Diffusion Krita 3f31062e10f1

Implement proper conversions to Rec. 2020 PQ color space

Authored by dkazakov on Dec 26 2018, 12:58 PM.

Description

Implement proper conversions to Rec. 2020 PQ color space

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.
  1. 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.
  1. 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

  1. 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.

Details

Committed
dkazakovDec 26 2018, 1:02 PM
Parents
R37:498f54d0c7bf: Implement loading of HDR PND images
Branches
Unknown
Tags
Unknown