1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Support 48bit rgb pam encoding.

This commit is contained in:
Carl Eugen Hoyos 2012-01-08 20:22:17 +01:00
parent fac2a6fa0c
commit 73ddc5869d

View File

@ -86,6 +86,12 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf,
maxval = 255; maxval = 255;
tuple_type = "RGB_ALPHA"; tuple_type = "RGB_ALPHA";
break; break;
case PIX_FMT_RGB48BE:
n = w * 6;
depth = 3;
maxval = 0xFFFF;
tuple_type = "RGB";
break;
default: default:
return -1; return -1;
} }
@ -134,6 +140,6 @@ AVCodec ff_pam_encoder = {
.priv_data_size = sizeof(PNMContext), .priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init, .init = ff_pnm_init,
.encode = pam_encode_frame, .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"), .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
}; };