kornelski / cavif-rs

AVIF image creator in pure Rust
https://lib.rs/cavif
BSD 3-Clause "New" or "Revised" License
559 stars 25 forks source link

ComplianceWarden errors with CAvif encoded images #35

Closed mongeron closed 2 years ago

mongeron commented 2 years ago

https://github.com/gpac/ComplianceWarden is a tool to check AVIF images and other media formats against specifications.

With an image encoded by CAvif 1.3.0, it reports the following errors:

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

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

[avif][Rule #7] Error: The values of the AV1CodecConfigurationBox shall match
the Sequence Header OBU in the AV1 Image Item Data:
    AV1CodecConfigurationBox:
        seq_profile=0
        seq_level_idx_0=0
        seq_tier_0=0
        high_bitdepth=0
        twelve_bit=0
        mono_chrome=0
        chroma_subsampling_x=0
        chroma_subsampling_y=0
        chroma_sample_position=0
    Sequence Header OBU in the AV1 Image Item Data:
        seq_profile=1
        seq_level_idx_0=31
        seq_tier_0=0
        high_bitdepth=0
        twelve_bit=0
        mono_chrome=0
        chroma_subsampling_x=0
        chroma_subsampling_y=0
        chroma_sample_position=0

[avif][Rule #9] Error: Transformative property "av1C" shall be marked as essential (item_ID=1)

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

===== Involved rules descriptions:

[avif][Rule #7] Section 2.2.1
The values of the fields in the AV1CodecConfigurationBox shall match those of the
Sequence Header OBU in the AV1 Image Item Data.

[avif][Rule #9] Section 2.2.1
AV1 Item Configuration Property [...] shall be marked as essential.

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

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

[miaf][Rule #2] Error: compatible_brands list shall contain 'miaf' (not found) and 'mif1' (found)

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

===== Involved rules descriptions:

[miaf][Rule #2] Section 7.2.1.2
The FileTypeBox shall contain, in the compatible_brands list,
the following (in any order): 'mif1' (specified in ISO/IEC 23008-12)
[...]
Files conforming to the general restrictions in clause 7 shall include
the brand 'miaf' in the compatible_brands in the FileTypeBox.

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

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

========================================
[heif] No errors.
========================================

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

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

[isobmff][Rule #12] Error: 'hdlr box': reserved1 shall be 0 but value is 1383428980

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

===== Involved rules descriptions:

[isobmff][Rule #12] Section 8.4.3.1
'hdlr box': pre_defined = 0, reserved = 0, 'name' field shall be null-terminated.

The tool's checks are based on AVIF v1.0.0 specifications from February 2019, so I'm not sure if all the errors are valid. However, I think it is good to check these so that possible more strict validation in browsers doesn't prevent CAvif generated images from showing.

kornelski commented 2 years ago

This is the same as #32