Need help with testing Animation Cache swapping patch :)
Dmitry Kazakov
dimula73 at gmail.com
Fri Jun 1 07:15:56 UTC 2018
On 31.05.2018 21:11, Fazekas László wrote:
> Hi Dmitry!
>
> Compression means intraframe or interframe here?
Right now we have both: first, we calculate differences against a base
frame, then compress these differences.
> Compressing the differences between frames (probably in a double
> buffered style, when you compress odd and even frames separately)
> results better compression rate,
Could you tell a bit more about "double buffered style, when you
compress odd and even frames separately", is there any article about it?
What is the benefit of this approach?
> Or just an opinion: what if you render the stream into a standard
> video format (ffmpeg/libav) and play it with these libraries, with all
> their hw acceleration etc.? Is there any support in qt for this? Maybe
> you can spare a lot of works...
Well, that would mean quite a lot of changes to our canvas rendering
code. Right now we reuse the same code that is used for painting.
>
> Fazek
>
>> Hi, all!
>>
>> I have just implemented the animation cache swapping feature and I
>> need your help with testing its usability and stability :)
>>
>> What is it and why it is needed?
>> ===================
>>
>> When the user presses Play button, Krita needs to prepare all the
>> frames of the user's animation and store this cache somewhere. In
>> older versions of Krita all these cached frames were stored on in
>> RAM. It caused some troubles when the user decided to make quite big
>> animation clip, e.g. 200 frames of 6000x4000, which is about 19GiB(!)
>> and will not fit into normal user's RAM :)
>>
>> This new feature will make Krita drop all these cached frame to a
>> hard drive and not occupy so much RAM.
>>
>>
>> What it does?
>> ========
>>
>> When the frames are generated, they are first compressed and then
>> saved to the hard drive, into the same folder where swap file is
>> stored. During the playback, the frames are fetched from the hard
>> drive on demand.
>>
>>
>> Configuration options
>> =============
>>
>> The options are placed in:
>> Settings->Preferences->Performance->Animation Cache
>>
>> * In-Memory/On-Disk -- choose whether you want to use old or new engine
>> * Limit Cached Frame Size -- if the size of the frame is too big,
>> Kirta may fail too load/decompress it quickly enough. Recommended
>> value is 2500px. In such a case, the frames will always be scaled
>> down to the size not bigger than 2500px.
>> * Region of Interest -- when enabled, Krita will pre-generate only a
>> portion of the canvas currently visible to the user
>> * Auto-generate animation cache -- enable generation of the frames in
>> a background
>>
>> All the options have tooltips, don't hesitate to check them :)
>>
>>
>> How to test?
>> =======
>>
>> I've made a Windows package, so you could test it easily :)
>>
>> https://yadi.sk/d/wX0G4z9J3WjpPt
>>
>> If you prefer building yourself, you can try my git-branch:
>>
>> git checkout kazakov/animation-cache-swapping
>>
>>
>> Test plan
>> ======
>>
>> 0) Make sure you have On-Disk backend activated and Frame Size Limit
>> Set.
>> 1) Open/Create an animaiton file with resolution 6000x4000 and at
>> least 200 frames
>> 2) Press Play button
>>
>> Try playing the animation many times with different zoom level and
>> panning. Also try to pan the image right while playback to see the
>> margins of region-of-interest.
>>
>> Everything should work in a sane way :)
>>
>
--
Dmitry Kazakov
More information about the kimageshop
mailing list