aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-01-22 01:33:05 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-01-22 01:33:05 +0100
commitc6a36f693153cc37bd993fafdaeb01ffcdb79725 (patch)
tree586d3b1bcc64a34bc71e4655bcc0aa3fceec61af /libavcodec
parentf845ae0c8ed8c6761a5372954aff5f82b1c87cbf (diff)
downloadffmpeg-c6a36f693153cc37bd993fafdaeb01ffcdb79725.tar.gz
lavc/pngenc: Support encoding ya16be.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pngenc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 401b1a2611..ef33332179 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -275,6 +275,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bit_depth = 8;
color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
break;
+ case AV_PIX_FMT_YA16BE:
+ bit_depth = 16;
+ color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
+ break;
case AV_PIX_FMT_MONOBLACK:
bit_depth = 1;
color_type = PNG_COLOR_TYPE_GRAY;
@@ -533,7 +537,7 @@ AVCodec ff_png_encoder = {
AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGBA64BE,
AV_PIX_FMT_PAL8,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A,
- AV_PIX_FMT_GRAY16BE,
+ AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_YA16BE,
AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
},
.priv_class = &pngenc_class,