Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2017-06-02 22:16:24 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2017-06-02 22:16:24 +0300
commitf26afaa60dfa4c71426e56f537567d811b766c9e (patch)
tree0488d172080a892bd35831ea685dbc3732050fd5
parentc2d32337ec880de1ed4b37f02e642bba154ef655 (diff)
Recalibrate VBR to hit target bitrate on average
-rw-r--r--celt/celt_encoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index 594d63ba..6c5e9e1c 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1283,7 +1283,7 @@ static int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32
/* Boost the rate according to dynalloc (minus the dynalloc average for calibration). */
target += tot_boost-(19<<LM);
/* Apply transient boost, compensating for average boost. */
- tf_calibration = QCONST16(0.04f,14);
+ tf_calibration = QCONST16(0.044f,14);
target += (opus_int32)SHL32(MULT16_32_Q15(tf_estimate-tf_calibration, target),1);
#ifndef DISABLE_FLOAT_API
@@ -1294,7 +1294,7 @@ static int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32
float tonal;
/* Tonality boost (compensating for the average). */
- tonal = MAX16(0.f,analysis->tonality-.15f)-0.09f;
+ tonal = MAX16(0.f,analysis->tonality-.15f)-0.12f;
tonal_target = target + (opus_int32)((coded_bins<<BITRES)*1.2f*tonal);
if (pitch_change)
tonal_target += (opus_int32)((coded_bins<<BITRES)*.8f);