Port libSoundTouch to RLBox
Categories
(Core :: Audio/Video, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: e5johnso, Assigned: wrv)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(8 files, 4 obsolete files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
Steps to reproduce:
This is the bug to track the process of porting libSoundTouch to RLBox. Currently it still uses the unsandboxed libSoundTouch, but now it uses the RLBox API so that we can easily switch between unsandboxed and sandboxed versions of the library.
Reporter | ||
Comment 1•4 years ago
|
||
Comment 2•4 years ago
|
||
Why did you file this as a security bug?
Reporter | ||
Comment 3•4 years ago
|
||
I marked it as a security bug as it concerns the sandboxing (and therefore security) of a media library, although this is more of a security infrastructure issue than an actual vulnerability. If this is incorrect, it can be marked as a non-security bug.
Updated•4 years ago
|
Comment 4•4 years ago
|
||
I can't edit the security checkbox, but we don't need this to be a security bug. None of the other sandboxing bugs are.
Updated•4 years ago
|
Reporter | ||
Comment 6•4 years ago
|
||
Depends on D94698
Reporter | ||
Comment 7•4 years ago
|
||
Depends on D99634
Reporter | ||
Comment 8•4 years ago
|
||
Depends on D99635
Comment 9•4 years ago
|
||
Seems like all the new patches should be squashes into a single patch (the original phab).
Reporter | ||
Comment 10•4 years ago
|
||
Depends on D94698
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Depends on D94698
Comment 12•4 years ago
|
||
Depends on D109843
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
Comment 13•3 years ago
|
||
Depends on D94698
Updated•3 years ago
|
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Depends on D109843
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 15•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee | ||
Comment 16•1 year ago
|
||
Combines previous Patches 1-4, adapted to the current codebase.
Updated•1 year ago
|
Assignee | ||
Comment 17•1 year ago
|
||
Part of patch 4 and patch 5 from previous effort.
Depends on D183627
Assignee | ||
Comment 18•1 year ago
|
||
This patch enables SIMD in Wasm sandboxed SoundTouch by using
simd-everywhere to map SSE intrinsics to WASMSIMD intrinsics and
compiling with -msimd128 flag.
Depends on D183628
Assignee | ||
Comment 19•1 year ago
|
||
These collection of patches apply the previous effort to the most recent Mozilla codebase, and also enable SIMD support for Wasm sandboxed libSoundTouch.
For
Assignee | ||
Comment 20•1 year ago
|
||
(continuing the previous message)
For completeness, I'm copying over https://bugzilla.mozilla.org/show_bug.cgi?id=1829765#c11 :
We have some SoundTouch numbers we can now share [1].
We calculated these numbers by following the methodology described in [2,3]:
- Open [4] and click 'set rate and play'. This will start playing a sound at 0.25x speed. Each time we click 'set rate and play' the speed will increase by 1x, up to 3.25x.
- Begin collecting Profiling information with Firefox Profiler
- Let the audio play completely at each speed, then click 'set rate and play' to go to the next speed.
- Once it stops playing, stop Profiling.
- Use [5] to plot Audio Callback values and get statistics.
Note that Native+SIMD is the default in Firefox.
Results:
**Mean time (s)**
No SIMD | SIMD
-------------------
Native | 0.03382 | 0.01486 |
|-------------------|
Wasm | 0.04419 | 0.01745 |
-------------------
**Median time (s)**
No SIMD | SIMD
-------------------
Native | 0.03304 | 0.01386 |
|-------------------|
Wasm | 0.04165 | 0.01473 |
-------------------
The above Mean time numbers show that an RLBoxed SoundTouch with SIMD (0.01745s) gives us a 2.5x speedup compared to an RLBoxed SoundTouch without SIMD (0.04419s). Previous results compared native+SIMD (0.01486s) to RLBoxed SoundTouch without SIMD (0.04419s) giving an almost 200% overhead. Compared to native+SIMD (0.01486s), RLBoxed SoundTouch with SIMD (0.01745s) has a 17% overhead. The linked to Google docs [1] has some more details.
[1] New results: https://docs.google.com/document/d/19LtpeSWA6ghfAEGw1lN8im2QPMc7wL2W7LusXPzfg18/edit
[2] Methodology: https://blog.paul.cx/post/profiling-firefox-real-time-media-workloads/#the-new-solution
[3] Previous results: https://docs.google.com/document/d/1h4UsI_9bXrMS3jy1dtu83GLwdi7xB3bNYrWh2MdyEes/edit
[4] Benchmark website: https://ritter.vg/misc/ff/soundtouch-perf.html
[5] Audio callback plotting plugin: https://github.com/padenot/fx-profiler-audio-cb
Updated•1 year ago
|
Comment 21•1 year ago
|
||
Comment 22•1 year ago
|
||
Backed out for causing build bustages in dom/media/AudioStream.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/273aa7310e552441853148728a6d1945ccb991cd
Comment 23•1 year ago
|
||
Can you fix the problem with AudioStream.cpp and also update rlfox_wasm2c_sandbox to https://github.com/PLSysSec/rlbox_wasm2c_sandbox/commit/0938ae96c5467bdf2210cf21be47ae576cbcc3cd ?
Assignee | ||
Comment 24•1 year ago
|
||
Fixed, and see https://bugzilla.mozilla.org/show_bug.cgi?id=1850471
Comment 25•1 year ago
|
||
Comment 26•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9cde99c7ec6a
https://hg.mozilla.org/mozilla-central/rev/ac7b4c876c2c
https://hg.mozilla.org/mozilla-central/rev/0e326fb37f8c
Description
•