[FFmpeg-devel] [PATCH v2 07/10] avfilter/vf_scale: preserve YUV range by default

Niklas Haas ffmpeg at haasn.xyz
Tue Oct 31 13:23:58 EET 2023


On Tue, 31 Oct 2023 00:42:47 +0100 Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Sat, Oct 28, 2023 at 04:41:14PM +0200, Niklas Haas wrote:
> > From: Niklas Haas <git at haasn.dev>
> > 
> > YUV->YUV conversions should preserve input range, if the output range is
> > unspecified. Ensures full-range YUV input comes out as full-range YUV
> > output by default, even through YUV->YUV pixel format conversions.
> > ---
> >  libavfilter/vf_scale.c | 23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> 
> this seems to change the output of the following:
> ffmpeg -i 4493/AVCI100.mov -vframes 3 -bitexact file.nut
> did not investigate if this is a bug or bugfix
> 
> files are here: https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket524/

Seems like it's a regression. mpeg4 does not support full range YUV, so
giving it full range YUV causes wrong levels to be saved.

I will drop this commit from this series and include it as part of the
filter negotiation series, since that one has the necessary
infrastructure to handle this more gracefully.


More information about the ffmpeg-devel mailing list