[FFmpeg-trac] #9167(undetermined:closed): Color changed when an image converting to video

FFmpeg trac at avcodec.org
Wed Mar 31 01:47:27 EEST 2021

#9167: Color changed when an image converting to video
             Reporter:  kvsico       |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:  invalid
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |

Comment (by pdr0):

 Replying to [comment:12 Balling]:

 > Just updated to this version, I still have perfect results on Windows,
 the same color. VERY strange, but it is what it is. I mean here is the
 screenshot if do not believe me.

 I believe you, but not perfect as in off by -1 in B. I'm just seeing
 different results, if you want I can post screenshot too

 I think there are some differences in  mpv config locally with that build.
 I think there are differences in output display chain, gpu, or renderer
 setup. Mine has slight variations between pixels or if I move cursor. It's
 also reflected in 3rd party screenshot tools of mpv and color pickers

 But if I use mpv.net (a GUI for mpv), it's a solid 238,77,44 (also off by
 -1 B) . I'll have to look into the configs , but I believe your version of
 mpv is setup like my version of mpv.net. By my mpv version has some weird
 config going on

 (But you're still going to get +/- 3 values in all channels if you check
 more colors. If you come across a perfect round trip value, it will only
 be a few colors by chance. It's a 8bit YUV<=>RGB fact, regardless of
 transfer,  matrix, or primaries, or full vs limited range)

 > I do not use it. It is still superblack, I will attach the sample. There
 are some values that are off-by-one.
 How are you defining "superblack" ?  <0 RGB  in any channel  ?

 You started with values of 0 and 255 in each channel already

 Negative RGB values will be clipped to 0,0,0 and >1 will be clipped to
 255,255,255 in 8bit integer RGB. You'd have to check the conversion before
 the clipping

 And you always expect off by +/-3 for 8bit RGB/YUV round trip conversions

 If you want truly perfect values, you have to use 8bit RGB, or 10bit YUV.

Ticket URL: <https://trac.ffmpeg.org/ticket/9167#comment:14>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list