aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pamenc.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-01-08 20:22:17 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-01-08 20:22:17 +0100
commit73ddc5869d08e11d901fcc067943eb2695634492 (patch)
tree7d26c3ad01db82f9f00d3746372a9c8406f05d2b /libavcodec/pamenc.c
parentfac2a6fa0c581542cc85ebe7387bc15ea024d908 (diff)
downloadffmpeg-73ddc5869d08e11d901fcc067943eb2695634492.tar.gz
Support 48bit rgb pam encoding.
Diffstat (limited to 'libavcodec/pamenc.c')
-rw-r--r--libavcodec/pamenc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c
index d6f945e24c..44db009c26 100644
--- a/libavcodec/pamenc.c
+++ b/libavcodec/pamenc.c
@@ -86,6 +86,12 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf,
maxval = 255;
tuple_type = "RGB_ALPHA";
break;
+ case PIX_FMT_RGB48BE:
+ n = w * 6;
+ depth = 3;
+ maxval = 0xFFFF;
+ tuple_type = "RGB";
+ break;
default:
return -1;
}
@@ -134,6 +140,6 @@ AVCodec ff_pam_encoder = {
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode = pam_encode_frame,
- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_GRAY8A, PIX_FMT_GRAY16BE, PIX_FMT_MONOBLACK, PIX_FMT_NONE},
+ .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_RGB48BE, PIX_FMT_GRAY8, PIX_FMT_GRAY8A, PIX_FMT_GRAY16BE, PIX_FMT_MONOBLACK, PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
};