-
Dmitry Kazakov authored
ICC engine cannot handle PQ-shaped color spaces properly. All the HDR data will be lost. Therefore, we should implement a custom transformation for that. 1) IccColorSpaceEngine now has a special method supportsColorSpace(), which declares that "SMPTE ST 2084 PQ" should not be handled by the engine. 2) LcmsRGBP2020PQColorSpaceFactoryWrapper adds custom conversions for this special color space. Before passing it to LCMS, the color space will be converted into Rec. 2020 Linear. After that ICC color management system can handle it correctly. 3) The conversions graph looks like that: p2020-pq-u8 <-> p2020-g10-f16 p2020-pq-u16 <-> p2020-g10-f16 p2020-pq-f16 <-> p2020-g10-f32 p2020-pq-f32 <-> p2020-g10-f32 4) There is still a problem: if one decides to convert p2020-pq-f16 into p2020-pq-u16, then the conversion will go via p2020-g10-f32. This is not optimal, but it can be fixed later.
3f31062e