WIP: VSE: speedup Alpha Over blend with SIMD #115892

Draft
Aras Pranckevicius wants to merge 1 commits from aras_p/blender:vse-alphaover-opt into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

1 Commits

Author SHA1 Message Date
Aras Pranckevicius 20b2d709ab VSE: speedup Alpha Over blend with SIMD
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-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-coordinator Build done. Details
Alpha Over is default blend mode used by all strips (images, text etc.),
so while SIMD arguably could be used in all of them, this one is
probably most important.

Makes straight_uchar_to_premul_float + actual blending math +
premul_float_to_straight_uchar use SIMD in a 4-wide fashion, i.e. still
works on one pixel at a time.

At 4K UHD resolution, Windows Ryzen 5950X:
- do_alphaover_effect_byte time 6.82ms -> 4.93ms
- with four image strips, sequencer playback 15.9FPS -> 17.9FPS
  (there are other time costs, not just alpha over blending)
2023-12-07 14:31:15 +02:00