if (vlc->table_size > vlc->table_allocated) {
vlc->table_allocated += (1 << vlc->bits);
vlc->table = para_realloc(vlc->table,
- sizeof(VLC_TYPE) * 2 * vlc->table_allocated);
+ sizeof(int16_t) * 2 * vlc->table_allocated);
}
}
{
int i, j, k, n, table_size, table_index, nb, n1, idx;
uint32_t code;
- VLC_TYPE(*table)[2];
+ int16_t (*table)[2];
table_size = 1 << table_nb_bits;
table_index = vlc->table_size;
*
* \return The vlc code.
*/
-int get_vlc(struct getbit_context *gbc, VLC_TYPE(*table)[2], int bits)
+int get_vlc(struct getbit_context *gbc, int16_t (*table)[2], int bits)
{
int n, idx, nb_bits, code;
int index;
};
-#define VLC_TYPE int16_t
-
/** A variable length code table. */
struct vlc {
/** Number of bits of the table. */
int bits;
/** The code and the bits table. */
- VLC_TYPE(*table)[2];
+ int16_t (*table)[2];
/** The size of the table. */
int table_size;
/** Amount of memory allocated so far. */
void init_vlc(struct vlc *vlc, int nb_bits, int nb_codes, const void *bits,
const void *codes, int codes_size);
void free_vlc(struct vlc *vlc);
-int get_vlc(struct getbit_context *gbc, VLC_TYPE(*table)[2], int bits);
+int get_vlc(struct getbit_context *gbc, int16_t (*table)[2], int bits);