Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(debug): Allow blurring video background during calls [WPB-724] #17326

Merged
merged 29 commits into from
Jun 11, 2024

Conversation

aweiss-dev
Copy link
Member

@aweiss-dev aweiss-dev commented Apr 26, 2024

StoryWPB-724 [Web] Blurred background on calls

Description

This is a first MVP for the blurred background.
It enabled blurring the self background using a debug util wire.debug.enableCameraBlur().

Next iteration:

Performances

Currently the performances are not quite there yet. The blurring is quite costly.
This is a typical example of the computation of a single frame of the video feed

image

We can see that the segmentation is taking very little time (some 2-3ms) but blurring takes 20ms+. Since we are supposed to have a budget of 16ms, this is not really our target performance.
It's also quite intense on the main thread and leaves very little resources for the user. Those issues will need to be tackled.

Attempted optimizations

Using webWorker to compute the blur:

  • 👍 leaves the main thread rather free
  • 👎 frame rate drops and video gets quite laggy

Using webgl to compute blurring on the GPU

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 6.95652% with 107 lines in your changes missing coverage. Please review.

Project coverage is 46.13%. Comparing base (696c293) to head (774da02).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #17326      +/-   ##
==========================================
- Coverage   46.29%   46.13%   -0.17%     
==========================================
  Files         758      760       +2     
  Lines       24904    25016     +112     
  Branches     5714     5721       +7     
==========================================
+ Hits        11530    11541      +11     
- Misses      11931    12033     +102     
+ Partials     1443     1442       -1     

@atomrc atomrc changed the title feat: first draft of blurred backgrounds feat(debug): Allow blurring video background during calls [WPB-724] Jun 4, 2024
@atomrc atomrc marked this pull request as ready for review June 4, 2024 15:48
@atomrc atomrc requested review from otto-the-bot and a team as code owners June 4, 2024 15:48
package.json Outdated
@@ -49,10 +50,12 @@
"redux-logdown": "1.0.4",
"redux-thunk": "3.1.0",
"speakingurl": "14.0.1",
"stackblur-canvas": "^2.7.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can go

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can go

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for LFS without the large file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for LFS without the large file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for LFS without the large file

.husky/pre-push Outdated
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for LFS without the large file

.gitattributes Outdated
@@ -13,3 +11,4 @@
*.ttf binary
*.woff binary
*.woff2 binary
*.tflite filter=lfs diff=lfs merge=lfs -text
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for LFS without the large file

Copy link

sonarcloud bot commented Jun 11, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@atomrc atomrc merged commit 1057adb into dev Jun 11, 2024
11 checks passed
@atomrc atomrc deleted the feat/video_blur branch June 11, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants