[FFmpeg-cvslog] Support 16bpp grayscale pam decoding.
Alexander Strasser
eclipse7 at gmx.net
Sat Jan 7 18:29:57 CET 2012
Hi
ami_stuff wrote:
> ffmpeg | branch: master | ami_stuff <ami_stuff at o2.pl> | Thu Jan 5 20:57:49 2012 +0100| [871e2f4fac18230abe4d7154d90cb5cba1479692] | committer: Carl Eugen Hoyos
[...]
> diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
> index 680034a..06ab701 100644
> --- a/libavcodec/pnm.c
> +++ b/libavcodec/pnm.c
> @@ -111,10 +111,13 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
> avctx->height = h;
> s->maxval = maxval;
> if (depth == 1) {
> - if (maxval == 1)
> + if (maxval == 1) {
> avctx->pix_fmt = PIX_FMT_MONOWHITE;
> - else
> + } else if (maxval == 255) {
> avctx->pix_fmt = PIX_FMT_GRAY8;
> + } else {
> + avctx->pix_fmt = PIX_FMT_GRAY16BE;
> + }
The two added else-lines seem to be one-off concerning the indentation.
Alexander
More information about the ffmpeg-cvslog
mailing list