There are several issues with the current API design:
metadata needs to describe the dynamic wallpaper, images are indexed
using integers
the writer cannot take images in online fashion because what if there
are fewer images than in metadata, etc
In order to "solve" those problems, the API of KDynamicWallpaperWriter
was changed so it takes metadata and images before starting writing.
Conceptually, that is great, but loading all images in RAM is not great
plus AV1 encoders consume ridiculously too much memory.
As a compromise, this change makes the KDynamicWallpaperWriter take
image views and load images on demand. This slightly reduces memory
usage but it looks like avifEncoder API is not really great for online
encoding, so memory usage when building a dynamic wallpaper is still
high.
There are several issues with the current API design:
In order to "solve" those problems, the API of KDynamicWallpaperWriter was changed so it takes metadata and images before starting writing.
Conceptually, that is great, but loading all images in RAM is not great plus AV1 encoders consume ridiculously too much memory.
As a compromise, this change makes the KDynamicWallpaperWriter take image views and load images on demand. This slightly reduces memory usage but it looks like avifEncoder API is not really great for online encoding, so memory usage when building a dynamic wallpaper is still high.
90