Browse Source

PNG 16-bit gray decoding support

Originally committed as revision 6779 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Kostya Shishkov 18 years ago
parent
commit
ae912c5b62
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/png.c

+ 3
- 0
libavcodec/png.c View File

@@ -567,6 +567,9 @@ static int decode_frame(AVCodecContext *avctx,
} else if (s->bit_depth == 8 &&
s->color_type == PNG_COLOR_TYPE_GRAY) {
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 &&
s->color_type == PNG_COLOR_TYPE_GRAY) {
avctx->pix_fmt = PIX_FMT_MONOBLACK;


Loading…
Cancel
Save