Open wantehchang opened 1 month ago
Is it allowed to have multiple properties of the same type for the same item? For example one could have a pixi
version 0 for backward compatibility and another pixi
version 1 for the extended fields but with the same values as the other pixi
for the fields in common.
Otherwise pixi
version 1 will never be backward compatible because it is mandatory, right?
@y-guyon
Is it allowed to have multiple properties of the same type for the same item?
It depends on the property. 'pixi' says this:
Box type: 'pixi'
Property type: Descriptive item property
Container: ItemPropertyContainerBox
Mandatory (per item): No
Quantity (per item): At most one
So we can't have one with version 0 and one with version 1, unless we change the text say "At most one per version". But that might cause issues for older parsers as well.
Given the discussion in the meeting yesterday and the thread with Dirk I think we should not bump the version and simply extend it.
This issue is really part of a larger issue. Ideally all non-essential item properties that not understood (or have an unsupported version) should be ignored.
@leo-barnes @podborski @y-guyon
If we see a pixi box with version > 0, we should ignore and skip the box. Right now libavif fails with the
AVIF_RESULT_BMFF_PARSE_FAILED
error if it sees a pix box with version > 0:and
We can fix this by changing
avifParsePixelInformationProperty()
to returnavifResult
and having it returnAVIF_RESULT_NOT_IMPLEMENTED
if version > 0, and changing the caller to ignore theAVIF_RESULT_NOT_IMPLEMENTED
error.Note: I think the caller need to call
avifArrayPop(properties)
whenavifParsePixelInformationProperty()
returnsAVIF_RESULT_NOT_IMPLEMENTED
to clean up properly.