Support gray8a pam decoding.
This commit is contained in:
parent
dc2f652ae4
commit
328e79329a
@ -118,6 +118,9 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
|
|||||||
} else {
|
} else {
|
||||||
avctx->pix_fmt = PIX_FMT_GRAY16BE;
|
avctx->pix_fmt = PIX_FMT_GRAY16BE;
|
||||||
}
|
}
|
||||||
|
} else if (depth == 2) {
|
||||||
|
if (maxval == 255)
|
||||||
|
avctx->pix_fmt = PIX_FMT_GRAY8A;
|
||||||
} else if (depth == 3) {
|
} else if (depth == 3) {
|
||||||
if (maxval < 256) {
|
if (maxval < 256) {
|
||||||
avctx->pix_fmt = PIX_FMT_RGB24;
|
avctx->pix_fmt = PIX_FMT_RGB24;
|
||||||
|
@ -75,6 +75,11 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
if (s->maxval < 255)
|
if (s->maxval < 255)
|
||||||
upgrade = 1;
|
upgrade = 1;
|
||||||
goto do_read;
|
goto do_read;
|
||||||
|
case PIX_FMT_GRAY8A:
|
||||||
|
n = avctx->width * 2;
|
||||||
|
components=2;
|
||||||
|
sample_len=8;
|
||||||
|
goto do_read;
|
||||||
case PIX_FMT_GRAY16BE:
|
case PIX_FMT_GRAY16BE:
|
||||||
case PIX_FMT_GRAY16LE:
|
case PIX_FMT_GRAY16LE:
|
||||||
n = avctx->width * 2;
|
n = avctx->width * 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user