gpac / ComplianceWarden

A pluggable compliance checker (ISOBMFF, HEIF/MIAF/AVIF, AV1 HDR10+)
https://gpac.github.io/ComplianceWarden-wasm/
Other
16 stars 7 forks source link

False positive: no warning/error for avif with invalid `property_index` in `ItemPropertyAssociationBox` (`ipma`) #27

Closed baumanj closed 1 year ago

baumanj commented 3 years ago

The attached file is valid aside from the fact that the 3rd entry in the ipma box, which should have property_index 3, to reference the pasp property in the ipco box, instead has the value 5, an invalid index since there are only 4 entries (ispe, pixi, pasp, av1C) in the ipco box. However, the avif validator gives no errors.

rbouqueau commented 3 years ago

I think it is a valid but I couldn't find any normative reference about this case in the ISOBMFF standard.

@cconcolato opinion on this?

baumanj commented 3 years ago

I'd say the spec reference ISOBMFF (ISO/IEC 14496-12:2020) § 8.11.14.3 is what makes this invalid:

property_index is either 0 indicating that no property is associated (the essential indicator shall also be 0), or is the 1-based index (counting all boxes, including FreeSpace boxes) of the associated property box in the ItemPropertyContainerBox contained in the same ItemPropertiesBox.

rbouqueau commented 3 years ago

So we need to fix the text at a standardization level. @cconcolato Do you plan to attend the next MPEG meeting?

baumanj commented 3 years ago

The way I read it, the standard text is ok and makes this invalid. What do you think would need to be changed, @rbouqueau ?

rbouqueau commented 3 years ago

The text misses a normative sentence to forbid index overflow e.g. "The property index shall not exceed the number of property boxes in the ItemPropertyContainerBox contained in the same ItemPropertiesBox".

baumanj commented 2 years ago

Looks like the normative sentence will be added per https://github.com/MPEGGroup/FileFormat/issues/34#issuecomment-982346770

rbouqueau commented 1 year ago

Addressed in https://github.com/MPEGGroup/FileFormat/issues/34 (ISOBMFF 8th Edition)