[SCM] libav/experimental: png: Support rgb48 and rgba64 encoding
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Aug 10 16:02:12 UTC 2014
The following commit has been merged in the experimental branch:
commit cccac7654f3f6b82967bc6ae08b35ae8b4fbe1a9
Author: Carl Eugen Hoyos <cehoyos at ag.or.at>
Date: Sun Jan 15 22:04:25 2012 +0000
png: Support rgb48 and rgba64 encoding
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index ccc5f7d..a6015ff 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -245,6 +245,14 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
is_progressive = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
switch (avctx->pix_fmt) {
+ case AV_PIX_FMT_RGBA64BE:
+ bit_depth = 16;
+ color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+ break;
+ case AV_PIX_FMT_RGB48BE:
+ bit_depth = 16;
+ color_type = PNG_COLOR_TYPE_RGB;
+ break;
case AV_PIX_FMT_RGB32:
bit_depth = 8;
color_type = PNG_COLOR_TYPE_RGB_ALPHA;
@@ -482,7 +490,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_RGBA64BE, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_GRAY16BE,
AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
},
};
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list