Refine rate estimate in trellis

Take into account cutoff parameter to switch between sets of contexts
for rate estimation in arithmetic coding version of trellis quantization
This commit is contained in:
Frank Bossen
2014-12-21 10:38:50 +01:00
parent 4802ddd7f7
commit 888d4075ee
3 changed files with 5 additions and 1 deletions

View File

@@ -940,6 +940,9 @@ jget_arith_rates (j_compress_ptr cinfo, int dc_tbl_no, int ac_tbl_no, arith_rate
{
int i;
arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy;
r->arith_ac_K = cinfo->arith_ac_K[ac_tbl_no];
for (i = 0; i < DC_STAT_BINS; i++) {
int state = entropy->dc_stats[dc_tbl_no][i];
int mps_val = state >> 7;