Binaural renderer with external binary file sampling rate mismatch
When outputting the audio from the decoder to binaural configurations, the HRTF coefficients can be loaded from an external binary file. However, when using a file with a sampling rate different from the sampling rate requested at the command line, the decoder still runs (except of the TD renderer) but uses ROM table coefficients. This is confusing as there is no warning that HRTF coefficients are not loaded from the file.
E.g. decoding MC format (Disc mode) bitstream using the following command lines, there is the following processing:
# | command-line | HRTF coefs. from |
---|---|---|
1 | ivas_dec.exe BINAURAL 48 bit syn | ROM tables |
2 | ivas_dec.exe -hrtf ivas_binaural_32kHz.bin BINAURAL 48 bit syn | ROM tables |
3 | ivas_dec.exe -hrtf ivas_binaural_48kHz.bin BINAURAL 48 bit syn | binary file |
In case of the sampling rate mismatch in the TD renderer, the decoding does not start and the following error message is printed:
Decoding finished prematurely: Invalid sampling rate
Moreover, for BINAURAL_ROOM_REVERB
output config. for all binaural renderers, scenario # 2 is not bit-exact with the other scenarios due to differences in handle hHrtfStatistics
- this handle is loaded from the binary file even when the sampling rate is incorrect.
I would suggest to fix the behavior for scenario # 2. There are at least two possibilities:
- Keep the processing as it is, fix the TD renderer behavior, and print out a warning that the HRTF coefs. are not loaded from the file
- Exit the processing and print out a message that a wrong HRTF binary file is provided (i.e. follow the current TD renderer logic)
Personally, I slightly prefer the second option.