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>2023-12-02 11:40:00 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2023-12-05 11:19:13 +0300
commit6598838b6ffa63d003dc2b6e2430478361a8e8bf (patch)
treeb214943d02984ca311f96e7d7d8dda9fd7a8419e
parentc390e1ac583e3bb6b33bd9dbc9185c2896db98a3 (diff)
CBR tuningexp_lowbitrate2
-rw-r--r--silk/float/encode_frame_FLP.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/silk/float/encode_frame_FLP.c b/silk/float/encode_frame_FLP.c
index 5e317cc1..4ee55921 100644
--- a/silk/float/encode_frame_FLP.c
+++ b/silk/float/encode_frame_FLP.c
@@ -246,6 +246,10 @@ opus_int silk_encode_frame_FLP(
if( iter == 0 && (useCBR == 1 || nBits > maxBits) ) {
*excess = nBits - maxBits;
+ /* For CBR, aim a little below the target to increase our chances. */
+ if ( useCBR ) {
+ *excess += 20;
+ }
}
if( useCBR == 0 && iter == 0 && nBits <= maxBits ) {
break;