diff options
author | Hector Martin <marcan@marcan.st> | 2020-05-25 20:30:04 +0900 |
---|---|---|
committer | Mark Harris <mark.hsj@gmail.com> | 2020-05-25 21:45:31 -0700 |
commit | 4d40636748da8aefd2e17b18c6897199838af77f (patch) | |
tree | 62559d159cfb38bba9c51d6f8a1f5ea4ff9b94b0 /celt | |
parent | 8aa7767207b1e3633004c26aecbb67d1c5118485 (diff) | |
download | opus-4d40636748da8aefd2e17b18c6897199838af77f.tar.gz |
fix equivalent bitrate calculation for <20ms frame sizes
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Diffstat (limited to 'celt')
-rw-r--r-- | celt/celt_encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c index 44cb0850..d6f8afc2 100644 --- a/celt/celt_encoder.c +++ b/celt/celt_encoder.c @@ -1571,7 +1571,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, (tmp+4*mode->Fs)/(8*mode->Fs)-!!st->signalling)); effectiveBytes = nbCompressedBytes - nbFilledBytes; } - equiv_rate = ((opus_int32)nbCompressedBytes*8*50 >> (3-LM)) - (40*C+20)*((400>>LM) - 50); + equiv_rate = ((opus_int32)nbCompressedBytes*8*50 << (3-LM)) - (40*C+20)*((400>>LM) - 50); if (st->bitrate != OPUS_BITRATE_MAX) equiv_rate = IMIN(equiv_rate, st->bitrate - (40*C+20)*((400>>LM) - 50)); |