#define GET_DATA(v, table, i, wrap, size) \
{\
- const uint8_t *ptr = (const uint8_t *)table + i * wrap;\
- switch(size) {\
- case 1:\
- v = *(const uint8_t *)ptr;\
- break;\
- case 2:\
- v = *(const uint16_t *)ptr;\
- break;\
- default:\
- v = *(const uint32_t *)ptr;\
- break;\
- }\
+ const uint8_t *ptr = (const uint8_t *)table + i * wrap; \
+ switch (size) { \
+ case 1: \
+ v = *(const uint8_t *)ptr; \
+ break; \
+ case 2: \
+ v = *(const uint16_t *)ptr; \
+ break; \
+ default: \
+ v = *(const uint32_t *)ptr; \
+ break; \
+ } \
}
static int alloc_table(struct vlc *vlc, int size)
* \param bits_wrap The number of bytes between each entry of the
* 'bits' or 'codes' tables.
*
- *
* \param bits_size The number of bytes of each entry of the
* 'bits' or 'codes' tables.
*
* \param codes_wrap Same as bits_wrap but uses the 'codes' table.
+ *
* \param codes_size Same as bits_size but for the 'codes' table.
*
* The wrap and size parameters allow to use any memory configuration and