w3c / png

Maintenance of the PNG specification
https://w3c.github.io/png/
Other
44 stars 11 forks source link

Use of TV specific terminology #346

Closed chrisn closed 8 months ago

chrisn commented 1 year ago

Reading through the current spec draft, I notice that there are a few terms used that are specific to TV production, and should be reviewed, as PNG is a general purpose graphics format and TV production is a small subset of its use cases. For example: "SDR" (as there are many different SDR formats, as @simontWork has mentioned in https://github.com/w3c/PNG-spec/issues/343), and the terms "shading" and "single-master".

fintelia commented 1 year ago

It isn't just TV terminology. A bunch of sections use different terminology, likely because they were written at different times by different people:

Section 4.2: Talks about a "source image" getting transformed into a "reference image", with the former explicitly left out of scope of the spec and the later consisting of dimensionless RGB or RGBA channels with $2^{sampledepth}$ bits.

cHRM chunk: Talks about display primaries "used" in "the image", without indicating whether that's the source image, reference image, or some other image.

sRGB chunk: Now the samples "conform" to a colour space and have a "rendering intent"

cICP and mDCv chunks: TV terminology as mentioned

Section 12.1 This section leans heavily into talking about samples being "light intensities" in an abstract 0-1 range. The concept of "original scene intensity" is mentioned but glossed over.

transfer function definition: "image luminance", "image samples"

simontWork commented 1 year ago

I think also the definition of luminance (and luma) could be tightened too. Luminance is a photometric measurement of intensity per area, brightness is the perception of luminance.

simontWork commented 1 year ago

Looking at the mDCv chunk, I think that the phrasing is still incorrect.

SDR covers a large range of file formats, not just BT.709. sRGB, AdobeRGB, ProPhoto all have fixed viewing environments and BT.709 has a reference viewing environment published in ITU-R BT.2035.

What does the end user do with an sRGB image that has an mCDv maximum luminance of 200? This just says that the file does not comply with the specification and needs some form of adaptation. There is however no specification of what that adaptation is. I don't think we can use normative text for SDR formats, "may" is probably the strongest that can be used.

svgeesus commented 1 year ago

It isn't just TV terminology. A bunch of sections use different terminology, likely because they were written at different times by different people:

Sometimes, yes. Other times because they are talking about different things, or at different levels of abstraction.

Section 4.2: Talks about a "source image" getting transformed into a "reference image", with the former explicitly left out of scope of the spec and the later consisting of dimensionless RGB or RGBA channels with $2^{sampledepth}$ bits.

Right. Those concepts were introduced in second edition, largely to help pin down what lossless means. For example I have a GIF image, whose palette has a dark brown in the first slot, a light green in the second slot and so on. I convert it to PNG. Can I rely on the green still being the second palette entry? No (and palettes are not part of the reference image). Is PNG lossless? Yes, it losslessly encodes the reference image.

cHRM chunk: Talks about display primaries "used" in "the image", without indicating whether that's the source image, reference image, or some other image.

The spec already asserts that these should be the same:

It is not recommended that datastream format converters attempt to convert supplied images to a different RGB colour space. The data should be stored in the PNG datastream without conversion, and the source primary chromaticities should be recorded if they are known. Colour space transformation at datastream conversion time is a bad idea because of gamut mismatches and rounding errors.

svgeesus commented 1 year ago

What does the end user do with an sRGB image that has an mCDv maximum luminance of 200? This just says that the file does not comply with the specification and needs some form of adaptation.

Does it really though? But yes, there is no definition for any adaptation that might be needed for a display-referred, relative luminance image displayed in non-reference viewing conditions.

I don't think we can use normative text for SDR formats, "may" is probably the strongest that can be used.

I agree we should use "may" here.

svgeesus commented 1 year ago

Luminance is a photometric measurement of intensity per area, brightness is the perception of luminance.

Right (for the first part. The second is misleading unless we mention cube roots). Currently the definition in the spec is a bit weak:

luminance perceived brightness of a colour Note

Luminance and chromaticity together fully define a perceived colour. A formal definition of luminance is found at [COLORIMETRY].

Of course, if we define luminance correctly this then adds the problem that we need to define the terms photometric, luminous intensity, and photopic observer.

In terms of the average readership (who will not have purchased CIE 15, so isn't helped by our current reference) perhaps we could point to something like

https://colorusage.arc.nasa.gov/lum_and_chrom.php

and give a better, but still informal, definition? Something like

Luminance: an objective measurement of the emitted light intensity, taking into account the sensitivity of the human eye to different wavelengths. See Luminance and Chromaticity or, for a formal definition, [[Colorimetry]].

Myndex commented 10 months ago

I think the simplest definition:

Works for most purposes. If we add in the weighting for spectral sensitivity, then we need to futher clarify that lightness, darkness, and brightness are not part of that weighting.

A more complete, mini-definition:


See also: https://cie.co.at/eilvterm/17-21-050

chrisn commented 8 months ago

I have copied the issues mentioned by @fintelia to #405 and the luminance discussion to #406, as the other points discussed here have been resolved in the spec, and we'd like to close this issue.