Merge commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe'

* commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe':
  png: support reading gray+alpha at 16 bits

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-04 22:37:17 +02:00
commit 59412e3a07
1 changed files with 3 additions and 0 deletions

View File

@ -655,6 +655,9 @@ static int decode_frame(AVCodecContext *avctx,
} 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",