Skip to content

Small differences between ROM and external binary HRTF file for FastConv and paramBin

While implementing the tests for HRTF binary loading, some testcases were skipped due to unintended non-bitexact results for

  • FastConv cases for Multi-channel at 160kbps and SBA at 256kbps
  • paramBin renderer for all cases

The difference is very minor and is just 1 (direct amplitude difference on the output WAV files) - at least for the FastConv cases, for paramBin there might be bigger ones.

The non-BE for paramBin was expected and a result of the fixes in !1400 (merged).

For FastConv, the exact reason is unknown, but may be related to floating-point differences between the values written to the ROM files in ASCII and the binary float representation written to the binary files (this is speculation by @kiene and @weckbecker). Another thing that was noted is that in lib_rend/ivas_rom_binauralRenderer.c, there is a comment at line 54 that the FastConv tables were updated on 8. January 2024, but git blame lib_rend/ivas_rom_binauralRenderer.c reveals that the actual values were only last update on 28. August 2023 (both edits by @emerit). Here the relevant part of the git blame output:

d9cbd165da lib_dec/ivas_rom_binauralRenderer.c  (szczerba        2022-06-02 15:48:51 +0200    52) /* Can be replaced by your own generated HRIR tables */
d9cbd165da lib_dec/ivas_rom_binauralRenderer.c  (szczerba        2022-06-02 15:48:51 +0200    53) /*
3511a101c2 lib_rend/ivas_rom_binauralRenderer.c (emerit          2024-01-08 18:49:01 +0100    54)  * Generated on 08-Jan-2024 with Matlab version 9.3.0.948333 (R2017b) Update 9 by MUXE6256 on PCWIN64
d9cbd165da lib_dec/ivas_rom_binauralRenderer.c  (szczerba        2022-06-02 15:48:51 +0200    55) */
6a19989e13 lib_rend/ivas_rom_binauralRenderer.c (emerit          2023-04-14 17:56:35 +0200    56) 
6a19989e13 lib_rend/ivas_rom_binauralRenderer.c (emerit          2023-04-14 17:56:35 +0200    57) 
7af9067f41 lib_rend/ivas_rom_binauralRenderer.c (Ke Zhao         2023-06-28 16:48:23 +1000    58) const float FASTCONV_HOA3_latency_s = 0.000020833f;
f190d90bbf lib_rend/ivas_rom_binauralRenderer.c (Ke Zhao         2023-06-29 17:53:57 +1000    59) const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HOA3_CHANNELS][BINAURAL_NTAPS_SBA]=
7af9067f41 lib_rend/ivas_rom_binauralRenderer.c (Ke Zhao         2023-06-28 16:48:23 +1000    60) {
7af9067f41 lib_rend/ivas_rom_binauralRenderer.c (Ke Zhao         2023-06-28 16:48:23 +1000    61)     {
0907c068cd lib_rend/ivas_rom_binauralRenderer.c (emerit          2023-08-28 15:39:25 +0200    62)         {+0.353305f, +0.566845f, +0.200116f},
0907c068cd lib_rend/ivas_rom_binauralRenderer.c (emerit          2023-08-28 15:39:25 +0200    63)         {+0.451504f, -0.563006f, +0.083565f},
0907c068cd lib_rend/ivas_rom_binauralRenderer.c (emerit          2023-08-28 15:39:25 +0200    64)         {+0.022092f, +0.111945f, -0.003135f},
0907c068cd lib_rend/ivas_rom_binauralRenderer.c (emerit          2023-08-28 15:39:25 +0200    65)         {+0.047133f, +0.000194f, -0.000386f},

Maybe this could also explain the difference.

This issue is for discussion on how - and if - to resolve this really minor differences. The difference is inaudible and probably negligible, but for conformance reasons, it is probably good to be really exact here. There is also the need to implement a fixed-point version of the HRTF binary format for the fixed-point codec version. If this format is used for both the floating point and the fixed point codec, then at least floating-point inaccuracies should not occur anymore. If this route is chosen, then maybe fixing this in the floating point version of the binary HRTF files is probably not necessary before.