[FFmpeg-trac] #10839(swscale:reopened): incorrect YCoCg to RGB conversion in swscale

FFmpeg trac at avcodec.org
Thu Feb 1 14:53:07 EET 2024


#10839: incorrect YCoCg to RGB conversion in swscale
-------------------------------------+-------------------------------------
             Reporter:  Connor       |                    Owner:  (none)
  Worley                             |
                 Type:  defect       |                   Status:  reopened
             Priority:  wish         |                Component:  swscale
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by haasn):

 Replying to [comment:13 Connor Worley]:
 > Summarizing what I believe is wrong:
 >
 > * In ffplay, going through vf_scale should cause an error after
 45e09a3041 (vf_scale: use colorspace negotiation API), but ffplay does not
 set the colorspace parameter on the buffersrc filter so some default
 conversion is chosen.
 > * In ffplay, automatic conversion can erroneously happen without going
 through vf_scale because the buffersink filter accepts YCoCg as a
 mergeable colorspace.
 > * swscale silently returns nonsense coefficients for YCoCg
 >
 > I would like for these things to work, but if they can't, I would much
 rather they error than produce incorrect output.

 This sounds like a reasonable assessment. Definitely, ffplay should only
 advertise supported colorspaces that it can actually output.

 I actually have a patch on the ML for fixing the first point:
 https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240110090547.69151-1-ffmpeg@haasn.xyz/

 There were some comments on the ML but no real opposal or approval. I'll
 merge it after a 24h grace period.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10839#comment:15>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list