[FFmpeg-trac] #979(swscale:open): Abnormal colorspace conversion of BGR -> YUV comparing the RGB variant

FFmpeg trac at avcodec.org
Mon Aug 26 13:19:48 EEST 2024


#979: Abnormal colorspace conversion of BGR -> YUV comparing the RGB variant
------------------------------------+-----------------------------------
             Reporter:  natt        |                    Owner:  (none)
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  swscale
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------
Comment (by fireattack):

 I don't think even white color is fixed; without accurate_rnd, it still
 produces yellowish color.


 {{{
 ffmpeg240821.exe -v error -i white.bmp -vf
 scale=out_color_matrix=bt709,format=yuv420p -color_primaries 1 -color_trc
 1 -colorspace 1  -qp 0 "output/white.bmp__ffmpeg240821.exe.mp4" -y
 ffmpeg240821.exe -v error -i "output/white.bmp__ffmpeg240821.exe.mp4"
 "output/img_white.bmp__ffmpeg240821.exe.png" -y
 }}}

 (Note: I convert the image to a proper mp4 video with all the color-
 related tags first, and then grab the frame from it. Otherwise different
 versions of FFMPEG often have different implied color matrix/space/etc.,
 and end up with different results.)


 I can also confirm there is a hash difference bwtween older version (I use
 4.2.1 to test) and current version when converting BGR to YUV (without
 accurate_rnd) as Balling observed. But perceptually the difference is so
 small they're visually the same (as in, not fixed at all.)
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/979#comment:22>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list