Verified Commit 4d406367 authored by Hector Martin's avatar Hector Martin Committed by Mark Harris
Browse files

fix equivalent bitrate calculation for <20ms frame sizes


Signed-off-by: Hector Martin's avatarHector Martin <marcan@marcan.st>
Signed-off-by: Mark Harris's avatarMark Harris <mark.hsj@gmail.com>
parent 8aa77672
Pipeline #1915 passed with stage
in 4 minutes and 59 seconds
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment