AOMediaCodec / av1-avif

AV1 Image File Format Specification - ISO-BMFF/HEIF derivative
https://aomediacodec.github.io/av1-avif/
BSD 2-Clause "Simplified" License
450 stars 40 forks source link

Invalid test files: Netflix/avis/alpha_video.avif `iref` value is incorrect #177

Open baumanj opened 2 years ago

baumanj commented 2 years ago

I believe the intent of https://github.com/AOMediaCodec/av1-avif/blob/master/testFiles/Netflix/avis/alpha_video.avif is to be a file with both 'avis' and 'avif' brand support, including an alpha channel associated with the primary image item.

The file contains both a primary image with item_ID 4: Screen Shot 2021-12-04 at 3 08 20 PM

as well as an alpha image with item_ID 3: Screen Shot 2021-12-04 at 3 08 48 PM

But the iref box which should associate the alpha item_ID (3) -> primary image item_ID (4) instead associates item_ID (3) -> item_ID (0) Screen Shot 2021-12-04 at 3 09 39 PM

I believe the fix is simply changing the byte at offset 0x103 to 0x04 as in alpha_video_fixed.avif.zip.

cconcolato commented 2 years ago

You're correct. But it seems, according to ComplianceWarden, that the file has more issues than that:

+--------------------------------------+
|           avif validation            |
+--------------------------------------+

Specification description: AVIF v1.0.0, 19 February 2019
https://aomediacodec.github.io/av1-avif/

[avif][Rule #3] Warning: [ItemId=3] still_picture flag set to 0
[avif][Rule #3] Warning: [ItemId=4] still_picture flag set to 0
[avif][Rule #4] Warning: [ItemId=3] reduced_still_picture_header flag set to 0
[avif][Rule #4] Warning: [ItemId=4] reduced_still_picture_header flag set to 0
[avif][Rule #5] Warning: Sequence Header OBUs should not be present in the AV1CodecConfigurationBox
[avif][Rule #5] Warning: Sequence Header OBUs should not be present in the AV1CodecConfigurationBox
[avif][Rule #11] Warning: The to_item_ID value of 0 should not be used - ignoring (from_item_ID=3)
[avif][Rule #12] Error: Not data offset found for item 0
[avif][Rule #13] Error: No sequence header OBU found in 'mdat' box (track_ID=2)

========================================
[avif] 2 error(s), 7 warning(s).
========================================

===== Involved rules descriptions:

[avif][Rule #3] Section 2.1
The AV1 Image Item Data should have its still_picture flag set to 1.

[avif][Rule #4] Section 2.1
The AV1 Image Item Data should have its reduced_still_picture_header flag set to 1.

[avif][Rule #5] Section 2.1
Sequence Header OBUs should not be present in the AV1CodecConfigurationBox.

[avif][Rule #11] Section 4. Auxiliary Image Items
The mono_chrome field in the Sequence Header OBU shall be set to 1.
The color_range field in the Sequence Header OBU shall be set to 1.

[avif][Rule #12] Section 4. Alpha Image Images
An AV1 Alpha Image Item (respectively an AV1 Alpha Image Sequence) shall be
encoded with the same bit depth as the associated master AV1 Image Item
(respectively AV1 Image Sequence).

[avif][Rule #13] Section 4. Auxiliary Image Sequences
The mono_chrome field in the Sequence Header OBU shall be set to 1.
The color_range field in the Sequence Header OBU shall be set to 1.

+--------------------------------------+
|           miaf validation            |
+--------------------------------------+

Specification description: MIAF (Multi-Image Application Format)
MPEG-A part 22 - ISO/IEC 23000-22 - w18260 FDIS - Jan 2019

[miaf][Rule #5] Error: iref references a non existing itemId=0

========================================
[miaf] 1 error(s), 0 warning(s).
========================================

===== Involved rules descriptions:

[miaf][Rule #5] Section 7.2.1.7
construction_method shall be equal to 0 for MIAF image items that are coded image items.
construction_method shall be equal to 0 or 1 for MIAF image items that are derived image items.

+--------------------------------------+
|           heif validation            |
+--------------------------------------+

Specification description: HEIF - ISO/IEC 23008-12 - 2nd Edition N18310

[heif][Rule #31] Error: 'msf1' brand: 'iso8' shall be present among the compatible brands array

========================================
[heif] 1 error(s), 0 warning(s).
========================================

===== Involved rules descriptions:

[heif][Rule #31] Section 10.3.1.1
Files shall contain the brand 'msf1' in the compatible brands:
- At least one track of handler type 'pict', as defined in 7.2, is required.
- It is required that 'iso8' is present among the compatible brands array.

+--------------------------------------+
|          isobmff validation          |
+--------------------------------------+

Specification description: ISO Base Media File Format
MPEG-4 part 12 - ISO/IEC 14496-12 - m17277 (6th+FDAM1+FDAM2+COR1-R4)

========================================
[isobmff] No errors.
========================================