Commit a0348d09 authored by Paul B Mahol's avatar Paul B Mahol

pnm: remove nonsense code

If maxval is more than 255 than each value takes 2 bytes with most
significant byte first.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent bf8f4db4
...@@ -163,8 +163,6 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) ...@@ -163,8 +163,6 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
if (s->maxval >= 256) { if (s->maxval >= 256) {
if (avctx->pix_fmt == AV_PIX_FMT_GRAY8) { if (avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
avctx->pix_fmt = AV_PIX_FMT_GRAY16BE; avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
if (s->maxval != 65535)
avctx->pix_fmt = AV_PIX_FMT_GRAY16;
} else if (avctx->pix_fmt == AV_PIX_FMT_RGB24) { } else if (avctx->pix_fmt == AV_PIX_FMT_RGB24) {
if (s->maxval > 255) if (s->maxval > 255)
avctx->pix_fmt = AV_PIX_FMT_RGB48BE; avctx->pix_fmt = AV_PIX_FMT_RGB48BE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment