Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Add libavif build #193

Closed
wants to merge 4 commits into from
Closed

Add libavif build #193

wants to merge 4 commits into from

Conversation

fdintino
Copy link

This is a companion PR for python-pillow/Pillow#5201 (and python-pillow/pillow-depends#37). It adds scripts to build libavif wheels for manylinux1 and os x.

A few notes:

AOM required two changes to build on manylinux1—one to deal with the old version of perl, and another to #define an intrinsic that has a different name in the glibc on el5.

While I was working on these scripts I ran into some flakiness with crates.io. The recommended way to avoid such issues with rust CI builds is to "vendor" the crate dependencies. To that end, I included a rav1e vendor tar.gz file in python-pillow/pillow-depends#37. Also included in that PR is a script to generate new rav1e vendor archives. Despite the complexity building rav1e adds, I still think its inclusion is worthwhile because of how much faster it is compared to aom.

I'm not currently building rav1e on 32-bit because there are only 64-bit binaries for cargo-c releases. If this strikes folks as problematic, I could either look into opening a pull request against cargo-c to add 32-bit builds to their CI, or build cargo-c from source here (though I'd likely have to add a crate vendor tar.gz file for cargo-c to pillow-depends).

SVT-AV1 was too much of a hassle to build for manylinux1, though I am still building it for the os x wheels here. I'm open to removing this codec altogether.

In summary: all wheels include the aom codec for encoding and decoding, and the dav1d codec for decoding. 64-bit wheels include rav1e, and OS X has the SVT-AV1 codec.

.gitmodules Outdated
@@ -1,6 +1,6 @@
[submodule "Pillow"]
path = Pillow
url = git://github.com/python-Pillow/Pillow.git
url = git://github.com/fdintino/Pillow.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume this is just temporary to demonstrate that the PR passes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. That's also why I made it a separate commit, so that it's easy to revert / rebase away.

@radarhere
Copy link
Member

This has now been incorporated into python-pillow/Pillow#5201

@radarhere radarhere closed this Oct 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants