[WIP] VSE: Only free ffmpeg codec context #118112
Draft
Richard Antalik
wants to merge 1 commits from
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
iss/blender:ffmpeg-free-1
into main
pull from: iss/blender:ffmpeg-free-1
merge into: blender:main
blender:main
blender:universal-scene-description
blender:brush-assets-project
blender:blender-v3.3-release
blender:blender-v3.6-release
blender:partial-write-refactor
blender:blender-v4.1-release
blender:blender-v3.6-temp_wmoss_animrig_public
blender:temp-sculpt-dyntopo
blender:gpencil-next
blender:anim/animation-id-113594
blender:blender-v4.0-release
blender:blender-projects-basics
blender:bridge-curves
blender:sculpt-blender
blender:asset-browser-frontend-split
blender:asset-shelf
blender:tmp-usd-python-mtl
blender:tmp-usd-3.6
blender:blender-v3.5-release
blender:blender-v2.93-release
blender:realtime-clock
blender:sculpt-dev
blender:bevelv2
blender:xr-dev
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
Richard Antalik | 0f392a9a50 |
[WIP] VSE: Only free ffmpeg codec context
buildbot/vexp-code-patch-lint 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-linux-x86_64 Build done.
Details
buildbot/vexp-code-patch-windows-amd64 Build done.
Details
buildbot/vexp-code-patch-coordinator Build done.
Details
`AVCodecContext` can use a large amount of memory. With large amount of strips this can add up to 100GB in normal use case. Whole `ImBufAnim` struct was freed to release memory resources, but penalty for that is, that whole ffmpeg decoding state had to be re-initialized, which causes delay when decoding after freeing. Free only `AVCodecContext` struct, to release majority of memory used and decrease delay when image is decoded after freeing. Table with experimental data (last 2 columns are improvements over worst case): |Method | Render time | Mem usage | Time | Mem | |-----------------------|---------------|---------------|-------|-------| |No freeing: | |24.5G | |1x | |Free `ImBufAnim`: |122.3ms | |1x | | |Flush buffers: |21ms |18G |5.8x |1.36x | |Free codecCtx: |68.8ms |2.6G |1.7x |9.42x | For experiment modified gold edit was used. |