comparison intreadwrite.h @ 231:33b71496b63b libavutil

rename BE/LE_8/16/32 to AV_RL/B_8/16/32
author alex
date Fri, 19 Jan 2007 22:12:59 +0000
parents 5b211d03227b
children 9845a508ffbd
comparison
equal deleted inserted replaced
230:4c85ac99ab37 231:33b71496b63b
24 #define ST32(a, b) *((uint32_t*)(a)) = (b) 24 #define ST32(a, b) *((uint32_t*)(a)) = (b)
25 25
26 #endif /* !__GNUC__ */ 26 #endif /* !__GNUC__ */
27 27
28 /* endian macros */ 28 /* endian macros */
29 #if !defined(BE_16) || !defined(BE_32) || !defined(LE_16) || !defined(LE_32) 29 #if !defined(AV_RB16) || !defined(AV_RB32) || !defined(AV_RL16) || !defined(AV_RL32)
30 #define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) 30 #define AV_RB16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])
31 #define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \ 31 #define AV_RB32(x) ((((uint8_t*)(x))[0] << 24) | \
32 (((uint8_t*)(x))[1] << 16) | \ 32 (((uint8_t*)(x))[1] << 16) | \
33 (((uint8_t*)(x))[2] << 8) | \ 33 (((uint8_t*)(x))[2] << 8) | \
34 ((uint8_t*)(x))[3]) 34 ((uint8_t*)(x))[3])
35 #define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0]) 35 #define AV_RL16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
36 #define LE_32(x) ((((uint8_t*)(x))[3] << 24) | \ 36 #define AV_RL32(x) ((((uint8_t*)(x))[3] << 24) | \
37 (((uint8_t*)(x))[2] << 16) | \ 37 (((uint8_t*)(x))[2] << 16) | \
38 (((uint8_t*)(x))[1] << 8) | \ 38 (((uint8_t*)(x))[1] << 8) | \
39 ((uint8_t*)(x))[0]) 39 ((uint8_t*)(x))[0])
40 #endif 40 #endif
41 41