Merge commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 4 Aug 2014 20:37:17 +0000 (22:37 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 4 Aug 2014 20:38:12 +0000 (22:38 +0200)
* commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe':
  png: support reading gray+alpha at 16 bits

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

@@@ -655,10 -500,10 +655,13 @@@ static int decode_frame(AVCodecContext 
                  } else if (s->bit_depth == 8 &&
                             s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
                      avctx->pix_fmt = AV_PIX_FMT_YA8;
+                 } else if (s->bit_depth == 16 &&
+                            s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+                     avctx->pix_fmt = AV_PIX_FMT_YA16BE;
                  } else {
 +                    av_log(avctx, AV_LOG_ERROR, "unsupported bit depth %d "
 +                                                "and color type %d\n",
 +                                                 s->bit_depth, s->color_type);
                      goto fail;
                  }