mirror of
https://github.com/xiph/opus.git
synced 2025-06-06 07:21:03 +00:00
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>
This commit is contained in:
parent
8aa7767207
commit
4d40636748
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue