avcodec/pnmdec: support more pnm files
Fixes Ticket1897 Some hunks that have become unneeded due to previous changes removed by the commiter. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
62738157dd
commit
34d48dac25
@ -66,11 +66,15 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
n = avctx->width * 8;
|
n = avctx->width * 8;
|
||||||
components=4;
|
components=4;
|
||||||
sample_len=16;
|
sample_len=16;
|
||||||
|
if (s->maxval < 65535)
|
||||||
|
upgrade = 2;
|
||||||
goto do_read;
|
goto do_read;
|
||||||
case AV_PIX_FMT_RGB48:
|
case AV_PIX_FMT_RGB48:
|
||||||
n = avctx->width * 6;
|
n = avctx->width * 6;
|
||||||
components=3;
|
components=3;
|
||||||
sample_len=16;
|
sample_len=16;
|
||||||
|
if (s->maxval < 65535)
|
||||||
|
upgrade = 2;
|
||||||
goto do_read;
|
goto do_read;
|
||||||
case AV_PIX_FMT_RGBA:
|
case AV_PIX_FMT_RGBA:
|
||||||
n = avctx->width * 4;
|
n = avctx->width * 4;
|
||||||
@ -81,6 +85,8 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
n = avctx->width * 3;
|
n = avctx->width * 3;
|
||||||
components=3;
|
components=3;
|
||||||
sample_len=8;
|
sample_len=8;
|
||||||
|
if (s->maxval < 255)
|
||||||
|
upgrade = 1;
|
||||||
goto do_read;
|
goto do_read;
|
||||||
case AV_PIX_FMT_GRAY8:
|
case AV_PIX_FMT_GRAY8:
|
||||||
n = avctx->width;
|
n = avctx->width;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user