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 negative: HEIF ItemPropertyAssociation (ipma) requirements #21

Closed baumanj closed 3 years ago

baumanj commented 3 years ago

Per HEIF (ISO 23008-12:2017) § 9.3.1:

  1. "flags should be equal to 0 unless there are more than 127 properties in the ItemPropertyContainerBox"
  2. "The version 0 should be used unless 32-bit item_ID values are needed"
  3. "There shall be at most one ItemPropertyAssociationbox with a given pair of values of version and flags."

See https://github.com/AOMediaCodec/libavif/issues/485 for example invalid files

rbouqueau commented 3 years ago

Hi, thanks for reporting.

The constraint is actually from the parent spec i.e. ISOBMFF (m17277 (6th+FDAM1+FDAM2+COR1-R4)) Section 8.11.14.1 and will be reported as such:

Each ItemPropertyAssociationBox shall be ordered by increasing item_ID, and there shall be at most one occurrence of a given item_ID, in the set of ItemPropertyAssociationBox boxes. The version 0 should be used unless 32-bit item_ID values are needed; similarly, flags should be equal to 0 unless there are more than 127 properties in the ItemPropertyContainerBox. There shall be at most one ItemPropertyAssociationBox with a given pair of values of version and flags.

I'm going to re-prioritize this one for my next batch of rules!

rbouqueau commented 3 years ago

PS: the shall is implemented, but the shoulds are not.