Skip to content

Fx Decoder output differs between HRTF from ROM and from file

Basic info

Bug description

The default hrtfs used for binaural output exists as ROM tables in the codec and as external files that can be loaded via the command line: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/tree/main/scripts/binauralRenderer_interface/binaural_renderers_hrtf_data?ref_type=heads. The output should be bit-exact regardless of the used method. In the floating point repo, this is assured by an automated test. When porting this test to main-pc branch, I found that this assumption is not met there. I could also reproduce that on latest BASOP main.

The test run can be found here: https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/jobs/378249. Most of the cases show a minimal diff of 1 (which is probably ok), but some of the cases show a larger deviation which should not occur.

Ways to reproduce

./IVAS_cod_fx -mc 7_1 512000 48 scripts/testv/stv71MC48c.wav bit
./IVAS_dec_fx -t scripts/testv/headrot_case00_3000_q.csv BINAURAL_ROOM_IR 32 bit out_no_hrtf.wav
./IVAS_dec_fx -hrtf scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin -t scripts/testv/headrot_case00_3000_q.csv BINAURAL_ROOM_IR 32 bit out_hrtf.wav
wav-diff out_hrtf.wav out_no_hrtf.wav

Output:

wav files differ
  ref: out_hrtf.wav
  cut: out_no_hrtf.wav
channel 0 is different:
  non BE frames: 146 (97.3%)
  first diff: frame 3, sample 510
  MLD: avg: 0.3, max: 0.9 @1.251s, louder: 75.9%, quieter: 21.0%
channel 1 is different:
  non BE frames: 145 (96.7%)
  first diff: frame 5, sample 184
  MLD: avg: 0.3, max: 1.0 @2.223s, louder: 79.6%, quieter: 16.4%