pillow-avif-plugin: add build-pillow-avif-plugin.yml for riscv64 wheels - #1030
Merged
Conversation
Vendors aom (encoder) and dav1d (decoder) via libavif's own CMake FetchContent, mirroring wheelbuild/config.sh's build_libavif. rav1e is dropped: it duplicates aom's encoder role and would pull in a Rust toolchain for no functional gain.
…bitdepth gating bug aom's av1.cmake unconditionally adds the highbd RVV convolve sources to its RVV object library, unlike the equivalent x86/NEON lists which gate their highbd files on CONFIG_AV1_HIGHBITDEPTH. With highbitdepth off (as upstream's own wheelbuild/config.sh sets it), those files call undeclared _c fallbacks. Confirmed against the pinned aom v3.14.1 tag and current aom main; see gotcha 271. -DENABLE_RVV=0 removes the whole broken RVV object library from the aom build instead of patching one symbol; aom is encoder-only here so the cost is slower portable-C encode, not a functional loss. Verified with a QEMU riscv64 rehearsal of the exact cmake/ninja invocation: the previous flags reproduce the CI failure verbatim, and the fix links libavif.so cleanly end to end (aom + dav1d + libyuv).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pillow-avif-plugin1.6.0Compiles a Pillow plugin that adds AVIF read/write support, vendoring aom and dav1d as static codecs inside libavif via CMake. Upstream publishes no riscv64 wheel.
Mirrors upstream's
build-native-wheelsjob.Differs from upstream
before-allwith a direct CMake invocation - multibuild's ccache/sccache/nasm helpers fetch prebuilt binaries with no riscv64 release.-DENABLE_RVV=0to the vendored aom build: aom'sav1.cmakeunconditionally bundles highbd-only RVV convolve sources into its RVV object library (unlike the equivalent x86/NEON lists, which gate their highbd files onCONFIG_AV1_HIGHBITDEPTH), so with highbitdepth off - the same setting upstream's ownwheelbuild/config.shuses - those files call undeclared_cfallbacks and fail to compile on riscv64. Confirmed against both the pinned aomv3.14.1tag and current aommain; not fixed upstream. aom is encoder-only in this build, so disabling its RVV path costs encode speed, not correctness.Testing
test-extras = tests, pytest via.github/workflows/wheels-test.sh).License: Wheel bundles aom (BSD-2-Clause + AOM Patent License) and dav1d (BSD-2-Clause), statically linked into libavif.so; upstream's own dependency licence texts are appended to
LICENSEthe same way its release CI does.Built on cp312 equivalent (aarch64, local): 104 passed, 11 skipped.