diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-05-24 02:36:30 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2018-05-24 02:36:30 -0400 |
commit | ed7283089cd1b6e8e3913bcfa310647a7797c288 (patch) | |
tree | 71713c7d6334d4c553917b63cd3be528e21e6bfb | |
parent | cd78f3976ea44797a10486592880511227d31594 (diff) | |
download | opus-exp_bandwidth_fix3.tar.gz |
Fix decision thresholds for larger frame sizesexp_bandwidth_fix3
Don't assume that frames larger than 20 ms save any overhead compared to 20 ms.
-rw-r--r-- | src/opus_encoder.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c index e6cca901..47b586a1 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -808,7 +808,8 @@ static opus_int32 compute_equiv_rate(opus_int32 bitrate, int channels, opus_int32 equiv; equiv = bitrate; /* Take into account overhead from smaller frames. */ - equiv -= (40*channels+20)*(frame_rate - 50); + if (frame_rate > 50) + equiv -= (40*channels+20)*(frame_rate - 50); /* CBR is about a 8% penalty for both SILK and CELT. */ if (!vbr) equiv -= equiv/12; |