Skip to content

ParamMC + BINAURAL_ROOM_REVERB causes premature end of decoding due to error in EFAP initialization

Running e.g.

./IVAS_cod -mc 5_1 80000 48 scripts/testv/stv51MC48c.wav bit
./IVAS_dec -t scripts/trajectories/const000.csv BINAURAL_ROOM_REVERB 48 bit out.wav

Results in

==================================================================================================

Input bitstream file:   bit
Output synthesis file:  out.wav

Output sampling rate:   48000 Hz
Bitrate:                80.00 kbps
Input configuration:    Multichannel 5.1 (CICP6)
Output configuration:   Binaural: room with reverb
Render framesize:       20ms
Head rotation:          ON

------ Running the decoder ------


Wrong function parameters: EFAP requires arrays of speaker azimuths and elevations

In function: efap_init_data(), lib_rend/ivas_efap.c:159


Error in IVAS_DEC_GetSamples: Wrong function parameters
Frames processed:       Decoding finished prematurely

Note that DEBUGGING needs to be defined to get the precise error message.

The reason seems to be that when in ivas_binRenderer_internal.c:1290 efap_init_data() is called, the internal decoder setup is HOA3. Therefore, st_ivas->hIntSetup.ls_azimuth st_ivas->hIntSetup.ls_elevation are both NULL. This triggers ivas_efap.c:156:

    /* Basic init checks */
    if ( !speaker_node_azi_deg || !speaker_node_ele_deg )
    {
        hEFAPdata = NULL;
        return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "EFAP requires arrays of speaker azimuths and elevations" );
    }