- From: Seeger, Chris (NBCUniversal) <Chris.Seeger@nbcuni.com>
- Date: Fri, 8 Dec 2023 21:46:15 +0000
- To: Chris Lilley <chris@w3.org>, "public-png@w3.org" <public-png@w3.org>
- Message-ID: <BL0PR14MB379559A8F18DCB928041BDA7E68AA@BL0PR14MB3795.namprd14.prod.outlook.com>
You’re not going to believe this, but Apple Compressor and FinalCut already recognizing the CICP Chunk correctly (with the exception of full-range flag). -Chris From: Chris Lilley <chris@w3.org> Date: Friday, December 8, 2023 at 3:54 PM To: Seeger, Chris (NBCUniversal) <Chris.Seeger@nbcuni.com>, public-png@w3.org <public-png@w3.org> Subject: Re: [EXTERNAL] Re: Conformance files in PQ, HLG, SDR-BT.709? Sorry I was in a rush to get to another meeting, meant to add the link, forgot The page is here: https://www.nayuki.io/page/png-file-chunk-inspector<https://urldefense.com/v3/__https:/www.nayuki.io/page/png-file-chunk-inspector__;!!PIZeeW5wscynRQ!qsxmSbvqc4A7IuUQxfIlRxReb1_9TKnUmESzCkfxEdPBHx23PKB55Ml6lSuM1-lvlrAgcMvMf2cb8A$> source is here: https://github.com/nayuki/Nayuki-web-published-code/tree/master/png-file-chunk-inspector<https://urldefense.com/v3/__https:/github.com/nayuki/Nayuki-web-published-code/tree/master/png-file-chunk-inspector__;!!PIZeeW5wscynRQ!qsxmSbvqc4A7IuUQxfIlRxReb1_9TKnUmESzCkfxEdPBHx23PKB55Ml6lSuM1-lvlrAgcMtpNW-Nqg$> my unofficial extension to that code to add cICP support is very simple ["cICP", "Coding-independent code points ", false, (chunk, earlier) => { addErrorIfHasType(earlier, "PLTE", chunk, "Chunk must be before PLTE chunk"); addErrorIfHasType(earlier, "IDAT", chunk, "Chunk must be before IDAT chunk"); if (chunk.data.length != 4) { chunk.errorNotes.push("Invalid data length"); return; } const chromaticities = chunk.data[0]; const transfer = chunk.data[1]; const matrix = chunk.data[2]; const videowidth = chunk.data[3]; if (matrix !== 0) { chunk.errorNotes.push("PNG only supports RGB data"); } if (videowidth > 1) { chunk.errorNotes.push("Undefined video width value, must be narrow or full"); } // look for specific, common combination values first if (chromaticities === 1) { // HDTV or sRGB if (transfer === 1) { chunk.innerNotes.push(`Rec BT.709 HDTV`); } else if (transfer === 8) { chunk.innerNotes.push(`Linear-light sRGB`); } else if (transfer === 13) { chunk.innerNotes.push(`IEC 61966-2-1 sRGB`); } } else if (chromaticities === 9) { // BT.2020 or BT.2100 if (transfer === 14) { chunk.innerNotes.push(`Rec. ITU-R BT.2020-2 (10-bit system)`); } else if (transfer === 15) { chunk.innerNotes.push(`Rec. ITU-R BT.2020-2 (12-bit system)`); } else if (transfer === 16) { chunk.innerNotes.push(`Rec. ITU-R BT.2100-2 (PQ system)`); } else if (transfer === 18) { chunk.innerNotes.push(`Rec. ITU-R BT.2100-2 (HLG system)`); }; // Only mention narrow or full range if both are actually options if (videowidth === 0) { chunk.innerNotes.push(`Narrow Range`); } else { chunk.innerNotes.push(`Full Range`); }; } else if (chromaticities === 12) { // SMPTE EG 432-1 (2010) - DCI D65 if (transfer === 13) { // Display-P3 uses sRGB transfer function chunk.innerNotes.push(`Display-P3`); } } else { // Not common combination let c, t, m, p; c = chromaticities.toString(); chunk.innerNotes.push(`Chromaticity: ${c}`); t = transfer.toString(); chunk.innerNotes.push(`Transfer: ${t}`); m = (matrix === 0) ? "RGB" : "YCC"; chunk.innerNotes.push(`Matrix: ${m}`); p = (videowidth === 0) ? "Narrow" : "Wide"; chunk.innerNotes.push(`videowidth: ${p}`); } }], On 2023-12-08 14:08, Seeger, Chris (NBCUniversal) wrote: Do you have a link to it 😊 Also, did I mention that MediaInfo now has support in their nightly build (I’ve been sending out too many emails this morning). https://mediaarea.net/download/snapshots/binary/mediainfo-gui/<https://urldefense.com/v3/__https:/mediaarea.net/download/snapshots/binary/mediainfo-gui/__;!!PIZeeW5wscynRQ!qsxmSbvqc4A7IuUQxfIlRxReb1_9TKnUmESzCkfxEdPBHx23PKB55Ml6lSuM1-lvlrAgcMtJSyeBsw$> -Chris From: Chris Lilley <chris@w3.org><mailto:chris@w3.org> Date: Friday, December 8, 2023 at 1:53 PM To: public-png@w3.org<mailto:public-png@w3.org> <public-png@w3.org><mailto:public-png@w3.org> Subject: Re: [EXTERNAL] Re: Conformance files in PQ, HLG, SDR-BT.709? There is a nice PNG file chunk inspector, all written in JavaScript I took a copy and extended it to support cICP. Here is a screenshot of the output. I recognize the most common color spaces and output their names, otherwise I output the actual data. [cid:part1.snFFGzUD.oGMQQbeO@w3.org] -- Chris Lilley @svgeesus Technical Director @ W3C W3C Strategy Team, Core Web Design W3C Architecture & Technology Team, Core Web & Media -- Chris Lilley @svgeesus Technical Director @ W3C W3C Strategy Team, Core Web Design W3C Architecture & Technology Team, Core Web & Media
Attachments
- image/png attachment: FPXniqf0gUljn0QA.png
Received on Friday, 8 December 2023 21:46:37 UTC