[FFmpeg-devel] [PATCH]lavc/dds: Fix GRAY8A decoding

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Apr 14 22:50:53 CEST 2016


Paul B Mahol <onemda <at> gmail.com> writes:

> > +        else if (bpp == 16 && r == 0xff00 && g == 0 && 
> b == 0 && a == 0xff) {
> > +            avctx->pix_fmt = AV_PIX_FMT_YA8;
> > +            ctx->postproc = DDS_SWAP_ALPHA;
> 
> Why? You disabled postproc lines bellow.

I don't understand this comment:
For GRAY8A, postproc depends on the exact mask.

> > diff --git a/tests/ref/fate/dds-ya b/tests/ref/fate/dds-ya
> > index d6527c6..01f7894 100644
> > --- a/tests/ref/fate/dds-ya
> > +++ b/tests/ref/fate/dds-ya
> >  <at>  <at>  -1,2 +1,2  <at>  <at> 
> >  #tb 0: 1/25
> > -0,          0,          0,        1,    28160, 0xd3981fcb
> > +0,          0,          0,        1,    28160, 0x5aa41fcb
> 
> I believe this shouldn't change

I tend to disagree.

> do you have explanation why it should change?

Because I believe it is wrong.

More important though: Why do you believe it is correct? 
Neither does the current code look correct nor do any of 
the two available samples look correct without the change.

Carl Eugen



More information about the ffmpeg-devel mailing list