comparison arm/bswap.h @ 603:880c6441f56a libavutil

Change semantic of CONFIG_*, HAVE_* and ARCH_*. They are now always defined to either 0 or 1.
author aurel
date Tue, 13 Jan 2009 23:44:16 +0000
parents 57da90f7c680
children d27f2ec2810b
comparison
equal deleted inserted replaced
602:0b84593767d8 603:880c6441f56a
21 21
22 #include <stdint.h> 22 #include <stdint.h>
23 #include "config.h" 23 #include "config.h"
24 #include "libavutil/common.h" 24 #include "libavutil/common.h"
25 25
26 #ifdef HAVE_ARMV6 26 #if HAVE_ARMV6
27 #define bswap_16 bswap_16 27 #define bswap_16 bswap_16
28 static av_always_inline av_const uint16_t bswap_16(uint16_t x) 28 static av_always_inline av_const uint16_t bswap_16(uint16_t x)
29 { 29 {
30 __asm__("rev16 %0, %0" : "+r"(x)); 30 __asm__("rev16 %0, %0" : "+r"(x));
31 return x; 31 return x;
33 #endif 33 #endif
34 34
35 #define bswap_32 bswap_32 35 #define bswap_32 bswap_32
36 static av_always_inline av_const uint32_t bswap_32(uint32_t x) 36 static av_always_inline av_const uint32_t bswap_32(uint32_t x)
37 { 37 {
38 #ifdef HAVE_ARMV6 38 #if HAVE_ARMV6
39 __asm__("rev %0, %0" : "+r"(x)); 39 __asm__("rev %0, %0" : "+r"(x));
40 #else 40 #else
41 uint32_t t; 41 uint32_t t;
42 __asm__ ("eor %1, %0, %0, ror #16 \n\t" 42 __asm__ ("eor %1, %0, %0, ror #16 \n\t"
43 "bic %1, %1, #0xFF0000 \n\t" 43 "bic %1, %1, #0xFF0000 \n\t"