-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add aom and libheif to 'web' group dependencies for AVIF support #16
Conversation
@kleisauke Thanks for adding the |
Great! I'm currently debugging a segfault in SSE2 code that happens on Windows i686 in combination with GCC (v10.2 and 9.3) and aom (master and v2.0.0). The binaries produced by LLVM works without any problems. Details
I suspect this is an assembler bug, I'm now trying to compile GCC v10.2 with binutils v2.35.1 as the binutils provided by MXE is old (v2.28, released on 2017-03-06). If that doesn't work, I think we need to disable the SIMD optimizations for i686 (i.e. compile with |
Did you see aom's |
Ah, I missed that. Upgrading binutils to the latest version didn't help, unfortunately. I disabled SSE2 with commit 050e4eb but it seems that this also disables the remaining optimizations (possible due to that i686 now almost passes the test suite, it fails with the last
(this needs a patch for libheif to improve the error reporting, see: 21ae186) |
Oh, I just noticed that position-independent code is disabled by default within aom, see: Perhaps forcing the build-win64-mxe/build/settings/gcc.mk Lines 12 to 13 in f415e83
could collide with the CONFIG_PIC variable in aom's CMake config. I'll have a try to build aom with -DCONFIG_PIC=1 (Firefox and Chrome also seems to force PIC for 32-bit builds) and revert that SSE2 change, perhaps that will resolve the above mentioned segfault.
|
Perhaps aom's Not Invented Here approach is part of their patent defence program? ;) |
The SSE2 segfault turns out to be a stack alignment bug, commit 755c615 adds a patch to fix this. I also incorporated patches from dav1d/webp with commit afdf49b and backported a security fix with commit 36bfc16. Windows x86 still has a OOM failure on the |
Fantastic, thank you Kleis, I'll let you press the big green merge button when you're ready. |
For the record, test suite currently fails on Windows ARM64 when checking the absolute difference between loading and saving the same AVIF image. I could also reproduce this on the command line (on Windows ARM64), when I do this: $ vips copy avif-orientation-6.avif x2.avif[compression=av1] Output: https://t0.nl/x2.avif Anyway, it works fine on Linux ARM64 (see libvips/libvips@c4f9bdc and Travis build), so this is ready for merging. |
Resolves #13