[FFmpeg-trac] #11182(swscale:closed): yuvtestsrc and yuv444p->rgba->yuv444p conversion result in huge difference
FFmpeg
trac at avcodec.org
Sun Sep 15 21:10:05 EEST 2024
#11182: yuvtestsrc and yuv444p->rgba->yuv444p conversion result in huge difference
-------------------------------------+-------------------------------------
Reporter: Andrew-R | Owner: (none)
Type: defect | Status: closed
Priority: normal | Component: swscale
Version: unspecified | Resolution: invalid
Keywords: colorspace | Blocked By:
color_primaries |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by Balling):
yuv444-rgba-problem1.png shows the difference only in the second raw and
third raw because those values are out-of-gamut. Indeed, green is 0x80,
0x80, 0x0. That means it is full range, as 0x0 value is prohibited in
limited range YCbCr. Now, let us use calculator
https://res18h39.netlify.app/color
This calculator does not support full range YCbCr, so we should convert it
to limited range. 128 in full range Y becomes float value
0.5019607843137254 that becomes *219+16 = 125.9294117647059, 126 Y limited
range, Cb 128 becomes 0 float and that becomes 128 Cb; Cr at 0 becomes
-0.5 float and that becomes 16 in limited range, so it is 126, 128, 16. In
R'G'B' that is -76, 232, 128.
There is no bug, RGB cannot preserve such a value in R, red is negative.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11182#comment:46>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list