Fix image byte extraction macros
This commit is contained in:
parent
ecfcf994c6
commit
2513b54e71
@ -21,11 +21,11 @@
|
||||
#define gdispImageGetVar(type, p, idx) (*(type *)(((uint8_t *)(p))+(idx)))
|
||||
#define gdispImageGetByte(type, p, idx, shift) (((type)gdispImageGetVar(uint8_t, p, idx))<<(shift))
|
||||
#define gdispImageSwap16(w) ((((uint16_t)(w))>>8)|(((uint16_t)(w))<<8))
|
||||
#define gdispImageSwap32(dw) ((((uint32_t)(w))>>24)|((((uint32_t)(w))&0x00FF0000)>>8)\
|
||||
|((((uint32_t)(w))&0x0000FF00)<<8)|(((uint32_t)(w))<<24))
|
||||
#define gdispImageSwapWords32(dw) ((((uint32_t)(w))>>16)|(((uint32_t)(w))<<16))
|
||||
#define gdispImageSwapBytes32(dw) (((((uint32_t)(w))&0xFF000000)>>8)|((((uint32_t)(w))&0x00FF0000)<<8)\
|
||||
|((((uint32_t)(w))&0x0000FF00)>>8)|(((uint32_t)(w))<<8))
|
||||
#define gdispImageSwap32(dw) ((((uint32_t)(dw))>>24)|((((uint32_t)(dw))&0x00FF0000)>>8)\
|
||||
|((((uint32_t)(dw))&0x0000FF00)<<8)|(((uint32_t)(dw))<<24))
|
||||
#define gdispImageSwapWords32(dw) ((((uint32_t)(dw))>>16)|(((uint32_t)(dw))<<16))
|
||||
#define gdispImageSwapBytes32(dw) (((((uint32_t)(dw))&0xFF000000)>>8)|((((uint32_t)(dw))&0x00FF0000)<<8)\
|
||||
|((((uint32_t)(dw))&0x0000FF00)>>8)|(((uint32_t)(dw))<<8))
|
||||
|
||||
/*
|
||||
* Get a uint16_t/uint32_t from memory in the required endianness.
|
||||
@ -120,7 +120,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user