ICtCp

From HandWiki

ICTCP, ICtCp, or ITP is a 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[2] from the IPT color space by Ebner and Fairchild.[3][4] 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.[2] Ebner also used IPT as short for "Image Processing Transform".[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.[5] ICTCP was defined as YCC digital format with support for 4:4:4, 4:2:2 and 4:2:0 chroma subsampling in CTA-861-H (that means that in limited range 10 bit mode 0, 1, 2, 3, 1020, 1021, 1022, 1023 values are reserved).[6]

ICtCp top view.png

Derivation

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

  1. Calculate LMS from BT.2100 RGB:[math]\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} }[/math]
  2. Normalize the LMS by a non-linearity:
    • If the PQ transfer function is used:[math]\displaystyle{ \begin{bmatrix} L'\\M'\\S' \end{bmatrix} = EOTF_{PQ}^{-1} \left( \begin{bmatrix} L\\M\\S \end{bmatrix} \right) }[/math]
    • If the HLG transfer function is used:[math]\displaystyle{ \begin{bmatrix} L'\\M'\\S' \end{bmatrix} = OETF_{HLG} \left( \begin{bmatrix} L\\M\\S \end{bmatrix} \right) }[/math]
  3. Calculate ICTCP:
    • for PQ:[math]\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} }[/math]
    • for HLG: [math]\displaystyle{ \begin{bmatrix} I\\C_T\\C_P \end{bmatrix} = \frac{1}{4096} \begin{bmatrix} 2048 & 2048 & 0\\ 3625 & -7465 & 3840\\ 9500 & -9212 & -288 \end{bmatrix} \begin{bmatrix} L'\\M'\\S' \end{bmatrix} }[/math]

All three above mentioned matrixes were derived (only the first 2 are documented derivations[2]) from the matrixes in IPT. The HLG matrix can be derived the same way as the PQ matrix, with the only difference being the scaling of the chroma rows. The inverted decoding ICTCP matrixes are specified in ITU-T Series H Supplement 18.[7]

ICTCP is defined such that the entire BT.2020 space fits into the range [0, 1] for I and [-0.5, +0.5] for the two chroma components. The related uniform color space ITP used in ΔEITP (Rec. 2124) scales CT by 0.5 to restore uniformity.[8] There is support for ICtCp in zimg (including zimg as part of FFmpeg) and color-science, for both HLG and PQ.

In IPT

The preceder to ICTCP, Ebner & Fairchild IPT color appearance model (1998), has a mostly similar transformation pipeline of input → LMS → nonlinearity → IPT.[3][9] The differences are that 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, but ICTCP has also Rotation matrix (to align skin tones) and Scalar matrix (scaled to fit the full BT.2020 gamut inside the -0.5 to 0.5 region) multiplied with this matrix:[2][10]

  1. Calculate LMS (see LMS color space § Hunt, RLAB for D65, slightly different[3]): [math]\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} }[/math]
  2. Nonlinearity (L'M'S'): For each of L, M, S components apply a power function: [math]\displaystyle{ X' = \begin{cases} X^{0.43} &\text{for } X \ge 0\\ -(-X)^{0.43} &\text{for } X \lt 0 \end{cases} }[/math]
  3. [math]\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} }[/math]

IPTPQc2

IPTPQc2 is another related colorspace used by Dolby Vision profile 5 BL+RPU (without EL).[11] The "c2" in the name means a cross talk matrix is used with c = 2%. It uses full range quantization (0-1023 for 10 bit video, no values reserved). It is also often referred to as IPTPQc2/IPT, as the matrix is in fact the same as in the 1998 IPT paper, just in inverse representation.[12] Documentation on this format is scarce due to its proprietary nature, but a patent[13] 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 of LMS components.[speculation?] The matrix is as follows:

[math]\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} }[/math]

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

The second step, the dynamic range adjustment modeling (reshaping[15]), is also defined in the patent.

It is used by Disney+, Apple TV+ and Netflix.[citation needed]

Decoder of IPTPQc2 with reshaping and MMR (but no NLQ and dynamic metadata) is available in libplacebo.[16]

Support for decoding all stages was added in mpv.

Characteristics

ICTCP has near constant luminance.[17] The correlation coefficient between encoded I and true luminance is 0.998, much higher than the 0.819 for YCBCR. An improved constant luminance versus YCBCR is an advantage for color processing operations such as chroma subsampling and gamut mapping where only the color difference information is changed.[2]

ICTCP also improves hue linearity compared with YCBCR, which helps with compression performance and color volume mapping.[18][19] Adaptive reshaping can further provide a 10% improvement on compression performance by 10%.[20]

Improvement in luminance and hue uniformity make scaled ICTCP a practical color space for calculating color differences (ΔEITP), as introduced by ITU-R Rec. BT.2124.[8]

