mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
Support gray8a pam encoding.
This commit is contained in:
parent
490c97bdf5
commit
03d7d8faef
@ -62,6 +62,12 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf,
|
||||
maxval = 255;
|
||||
tuple_type = "GRAYSCALE";
|
||||
break;
|
||||
case PIX_FMT_GRAY8A:
|
||||
n = w * 2;
|
||||
depth = 2;
|
||||
maxval = 255;
|
||||
tuple_type = "GRAYSCALE_ALPHA";
|
||||
break;
|
||||
case PIX_FMT_RGB24:
|
||||
n = w * 3;
|
||||
depth = 3;
|
||||
@ -122,6 +128,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_MONOBLACK, PIX_FMT_NONE},
|
||||
.pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_GRAY8A, PIX_FMT_MONOBLACK, PIX_FMT_NONE},
|
||||
.long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user