return -1;
/* note: realloc has been done, so reload tables */
table = &vlc->table[table_index];
- table[i][0] = index - table_index; //code
+ table[i][0] = index; //code
}
}
return table_index;
const void *codes, int codes_wrap, int codes_size);
void free_vlc(VLC *vlc);
-//note table will be trashed (pointer increased)
#define GET_VLC(code, name, gb, table, bits, max_depth)\
{\
int n, index, nb_bits;\
UPDATE_CACHE(name, gb)\
\
nb_bits = -n;\
- table += code;\
\
- index= SHOW_UBITS(name, gb, nb_bits);\
+ index= SHOW_UBITS(name, gb, nb_bits) + code;\
code = table[index][0];\
n = table[index][1];\
if(max_depth > 2 && n < 0){\
UPDATE_CACHE(name, gb)\
\
nb_bits = -n;\
- table += code;\
\
- index= SHOW_UBITS(name, gb, nb_bits);\
+ index= SHOW_UBITS(name, gb, nb_bits) + code;\
code = table[index][0];\
n = table[index][1];\
}\