Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifications on mdcv box #138

Closed
jeanlf opened this issue Dec 7, 2021 · 7 comments · Fixed by #156
Closed

Clarifications on mdcv box #138

jeanlf opened this issue Dec 7, 2021 · 7 comments · Fixed by #156
Assignees
Labels
editorial if approved, it does not affect the technical aspects of the specification (e.g. typo change)

Comments

@jeanlf
Copy link

jeanlf commented Dec 7, 2021

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
Copy link
Collaborator

cconcolato commented Dec 7, 2021

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

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

  • in an SEI message (and in the mdcv box), whether it's a min or a max does not matter, it would be coded in units of 0.0001, so the actual coded value would be 10000, i.e. 0x00002710 in the 32bit field.
  • in the MDCV OBU (see section 6.7.4 of the AV1 specification, (and in the not-to-be-used SmDm box defined for VP9)), the value is coded using a 24.8 fixed point representation for a max luminance and 18.14 fixed point representation for a min luminance. So as a max value 1cd/m^2 would be coded as 0x00000100 and as a min value it would be 0x00004000.

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
Copy link
Author

jeanlf commented Dec 8, 2021

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
Copy link
Collaborator

wantehchang commented Jan 30, 2022

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
Copy link
Collaborator

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.

wantehchang added a commit to wantehchang/av1-isobmff that referenced this issue Mar 21, 2022
wantehchang added a commit to wantehchang/av1-isobmff that referenced this issue Oct 2, 2022
@cconcolato
Copy link
Collaborator

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
Copy link
Collaborator

Cyril: The extraneous "of" was a fixed issue (#124). Dimitri removed it in 83e2dcc.

wantehchang added a commit to wantehchang/av1-isobmff that referenced this issue Oct 3, 2022
In "their values SHALL match", change the word "match" to
"equal (except for precision issues, see note below)".

Exchange METADATA_TYPE_HDR_CLL and METADATA_TYPE_HDR_MDCV so that they
correspond to mdcv and clli in the right order.

Fix AOMediaCodec#138.
@wantehchang
Copy link
Collaborator

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).

wantehchang added a commit to wantehchang/av1-isobmff that referenced this issue Oct 11, 2022
In "their values SHALL match", change the word "match" to "equal (except
for different binary representations and precision issues, see the
second note below)".

Exchange METADATA_TYPE_HDR_CLL and METADATA_TYPE_HDR_MDCV so that they
correspond to mdcv and clli in the right order.

Fix AOMediaCodec#138.
wantehchang added a commit to wantehchang/av1-isobmff that referenced this issue Oct 11, 2022
In "their values SHALL match", change the word "match" to "equal (except
for different binary representations and precision issues, see the
second note below)".

Exchange METADATA_TYPE_HDR_CLL and METADATA_TYPE_HDR_MDCV so that they
correspond to mdcv and clli in the right order.

Fix AOMediaCodec#138.
@wantehchang wantehchang reopened this Oct 11, 2022
wantehchang added a commit to wantehchang/av1-isobmff that referenced this issue Dec 12, 2022
Split the requirements on 'clli' and 'mdcv' into separate list items so
that we can state the more complicated requirements that only apply to
'mdcv'.

Fix AOMediaCodec#138.
@cconcolato cconcolato added the editorial if approved, it does not affect the technical aspects of the specification (e.g. typo change) label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial if approved, it does not affect the technical aspects of the specification (e.g. typo change)
Projects
None yet
3 participants