}
if (rs == 0x00) {
// End of block.
- tbl->ac_table_codes[i] = AC_END_OF_BLOCK;
+ tbl->ac_table_codes[i] = 0;
tbl->ac_table_length[i] = length;
- tbl->ac_table_skip[i] = 0;
+ tbl->ac_table_skip[i] = 64;
continue;
}
if (rs == 0xf0) {
// 16 zero coefficients.
- tbl->ac_table_codes[i] = AC_SIXTEEN_ZEROS;
+ tbl->ac_table_codes[i] = 0;
tbl->ac_table_length[i] = length;
- tbl->ac_table_skip[i] = 15;
+ tbl->ac_table_skip[i] = 16;
continue;
}
tbl->ac_table_codes[i] = extend(bits, s);
tbl->ac_table_length[i] = length + s;
- tbl->ac_table_skip[i] = r;
+ tbl->ac_table_skip[i] = r + 1;
assert(tbl->ac_table_length[i] <= DEHUF_AC_TABLE_BITS);
}