From e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe Mon Sep 17 00:00:00 2001
From: Vittorio Giovara <vittorio.giovara@gmail.com>
Date: Sun, 20 Jul 2014 22:54:27 +0100
Subject: [PATCH] png: support reading gray+alpha at 16 bits

---
 libavcodec/pngdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 0c4c91a6122..fa7f7cc0a62 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;
                 }
-- 
GitLab