ffmpeg: optimize ffmpeg_postprocess #116309

Merged
Aras Pranckevicius merged 4 commits from aras_p/blender:ffmpeg-threaded-decode-conv into main 2023-12-19 18:29:01 +01:00

4 Commits

Author SHA1 Message Date
Aras Pranckevicius 1a8154fb6d ffmpeg: move threaded sws context helper functions to a better place
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-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
2023-12-18 21:46:12 +02:00
Aras Pranckevicius 833ebb9087 ffmpeg: scale and flip has been broken before ffmpeg 6 on arm64, account for that
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-lint 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
2023-12-18 21:16:38 +02:00
Aras Pranckevicius d0d94974dd ffmpeg: speed up video playback by reintroducing vertical flip in same step as scale where possible
Blender used to do video frame YUV->RGB conversion and image vertical
flip in the same step, but that was removed in 2ed73fc97e in order
to fix problems with video widths that aren't multiple of SIMD width
(e.g. 32). However many common video resolutions (e.g. 1920x1080) are
compatible with that, so try to reintroduce that.

Playing back 1080p resolution video in VSE, the ffmpeg_postprocess
step (deinterlace, YUV->RGB, vertical flip) on Windows / Ryzen 5950X
goes from 2.41ms down to 1.18ms
2023-12-18 20:32:50 +02:00
Aras Pranckevicius 4647c80f52 ffmpeg: multithreaded YUV->RGB conversion on movie file reading
Playing back 1080p resolution video in VSE, the ffmpeg_postprocess
step (deinterlace, YUV->RGB, vertical flip) on Windows / Ryzen 5950X
goes from 3.05ms down to 2.41ms
2023-12-18 20:27:29 +02:00