Browse Source

Allow decoding of 64bit png images.

Fixes a part of ticket #639.
tags/n0.11
Carl Eugen Hoyos 13 years ago
parent
commit
97da38c99b
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/pngdec.c

+ 3
- 0
libavcodec/pngdec.c View File

@@ -485,6 +485,9 @@ static int decode_frame(AVCodecContext *avctx,
} else if (s->bit_depth == 16 && } else if (s->bit_depth == 16 &&
s->color_type == PNG_COLOR_TYPE_RGB) { s->color_type == PNG_COLOR_TYPE_RGB) {
avctx->pix_fmt = PIX_FMT_RGB48BE; avctx->pix_fmt = PIX_FMT_RGB48BE;
} else if (s->bit_depth == 16 &&
s->color_type == PNG_COLOR_TYPE_RGB_ALPHA) {
avctx->pix_fmt = PIX_FMT_RGBA64BE;
} else if (s->color_type == PNG_COLOR_TYPE_PALETTE) { } else if (s->color_type == PNG_COLOR_TYPE_PALETTE) {
avctx->pix_fmt = PIX_FMT_PAL8; avctx->pix_fmt = PIX_FMT_PAL8;
} else if (s->bit_depth == 1) { } else if (s->bit_depth == 1) {


Loading…
Cancel
Save