Commit f0b6326f authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch '103-Digest-room-acoustics-parameters-for-Parametric-Binaural-Renderer' into 'main'

Resolve "[Rendering] Digest room acoustics parameters for Parametric Binaural Renderer"

See merge request !325
parents 96b39bc6 1a3aba2d
Loading
Loading
Loading
Loading
Loading

lib_com/options.h

100755 → 100644
+1 −0
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@
#define DISABLE_ADAP_RES_COD_TMP                        /* temporary fix for IVAS-403, disables adaptive residual coding */
/*#define ITD_WINNER_GAIN_MODIFY */                     /* ITD optimization - WORK IN PROGRESS */
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define FIX_103_RA_PARAMS_PARAM_BIN_REND                /* Issue 103: Digest room acoustics parameters for Parametric Binaural Renderer*/
/*#define SBA_HPF_TUNING_DEC*/

#define FIX_350_MASA_DELAY_COMP                         /* Nokia: Issue 350: MASA audio/meta delay compensation */
+23 −0
Original line number Diff line number Diff line
@@ -1894,6 +1894,28 @@ ivas_error ivas_binaural_reverb_open(
        }
    }


#ifdef FIX_103_RA_PARAMS_PARAM_BIN_REND
    if ( ( roomAcoustics ) && ( roomAcoustics->override ) )
    {
        ivas_reverb_prepare_cldfb_params( roomAcoustics, hHrtfFastConv, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene );
        ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, t60, ene );
        ivas_binaural_reverb_setPreDelay( hReverb, (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX ) );
    }
    else
    {
        if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
        {
            ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfFastConv->fastconvReverberationTimes, hHrtfFastConv->fastconvReverberationEneCorrections );
            ivas_binaural_reverb_setPreDelay( hReverb, 10 );
        }
        else
        {
            ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfParambin->parametricReverberationTimes, hHrtfParambin->parametricReverberationEneCorrections );
            ivas_binaural_reverb_setPreDelay( hReverb, 10 );
        }
    }
#else
    if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    {
        if ( !roomAcoustics->override )
@@ -1914,6 +1936,7 @@ ivas_error ivas_binaural_reverb_open(
        ivas_binaural_reverb_setPreDelay( hReverb, 10 );
    }

#endif
    return IVAS_ERR_OK;
}