From 3fe4540b0856438706553a511b43a8389dc07acb Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 14 Jan 2012 01:13:20 +0100 Subject: [PATCH] Support 64bit pam encoding. --- libavcodec/pamenc.c | 8 +++++++- libavcodec/version.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c index 20516c57ed..5ae6597653 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; } @@ -128,6 +134,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_RGBA, 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_RGBA, 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"), }; diff --git a/libavcodec/version.h b/libavcodec/version.h index d9267fee6c..6bde95c033 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -22,7 +22,7 @@ #define LIBAVCODEC_VERSION_MAJOR 53 #define LIBAVCODEC_VERSION_MINOR 55 -#define LIBAVCODEC_VERSION_MICRO 102 +#define LIBAVCODEC_VERSION_MICRO 103 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \