Commit dc8c2baf authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Merge remote-tracking branch 'origin/main' into 3gpp_issue_1781_fix

parents 280ddf68 2ba9f36e
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
@@ -2824,6 +2824,52 @@ ivas_error IVAS_DEC_FeedRenderConfig(
    Copy32( renderConfig.roomAcoustics.pAcoustic_rt60_fx, hRenderConfig->roomAcoustics.pAcoustic_rt60_fx, CLDFB_NO_CHANNELS_MAX ); // Q26
    Copy32( renderConfig.roomAcoustics.pAcoustic_dsr_fx, hRenderConfig->roomAcoustics.pAcoustic_dsr_fx, CLDFB_NO_CHANNELS_MAX );   // Q30

#ifdef FIX_1053_REVERB_RECONFIGURATION
    /* Re-initialize reverb instance if already available */

    /* TD renderer Jot reverberator */
    IF( hIvasDec->st_ivas->hReverb != NULL )
    {
        IF( ( error = ivas_reverb_open_fx( &hIvasDec->st_ivas->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }

    /* CREND Jot reverberator */
    test();
    test();
    IF( hIvasDec->st_ivas->hCrendWrapper != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend[0] != NULL && hIvasDec->st_ivas->hCrendWrapper->hCrend[0]->hReverb != NULL )
    {
        IF( ( error = ivas_reverb_open_fx( &hIvasDec->st_ivas->hCrendWrapper->hCrend[0]->hReverb, hIvasDec->st_ivas->hHrtfStatistics, hRenderConfig, hIvasDec->st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }

    test();
    /* FB reverberator */
    IF( hIvasDec->st_ivas->hDiracDecBin[0] != NULL && hIvasDec->st_ivas->hDiracDecBin[0]->hReverb != NULL )
    {
        ivas_binaural_reverb_close_fx( &( hIvasDec->st_ivas->hDiracDecBin[0]->hReverb ) );
        IF( ( error = ivas_binaural_reverb_init( &( hIvasDec->st_ivas->hDiracDecBin[0]->hReverb ), hIvasDec->st_ivas->hHrtfStatistics, hIvasDec->st_ivas->hSpatParamRendCom->num_freq_bands, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, &( hRenderConfig->roomAcoustics ), hIvasDec->st_ivas->hDecoderConfig->output_Fs, NULL, NULL ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }

    test();
    /* Fastconv CLDFB reverberator */
    IF( hIvasDec->st_ivas->hBinRenderer != NULL && hIvasDec->st_ivas->hBinRenderer->hReverb != NULL )
    {
        ivas_binaural_reverb_close_fx( &( hIvasDec->st_ivas->hBinRenderer->hReverb ) );
        IF( ( error = ivas_binaural_reverb_init( &( hIvasDec->st_ivas->hBinRenderer->hReverb ), hIvasDec->st_ivas->hHrtfStatistics, hIvasDec->st_ivas->hBinRenderer->conv_band, hIvasDec->st_ivas->hBinRenderer->timeSlots, &( hRenderConfig->roomAcoustics ), hIvasDec->st_ivas->hDecoderConfig->output_Fs, NULL, NULL ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }
#endif

    Copy( renderConfig.directivity_fx, hRenderConfig->directivity_fx, 3 * MAX_NUM_OBJECTS );
#ifdef CONF_DISTATT
    Copy32( renderConfig.distAtt_fx, hRenderConfig->distAtt_fx, 3 );