From 016d3995ccf9a2838be0b247bf6d1c89980ea72d Mon Sep 17 00:00:00 2001 From: Pierre-Anthony Lemieux Date: Thu, 23 Jun 2022 07:40:15 -0700 Subject: [PATCH] Conform cICP chunk to Rec. ITU-T h.273 (#134) * Conform to Rec. ITU-T h.273 (#129) Clean-up cICP chunk * Remove misleading example --- index.html | 225 ++++++++++++++++------------------------------------- 1 file changed, 68 insertions(+), 157 deletions(-) diff --git a/index.html b/index.html index bdc7625..b13352e 100644 --- a/index.html +++ b/index.html @@ -159,6 +159,12 @@ date: "2004-11-30", href: "https://standards.globalspec.com/std/892300/SMPTE%20ST%20170M" }, + "SMPTE RP 2077": { + title: "Full-Range Image Mapping", + publisher: "Society of Motion Picture and Television Engineers", + date: "2013-01-01", + href: "https://doi.org/10.5594/SMPTE.RP2077.2013" + }, "TIFF 6.0": { "href": "https://www.loc.gov/preservation/digital/formats/fdd/fdd000022.shtml", "title": "TIFF Revision 6.0", @@ -554,6 +560,10 @@

Definitions

are scaled to the range 0 to 1. +
full-range image
+
Image where reference black and white correspond to sample values +0 and 2bit depth - 1, respectively.
+
greyscale
@@ -637,6 +647,10 @@

Definitions

data compression algorithm described by Ziv and Lempel in their 1977 paper [[Ziv-Lempel]].
+
narrow-range image
+
Image where reference black and white do not correspond to sample values +0 and 2bit depth - 1, respectively.
+
network byte @@ -4131,115 +4145,59 @@

cICP 99 73 67 80 -

If the cICP chunk is present, the - image samples have a specifically defined colour space, transfer function, and signal - range that should be displayed using the specified rendering intent defined in - [[ITU-T H.273]]. -

+

If present, the cICP chunk specifies the colour +space of the image using the code points specified in [[ITU-T H.273]]. This +colour space SHOULD be used when processing the image, including by a decoder +when rendering the image.

-

The cICP chunk contains:

+

The following specifies the syntax of the cICP chunk:

- +
- - + + - - - + + - - - + + - - - - + + -
Colour Primaries2 bytesColour Primaries1 byte
Transfer Function2 bytesTransfer Function1 byte
Matrix Coefficients2 bytesMatrix Coefficients1 byte
Full Range Flag1 byteVideo Full Range Flag1 byte
+

Each of the fields of the cICP chunk corresponds + to the parameter of the same name in [[ITU-T H.273]].

-

Coding-Independent Code Points are defined in [[ITU-T H.273]] and - are typically embedded in video content and streams to define an explicit - video rendering. The most common renderings for video imagery are defined in - [[ITU-R BT.709]] and - and [[ITU-R BT.2100]].

+

The Matrix Coefficients value is equal to 0.

-

The cICP chunk contains four decimal values corresponding to - the colour primaries, transfer function, matrix coefficients and video signal - range flag for the source imagery.

+ -

Note: In Coding-Independent Code Points - [[ITU-T H.273]], the - third video coding point defines matrix coefficients which are used to describe - conversions from other colour representations to RGB. PNG image samples are - explicitly RGB, so the matrix coefficients value must be set to "0" which is - labeled in [[ITU-T H.273]] - as "RGB Identity". With PNG, decoders will always assume a matrix coefficient - value of "0" but this value will remain in PNG for forward compatibility.

+

The Video Full Range Flag value MUST be either 0 + or 1.

+ - - - - - - +

The cICP chunk MUST come before the IDAT chunk.

- - - - - - - - - - -. -As noted earlier, since PNG is explicitly RGB, this value must always be set to -"0" which is labeled as "RGB Identity" in [[ITU-T H.273]]. - - - - - - - - -Currently, PNG is "RGB ONLY" and typically lossless and therefore a value of "1" -is the default to indicate the the use of full-range signal scaling. There are -some use-cases where levels below or above nominal signal level (0 or 100%) -should be preserved, and therefore the signal range would be defined as "narrow -range" which is typically used in YCBCR video imagery. For -"narrow range" the Full-Range Flag would be set to "0". In the future, if PNG is -updated to include the YCBCR colour representation, -narrow-range signal scaling would be the default. In the future, if PNG is -updated to include ICTCP the full-range flag would be set -to a value of "1" since it uses the PQ transfer function and therefore doesn't -benefit from the existence of sub-blacks or super-whites. - - - - -
0Colour PrimariesIdentifies the colour primaries of the source picture as - defined in [[ITU-T H.273]]
1Transfer CharacteristicsIdentifies the reference opto-electronic transfer -characteristic function or inverse reference electro-optical transfer -characteristic function as defined in [[ITU-T H.273]]
2Matrix CoefficientsIdentifies the matrix coefficients used in deriving luma and -chroma signals from the green, blue and red as defined in [[ITU-T H.273]]
3Full Range FlagIdentifies a Full-Range scaling when this value is "1" as defined in - [[ITU-T H.273]].
-

The cICP chunk must come before the IDAT chunk.

- -

When the cICP chunk is present, PNG decoders that recognize it shall ignore -the following chunks:

+

When the cICP chunk is present, decoders that +recognize it SHALL ignore the following chunks:

  • iCCP
  • ICCN
  • @@ -4248,83 +4206,37 @@

    cICP
  • sRGB
+ - - -

Below is an example for the use of the cICP:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COLPRIMS
COLPRIMS9
TRANSFC
TRANSFC16
MATCOEFFS
MATCOEFFS0
TRANSFC
VIDFRNG1
- - - -

Here is an example of source content that uses the BT.2100 colour primaries [[ITU-R BT.2100]], -with the PQ transfer function, Matrix Coefficients (using RGB Identity)and Full-Range signal scaling

- + -

Here is an example of source content that uses the BT.2100 colour primaries, -with the HLG transfer function, Matrix Coefficients (using RGB Identity)and Full-Range signal scaling

- + -

Here is an example of source content that uses BT.709 colour primaries [[ITU-R BT.709]], -with the BT.709 transfer function, Matrix Coefficients (using RGB Identity)and Full-Range signal scaling

- + - -

When the cICP chunk is used, a -decoder should be capable of producing the proper rendering intent as described in -[[ITU-T H.273]] and -it's associated recommendations.

@@ -4364,7 +4276,6 @@

iCCN n bytes -

The iCCN profile name may be any convenient name for referring to the profile. It is case-sensitive. Profile names shall contain printable characters. Leading, trailing, and consecutive spaces are not permitted.