File tree Expand file tree Collapse file tree 4 files changed +26
-13
lines changed
SDWebImageAVIFCoder/Classes Expand file tree Collapse file tree 4 files changed +26
-13
lines changed Original file line number Diff line number Diff line change 3
3
target 'SDWebImageAVIFCoder_Example' do
4
4
platform :ios , '8.0'
5
5
pod 'SDWebImageAVIFCoder' , :path => '../'
6
+ pod 'libavif' , :subspecs => [ 'libaom' , 'libdav1d' ]
6
7
7
8
target 'SDWebImageAVIFCoder_Tests' do
8
9
inherit! :search_paths
14
15
target 'SDWebImageAVIFCoder_Example macOS' do
15
16
platform :osx , '10.10'
16
17
pod 'SDWebImageAVIFCoder' , :path => '../'
18
+ pod 'libavif' , :subspecs => [ 'libaom' , 'libdav1d' ]
17
19
end
Original file line number Diff line number Diff line change 1
1
PODS:
2
2
- libaom (1.0.1)
3
- - libavif (0.2.0):
3
+ - libavif (0.3.0):
4
+ - libavif/libaom (= 0.3.0)
5
+ - libavif/libaom (0.3.0):
4
6
- libaom (>= 1.0.1)
5
- - SDWebImage (5.1.0):
6
- - SDWebImage/Core (= 5.1.0)
7
- - SDWebImage/Core (5.1.0)
8
- - SDWebImageAVIFCoder (0.2.1):
9
- - libavif (~> 0.2.0)
7
+ - libavif/libdav1d (0.3.0):
8
+ - libavif/libaom
9
+ - libdav1d (>= 0.4.0)
10
+ - libdav1d (0.4.0)
11
+ - SDWebImage (5.2.2):
12
+ - SDWebImage/Core (= 5.2.2)
13
+ - SDWebImage/Core (5.2.2)
14
+ - SDWebImageAVIFCoder (0.3.0):
15
+ - libavif (~> 0.3.0)
10
16
- SDWebImage (~> 5.0)
11
17
12
18
DEPENDENCIES:
19
+ - libavif/libaom
20
+ - libavif/libdav1d
13
21
- SDWebImageAVIFCoder (from `../`)
14
22
15
23
SPEC REPOS:
16
24
https://github.com/cocoapods/specs.git:
17
25
- libaom
18
26
- libavif
27
+ - libdav1d
19
28
- SDWebImage
20
29
21
30
EXTERNAL SOURCES:
@@ -24,10 +33,11 @@ EXTERNAL SOURCES:
24
33
25
34
SPEC CHECKSUMS:
26
35
libaom: 1e48c68559b8d6191c1a9f266e0bee83b2dd21fd
27
- libavif: 251b8a20baa5b05467cc64c3b844eaa7b5cf3a62
28
- SDWebImage: fb387001955223213dde14bc08c8b73f371f8d8f
29
- SDWebImageAVIFCoder: 0cc05dc868739b68d6b61856ef11e1aea6af68eb
36
+ libavif: 8ae7eca52a4ba56592c63991a30697a9a24244e7
37
+ libdav1d: 097f791c93d050b1cb6c0788fbe6c9024ceb3d7e
38
+ SDWebImage: 5fcdb02cc35e05fc35791ec514b191d27189f872
39
+ SDWebImageAVIFCoder: f994b0bf9e8748a837bd18ec8491228690c16612
30
40
31
- PODFILE CHECKSUM: cb60778bff8fb5ce4fbc8792f6079317b7a897be
41
+ PODFILE CHECKSUM: 1daaa635bd369cbbf21bf2dd090f9adae3a762dc
32
42
33
43
COCOAPODS: 1.7.5
Original file line number Diff line number Diff line change @@ -36,5 +36,5 @@ Which is built based on the open-sourced libavif codec.
36
36
s . source_files = 'SDWebImageAVIFCoder/Classes/**/*' , 'SDWebImageAVIFCoder/Module/SDWebImageAVIFCoder.h'
37
37
38
38
s . dependency 'SDWebImage' , '~> 5.0'
39
- s . dependency 'libavif' , '~> 0.2 .0'
39
+ s . dependency 'libavif' , '~> 0.3 .0'
40
40
end
Original file line number Diff line number Diff line change @@ -278,11 +278,12 @@ - (nullable NSData *)encodedDataWithImage:(nullable UIImage *)image format:(SDIm
278
278
if (options[SDImageCoderEncodeCompressionQuality]) {
279
279
compressionQuality = [options[SDImageCoderEncodeCompressionQuality] doubleValue ];
280
280
}
281
- int rescaledQuality = AVIF_WORST_QUALITY - (int )((compressionQuality) * AVIF_WORST_QUALITY );
281
+ int rescaledQuality = AVIF_QUANTIZER_WORST_QUALITY - (int )((compressionQuality) * AVIF_QUANTIZER_WORST_QUALITY );
282
282
283
283
avifRawData raw = AVIF_RAW_DATA_EMPTY;
284
284
avifEncoder *encoder = avifEncoderCreate ();
285
- encoder->quality = rescaledQuality;
285
+ encoder->minQuantizer = rescaledQuality;
286
+ encoder->maxQuantizer = rescaledQuality;
286
287
encoder->maxThreads = 2 ;
287
288
avifResult result = avifEncoderWrite (encoder, avif, &raw);
288
289
You can’t perform that action at this time.
0 commit comments