[FFmpeg-cvslog] lavc/opus: Reset alloc_trim when doing decoder bit-allocation.
Carl Eugen Hoyos
git at videolan.org
Sat May 2 11:53:14 EEST 2020
ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sat May 2 10:09:01 2020 +0200| [0d81edcbba5149e46b11d447790f3a57a6eaa635] | committer: Carl Eugen Hoyos
lavc/opus: Reset alloc_trim when doing decoder bit-allocation.
Fixes ticket #8649.
Reported-by: irc user Xogium
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d81edcbba5149e46b11d447790f3a57a6eaa635
---
libavcodec/opus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/opus.c b/libavcodec/opus.c
index f74278a7e3..64de246720 100644
--- a/libavcodec/opus.c
+++ b/libavcodec/opus.c
@@ -613,6 +613,8 @@ void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode)
}
/* Allocation trim */
+ if (!encode)
+ f->alloc_trim = 5;
if (opus_rc_tell_frac(rc) + (6 << 3) <= tbits_8ths)
if (encode)
ff_opus_rc_enc_cdf(rc, f->alloc_trim, ff_celt_model_alloc_trim);
More information about the ffmpeg-cvslog
mailing list