Commit e64f0bf2 authored by Vittorio Giovara's avatar Vittorio Giovara

png: support reading gray+alpha at 16 bits

parent 2257165b
......@@ -500,6 +500,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 {
goto fail;
}
......
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