File tree Expand file tree Collapse file tree
SDWebImageAVIFCoder/Classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33target 'SDWebImageAVIFCoder_Example' do
44 platform :ios , '8.0'
55 pod 'SDWebImageAVIFCoder' , :path => '../'
6+ pod 'libavif' , :subspecs => [ 'libaom' , 'libdav1d' ]
67
78 target 'SDWebImageAVIFCoder_Tests' do
89 inherit! :search_paths
1415target 'SDWebImageAVIFCoder_Example macOS' do
1516 platform :osx , '10.10'
1617 pod 'SDWebImageAVIFCoder' , :path => '../'
18+ pod 'libavif' , :subspecs => [ 'libaom' , 'libdav1d' ]
1719end
Original file line number Diff line number Diff line change 11PODS:
22 - 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):
46 - 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)
1016 - SDWebImage (~> 5.0)
1117
1218DEPENDENCIES:
19+ - libavif/libaom
20+ - libavif/libdav1d
1321 - SDWebImageAVIFCoder (from `../`)
1422
1523SPEC REPOS:
1624 https://github.com/cocoapods/specs.git:
1725 - libaom
1826 - libavif
27+ - libdav1d
1928 - SDWebImage
2029
2130EXTERNAL SOURCES:
@@ -24,10 +33,11 @@ EXTERNAL SOURCES:
2433
2534SPEC CHECKSUMS:
2635 libaom: 1e48c68559b8d6191c1a9f266e0bee83b2dd21fd
27- libavif: 251b8a20baa5b05467cc64c3b844eaa7b5cf3a62
28- SDWebImage: fb387001955223213dde14bc08c8b73f371f8d8f
29- SDWebImageAVIFCoder: 0cc05dc868739b68d6b61856ef11e1aea6af68eb
36+ libavif: 8ae7eca52a4ba56592c63991a30697a9a24244e7
37+ libdav1d: 097f791c93d050b1cb6c0788fbe6c9024ceb3d7e
38+ SDWebImage: 5fcdb02cc35e05fc35791ec514b191d27189f872
39+ SDWebImageAVIFCoder: f994b0bf9e8748a837bd18ec8491228690c16612
3040
31- PODFILE CHECKSUM: cb60778bff8fb5ce4fbc8792f6079317b7a897be
41+ PODFILE CHECKSUM: 1daaa635bd369cbbf21bf2dd090f9adae3a762dc
3242
3343COCOAPODS: 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.
3636 s . source_files = 'SDWebImageAVIFCoder/Classes/**/*' , 'SDWebImageAVIFCoder/Module/SDWebImageAVIFCoder.h'
3737
3838 s . dependency 'SDWebImage' , '~> 5.0'
39- s . dependency 'libavif' , '~> 0.2 .0'
39+ s . dependency 'libavif' , '~> 0.3 .0'
4040end
Original file line number Diff line number Diff line change @@ -278,11 +278,12 @@ - (nullable NSData *)encodedDataWithImage:(nullable UIImage *)image format:(SDIm
278278 if (options[SDImageCoderEncodeCompressionQuality]) {
279279 compressionQuality = [options[SDImageCoderEncodeCompressionQuality] doubleValue ];
280280 }
281- int rescaledQuality = AVIF_WORST_QUALITY - (int )((compressionQuality) * AVIF_WORST_QUALITY );
281+ int rescaledQuality = AVIF_QUANTIZER_WORST_QUALITY - (int )((compressionQuality) * AVIF_QUANTIZER_WORST_QUALITY );
282282
283283 avifRawData raw = AVIF_RAW_DATA_EMPTY;
284284 avifEncoder *encoder = avifEncoderCreate ();
285- encoder->quality = rescaledQuality;
285+ encoder->minQuantizer = rescaledQuality;
286+ encoder->maxQuantizer = rescaledQuality;
286287 encoder->maxThreads = 2 ;
287288 avifResult result = avifEncoderWrite (encoder, avif, &raw);
288289
You can’t perform that action at this time.
0 commit comments