[FFmpeg-devel] [PATCH v3 8/8] avcodec/pnm: explicitly tag color range

Michael Niedermayer michael at niedermayer.cc
Sat Nov 4 22:36:20 EET 2023


On Tue, Oct 31, 2023 at 03:54:50PM +0100, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
> 
> PGMYUV seems to be always limited range. This was a format originally
> invented by FFmpeg at a time when YUVJ distinguished limited from full
> range YUV, and this codec never appeared to output YUVJ in any
> circumstance, so hard-coding limited range preserves the status quo.
> 
> The other formats are explicitly documented to be full range RGB/gray
> formats. That said, don't tag them yet, due to outstanding bugs w.r.t
> grayscale formats and color range handling.
> 
> This change in behavior updates a bunch of FATE tests in trivial ways
> (added tagging being the only difference).
> ---
>  libavcodec/pnm.c              |  7 ++++--
>  tests/ref/lavf/mkv            |  4 ++--
>  tests/ref/lavf/mkv_attachment |  4 ++--
>  tests/ref/lavf/mxf            |  6 ++---
>  tests/ref/lavf/y4m            |  4 ++--
>  tests/ref/seek/lavf-mkv       | 44 +++++++++++++++++------------------
>  tests/ref/seek/lavf-y4m       | 22 +++++++++---------
>  7 files changed, 47 insertions(+), 44 deletions(-)
> 
> diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
> index 77d24eeaf7..796807da23 100644
> --- a/libavcodec/pnm.c
> +++ b/libavcodec/pnm.c
[...]

> @@ -240,5 +242,6 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
>          h /= 3;
>          avctx->height = h;
>      }
> +
>      return 0;
>  }

stray change

otherwise LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231104/0e6f3d5b/attachment.sig>


More information about the ffmpeg-devel mailing list