forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Audio: MDRC: Restructure MDRC for effective memory allocation
This check-in improves memory management in the Multiband Dynamic Range Control (MDRC) component by reducing overhead, increasing cache efficiency through data locality, and minimising heap fragmentation. Key Changes: 1. Removed the redundant `struct multiband_drc_coefficients` from multiband_drc.h and multiband_drc.c. 2. Updated `multiband_drc_init` function to eliminate the allocation of the obsolete `coefficients_block`. 3. Adjusted `multiband_drc_free` to no longer check and free the now-nonexistent `coefficients_block`. 4. Streamlined memory allocation and initialization of crossover, emphasis, and de-emphasis coefficients directly in `multiband_drc_init_coef`. 5. Simplified overall memory management, removing unnecessary layers of indirection. Performance Improvements: - Reduces memory allocation overhead. - Enhances data locality, improving cache efficiency. - Mitigates heap fragmentation, thereby reducing the chances of memory leaks. Signed-off-by: Shriram Shastry <[email protected]>
- Loading branch information
1 parent
28a5265
commit 7627cea
Showing
1 changed file
with
91 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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