JPEG: YCCK/CMYK too green
|Reported by:||Balling||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug:
There are two color spaces that are not supported in JPEG currently, YCCK and, as used in Photo CD (see #5923), PhotoYCC. YCCK is (as said in https://web.archive.org/web/20170720100717/http://halicery.com/Image/jpeg/JPEGCMYK.html) YCC --> CMY and then K is added. Also there is this sample: https://bugs.chromium.org/p/chromium/issues/detail?id=1115101 (chromium does support it but not icc profiles).
Note: as said in above link K can be inverted.
Now with PhotoYCC it is a little more complicated. But I fully described it on Wikipedia, fixing the incorrect transfer function (it is the same as in xvYCC format that is IN ffmpeg). The matrix is from BT.601 but without scaling, so 1.402 (2 * (1 - K_r)) and 1.772 (2 * (1 - K_b)) are not applied. Also quantization is different. All is here: https://en.wikipedia.org/wiki/Photo_CD#Encoding
JPEG 2000 also supports both of them (EnumCS 13 and 9).
This produces very green picture:
% ffplay Channel_digital_image_CMYK_color.jpg
I believe this is a defect, as it is part of the jpeg decoder...
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (29)
comment:1 by , 9 months ago
|Component:||undetermined → avcodec|
|Keywords:||mjpeg cmyk added; pcd j2k jpeg removed|
|Reproduced by developer:||unset|