Skip to content

Commit

Permalink
Fix Link-U files (closes #196)
Browse files Browse the repository at this point in the history
Also fix crash in sanitizer for some profile 2 files

testFiles/Link-U/hato.profile0.10bpc.yuv420.monochrome.no-cdef.no-restoration.avif
testFiles/Link-U/hato.profile0.8bpc.yuv420.monochrome.no-cdef.avif
testFiles/Link-U/hato.profile2.10bpc.yuv422.monochrome.no-cdef.no-restoration.avif
testFiles/Link-U/hato.profile2.8bpc.yuv422.monochrome.no-cdef.avif
    Remove optional config OBUs
    Insert default colr box
    Fix incorrect pixi

testFiles/Link-U/fox.profile2.10bpc.yuv422.avif
testFiles/Link-U/fox.profile2.10bpc.yuv422.odd-height.avif
testFiles/Link-U/fox.profile2.10bpc.yuv422.odd-width.avif
testFiles/Link-U/fox.profile2.10bpc.yuv422.odd-width.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv422.avif
testFiles/Link-U/fox.profile2.12bpc.yuv422.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv422.odd-width.avif
testFiles/Link-U/fox.profile2.12bpc.yuv422.odd-width.odd-height.avif
testFiles/Link-U/hato.profile2.10bpc.yuv422.no-cdef.no-restoration.avif
testFiles/Link-U/hato.profile2.12bpc.yuv422.monochrome.no-cdef.no-restoration.avif
testFiles/Link-U/hato.profile2.12bpc.yuv422.no-cdef.no-restoration.avif
testFiles/Link-U/fox.profile2.8bpc.yuv422.avif
testFiles/Link-U/fox.profile2.8bpc.yuv422.odd-height.avif
testFiles/Link-U/fox.profile2.8bpc.yuv422.odd-width.avif
testFiles/Link-U/fox.profile2.8bpc.yuv422.odd-width.odd-height.avif
    Update av1C: av1C[chroma_subsampling_x] does not match Sequence Header OBU. '0' != '1'
    Remove optional config OBUs
    Insert default colr box

testFiles/Link-U/fox.profile0.10bpc.yuv420.avif
testFiles/Link-U/fox.profile0.10bpc.yuv420.monochrome.avif
testFiles/Link-U/fox.profile0.10bpc.yuv420.monochrome.odd-height.avif
testFiles/Link-U/fox.profile0.10bpc.yuv420.monochrome.odd-width.avif
testFiles/Link-U/fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif
testFiles/Link-U/fox.profile0.10bpc.yuv420.odd-height.avif
testFiles/Link-U/fox.profile0.10bpc.yuv420.odd-width.avif
testFiles/Link-U/fox.profile0.10bpc.yuv420.odd-width.odd-height.avif
testFiles/Link-U/fox.profile0.8bpc.yuv420.avif
testFiles/Link-U/fox.profile0.8bpc.yuv420.monochrome.avif
testFiles/Link-U/fox.profile0.8bpc.yuv420.monochrome.odd-height.avif
testFiles/Link-U/fox.profile0.8bpc.yuv420.monochrome.odd-width.avif
testFiles/Link-U/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif
testFiles/Link-U/fox.profile0.8bpc.yuv420.odd-height.avif
testFiles/Link-U/fox.profile0.8bpc.yuv420.odd-width.avif
testFiles/Link-U/fox.profile0.8bpc.yuv420.odd-width.odd-height.avif
testFiles/Link-U/fox.profile1.10bpc.yuv444.avif
testFiles/Link-U/fox.profile1.10bpc.yuv444.odd-height.avif
testFiles/Link-U/fox.profile1.10bpc.yuv444.odd-width.avif
testFiles/Link-U/fox.profile1.10bpc.yuv444.odd-width.odd-height.avif
testFiles/Link-U/fox.profile1.8bpc.yuv444.avif
testFiles/Link-U/fox.profile1.8bpc.yuv444.odd-height.avif
testFiles/Link-U/fox.profile1.8bpc.yuv444.odd-width.avif
testFiles/Link-U/fox.profile1.8bpc.yuv444.odd-width.odd-height.avif
testFiles/Link-U/fox.profile2.10bpc.yuv422.avif
testFiles/Link-U/fox.profile2.10bpc.yuv422.monochrome.avif
testFiles/Link-U/fox.profile2.10bpc.yuv422.monochrome.odd-height.avif
testFiles/Link-U/fox.profile2.10bpc.yuv422.monochrome.odd-width.avif
testFiles/Link-U/fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv420.avif
testFiles/Link-U/fox.profile2.12bpc.yuv420.monochrome.avif
testFiles/Link-U/fox.profile2.12bpc.yuv420.monochrome.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv420.monochrome.odd-width.avif
testFiles/Link-U/fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv420.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv420.odd-width.avif
testFiles/Link-U/fox.profile2.12bpc.yuv420.odd-width.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv422.monochrome.avif
testFiles/Link-U/fox.profile2.12bpc.yuv422.monochrome.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv422.monochrome.odd-width.avif
testFiles/Link-U/fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv444.avif
testFiles/Link-U/fox.profile2.12bpc.yuv444.monochrome.avif
testFiles/Link-U/fox.profile2.12bpc.yuv444.monochrome.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv444.monochrome.odd-width.avif
testFiles/Link-U/fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv444.odd-height.avif
testFiles/Link-U/fox.profile2.12bpc.yuv444.odd-width.avif
testFiles/Link-U/fox.profile2.12bpc.yuv444.odd-width.odd-height.avif
testFiles/Link-U/fox.profile2.8bpc.yuv422.monochrome.avif
testFiles/Link-U/fox.profile2.8bpc.yuv422.monochrome.odd-height.avif
testFiles/Link-U/fox.profile2.8bpc.yuv422.monochrome.odd-width.avif
testFiles/Link-U/fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif
testFiles/Link-U/hato.profile0.10bpc.yuv420.no-cdef.no-restoration.avif
testFiles/Link-U/hato.profile0.8bpc.yuv420.no-cdef.avif
testFiles/Link-U/hato.profile2.12bpc.yuv422.monochrome.avif
    Remove optional config OBUs
    Insert default colr box
  • Loading branch information
leo-barnes committed Sep 10, 2024
1 parent aa906e0 commit 96fe174
Show file tree
Hide file tree
Showing 76 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tools/sanitize_avif.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ def _parse_av1_sequence_header_obu(self, reader: FileReader.BitReader) -> dict[s
parsed["enable_restoration"] = reader.f(1)

# color_config()
bitdepth = 8
parsed["high_bitdepth"] = reader.f(1)
if parsed["seq_profile"] == 2 and parsed["high_bitdepth"]:
parsed["twelve_bit"] = reader.f(1)
Expand Down Expand Up @@ -1301,7 +1302,7 @@ def _parse_av1_sequence_header_obu(self, reader: FileReader.BitReader) -> dict[s
elif parsed["seq_profile"] == 1:
parsed["subsampling_x"] = parsed["subsampling_y"] = 0
else:
if parsed["twelve_bit"]:
if bitdepth == 12:
parsed["subsampling_x"] = reader.f(1)
if parsed["subsampling_x"]:
parsed["subsampling_y"] = reader.f(1)
Expand Down
Binary file modified testFiles/Link-U/fox.profile0.10bpc.yuv420.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile0.10bpc.yuv420.monochrome.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile0.10bpc.yuv420.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile0.10bpc.yuv420.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile0.8bpc.yuv420.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile0.8bpc.yuv420.monochrome.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile0.8bpc.yuv420.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile0.8bpc.yuv420.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile1.10bpc.yuv444.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile1.10bpc.yuv444.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile1.10bpc.yuv444.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile1.8bpc.yuv444.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile1.8bpc.yuv444.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile1.8bpc.yuv444.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.10bpc.yuv422.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.10bpc.yuv422.monochrome.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.10bpc.yuv422.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.10bpc.yuv422.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv420.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv420.monochrome.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv420.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv420.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv422.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv422.monochrome.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv422.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv422.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv444.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv444.monochrome.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv444.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.12bpc.yuv444.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.8bpc.yuv422.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.8bpc.yuv422.monochrome.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.8bpc.yuv422.odd-height.avif
Binary file not shown.
Binary file modified testFiles/Link-U/fox.profile2.8bpc.yuv422.odd-width.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/hato.profile0.8bpc.yuv420.no-cdef.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/hato.profile2.12bpc.yuv422.monochrome.avif
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified testFiles/Link-U/hato.profile2.8bpc.yuv422.no-cdef.avif
Binary file not shown.

0 comments on commit 96fe174

Please sign in to comment.