aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/png.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-10-24 04:59:46 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-10-24 04:59:46 +0000
commitae912c5b622df55a229502e8b2742a0625373f21 (patch)
tree9f6d389664c09e78fd9de1f5b6c490c7d04614c6 /libavcodec/png.c
parent34380af0e1c837e116d12e57155a7057bf3b872b (diff)
downloadffmpeg-ae912c5b622df55a229502e8b2742a0625373f21.tar.gz
PNG 16-bit gray decoding support
Originally committed as revision 6779 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/png.c')
-rw-r--r--libavcodec/png.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/png.c b/libavcodec/png.c
index 6d588c35a8..a257492b7c 100644
--- a/libavcodec/png.c
+++ b/libavcodec/png.c
@@ -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;