[FFmpeg-devel] [PATCH] swscale_unscaled: fix DITHER_COPY macro, use it only for dst_depth == 8

Mateusz mateuszb at poczta.onet.pl
Mon Sep 25 10:49:51 EEST 2017


W dniu 2017-09-25 o 01:42, Carl Eugen Hoyos pisze:
> 2017-09-23 19:18 GMT+02:00 Mateusz <mateuszb at poczta.onet.pl>:
> 
>> In reality -- current version of DITHER_COPY mess
>> up the average color tone.
> 
> You could explain how we can reproduce this.

Please take any video with colors that you can see change to green color --
it could be with human faces, for example free
http://media.xiph.org/video/derf/y4m/KristenAndSara_1280x720_60.y4m

Copy the video to o.y4m and make some iteration of 8-bit -> 10-bit -> 8-bit conversions:
ffmpeg -i o.y4m -y -strict -1 -pix_fmt yuv420p10 t10.y4m
ffmpeg -i t10.y4m -y -strict -1 -pix_fmt yuv420p o.y4m

Please watch result video -- it should be more green, with pattern and darker.

You can watch 'KristenAndSara' video after 100 iteration
http://www.msystem.waw.pl/x265/limited.mkv

And 100th iteration of 'KristenAndSara' with '-color_range 2' option
http://www.msystem.waw.pl/x265/full.mkv

Now DITHER_COPY works wrong in both cases (full and limited range).

Mateusz



More information about the ffmpeg-devel mailing list