You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-17Lines changed: 3 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ This is a [SDWebImage](https://github.com/rs/SDWebImage) coder plugin to add [AV
12
12
13
13
This AVIF coder plugin currently support AVIF still image **decoding**. Including alpha channel, as well as 10bit/12bit HDR images.
14
14
15
-
The AVIF encoding is not currently support, because the software-based encoding speed is really slow. Need to wait for better enc implementation.
15
+
The AVIF encoding is also supported now. Which always encode as 8-bit depth images.
16
16
17
-
Note: AVIF image spec is still in evolve. And the current AVIF codec is a simple implementation.
17
+
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.
18
18
19
19
Since AVIF is AV1-based inside HEIF image container. In the future, this repo may moved to existing HEIF coder plugin [SDWebImageHEIFCoder](https://github.com/SDWebImage/SDWebImageHEIFCoder) instead.
20
20
@@ -35,17 +35,7 @@ it, simply add the following line to your Podfile:
35
35
pod 'SDWebImageAVIFCoder'
36
36
```
37
37
38
-
Note: Current `libaom` dependency via CocoaPods, use the pre-built static library for each architecutre.
39
-
40
-
The reason of this it's that we want to use SIMD/SSE/AVX2 CPU instruction optimization for each platforms. However libaom does not using dynamic CPU detection for Apple's platforms. We need the upstream to support it.
41
-
42
-
At the same time, CocoaPods does not allow you to write a framework contains so much of architecture detection (for example, iPhone Simulator is x86_x64, however, iPhone is ARM, they should use different assembly files). So we use the pre-built one instead.
43
-
44
-
If you're using `use_frameworks!` in Podfile, you can check it with static framework instead.
45
-
46
-
```
47
-
pod 'SDWebImageAVIFCoder', :modular_headers => true
48
-
```
38
+
Note: From version 0.2.0, the dependency libavif and libaom use the portable C implementation to works on Apple platforms. If you need the pre-built library with SIMD/AVX and assembly optimization, try the 0.1.0 version.
49
39
50
40
#### Carthage
51
41
@@ -55,10 +45,6 @@ SDWebImageAVIFCoder is available through [Carthage](https://github.com/Carthage/
55
45
github "SDWebImage/SDWebImageAVIFCoder"
56
46
```
57
47
58
-
Note: Carthage dependency of `libaom` using the C implementation codec, instead of original SIMD/SSE/AVX accelerated and assembly implementation, because it need extra dependency (CMake && NASM build tool).
59
-
60
-
The C implementation make it possible to cross-platform in tvOS/watchOS as well. But if you're care about performance, try CocoaPods instead.
61
-
62
48
## Usage
63
49
64
50
To use AVIF coder, you should firstly add the `SDImageAVIFCoder.sharedCoder` to the coders manager. Then you can call the View Category method to start load AVIF images.
0 commit comments