diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-01-08 20:20:29 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-01-08 20:20:29 +0100 |
commit | fac2a6fa0c581542cc85ebe7387bc15ea024d908 (patch) | |
tree | d1dab30dbd80b7a02fb016ad3aaa8b8687abd4cb /libavcodec/pamenc.c | |
parent | 2f21c5078438665e8d1b0388d3a44067366fbbe2 (diff) | |
download | ffmpeg-fac2a6fa0c581542cc85ebe7387bc15ea024d908.tar.gz |
Support 16bit gray pam encoding.
Diffstat (limited to 'libavcodec/pamenc.c')
-rw-r--r-- | libavcodec/pamenc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c index e69c53f72a..d6f945e24c 100644 --- a/libavcodec/pamenc.c +++ b/libavcodec/pamenc.c @@ -62,6 +62,12 @@ static int pam_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, maxval = 255; tuple_type = "GRAYSCALE"; break; + case PIX_FMT_GRAY16BE: + n = w * 2; + depth = 1; + maxval = 0xFFFF; + tuple_type = "GRAYSCALE"; + break; case PIX_FMT_GRAY8A: n = w * 2; depth = 2; @@ -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_RGB32, PIX_FMT_GRAY8, PIX_FMT_GRAY8A, 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_GRAY16BE, PIX_FMT_MONOBLACK, PIX_FMT_NONE}, .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), }; |