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

Test failure avif/compare_avif_to_png with libavif-0.8.2 #677

Closed
remicollet opened this issue Mar 8, 2021 · 5 comments · Fixed by #680
Closed

Test failure avif/compare_avif_to_png with libavif-0.8.2 #677

remicollet opened this issue Mar 8, 2021 · 5 comments · Fixed by #680
Labels
Milestone

Comments

@remicollet
Copy link
Contributor

GD Warning: avif error - Could not parse image: Truncated dataavif/compare_avif_to_png.c:52: baboon: gdImageCreateFromAvifPtr failed
GD Warning: avif error - Could not parse image: Truncated dataavif/compare_avif_to_png.c:52: dice_with_alpha: gdImageCreateFromAvifPtr failed
GD Warning: avif error - Could not parse image: Truncated dataavif/compare_avif_to_png.c:52: plum_blossom_12bit: gdImageCreateFromAvifPtr failed
GD Warning: avif error - Could not parse image: Truncated dataavif/compare_avif_to_png.c:52: sunset: gdImageCreateFromAvifPtr failed
FAIL avif/compare_avif_to_png (exit status: 4)

remicollet referenced this issue Mar 8, 2021
Demand for AVIF support on the web is growing, as the word gets out
about this new file format which allows higher-quality encoding at
smaller sizes.  Core contributors to major open-source CMSs are
interested in auto-generating AVIF images! They've been simply
waiting for support to appear in libgd.

This PR aims to meet the growing demand, and to help bring smaller,
more beautiful images to more of the web - to sites created by
experienced developers and CMS users alike.

This PR adds support by incorporating libavif in addition to the
existing libheif support.  It's generally felt that libavif has
more complete support for the AVIF format. libavif is also used
by the Chromium project and squoosh.app.

In this PR, I've endeavored to incorporate the latest research into
best practices for AVIF encoding - not just for default quantizer
values, but also an algorithm for determining the number of
horizontal tiles, vertical tiles, and threads.

Fixes #557.
@remicollet remicollet changed the title [2.3.2] Test falure avif/compare_avif_to_png [2.3.2] Test failure avif/compare_avif_to_png Mar 8, 2021
@remicollet
Copy link
Contributor Author

Seems related to libavif version used

  • fails on Fedora 33 with version 0.8.2
  • passes on Fedora 34 with version 0.8.4

@vapier vapier changed the title [2.3.2] Test failure avif/compare_avif_to_png Test failure avif/compare_avif_to_png with libavif-0.8.2 Mar 8, 2021
@vapier vapier added the bug label Mar 8, 2021
@vapier vapier added this to the GD 2.3.3 milestone Mar 8, 2021
@vapier
Copy link
Member

vapier commented Mar 8, 2021

@morsssss want to increase the requirement to 0.8.4 and call it a day?

@morsssss
Copy link
Contributor

morsssss commented Mar 8, 2021

Mayyyyybe. I'm looking at distros, and if we bump up to 0.8.4:

  • for Debian, buster has 0.7, buster-backports has 0.8.2, and as of bullseye it's 0.8.4.
  • For Ubuntu, it doesn't matter - Xenial has 0.7, and hirsute has 0.8.4.

For Fedora, of course, it would be nice if we supported 33.

Let me see if I can quickly find out what might have changed between 0.8.2 and 0.8.4 - but I won't spend too much time on it - especially given your suggestion :)

@morsssss
Copy link
Contributor

morsssss commented Mar 8, 2021

Separately, @remicollet , I started talking to PHP project maintainers this weekend about introducing this support into PHP. It looks like you're quite involved in PHP! Let me know if you have interest here....

@morsssss
Copy link
Contributor

morsssss commented Mar 8, 2021

@wantehchung and I have a simple patch that, at least in his tests, makes this work on v0.8.2. I will submit it.

vapier pushed a commit that referenced this issue Mar 16, 2021
Don't return AVIF_RESULT_TRUNCATED_DATA, as this is normal for libavif <= 0.8.2. In our tests,
this makes tests pass with libavif 0.8.2.

Plus, we did a few things to stop compiler warnings - and added a newline to error output.

thanks @wantehchang for the collaboration here!

This fixes #677.
andykimpe pushed a commit to andykimpe/remirepo that referenced this issue Oct 5, 2021
open libgd/libgd#677 avif test failure
open libgd/libgd#678 heif segfault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants