# ICtCp

ICTCP, ICtCp, or ITP is a patented color representation format specified in the Rec. ITU-R BT.2100 standard that is used as a part of the color image pipeline in video and digital photography systems for high dynamic range (HDR) and wide color gamut (WCG) imagery.[1] It was developed by Dolby Laboratories from the IPT color space by Ebner and Fairchild.[2] The format is derived from an associated RGB color space by a coordinate transformation that includes two matrix transformations and an intermediate nonlinear transfer function that is informally known as gamma pre-correction. The transformation produces three signals called I, CT, and CP. The ICTCP transformation can be used with RGB signals derived from either the perceptual quantizer (PQ) or hybrid log-gamma (HLG) nonlinearity functions, but is most commonly associated with the PQ function (which was also developed by Dolby).

The I ("intensity") component is a luma component that represents the brightness of the video, and CT and CP are blue-yellow (named from tritanopia) and red-green (named from protanopia) chroma components.[3]

The ICTCP color representation scheme is conceptually related to the LMS color space, as the color transformation from RGB to ICTCP is defined by first converting RGB to LMS with a 3×3 matrix transformation, then applying the nonlinearity function, and then converting the nonlinear signals to ICTCP using another 3×3 matrix transformation.[4]

## Derivation

ICTCP is defined by Rec. 2100 as being derived from RGB as follows:[1]

1. Calculate LMS from BT.2100 RGB:${\displaystyle {\begin{bmatrix}L\\M\\S\end{bmatrix}}={\frac {1}{4096}}{\begin{bmatrix}1688&2146&262\\683&2951&462\\99&309&3688\end{bmatrix}}{\begin{bmatrix}R\\G\\B\end{bmatrix}}}$
2. Normalize the LMS by a non-linearity:
• If the PQ transfer function is used:${\displaystyle {\begin{bmatrix}L'\\M'\\S'\end{bmatrix}}=EOTF_{PQ}^{-1}\left({\begin{bmatrix}L\\M\\S\end{bmatrix}}\right)}$
• If the HLG transfer function is used:${\displaystyle {\begin{bmatrix}L'\\M'\\S'\end{bmatrix}}=OETF_{HLG}\left({\begin{bmatrix}L\\M\\S\end{bmatrix}}\right)}$
3. Calculate ICTCP:${\displaystyle {\begin{bmatrix}I\\C_{T}\\C_{P}\end{bmatrix}}={\frac {1}{4096}}{\begin{bmatrix}2048&2048&0\\6610&-13613&7003\\17933&-17390&-543\end{bmatrix}}{\begin{bmatrix}L'\\M'\\S'\end{bmatrix}}}$

### In IPT

The preceder to ICtCp, Ebner & Fairchild IPT color appearance model (1998), has a mostly similar transformation pipeline of input → LMS → nonlinearity → IPT.[5] The differences are it defines its input to the more general CIEXYZ tristimulus color space and as a result has a more conventional Hunt-Pointer-Estevez (for D65) matrix for LMS. The nonlinearity is a fixed gamma of 0.43, quite close to the one used by RLAB. The second matrix here is slightly different from the ICtCp matrix, mainly in that is also considers S (blue cone) for intensity:[6]

1. Calculate LMS (see LMS color space § Hunt, RLAB, D65, slightly different): ${\displaystyle {\begin{bmatrix}L\\M\\S\end{bmatrix}}={\begin{bmatrix}0.4002&0.7075&-0.0807\\-0.2280&1.1500&0.0612\\0&0&0.9184\end{bmatrix}}{\begin{bmatrix}X\\Y\\Z\end{bmatrix}}}$
2. Nonlinearity (L'M'S'): For each of L, M, S components apply a power function: ${\displaystyle X'={\begin{cases}X^{0.43}&{\text{for }}X\geq 0\\-(-X)^{0.43}&{\text{for }}X<0\end{cases}}}$
3. ${\displaystyle {\begin{bmatrix}I\\P\\T\end{bmatrix}}={\begin{bmatrix}0.4000&0.4000&0.2000\\4.4550&-4.8510&0.3960\\0.8056&0.3572&-1.1628\end{bmatrix}}{\begin{bmatrix}L'\\M'\\S'\end{bmatrix}}}$

### IPTPQc2

IPTPQc2 is another related colorspace used by Dolby Vision BL+RPU (without EL). Although often referred to as IPTPQc2/IPT, it is different from the 1998 IPT. Documentation on this format is scarce due to its proprietary nature, but a patent[7] on the "IPT-PQ" (perceptually quantized IPT) color space seems to describe how Dolby changed the domain to PQ by changing the traditional power function from 1998 IPT paper to PQ function for each LMS components. The matrix is as follows and is the same as in 1998 IPT paper on page 146, at least according to a "testing-video" project:[8]

${\displaystyle {\begin{bmatrix}I\\P\\T\end{bmatrix}}_{PQC2}=\left({\frac {1}{8192}}{\begin{bmatrix}8192&799&1681\\8192&-933&1091\\8192&267&-5545\end{bmatrix}}\right)^{-1}{\begin{bmatrix}L'\\M'\\S'\end{bmatrix}}}$

Note the matrix inversion used and a error was made in patent in 1091 number of the matrix (the matrix after inversion is correct in patent). In addition, this format has no non-linearity, and is assumed to be BT.2020-based.[9]

The second step, the reshaping, is also defined in the patent.

## Characteristics

ICTCP has near constant luminance, which improves chroma subsampling versus YCBCR.[10] ICTCP also improves hue linearity compared with YCBCR, which helps with compression performance and color volume mapping.[11] When combined with adaptive reshaping ICTCP can improve compression performance by 10%.[12] For CIEDE2000 color quantization errors, 10-bit ICTCP would be equivalent to 11.5 bit YCBCR.[3] Luminance constancy is also improved with ICTCP, which has a luminance relationship of 0.998 between the luma and encoded brightness while YCBCR has a luminance relationship of 0.819.[3] An improved constant luminance is an advantage for color processing operations such as chroma subsampling and gamut mapping where only the color difference information is changed.[3]

## Uses

ICTCP is supported in the HEVC video coding standard.[13]

## References

1. ^ a b "BT.2100-2: Image parameter values for high dynamic range television for use in production and international programme exchange". ITU-R. July 2018.
2. ^ Ebner; Fairchild (1998), Development and Testing of a Color Space with Improved Hue Uniformity, Proc. IS&T 6th Color Imaging Conference, Scottsdale, AZ, pp. 8–13., retrieved 29 February 2020
3. ^ a b c d "ICtCp Dolby White Paper" (PDF). Dolby. Retrieved 2016-04-20.
4. ^
5. ^ F.Ebner, M.D.Fairchild, Development and testing of a color space (IPT) with improved hue uniformity. In: Proceedings of The Sixth Color Imaging Conference, 8-13, 1998
6. ^ Xue, Yang (1 November 2008). "Uniform color spaces based on CIECAM02 and IPT color difference equations". RITTheses: 7.
7. ^ [1], "Signal reshaping and coding in the ipt-pq color space", issued 2016-04-19
8. ^
9. ^
10. ^ "Subsampling in ICtCp vs YCbCr" (PDF). Dolby Laboratories, Inc.
11. ^
12. ^
13. ^ Peng Yin; Chad Fogg; Gary J. Sullivan; Alexis Michael Tourapis (2016-03-19). "Draft text for ICtCp support in HEVC (Draft 1)". JCT-VC. Retrieved 2016-04-20.