Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 150 #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix issue 150 #202

wants to merge 1 commit into from

Conversation

leo-barnes
Copy link
Collaborator

@leo-barnes leo-barnes commented Nov 14, 2022

Microsoft/Chimera_cropped.avif:

  • Truncated crop to integers
  • Stripped optional config OBUs

Link-U/kimono*.crop.avif:

  • Reordered property associations so 'ispe' comes before transform properties
  • Rounded up crop to integers (that matches the PNGs)
  • Added NCLX with values 1,13,9,0
  • Stripped optional config OBUs

This closes issue #150

Microsoft/Chimera_*_cropped_*.avif:
- Truncated crop to integers
- Stripped optional config OBUs

Link-U/kimono*.crop.avif:
- Reordered property associations so 'ispe' comes before transform properties
- Rounded up crop to integers (that matches the PNGs)
- Added NCLX with values 1,13,9,0
- Stripped optional config OBUs
@leo-barnes
Copy link
Collaborator Author

@wantehchang @y-guyon
Do you want to sanity check the files? If not I'll merge this PR tomorrow.

@y-guyon
Copy link
Collaborator

y-guyon commented Aug 21, 2024

I ran avifdec at AOMediaCodec/libavif@3e4b9c8 compiled with

    "AVIF_ENABLE_EXPERIMENTAL_YCGCO_R": "ON",
    "AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP": "ON",
    "AVIF_ENABLE_EXPERIMENTAL_MINI": "ON",
    "AVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM": "ON",

It fails on kimono.crop.avif, kimono.mirror-vertical.rotate270.crop.avif and Chimera_8bit_cropped_480x256.avif with the error:

ERROR: Failed to parse image: BMFF parsing failed
Diagnostics:
 * [Strict] crop rect Y offset must be even due to this image's YUV subsampling

It works on Chimera_10bit_cropped_to_1920x1008.avif.

It fails on Chimera_10bit_cropped_to_1920x1008_with_HDR_metadata.avif with the error:

Conversion to RGB failed

@maryla-uc
Copy link

maryla-uc commented Aug 21, 2024

I looked into Chimera_10bit_cropped_to_1920x1008_with_HDR_metadata.avif which gives the Conversion to RGB failed error. This is because the image has matrix coeffecients value 10, i.e. AVIF_MATRIX_COEFFICIENTS_BT2020_CL, which is currently unsupported https://github.com/AOMediaCodec/libavif/blob/3e4b9c88761aab919cbf98377447b7315dd834b3/src/reformat.c#L108
avifdec tries to convert from YUV to RGB to save the output image and fails.
So the file is valid, it's just that avifdec doen't handle it.

@podborski podborski added the conformance Related to conformance suite. E.g. file updates, asserts, etc. label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conformance Related to conformance suite. E.g. file updates, asserts, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants