[FFmpeg-cvslog] png: support reading gray+alpha at 16 bits
Vittorio Giovara
git at videolan.org
Mon Aug 4 22:44:56 CEST 2014
ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Sun Jul 20 22:54:27 2014 +0100| [e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe] | committer: Vittorio Giovara
png: support reading gray+alpha at 16 bits
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe
---
libavcodec/pngdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 0c4c91a..fa7f7cc 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list