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@amazon.com>2023-07-11 00:43:33 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-07-11 00:43:33 +0300
commit831d02702a0328f905a807dcdc32bffe71675eed (patch)
tree6eeda0e74a900e2726399d7d961f83108af097f3
parent7e1e33e62b9ff0204cf0b0df0f9a7ec8979e03cb (diff)
Properly account for SILK bits in CELT CBR codedred_bitrate2
CELT encoding would just fail when setting CELT to CBR in hybrid mode. It was never a problem because hybrid CBR was always used with OPUS_BITRATE_MAX.
-rw-r--r--celt/celt_encoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index 637d442c..d8df7e78 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1565,7 +1565,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
vbr_rate = 0;
tmp = st->bitrate*frame_size;
if (tell>1)
- tmp += tell;
+ tmp += tell*mode->Fs;
if (st->bitrate!=OPUS_BITRATE_MAX)
nbCompressedBytes = IMAX(2, IMIN(nbCompressedBytes,
(tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling));