diff mbox series

[FFmpeg-devel] lavc/opus: Reset alloc_trim when doing decoder bit-allocation

Message ID CAB0OVGqMim02=_kMSrgAhKGgDc7Nn1Kcagt6jfhyYcaHKTJuUQ@mail.gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] lavc/opus: Reset alloc_trim when doing decoder bit-allocation | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Carl Eugen Hoyos May 2, 2020, 8:14 a.m. UTC
Hi!

I believe attached patch fixes ticket #8649, a regression reported
yesterday on irc, I don't see anymore (and forgot) the irc name of the
original reporter, that's why it is missing in the ticket and the
patch.
Improvements for the commit message welcome.

Please comment, Carl Eugen

Comments

Carl Eugen Hoyos May 2, 2020, 8:18 a.m. UTC | #1
Am Sa., 2. Mai 2020 um 10:14 Uhr schrieb Carl Eugen Hoyos <ceffmpeg@gmail.com>:

> I believe attached patch fixes ticket #8649, a regression reported
> yesterday on irc, I don't see anymore (and forgot) the irc name of the
> original reporter, that's why it is missing in the ticket and the
> patch.
> Improvements for the commit message welcome.

irc name Xogium added to the commit message locally.

Carl Eugen
Lynne May 2, 2020, 8:49 a.m. UTC | #2
May 2, 2020, 09:14 by ceffmpeg@gmail.com:

> Hi!
>
> I believe attached patch fixes ticket #8649, a regression reported
> yesterday on irc, I don't see anymore (and forgot) the irc name of the
> original reporter, that's why it is missing in the ticket and the
> patch.
> Improvements for the commit message welcome.
>
> Please comment, Carl Eugen
>

LGTM
Carl Eugen Hoyos May 2, 2020, 8:52 a.m. UTC | #3
Am Sa., 2. Mai 2020 um 10:49 Uhr schrieb Lynne <dev@lynne.ee>:
>
> May 2, 2020, 09:14 by ceffmpeg@gmail.com:
>
> > Hi!
> >
> > I believe attached patch fixes ticket #8649, a regression reported
> > yesterday on irc, I don't see anymore (and forgot) the irc name of the
> > original reporter, that's why it is missing in the ticket and the
> > patch.
> > Improvements for the commit message welcome.
> >
> > Please comment, Carl Eugen
> >
>
> LGTM

Patch applied.

Thank you, Carl Eugen
diff mbox series

Patch

From b16b0ad02510259fe3ce536144eb8ddec4f65f7b Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sat, 2 May 2020 10:09:01 +0200
Subject: [PATCH] lavc/opus: Reset alloc_trim when doing decoder bit-allocation.

Fixes ticket #8649.
---
 libavcodec/opus.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/libavcodec/opus.c b/libavcodec/opus.c
index f74278a7e3..0e599783c3 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);
-- 
2.24.1