Repository navigation
[stable35] fix(call): reduce virtual background performance load - #20418
Merged
Merged
Conversation
- square model (256x256) squashed 16:9 frames by 1.78 before inference - landscape model (256x144) matches 16:9 frames, Talk requests 1280x720 or more in calls - model run 15.2 -> 8.9 ms with the MediaPipe CPU delegate, smaller gain on GPU - switching models by aspect ratio is not possible - remove unused square model Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- MediaPipe returned the confidence mask at the input frame size (1280x720) - it uploaded the full frame, scaled the mask back up on the GPU, and the mask was copied between WebGL contexts at that size - the model scales its input to 256x144 anyway, so a 256 px wide frame loses nothing - the mask, its copies and the mask filtering now run at 256x144 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- the blur ran 3 horizontal and vertical passes at half resolution, each tap reading the frame and the mask - 2 passes at quarter resolution need about 6x fewer texture reads - the blur gets about 1.6x wider, which does not show on a blurred background - Intel UHD 630, 720p blur: iGPU load 72 -> 64 % Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- the joint bilateral filter ran at the output size (1280x720), 16 taps per pixel, each reading the frame and the mask - the mask comes from a 256x144 model, half resolution keeps its detail - blur and blend read the filtered mask with linear filtering, the blur pass also reads a 4x smaller texture Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Antreesy
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #20377