diff options
author | Ian Taylor <ibtaylor@gmail.com> | 2013-08-12 22:02:55 -0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-08-13 06:05:44 +0200 |
commit | 46dee21a3238a5d9dfeeb1108dbad0beaa677035 (patch) | |
tree | 2a6b8dced1b37521491716f6115fafde2c340ed0 | |
parent | 3ca5df36a50e3ffd3b24734725bf545617a627a8 (diff) | |
download | ffmpeg-streaming-46dee21a3238a5d9dfeeb1108dbad0beaa677035.zip ffmpeg-streaming-46dee21a3238a5d9dfeeb1108dbad0beaa677035.tar.gz |
png: allow encoding 16-bit grayscale
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavcodec/pngenc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index 7f601ca..37910a1 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -255,6 +255,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, bit_depth = 8; color_type = PNG_COLOR_TYPE_RGB; break; + case AV_PIX_FMT_GRAY16BE: + bit_depth = 16; + color_type = PNG_COLOR_TYPE_GRAY; + break; case AV_PIX_FMT_GRAY8: bit_depth = 8; color_type = PNG_COLOR_TYPE_GRAY; @@ -460,6 +464,7 @@ AVCodec ff_png_encoder = { .encode2 = encode_frame, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB32, AV_PIX_FMT_PAL8, AV_PIX_FMT_GRAY8, + AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"), |