Repository navigation
Add opt-in mono processing for DPDFNet - #5375
Merged
Merged
Conversation
Mix duplicate microphone channels before resampling and run one mono LADSPA instance. Persist the setting per effect and preset, document CPU savings and channel averaging, and discard superseded setup requests during rapid changes.
|
Workflow failed, but the following artifacts are still available for this pull request: |
Allocate the mixing buffer outside PipeWire callbacks, publish it with a constant-time swap, and free the retired buffer after releasing the data mutex. Use the ranges transform and explicit arithmetic grouping required by Clang Tidy.
Owner
|
I did some tests and it seems fine. Thanks. |
Contributor
Author
|
@wwmm Thank you! I'm happy to help the project grow and glad to be useful :) |
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.
Mono microphones can expose identical left/right channels through PipeWire. DPDFNet currently runs two independent mono LADSPA instances for that stream, doubling model work for the same signal. This adds an opt-in Process as Mono control to Deep Noise Remover when DPDFNet is selected.
Behavior and compatibility
falsepreserves existing stereo behavior. The option is per effect instance, available in either pipeline, and persisted asmono-processingin presets. Loading a preset without the key resets it to the default, including after a mono preset was loaded.Validation
DeepFilterNetand preset implementation, using a counting/gain LADSPA fixture and a private PipeWire server. Verified preset round trip, legacy preset default, one/two instance and callback counts, in-place mixing, finite output, identical mono channels, and bypass.Performance
Mean CPU use (percentage of one core, mean ± SD of four run values): 68.00 ± 14.11% stereo → 33.99 ± 7.39% mono, a 50.0% reduction on this setup. Background desktop workloads were present; the relatively large run variability makes the absolute CPU values illustrative rather than an isolated-core capacity estimate.
The measurement uses the actual compiled effect in the isolated harness with HushMic v0.10.3 LADSPA with native INT8 DPDFNet8 (locally built with AVX-VNNI for Alder Lake; identical plugin and assets in both modes), fixed quality tier, duplicated synthetic mono input, 480 samples at 48 kHz. Four fresh 12-second processes per mode, alternating AB/BA order, all threads on logical CPU 2 (Intel Core i7-1255U P core). Process CPU time includes the inference workers; setup completes before timing. No queue overflow was reported.
This is a DSP/effect CPU benchmark, not a hardware-capture or complete PipeWire latency benchmark. Savings depend on the model, backend, and other enabled effects; the UI deliberately promises no fixed percentage.
Related independent optimization: ceva-ip/DPDFNet#20 adds automatic AVX-VNNI dispatch in the upstream native runtime. This EasyEffects PR works with the existing mono LADSPA interface and does not depend on that change or add an ISA setting.
CI baseline
The final PR CI run passed 12 of 13 jobs, including all native/Flatpak builds (GCC, Clang, x86_64, aarch64), CodeQL, QML, KCFG, and manifest checks. Clang Tidy remains failing on pre-existing diagnostics in unchanged code. The CI run for the unmodified base commit already fails on these checks, including implicit constructors in
kconfig_base_ee.hpp/lv2_wrapper.hppand redundant empty lambda parameter lists inplugin_base.hpp. The final Clang Tidy log contains no diagnostics indeepfilternet.cpp,deepfilternet.hpp, or their preset implementation. Unrelated baseline diagnostics remain outside this feature.