📈 GH Trending Explorer 🎲 Surprise me

← all repos

SDWebImage / SDWebImageAVIFCoder

git clone https://github.com/SDWebImage/SDWebImageAVIFCoder.git 0.11.1 · 1y ago 🔥 on GitHub Trending today

A SDWebImage coder plugin to support AVIF(AV1 Image File Format) image

+0
stars, 24h · #59,302
+0
stars, 7 days · #58,076
+~0
stars, 30 days · #58,657
66
★ total
13
forks · 6 open issues

Star history (as recorded here)

2026-10-22 · 66 ★ 2026-10-23 · 66 ★
LanguageObjective-C
LicenseMIT
Created2019-04-14 (7y ago)
Last push8mo ago
Watchers7
OwnerOrganization

Seen on GitHub Trending

  • 2026-10-23 — #18 weekly in objective-c
  • 2026-10-22 — #19 weekly in objective-c

GitHub topics

Links

README excerpt
# SDWebImageAVIFCoder
## What's for
This is a SDWebImage coder plugin to add AV1 Image File Format (AVIF) support. Which is built based on the open-sourced libavif codec.
This AVIF coder plugin support AVIF still/sequence image. Including alpha channel, as well as 10bit/12bit/16bit HDR images. (The AVIF sequence animation is available from v0.9.0).
The AVIF encoding is also supported now. Which always encode as 8-bit depth images.
See the demo for the more showcase.
## Note
AVIF image spec is still in evolve. And the current upstream AVIF codec is a simple implementation. The encoding time may be long for large images.
Since we rely on the external codec libavif. We may periodically update the dependency and bump version. Make sure you're using the latest version as possible as you can :)
## AV1 Codec
libavif is a image codec. But AVIF is based on the AV1 Video standard. So it need a AV1 codec for support. This relationship is just like HEIF(image) and HEVC(video) codec.
You can choose the codec and use `libavif` CocoaPods subspec to choose the one you'd like.
### aom
+ For Carthage/SwifftPM
libavif is built with aom codec support. aom is the first AV1 codec during the standard draft implementation. The aom support both decodinng and encoding
+ For CocoaPods
Because of strange design of **subspec dependencies resolution algorithm**, we can not make aom by default (or all the subspecs will always link aom, which means not optional). So libavif is built with nothing codec (`libavif/core`). You need to choose the actual AV1 codec using one or more of below.
If you want to use aom, use:
 [code] 
or other AV1 codec, like dav1d:
 [code] 
### dav1d (Decoding)
dav1d is the new and next generation AV1 codec, focused on speed and correctness.
See more about explanation for why starting a new project but not improving aom
From v0.3.0, libavif can built with dav1d. For CocoaPods user, you can simply use the subspec for this. Carthage for optional dav1d codec is not supported currently.
### libgav1 (Decoding)
libgav1 is a Main profile (0) & High profile (1) compliant AV1 decoder. More information on the AV1 video format can be found at aomedia.org.
From v0.8.3, libavif can built with libgav1. For For CocoaPods user, you can simply use the subspec for this.
### rav1e (Encoding)
rav1e is the fastest and safest AV1 encoder. Which use Rust programming to provide fast and safe codec compared to aom. Its current form it is most suitable for cases where libaom (the reference encoder) is too slow.
See more about performance
From v0.4.3, libavif can built with rav1e. For CocoaPods user, you can simply use the subspec for this. Carthage/SPM for optional rav1c codec is not supported currently.
Note: The librav1e on CocoaPods use pre-built static-linking binary. Which means, it can not be used for CocoaPods's dynamic-linking.
To use for framework package format (CocoaPods defaults use ar archive format), you should write something like this:
 [code] 
but not this:
 [code