aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-04 22:37:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-04 22:38:12 +0200
commit59412e3a0703222c8bc995a7deb883327b7a9c03 (patch)
treef641754c62b6a30a70c4f3d05a1f036e5be2f666
parente1795bc380896701dfbbf904a8089154aff04746 (diff)
parente64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe (diff)
downloadffmpeg-59412e3a0703222c8bc995a7deb883327b7a9c03.tar.gz
Merge commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe'
* commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe': png: support reading gray+alpha at 16 bits Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/pngdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 66a59ae8bd..92dc25a833 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -655,6 +655,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 {
av_log(avctx, AV_LOG_ERROR, "unsupported bit depth %d "
"and color type %d\n",