Description
Desired behavior
Asset-backed masks should add minimal overhead during timeline scrubbing.
Actual behavior
Scrubbing becomes noticeably slower when a clip has an asset-backed mask applied (for example SAM2 / generation mask video).
Notes
A likely contributor is the mask-video decode path in the decoder worker, where convertMaskBitmapToAlpha performs a full CPU pixel scan per frame. Scrubbing waits for mask frame synchronization, so the slowdown may come from the combined decode + conversion + sync path.
Possible direction
Investigate whether binary mask thresholding can be moved out of the CPU pixel-scan path, potentially into the GPU/Pixi compositing path.
Description
Desired behavior
Asset-backed masks should add minimal overhead during timeline scrubbing.
Actual behavior
Scrubbing becomes noticeably slower when a clip has an asset-backed mask applied (for example SAM2 / generation mask video).
Notes
A likely contributor is the mask-video decode path in the decoder worker, where
convertMaskBitmapToAlphaperforms a full CPU pixel scan per frame. Scrubbing waits for mask frame synchronization, so the slowdown may come from the combined decode + conversion + sync path.Possible direction
Investigate whether binary mask thresholding can be moved out of the CPU pixel-scan path, potentially into the GPU/Pixi compositing path.