ref: ed7283089cd1b6e8e3913bcfa310647a7797c288
parent: cd78f3976ea44797a10486592880511227d31594
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Wed May 23 22:36:30 EDT 2018
Fix decision thresholds for larger frame sizes Don't assume that frames larger than 20 ms save any overhead compared to 20 ms.
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -808,7 +808,8 @@
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;