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

FFmpeg trac at avcodec.org
Thu Apr 15 06:31:17 EEST 2021


#9167: Color changed when an image converting to video
-------------------------------------+-------------------------------------
             Reporter:  kvsico       |                    Owner:
                 Type:  defect       |                   Status:  reopened
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Changes (by Balling):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Okay, so this is just a bug here.
 https://github.com/FFmpeg/FFmpeg/blob/573f05a7533cd9aed3ed895b4fa4ad8fcba4e56a/fftools/ffplay.c#L968

 See https://github.com/libsdl-org/SDL/issues/2860

 So frame->colorspace == AVCOL_SPC_SMPTE170M (SMPTE 170M matrix) should
 force that mode, but it does not.

 Also why AVCOL_SPC_SMPTE240M matrix uses BT.601?? It is a different matrix
 as derived from SMPTE 170M primaries (yeah, SMPTE 170M matrix is not
 derived from SMPTE 170M primaries, I know, confusing).
 P.S.
 Obviously it is not primaries that define the matrix, even though it
 should be (not the case for JPEG (BT.601 a.k.a. SMPTE 170M matrix is
 derived from System M primaries ACTUALLY, see SMPTE 177) but BT.709 is the
 default in JPEG, since that is used in the default sRGB, also not the case
 for DCI-P3 in BT.2020 matrix as Netflix uses).

 I think we should try to fix that. Or at least deprecate ffplaying sYCC
 files...

 Since they migrated to github I will try to open an issue there too.

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


More information about the FFmpeg-trac mailing list