Browse Source

png: support reading gray+alpha at 16 bits

tags/n2.4
Vittorio Giovara 11 years ago
parent
commit
e64f0bf2d2
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/pngdec.c

+ 3
- 0
libavcodec/pngdec.c View File

@@ -500,6 +500,9 @@ static int decode_frame(AVCodecContext *avctx,
} else if (s->bit_depth == 8 &&
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
avctx->pix_fmt = AV_PIX_FMT_YA8;
} else if (s->bit_depth == 16 &&
s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
avctx->pix_fmt = AV_PIX_FMT_YA16BE;
} else {
goto fail;
}


Loading…
Cancel
Save