- From: John Bowler <john.cunningham.bowler@gmail.com>
- Date: Sun, 4 Feb 2024 09:56:31 -0800
- To: public-png@w3.org
- Cc: Chris.Seeger@nbcuni.com
I think I've worked out what I did wrong, the answer to my own question: >This does depend on my correct interpretation of the direction of the equations. I'm sure I got the H.273 equations the wrong way round. I said: >equation (20); E'r is a linear value that has been obtained from the inverse of the transfer characteristics (EOTF; the encoding function). Nope; here's the H.273 definition: >The application of the transfer characteristics function is denoted by ( x )′ for an argument x. But the "transfer characteristics" H.273 refers to are, in fact, part of what BT.2100 calls the "OETF", "Input signal to PQ optoelectronic transfer function (OETF)". The transfer characteristic is OETF, E' is the encoded value (value that is transmitted in the signal) and E is the unencoded linear value. The encoding includes the display correction/tone mapping etc (the "OOTF"; "The OOTF maps relative scene linear light to display linear light.") This applies to all the H.273 transfer codes, including sRGB. The decoder has the same issue it faces with sRGB; whether to use the inverse of the OETF (which will return the "relative scene linear light" factoring out the viewing corrections) or to use the "EOTF" which returns "display linear linear" with viewing corrections, the OOTF. The correct answer depends on the purpose of the decode but typically if libpng and other decoders need to decode they will need the "scene linear light" because the result of the decode will be re-encoded later either with the original or a different OETF. Typically apps which don't process the PNG (transcoding for a different output device or image processing) don't need PNG decoder support; they take the data as-is. In the case of PQ this is just PQ-16. For 10-bit HLG it's the standard arithmetic multiply, typically either 4/256 (or shift right 6) for narrow range or 3/255 for full range (note the scale factors are quite different; 1/64 vs 1/85!). What is needed to avoid my confusion is something like the gamma description but my current feelings are that both the encoder and decoder descriptions can be removed and replaced by general descriptions which are far simpler. Much of the stuff in the current draft is dated and not very helpful. The BT.2100 Annex 1 is better and a subset of it could be used for the PNG spec, perhaps combined with how to do color correction.
Received on Sunday, 4 February 2024 17:56:50 UTC