[FFmpeg-trac] #9673(undetermined:closed): ffmpeg not reading color information from JPEG ICC profile

FFmpeg trac at avcodec.org
Fri Jul 14 17:33:17 EEST 2023


#9673: ffmpeg not reading color information from JPEG ICC profile
-------------------------------------+-------------------------------------
             Reporter:  Cosmin       |                    Owner:  haasn
  Stejerean                          |
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:  fixed
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by Cosmin Stejerean):

 The color primaries shouldn't be unknown though, for P3 I believe this
 should return color_primaries=smpte432

 Also if I attempt to create a P3 image through ffmpeg using


 ./ffmpeg.sh -flags2 icc_profiles -filter_complex color=red:s=640x480
 -frames 1 -q:v 1 -color_primaries smpte432 -colorspace bt470bg
 -color_range pc -color_trc iec61966-2-1 -pix_fmt yuv420p red2.jpg
 ```

 then ffprobe recognizes it as `smpte432` however `exiftool` does not show
 P3. Instead it shows

 {{{
 Profile ID                      : 0
 Profile Description             : RGB built-in
 Profile Copyright               : No copyright, use freely
 Media White Point               : 0.9642 1 0.82491
 Chromatic Adaptation            : 1.04788 0.02292 -0.05022 0.02959 0.99048
 -0.01707 -0.00925 0.01508 0.75168
 Red Matrix Column               : 0.51512 0.2412 -0.00105
 Blue Matrix Column              : 0.1571 0.06657 0.78407
 Green Matrix Column             : 0.29198 0.69225 0.04189
 }}}

 whereas for the P3 image shared above it shows

 {{{
 Profile Creator                 : Apple Computer Inc.
 Profile ID                      : ca1a9582257f104d389913d5d1ea1582
 Profile Description             : Display P3
 Profile Copyright               : Copyright Apple Inc., 2017
 Media White Point               : 0.95045 1 1.08905
 Red Matrix Column               : 0.51512 0.2412 -0.00105
 Green Matrix Column             : 0.29198 0.69225 0.04189
 Blue Matrix Column              : 0.1571 0.06657 0.78407
 }}}

 The notable difference here seems to be the media white point.

 0.9642 1 0.82491 maps to D50 illuminant
 0.95045 1 1.08905 matches D65

 I think P3 is supposed to use D65 adapted to D50 in the ICC profile.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9673#comment:10>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list