3 typedef unsigned int uint32_t;
4 typedef unsigned short uint16_t;
5 union unaligned_32
{ uint32_t l
; } __attribute__((packed
));
6 union unaligned_16
{ uint16_t l
; } __attribute__((packed
));
9 test_00 (unsigned char* buf
, int bits_per_component
)
11 (((union unaligned_32
*)(buf
))->l
) =
12 __builtin_bswap32 (bits_per_component
== 10 ? 1 : 0);
17 test_01 (unsigned char* buf
, int bits_per_component
)
19 (((union unaligned_16
*)(buf
))->l
) =
20 __builtin_bswap16 (bits_per_component
== 10 ? 1 : 0);