Skip to content

RAM optimization in Crend binaural renderer with external binary file

Crend binaural renderer HRTF coefficients loading from an external file is not efficient: it currently loads 5 HRTF coefs. sets while only one is actually needed. It thus consumes unnecessary complexity and RAM memory (though they are not currently counted towards the codec complexity/memory numbers as the processing is done in the utility file lib_util\hrtf_file_reader.c).

An optimization is thus desirable that would limit the loading and memory allocation to one HRTF set only. The choice of the one HRTF coefs. set can now be possible due to the work that was recently done in !1804 (merged). Now the input IVAS format and mode are known at the beginning of the decoding process from the application level - see https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/blob/main/apps/decoder.c#L2369.

Note 1: a similar optimization work was already done for FastConv renderer in !1867 (merged).

Note 2: The RAM memory allocation for HRTFs coefs. is done differently in different renderers:

  • Crend: function create_HRTF_from_rawdata() in utility library, thus memory is not counted
  • FastConv: function ivas_allocate_binaural_hrtf() in the decoder library, thus memory is counted

Could the memory allocation in Crend be done similarly as in FastConv, i.e. allocate it only once when loading the coefficients and then pass only the pointer in the Crend initialization in ivas_rend_initCrend()?

Edited by vaclav