On 2012-01-05 08:57:53 -0800, Ronald S. Bultje wrote:
> Hi,
> 
> On Thu, Jan 5, 2012 at 8:50 AM, Janne Grunau <janne-li...@jannau.net> wrote:
> > On 2012-01-03 14:32:34 +0100, Janne Grunau wrote:
> >> Fixes a regression introduced in 8b94df0f2047e972.
> >> ---
> >>  libavcodec/vp3.c |    2 ++
> >>  1 files changed, 2 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
> >> index f44d084..602b5fa 100644
> >> --- a/libavcodec/vp3.c
> >> +++ b/libavcodec/vp3.c
> >> @@ -1378,6 +1378,8 @@ static inline int vp3_dequant(Vp3DecodeContext *s, 
> >> Vp3Fragment *frag,
> >>              return i;
> >>          }
> >>      } while (i < 64);
> >> +    // return value is expected to be a valid level
> >> +    i--;
> >>  end:
> >>      // the actual DC+prediction is in the fragment structure
> >>      block[0] = frag->dc * s->qmat[0][inter][plane][0];
> >
> > ping
> 
> Why not just return i - 1?

that would return -1 instead of 0 if the first token & 3 is 0

Not sure if that is a valid thing but it changes behavior of vp3_dequant
and we test if the return value is < 0

Janne
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to