Skip to content

Binauralization delay rounding

This is a spin-off of #59 (closed).

The MR !193 (merged), switch FIX_I59_DELAY_ROUNDING changes the way how the binauralization delay is rounded by replacing NS2SA() with roundf(). This reopens a discussion we already had in the past.

Personally (@vaclav), I do not think that this is a good way to go as discussed in #59 (closed):

  • NS2SA() was introduced in FLP framework to replicate the behavior in BASOP implementation as discussed in #215
  • as raised in the past, NS2SA() returns the number of values corresponding to the same time instance regardless of the sampling rate while roundf() does not. E.g. for MC 5.1 256 kbps encoding and binaural decoding, one gets for delay in samples:
variant 16 kHz 32 kHz 48 kHz
float 52.3333 104.6666 157
NS2SA() 52 104 156
roundf() 52 105 157
  • with the proposed change, the use of get_delay() is different between encoder and decoder

Another comment (@janssontoftg) mentioned that in EVS BASOP there are two versions of NS2SA(), one used for by the pre-compiler (which is the same as the NS2SA we have here) and another one to be used in runtime, which is different. The precision for the computation of NS2SA() could also be improved.

Edited by emerit