From 328e79329af80977451b501a2880f016ba0801e2 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 17 Jan 2012 00:37:20 +0100 Subject: Support gray8a pam decoding. --- libavcodec/pnm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavcodec/pnm.c') diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index fa43c8d6e9..1defbc20e6 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -118,6 +118,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) } else { avctx->pix_fmt = PIX_FMT_GRAY16BE; } + } else if (depth == 2) { + if (maxval == 255) + avctx->pix_fmt = PIX_FMT_GRAY8A; } else if (depth == 3) { if (maxval < 256) { avctx->pix_fmt = PIX_FMT_RGB24; -- cgit v1.2.3