In terms of CIEDE2000 color quantization error, 10-bit ICTCP would be equivalent to 11.5 bit YCBCR.[2]

Uses

ICTCP is supported in the HEVC video coding standard.[21] It is also a digital YCC format and can be signaled in EDID's Colorimetry block as part of CTA-861-H.

References

  1. 1.0 1.1 "BT.2100-2: Image parameter values for high dynamic range television for use in production and international programme exchange". July 2018. https://www.itu.int/rec/R-REC-BT.2100/. 
  2. 2.0 2.1 2.2 2.3 2.4 2.5 "What Is ICtCp – Introduction?". Dolby. https://www.dolby.com/us/en/technologies/dolby-vision/ICtCp-white-paper.pdf. 
  3. 3.0 3.1 3.2 3.3 Ebner, Fritz (1998-07-01). "Derivation and modelling hue uniformity and development of the IPT color space". Theses. https://scholarworks.rit.edu/theses/2858. 
  4. 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
  5. "ST 2084:2014". Society of Motion Picture and Television Engineers. https://www.smpte.org/standards/document-index/st. 
  6. "A DTV Profile for Uncompressed High Speed Digital Interfaces (ANSI/CTA-861-H)" (in en). https://shop.cta.tech/products/a-dtv-profile-for-uncompressed-high-speed-digital-interfaces-cta-861-h. 
  7. "ITU-T Recommendation database" (in en). https://www.itu.int/ITU-T/recommendations/rec.aspx?id=13441&lang=en. 
  8. 8.0 8.1 "BT.2124: Objective metric for the assessment of the potential visibility of colour differences in television". https://www.itu.int/rec/R-REC-BT.2124/en. 
  9. Ebner, Fritz; Fairchild, Mark D. (1998-01-01). "Development and Testing of a Color Space (IPT) with Improved Hue Uniformity". Color and Imaging Conference 1998 (1): 8–13. doi:10.2352/CIC.1998.6.1.art00003. https://www.ingentaconnect.com/content/ist/cic/1998/00001998/00000001/art00003#expand/collapse. closed access
  10. Xue, Yang (1 November 2008). "Uniform color spaces based on CIECAM02 and IPT color difference equations". RITTheses: 7. https://scholarworks.rit.edu/theses/2866/. 
  11. Dolby. "Dolby Vision Profiles and Levels Version 1.3.2 - Specification". https://professional.dolby.com/siteassets/content-creation/dolby-vision-for-content-creators/dolbyvisionprofileslevels_v1_3_2_2019_09_16.pdf. 
  12. "Dolby Vision with wrong colors · Issue #7326 · mpv-player/mpv" (in en). https://github.com/mpv-player/mpv/issues/7326#issuecomment-592221831. 
  13. ; Pu, Fangjun & Yin, Peng et al."Signal reshaping and coding in the ipt-pq color space" US patent 20180131938A1, published 2018-05-10, issued 2019-11-19, assigned to Dolby Laboratories Licensing Corp
  14. "testing-av/testing-video: IPTPQc2.java" (in en). https://github.com/testing-av/testing-video/blob/9256b779f7721bd3dbdceedab7c65b6f64bbab79/core/src/main/java/band/full/video/dolby/IPTPQc2.java. 
  15. "Description of the reshaper parameters derivation process in ETM reference software". http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=10318. 
  16. "colorspace: add support for Dolby Vision (!207) · Merge requests · VideoLAN / libplacebo" (in en). 29 November 2021. https://code.videolan.org/videolan/libplacebo/-/merge_requests/207. 
  17. "Subsampling in ICtCp vs YCbCr". Dolby Laboratories, Inc.. https://www.dolby.com/us/en/technologies/dolby-vision/ictcp_vs_ycbcr-subsampling.pdf. 
  18. "ITP Colour Space and Its Compression Performance for High Dynamic Range and Wide Colour Gamut Video Distribution". ZTE. https://www.zte.com.cn/global/about/magazine/zte-communications/2016/1/en_214/448972. 
  19. Cotton, Andrew; Thompson, Simon (2018). "Scene-light conversions: the key to enabling live HDR production". SMPTE 2018. pp. 10–11. doi:10.5594/M001822. ISBN 978-1-61482-960-7. 
  20. Perrin, Anne-Flore; Rerabek, Martin; Husak, Walt; Ebrahimi, Touradj (May 2018). "ICtCp Versus Y'CbCr: Evaluation of ICtCp Color Space and an Adaptive Reshaper for HDR and WCG". IEEE Consumer Electronics Magazine 7 (3): 38–47. doi:10.1109/MCE.2017.2714696. https://infoscience.epfl.ch/record/222897#record-files-collapse-header. 
  21. Peng Yin; Chad Fogg; Gary J. Sullivan; Alexis Michael Tourapis (2016-03-19). "Draft text for ICtCp support in HEVC (Draft 1)". JCT-VC. http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=10478.