Open wantehchang opened 3 years ago
Since this list item is in v1.0.0 and is not new, we don't need to fix this in the new version of the spec.
Thanks for the report. You're correct. I think it was intended to say something along the lines of: information in OBUs (Sequence Header, Metadata) shall match information in properties, if a property exists that carries the same type of information.
The question is more complex than I initially thought, as it depends on the property:
pixi
), I think we want that if the box is present, its values shall match the depth information given in the Sequence Header OBUcolr
), if it is of type nclx
, we want to allow the container to override missing or unknown values in the Sequence Headermdcv
), we want it to match the Metadata OBUs values. Same for the Content Light Level Information (clli
). Hi Cyril,
Thank you for taking a look. I would like to comment on the first two bullet points in your comment.
avifDecoderItemValidateAV1()
function in libavif/src/read.c:static avifResult avifDecoderItemValidateAV1(const avifDecoderItem * item, avifDiagnostics * diag, const avifStrictFlags strictFlags)
{
const avifProperty * av1CProp = avifPropertyArrayFind(&item->properties, "av1C");
...
const avifProperty * pixiProp = avifPropertyArrayFind(&item->properties, "pixi");
...
if (pixiProp) {
const uint32_t av1CDepth = avifCodecConfigurationBoxGetDepth(&av1CProp->u.av1C);
for (uint8_t i = 0; i < pixiProp->u.pixi.planeCount; ++i) {
if (pixiProp->u.pixi.planeDepths[i] != av1CDepth) {
// pixi depth must match av1C depth
avifDiagnosticsPrintf(diag,
"Item ID %u depth specified by pixi property [%u] does not match av1C property depth [%u]",
item->id,
pixiProp->u.pixi.planeDepths[i],
av1CDepth);
return AVIF_RESULT_BMFF_PARSE_FAILED;
}
}
}
The colour information property takes precedence over any colour information in the image bitstream, i.e. if the property is present, colour information in the bitstream shall be ignored.
the AVIF spec does not need to describe the relation between a colour information property of type nclx
and the sequence header OBU.
Section 2.2.1. AV1 Item Configuration Property says:
I have a question about the last list item. None of the AV1 Metadata OBUs contains information equivalent to the PixelInformationProperty or the
nclx
type of ColourInformationBox. So the last list item apparently contains a typo. But I don't know how to correct it.