VSE: make Glow effect 6x-10x faster #115818

Merged
Aras Pranckevicius merged 5 commits from aras_p/blender:vse-glow-opt into main 2023-12-06 19:39:51 +01:00

5 Commits

Author SHA1 Message Date
Aras Pranckevicius 4e9e35edcb Cleanup timers 2023-12-06 12:05:16 +02:00
Aras Pranckevicius b695329bb9 VSE: simplify and speedup Glow some more
buildbot/vexp-code-patch-coordinator Build done. Details
Instead of applying blur kernel to "left + right side, followed by
middle", do much simpler thing and just apply it normally, taking care
of boundary conditions where kernel would step outside the image.

Also instead of doing "add glow to original image" in a separate pass
over the whole image, just add source when writing the final pixel.

Less code, and faster.

Applying glow at 4K UHD resolution, on Windows Ryzen 5950X:
- distance 4: 122ms -> 109ms
- distance 20: 346ms -> 336ms
2023-12-06 09:49:37 +02:00
Aras Pranckevicius e649b52d59 VSE: simplify Glow code by using vector types
No performance difference observed
2023-12-05 22:19:35 +02:00
Aras Pranckevicius ebde205d2b VSE: further speedup of Glow by merging operations
Instead of doing preparation/finishing operations in separate passes
over the image, do a combined operation in one go. This also makes
IMB_buffer_float_unpremultiply and IMB_buffer_float_premultiply not
be used by anything, so remove.

Applying glow at 4K UHD resolution, on Windows Ryzen 5950X:
- distance 4: 136ms -> 122ms
- distance 20: 365ms -> 346ms
2023-12-05 22:01:45 +02:00
Aras Pranckevicius 692a8a6816 VSE: optimize Glow effect with multi-threading
Applying glow at 4K UHD resolution, on Windows Ryzen 5950X:
- distance 4: 935ms -> 136ms
- distance 20: 3524ms -> 365ms
2023-12-05 21:44:49 +02:00