Commit 59412e3a authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e64f0bf2'

* commit 'e64f0bf2':
  png: support reading gray+alpha at 16 bits
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents e1795bc3 e64f0bf2
...@@ -655,6 +655,9 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -655,6 +655,9 @@ static int decode_frame(AVCodecContext *avctx,
} else if (s->bit_depth == 8 && } else if (s->bit_depth == 8 &&
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
avctx->pix_fmt = AV_PIX_FMT_YA8; 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 { } else {
av_log(avctx, AV_LOG_ERROR, "unsupported bit depth %d " av_log(avctx, AV_LOG_ERROR, "unsupported bit depth %d "
"and color type %d\n", "and color type %d\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment