[FFmpeg-devel] [PATCH] vp9: fix bug in updating of coef probabilities with parallelmode=1.

Michael Niedermayer michaelni at gmx.at
Tue Dec 24 12:06:32 CET 2013


On Tue, Dec 24, 2013 at 10:56:49AM +0100, Clément Bœsch wrote:
> On Mon, Dec 23, 2013 at 09:41:35PM -0500, Ronald S. Bultje wrote:
> > Fixes trac 3228.
> > ---
> >  libavcodec/vp9.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> > index a52924c..88c5bc6 100644
> > --- a/libavcodec/vp9.c
> > +++ b/libavcodec/vp9.c
> > @@ -3547,13 +3547,16 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
> >      if (s->refreshctx && s->parallelmode) {
> >          int j, k, l, m;
> >  
> > -        for (i = 0; i < 4; i++)
> > +        for (i = 0; i < 4; i++) {
> >              for (j = 0; j < 2; j++)
> >                  for (k = 0; k < 2; k++)
> >                      for (l = 0; l < 6; l++)
> >                          for (m = 0; m < 6; m++)
> >                              memcpy(s->prob_ctx[s->framectxid].coef[i][j][k][l][m],
> >                                     s->prob.coef[i][j][k][l][m], 3);
> > +            if (s->txfmmode == i)
> > +                break;
> > +        }
> 
> I tested with some other samples, output looks ok, no valgrind complain
> (if we strip out the current weird stack bug).
> 
> little nit: we could probably just change the loop into
> -        for (i = 0; i < 4; i++)
> +        for (i = 0; i < 4 && i <= s->txfmmode; i++)
> 
> ...but I'm assuming you're just getting consistent with the coeff updates
> code.
> 

> Patch is fine anyway.

applied

thanks

PS: feel free to flame me if i was supposed to wait with pushing until
    after the txfmmode nit is decided

PS2: merry christmess

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131224/57ffa917/attachment.asc>


More information about the ffmpeg-devel mailing list