GNOME Bugzilla – Bug 616804
[jpegdec] support more than 3 components
Last modified: 2018-11-03 14:41:48 UTC
+++ This bug was initially created as a clone of Bug #604106 +++ See attachment (id=149363)
FWIW, just noting that libjpeg reports the colour space of this sample to be YCCK (definition?) as result of some decision heuristic. As such, it is not only about components, but also colour space (including handling of some custom colour profiles or whatever).
This seems to be a bastard of YCbCr and CMYK, where CMY are converted to YCbCr and K is written as is.
Created attachment 198328 [details] [review] jpegdec: rewrite colorspace/components checks Use a table, for easier modification without having to write custom checks for each case.
Created attachment 198329 [details] [review] jpegdec: test the correct colorspace And store it for later so the "has it changed" test actually does something. While there, don't assume we get a YCbCr colorspace if it's not grayscale nor RGB, test for it.
Created attachment 198330 [details] [review] jpegdec: decode YCCK images I'm not totally sure that the decoding is correct on these two points: - U and V need swapping to match the colors I get in Firefox, see the comment in the code - Since K represents black, I think only Y is meant to be scaled, but I am not entirely certain
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/27.