Page MenuHome

VSE: Update first thumbnail when moving handle
AbandonedPublic

Authored by Richard Antalik (ISS) on Oct 20 2021, 9:10 AM.

Details

Reviewers
None
Maniphest Tasks
T91618: VSE thumbnails improvements
Summary

Even though thumbnails should be used as approximate depiction of strip
content, it is useful to see change in (close to) real time.

This feature required some changes in how thumbnails are drawn:

  • Drawing starts from strip left handle position
  • First thumbnail actually represents first frame of strip

When moving handle, only first image is updated. Other thumbnails are
read from memory.

Overview of how first thumbnail update is managed:
Similar to how set of guaranteed frames work, a lookup cache for frames
is used. In this case array is used and lookup is supposed to be linear
instead of best fit. Each time a job is created, current frame number is
pushed into array. This cache is used, because job renders image at
handle position asynchronously and therefore will likely lag a bit.
With linear lookup, access to most recent frame is guaranteed, so there
is no risk of noise if many frames are rendered in close space and
handle movement changes direction. This cache currently has 10 frame
slots. Number of slots is technically arbitrary and only few should be
needed as only 1 job can run at the time. Images are stored in global
sequencer cache, so more slots can cover case if image is freed even
though it is unlikely event.

Set of guaranteed frames now covers all of strip media source content.
This probably wasn't necessary change, but behavior is bit more suitable
for editing, not only for navigating.

Other minor changes are fixes for incorrect conditions to check if
thumbnail rendering is needed that were discovered in process.

ref T91618

Diff Detail

Repository
rB Blender
Branch
thumbnail-edge_images (branched from master)
Build Status
Buildable 18113
Build 18113: arc lint + arc unit

Event Timeline

Richard Antalik (ISS) requested review of this revision.Oct 20 2021, 9:10 AM
Richard Antalik (ISS) created this revision.
  • Add thumbnail handle update cache
  • Fix guaranteed frame calculation
  • Fix thumbnail rendering boundary
  • remove debug printfs
Richard Antalik (ISS) edited the summary of this revision. (Show Details)Oct 21 2021, 6:27 AM
Richard Antalik (ISS) edited the summary of this revision. (Show Details)
  • Fix compiler warnings

Speed doesn't seem to be affected much, however first and second image flickers:

  • Fix flickering thumbnails

Closing, since different solution was implemented in 29b9187b327c.