Unnecessary allocation of memories for channels in the JBM decoder
In the case of JBM operation, the output channels' buffers are allocated twice, once as st_ivas->p_output_f[n]
and then as st_ivas->hTcBuffer->tc_buffer[]
A substantial memory saving can be achieved if these buffers are merged. (For the non-JBM path, the saving was in the order of tens to hundreds of kBytes as reported at #876 (comment 32711).)
Note: This is a follow-up to #858 (closed) where the same issue was solved for the non-JBM case.
Exemplary RAM consumption comparison between non-JBM and JBM decoder (commit 9da419d7 from April 8, 2025):
IVAS format | stack | heap | ||||
---|---|---|---|---|---|---|
non-JBM | JBM | increase [%] | non-JBM | JBM | increase [%] | |
EVS, 32 kbps | 87,416 | 184,876 | 111 | 196,360 | 247,360 | 26 |
ISM, 32 kbps, 1 ISM | 112,560 | 184,872 | 64 | 181,076 | 232,076 | 28 |
stereo, 32 kbps | 132,584 | 184,872 | 39 | 264,596 | 346,552 | 31 |
SBA, 512 kbps, HOA3 | 166,408 | 184,736 | 11 | 884,646 | 1,083,926 | 23 |
OSBA 512 kbps, 3OA, 4 ISMs | 166,408 | 184,736 | 11 | 1,456,946 | 1,780,050 | 22 |
All numbers correspond to EXT output configuration at 48 kHz.
Edited by vaclav