Huge static RAM consumption when HRTFs are loaded from file
When HRTFs for binaural rendering are loaded from a file, the static RAM consumption is huge compared to the consumption when HRTFs are loaded from ROM tables. The main reason is that handles for all four binaural renderers are always allocated and loaded while only one (or two in case of OMASA/OSBA) is really needed.
This issue was already discussed in !1717 (comment 49931).
A solution would be to move the HRTFs loading from the initialization to the frame decoding loop. After feeding the received bitstream to the decoder, the following steps would need to be performed:
- an IVAS format and signaling is read; in the attached branch it is the function
IVAS_DEC_ReadFormat()
- HRTFs are loaded and appropriate handles allocated/deallocated; this is done in the first frame and potentially in the bitrate switching; in the attached branch it is the function
IVAS_DEC_LoadHrtfFromFile()
- Continue as usual by calling
IVAS_DEC_Setup()
andIVAS_DEC_GetTcSamples()
The following table summarizes the static RAM impact at some operating points involving all renderers [bytes]:
condition | binaural renderer | HRTFs from ROM | HRTFs from file | HRTFs from file FIX |
---|---|---|---|---|
SBA @64 kbps to BINAURAL | Parametric Binaural Renderer | 466,892 | 1,777,192 | 466,920 |
SBA @128 kbps to BINAURAL | FastConv Binaural Renderer | 914,082 | 2,213,470 |
|
ISM2 @64kbps to BINAURAL | Time Domain Object Renderer | 372,028 | 1,694,520 | 369,028 |
ISM2 @64kbps to BINAURAL_ROOM_IR | Crend Binaural Renderer | 951,868 | 2,278,248 | 951,916 |
Note: SBA @128 kbps HRTFs from file FIX number corresponds to loading of all HRTFs (FOA/HOA2/HOA3/reverb). When only the really used one is loaded, the number goes down to 939,710 bytes.
A possible solution is shown in the attached branch under FIX_HRTF_LOAD
switch. Note that, for the moment, only the non-JBM path has been implemented and non-combined formats have been verified.