VSE: Skip rendering lower strips that are behind opaque strips above them #118396

Merged
Aras Pranckevicius merged 6 commits from aras_p/blender:vse_strip_occlusion into main 2024-02-21 20:16:53 +01:00

6 Commits

Author SHA1 Message Date
Aras Pranckevicius 3f57e2a15f VSE: Guard against strips where render size is not known for whatever reason 2024-02-21 12:58:30 +02:00
Aras Pranckevicius ef606647fc VSE: Take aspect ratio into account when calculatin screen quad, and fix uninitialized variable 2024-02-21 12:49:39 +02:00
Aras Pranckevicius d3def0fd0a Merge branch 'main' into vse_strip_occlusion 2024-02-21 11:33:12 +02:00
Aras Pranckevicius 63d0f100c8 VSE: Simplify occlusion checking code based on review suggestion
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
Instead of tracking via separate planes_before_pp map, look at the
SEQ_CACHE_STORE_RAW cached image.
2024-02-18 21:39:49 +02:00
Aras Pranckevicius 3284c3be18 Merge branch 'main' into vse_strip_occlusion 2024-02-18 20:56:05 +02:00
Aras Pranckevicius 362b5a3f00 VSE: Skip rendering lower strips that are behind opaque strips above them
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
Often in previs setups, you have several "variations" of image/movie
strips for review, where the topmost one completely covers the others
under it. VSE rendering alreayd had an optimization where if there's
a fully opaque strip that covers the whole screen, then the lower
strips are skipped from processing/rendering. However, it was not
handling the case of non-fullscreen strips (e.g. you'd have a Color
strip near top & bottom for letterboxing, and an opaque strip "in the
middle").

This adds a simple "occluder tracking", and skips strips that are
completely covered by any single opaque strip that is above it.

Playback of Gold previs between 1:42 and 1:55, on Windows/Ryzen5950X:
- Average frame time 28.5ms -> 23.8ms
- Median frame time 24.1ms -> 21.5ms
- Two slowest frames: 263->189ms, 194->178ms

Rendering the Gold previs movie: 325s -> 304s (93% of previous time)
2024-02-16 22:23:44 +02:00