AOMediaCodec / av1-isobmff

Official specification of the AOM group for the carriage of AV1 in ISOBMFF
https://AOMediaCodec.github.io/av1-isobmff
64 stars 16 forks source link

Clarifications on mdcv box #138

Closed jeanlf closed 1 year ago

jeanlf commented 2 years ago

The spec says:

For sample entries corresponding to HDR content, the MasteringDisplayColourVolumeBox mdcv and ContentLightLevelBox clli SHOULD be present, and their values SHALL match the values of contained in the Metadata OBUs of type METADATA_TYPE_HDR_CLL and METADATA_TYPE_HDR_MDCV, if present (in the configOBUs or in the samples).

For mdcv, this is not very clear. Does this mean that the values shall be exactly the same values as in the METADATA_TYPE_HDR_MDCV OBU, or shall be rewritten into the binary representation of the corresponding HEVC/VVC SEIs ?

cconcolato commented 2 years ago

If it's not clear, we should clarify it. Let's take examples.

If a luminance value is 1 cd/m^2:

So the coded value is not the same but the actual value (in cd/m^2) is the same. I think that's why the spec uses "match" and not "equal".

The same applies for chromaticity values. The MPEG specifications uses 0.00002 increments and limits the value to the range 0 to 50000. The AOM specification uses a 0.16 fixed-point representation. So a CIE value of 0.6900 would be coded in MPEG-space as 0.6900/0.00002 = 34500, i.e. 0x86C4, while in AOM-space it would be coded 0.6900*65536 = 45,219.84 ~= 0xB0A4.

jeanlf commented 2 years ago

I think 'match' is misleading here, as it could be interpreted as 'equal', especially since there are several occurrences of 'shall match' in this text for which the meaning is 'equal'

wantehchang commented 2 years ago

I think it is useful to add a note/warning about the different units and encodings used in the AV1 HDR MDCV metadata OBU and the HEVC mastering display colour volume SEI message.

Also, it seems that certain fractional values cannot be represented exactly in either format. For example, consider a luminance value of 1.1 cd/m^2. This luminance value can be coded exactly in the SEI message but cannot be coded exactly in the MDCV OBU. So it is not clear what it means for values to "match" or be "equal".

cconcolato commented 2 years ago

The group agrees to add a note, to clarify the precision aspect and highlight that coded values are not the same as in an SEI message.

cconcolato commented 2 years ago

The groups agrees to update the word "match" to "equal (except for precision issues, see note below)". And also to remove the extraneous "of".

wantehchang commented 2 years ago

Cyril: The extraneous "of" was a fixed issue (https://github.com/AOMediaCodec/av1-isobmff/issues/124). Dimitri removed it in https://github.com/AOMediaCodec/av1-isobmff/commit/83e2dccd00a6f40744275539244759c324f60331.

wantehchang commented 2 years ago

Cyril: After reading this issue again,I realized that it's not good to change "match" to "equal", because that's exactly what jeanlf found confusing (see the second comment of jeanlf).

One solution is to change "values" to "actual values" or "decoded values" (as opposed to coded values).