Revision 57c36bdc
libavutil/intreadwrite.h | ||
---|---|---|
25 | 25 |
|
26 | 26 |
/* |
27 | 27 |
* Arch-specific headers can provide any combination of |
28 |
* AV_[RW][BLN](16|32|64) macros. Preprocessor symbols must be |
|
28 |
* AV_[RW][BLN](16|24|32|64) macros. Preprocessor symbols must be
|
|
29 | 29 |
* defined, even if these are implemented as inline functions. |
30 | 30 |
*/ |
31 | 31 |
|
... | ... | |
249 | 249 |
# define AV_WL64(p, v) AV_WL(64, p, v) |
250 | 250 |
#endif |
251 | 251 |
|
252 |
#ifndef AV_RB24 |
|
252 | 253 |
#define AV_RB24(x) ((((const uint8_t*)(x))[0] << 16) | \ |
253 | 254 |
(((const uint8_t*)(x))[1] << 8) | \ |
254 | 255 |
((const uint8_t*)(x))[2]) |
256 |
#endif |
|
257 |
#ifndef AV_WB24 |
|
255 | 258 |
#define AV_WB24(p, d) do { \ |
256 | 259 |
((uint8_t*)(p))[2] = (d); \ |
257 | 260 |
((uint8_t*)(p))[1] = (d)>>8; \ |
258 | 261 |
((uint8_t*)(p))[0] = (d)>>16; } while(0) |
262 |
#endif |
|
259 | 263 |
|
264 |
#ifndef AV_RL24 |
|
260 | 265 |
#define AV_RL24(x) ((((const uint8_t*)(x))[2] << 16) | \ |
261 | 266 |
(((const uint8_t*)(x))[1] << 8) | \ |
262 | 267 |
((const uint8_t*)(x))[0]) |
268 |
#endif |
|
269 |
#ifndef AV_WL24 |
|
263 | 270 |
#define AV_WL24(p, d) do { \ |
264 | 271 |
((uint8_t*)(p))[0] = (d); \ |
265 | 272 |
((uint8_t*)(p))[1] = (d)>>8; \ |
266 | 273 |
((uint8_t*)(p))[2] = (d)>>16; } while(0) |
274 |
#endif |
|
267 | 275 |
|
268 | 276 |
#endif /* AVUTIL_INTREADWRITE_H */ |
Also available in: Unified diff