Open ghost opened 1 year ago
This avifDecoderNextImage
seems used for AVIF animated image (really rare but supported).
I think this need more information to test and increase performance. May need libavif's upstream help :)
Known issue for animated AVIF. But we have no better way to avoid this.
A possible way is like using the internal API of AOM like https://github.com/SDWebImage/SDWebImageWebPCoder
Which calculate a latest reusable frame index and canvas without re-scan
, but it's complicated and I have no free time to complete.
You can have a try by different AVIF codec (for decoding)
From v0.11.0, we support using SDImageCoderAVIFDecodeCodecChoice
to chooce codec at runtime. You can install all 4 AVIF decoding codec and compare them one by one
Unit of time milliseconds iphone x: avifDecoderNextImage: 397.489014--SDCreateCGImageFromAVIF: 1.329102 iphone 11 pro max: avifDecoderNextImage: 279.439941--SDCreateCGImageFromAVIF: 1.563965