diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-04 08:06:11 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-19 23:11:50 +0300 |
commit | 6fccb4b6159c9f54be8db8daaaa8d305bdfcbc33 (patch) | |
tree | 9c95cbd3aa518f4451d7ed2c675e74556b91f915 /celt/quant_bands.c | |
parent | b3c9e79a8291e85c0cd5f91b55d1e856edd95ac1 (diff) |
Adds some smoothing to the energy quantizationexp_lbr_tune
When the energy is stable, we slightly bias energy quantization towards
the previous error to make the gain more stable (a constant offset is
better than fluctuations).
We reduce the bitrate by about 0.2% to 1% at low bitrate for the same quality.
Diffstat (limited to 'celt/quant_bands.c')
-rw-r--r-- | celt/quant_bands.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/celt/quant_bands.c b/celt/quant_bands.c index 95076e0a..46777b38 100644 --- a/celt/quant_bands.c +++ b/celt/quant_bands.c @@ -418,6 +418,7 @@ void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *ol offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); #endif oldEBands[i+c*m->nbEBands] += offset; + error[i+c*m->nbEBands] -= offset; bits_left--; } while (++c < C); } |