Page MenuHome

Combined caching and thumbnail drawing code
Needs ReviewPublic

Authored by Aditya Y Jeppu (quantimoney) on Jun 27 2021, 4:01 PM.

Details

Summary

Involves modification to the image rendering, caching and drawing. The
thumbs are fixed to 256 max size, the caching is limited in number
and the overall look of the thumbnails is proper (no incorrect clipping).

Maniphest task : T89143

Diff Detail

Repository
rB Blender
Branch
soc-2021-vse-strip-thumbnails
Build Status
Buildable 15445
Build 15445: arc lint + arc unit

Event Timeline

Aditya Y Jeppu (quantimoney) requested review of this revision.Jun 27 2021, 4:01 PM
Aditya Y Jeppu (quantimoney) created this revision.

Found some issues, other than that, code seems to work fine.

source/blender/editors/space_sequencer/sequencer_draw.c
1179

I think you forgot to add round_fl_to_int() to timeline_frame parameter. This seems to be cause of UI lags you are still getting.

source/blender/makesdna/DNA_sequence_types.h
694

I think it's best to add this type to the end of enum. There are 2 reasons:

  • This value is stored in .blend file and if you change code, values would be mismatched. you can add versioning code to make room for new value though - see file versioning_300.c
  • I probably wouldn't add this to SEQ_CACHE_ALL_TYPES too because thumbnails are not invalidated with other strips. It is very likely that thumbnails will be moved into own cache anyway.
source/blender/sequencer/intern/image_cache.c
1212

I thinh this should do key->type != SEQ_CACHE_STORE_THUMBNAIL instead of !key->context.is_thumb

source/blender/sequencer/intern/render.c
238

If you remove check in seq_cache_free_temp_cache, this field will be effectively unused, so it can be removed.

567

I guess this is accidental change?
Same below

Aditya Y Jeppu (quantimoney) marked 5 inline comments as done.Jun 28 2021, 3:08 PM
Aditya Y Jeppu (quantimoney) added inline comments.
source/blender/makesdna/DNA_sequence_types.h
694

it was added to SEQ_CACHE_ALL_TYPES but removed before. think its some formatting change that got uploaded

source/blender/sequencer/intern/render.c
567

yup. didn't notice that - it was when i was testing so had to remove const. didn't change back when new function created

Aditya Y Jeppu (quantimoney) marked 2 inline comments as done.

Added changes specified in comments - D11718