diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-01-22 01:49:04 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-01-22 01:49:04 +0100 |
commit | 6c559a0a9d3e8eb10e2b92b6793e11038ab86fcf (patch) | |
tree | 02da8b08d7cac832f1d8f9194ea3e1fb6bee47f3 /libavcodec/pnm.c | |
parent | 196dd72bcfe073a77be5fd55a69de61d54a3a2dc (diff) | |
download | ffmpeg-6c559a0a9d3e8eb10e2b92b6793e11038ab86fcf.tar.gz |
lavc/pnm: Support decoding ya16.
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r-- | libavcodec/pnm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 502e550097..1675959fbf 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -122,8 +122,11 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) avctx->pix_fmt = AV_PIX_FMT_GRAY16; } } else if (depth == 2) { - if (maxval == 255) + if (maxval < 256) { avctx->pix_fmt = AV_PIX_FMT_GRAY8A; + } else { + avctx->pix_fmt = AV_PIX_FMT_YA16; + } } else if (depth == 3) { if (maxval < 256) { avctx->pix_fmt = AV_PIX_FMT_RGB24; |