[FFmpeg-trac] #3785(swscale:closed): SWSCALE: in_range, in_color_matrix, out_range, out_color_matrix incorrect
FFmpeg
trac at avcodec.org
Sat Apr 24 08:37:46 EEST 2021
#3785: SWSCALE: in_range, in_color_matrix, out_range, out_color_matrix incorrect
------------------------------------+-----------------------------------
Reporter: troy_s | Owner: (none)
Type: defect | Status: closed
Priority: normal | Component: swscale
Version: git-master | Resolution: invalid
Keywords: range | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Comment (by pdr0):
Replying to [comment:28 Balling]:
> >The following, despite being 601 coefficients, should yield perfect 1:1
with RGB values (RGB being a relative color space) but quantization issues
again result.
>
> No, it should not. FFplay does not really support some BT.601 stuff,
because it uses SDL library for decoding (very dumb, I know). If you want
correct output use mpv. See #8862
Yes , but because of incomplete syntax. FFplay supports "BT.601 stuff"
with vf scale as he was using. But for ffplay, when using -vf scale
arguments - you just add the format=gbrp to the end after -vf scale
arguments (rgb24 works as well) to get the expected "almost" correct +/-3
colors.
-vf scale=in_range=full:in_color_matrix=bt601,format=gbrp
"almost" correct because that is an 8bit pipeline. You'd get psnr inf when
using 10bit444 for the RGB => 10bit YCbCr => RGB round trip
Yes, there are other issues with ffplay reading flags automatically and
adjusting. But it's the same workaround for #8862 until a proper "auto"
fix is implemented
ffplay -i vokoscreenNG.x264_q0_high.mkv -vf
scale=in_color_matrix=bt601,format=gbrp
(But on the other hand, sometimes files are flagged improperly. You can
make a case for not autoadjusting the rgb conversion)
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3785#comment:29>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list