Skip to content
Snippets Groups Projects
Commit ae912c5b authored by Kostya Shishkov's avatar Kostya Shishkov
Browse files

PNG 16-bit gray decoding support

Originally committed as revision 6779 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 34380af0
Branches
Tags
No related merge requests found
...@@ -567,6 +567,9 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -567,6 +567,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) { s->color_type == PNG_COLOR_TYPE_GRAY) {
avctx->pix_fmt = PIX_FMT_GRAY8; avctx->pix_fmt = PIX_FMT_GRAY8;
} else if (s->bit_depth == 16 &&
s->color_type == PNG_COLOR_TYPE_GRAY) {
avctx->pix_fmt = PIX_FMT_GRAY16BE;
} else if (s->bit_depth == 1 && } else if (s->bit_depth == 1 &&
s->color_type == PNG_COLOR_TYPE_GRAY) { s->color_type == PNG_COLOR_TYPE_GRAY) {
avctx->pix_fmt = PIX_FMT_MONOBLACK; avctx->pix_fmt = PIX_FMT_MONOBLACK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment