diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-07-25 01:32:29 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-07-25 01:32:29 -0400 |
commit | 4044ea8a1daac0b91166603a0ad8c5cccb70f708 (patch) | |
tree | 18fbc0d760a78f32c8520b2f4659b4a860f17b3b /celt/celt.c | |
parent | bfabfd383dee7784aff30c4ed0343b54dc7cbabd (diff) | |
download | opus-4044ea8a1daac0b91166603a0ad8c5cccb70f708.tar.gz |
VBR tuning: increases transient and dynalloc boost
This only increases the average rate by about 1.5 kb/s, but it
restores the high quality of transients from 1.0. Also it
ensures that dynalloc can never starve other bands when used
aggressively.
Diffstat (limited to 'celt/celt.c')
-rw-r--r-- | celt/celt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/celt/celt.c b/celt/celt.c index 91c4c962..370772db 100644 --- a/celt/celt.c +++ b/celt/celt.c @@ -411,7 +411,7 @@ static int transient_analysis(const opus_val32 * restrict in, int len, int C, } } /* *tf_estimate = 1 + MIN16(1, sqrt(MAX16(0, tf_max-30))/20); */ - *tf_estimate = QCONST16(1.f, 14) + celt_sqrt(MAX16(0, SHL32(MULT16_16(QCONST16(0.0025f,14),IMIN(420,tf_max)),14)-QCONST32(0.075f,28))); + *tf_estimate = QCONST16(1.f, 14) + celt_sqrt(MAX16(0, SHL32(MULT16_16(QCONST16(0.0069,14),IMIN(163,tf_max)),14)-QCONST32(0.139,28))); RESTORE_STACK; #ifdef FUZZING @@ -1641,7 +1641,7 @@ int celt_encode_with_ec(CELTEncoder * restrict st, const opus_val16 * pcm, int f /* Compensates for the average tonality boost */ target -= MULT16_16_Q15(QCONST16(0.13f,15),coded_bins<<BITRES); /* Limits starving of other bands when using dynalloc */ - target += IMAX(0,tot_boost-100)/2; + target += tot_boost; /* Compensates for the average transient boost */ target = MULT16_32_Q15(QCONST16(0.96f,15),target); |