OSDN Git Service

Merge commit 'e8c0defe1322f0ff281d9bc5eee91fa1b712b6aa'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Aug 2013 09:43:26 +0000 (11:43 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Aug 2013 09:43:26 +0000 (11:43 +0200)
* commit 'e8c0defe1322f0ff281d9bc5eee91fa1b712b6aa':
  8bps: decode 24bit files correctly as rgb32 on bigendian

Conflicts:
libavcodec/8bps.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/8bps.c

@@@ -177,6 -176,12 +167,12 @@@ static av_cold int decode_init(AVCodecC
          return AVERROR_INVALIDDATA;
      }
  
 -        c->planemap[3] = HAVE_BIGENDIAN ? 0 : 3; // 4th plane is alpha???
+     if (avctx->pix_fmt == AV_PIX_FMT_RGB32) {
+         c->planemap[0] = HAVE_BIGENDIAN ? 1 : 2; // 1st plane is red
+         c->planemap[1] = HAVE_BIGENDIAN ? 2 : 1; // 2nd plane is green
+         c->planemap[2] = HAVE_BIGENDIAN ? 3 : 0; // 3rd plane is blue
++        c->planemap[3] = HAVE_BIGENDIAN ? 0 : 3; // 4th plane is alpha
+     }
      return 0;
  }