libheif
libheif copied to clipboard
Parse EntityGroup Remaining Data
Some EntityToGroupBoxes have additional data at the end of the box (see ISO/IEC 14496-12 section 8.18.3.2). Currently, the libheif Box_grpl class doesn't parse any additional data. This pull request resolves this issue by moving the EntityGroup struct to its own class which allows for other boxes to inherit from it and specify how to parse their own remaining data.
For use cases, see ISO/IEC 23008-12 section 6.8 Entity and Sample Groups which mention the following entity groups:
Equivalent Boxes (eqiz) Burst Images (brst) Time-synchronized group (tsyn) Auto to Image group (iaug) etc... Personally, I'm interested in the Image Pyramid Entity Group (pymd) which will be added to HEIF version 3. Sample Files: C007.heic Contains a grpl box with an "altr" EntityGroup. The altr box doesn't have additional data at the end of the box, so it can simply reuse the defined EntityGroup class. No Box_altr is required.
multilayer003.heic Contains a grpl box with an "ster" EntityGroup. The ster box has an additional flag so the Box_ster parse_remaining() function accounts for this.