Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avifDecoderNextImage interface take a lot time #44

Open
ghost opened this issue Nov 1, 2022 · 3 comments
Open

avifDecoderNextImage interface take a lot time #44

ghost opened this issue Nov 1, 2022 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 1, 2022

截屏2022-11-01 16 53 49

Unit of time milliseconds
iphone x: avifDecoderNextImage: 397.489014--SDCreateCGImageFromAVIF: 1.329102
iphone 11 pro max: avifDecoderNextImage: 279.439941--SDCreateCGImageFromAVIF: 1.563965

@dreampiggy
Copy link
Collaborator

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 :)

@dreampiggy
Copy link
Collaborator

dreampiggy commented May 16, 2023

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.

@dreampiggy
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant