[FFmpeg-devel] [PATCH]Support writing 64bit pam
Carl Eugen Hoyos
cehoyos at ag.or.at
Thu Jan 12 01:51:33 CET 2012
Hi!
Attached patch allows to reencode the 64bit png sample to pam on be.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c
index 44db009..02ad6b5 100644
--- a/libavcodec/pamenc.c
+++ b/libavcodec/pamenc.c
@@ -92,6 +92,12 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf,
maxval = 0xFFFF;
tuple_type = "RGB";
break;
+ case PIX_FMT_RGBA64BE:
+ n = w * 8;
+ depth = 4;
+ maxval = 0xFFFF;
+ tuple_type = "RGB_ALPHA";
+ break;
default:
return -1;
}
@@ -140,6 +146,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_RGB48BE, 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_RGBA64BE, 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"),
};
More information about the ffmpeg-devel
mailing list