Support gray8a pam decoding.

This commit is contained in:
Carl Eugen Hoyos
2012-01-17 00:37:20 +01:00
parent dc2f652ae4
commit 328e79329a
2 changed files with 8 additions and 0 deletions

View File

@ -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;