Blender Git Commit Log

Git Commits -> Revision fb1265c

Revision fb1265c by Sergey Sharybin (master)
March 22, 2021, 15:27 (GMT)
Tracking: Fix movie file prefetch freezing interface

The issue was caused by the prefetch code having LOCK_MOVIECLIP lock
acquired while reading frames from the movie files. The need of the
lock was coming from the fact that `clip->anim` can not be accessed
from multiple threads, so that was guarded by a lock. The side effect
of this lock was that the main thread (from which drawing is happening)
did not have any chance passing through it in the cache code because
the prefetch happens so quickly.

The solution is to create a local copy of the clip with its own
anim handler, so that read can happen without such lock.

The prefetch is slower by an absolute number in seconds (within 10%
in tests here), but it is interactive now.

Commit Details:

Full Hash: fb1265c5cf24462985cd3debae9205ac78f5d6ab
Parent Commit: 4b9c9a7
Lines Changed: +42, -11

3 Modified Paths:

/source/blender/blenkernel/BKE_movieclip.h (+5, -2) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+1, -3) (Diff)
/source/blender/editors/space_clip/clip_editor.c (+36, -6) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021