Commit 917f0587 authored by emerit's avatar emerit
Browse files

merge with main

parent 784867eb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ typedef struct _IVAS_JBM_TRACE_DATA
} IVAS_JBM_TRACE_DATA;



/*----------------------------------------------------------------------------------*
 * Renderer API structures and enums
 *----------------------------------------------------------------------------------*/
+0 −1
Original line number Diff line number Diff line
@@ -186,7 +186,6 @@ void initFdCngDec_flt(
    hFdCngDec->cna_rescale_fact_fx = 0;
#if (defined EVS_FLOAT) || !(defined IVAS_FLOAT_FIXED)
    hFdCngDec->cna_act_fact = 1.0f;
#if (defined EVS_FLOAT) || !(defined IVAS_FLOAT_FIXED)
    hFdCngDec->cna_rescale_fact = 0.0f;
#endif 
    hFdCngDec->cna_seed = 5687;
+47 −45
Original line number Diff line number Diff line
@@ -772,8 +772,10 @@ static ivas_error ivas_alloc_pppMem(
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HRTF memory" );
    }

    FOR( i = 0; i < dim1; i++ ){
        IF( ( localMem[i] = (float **) malloc( dim2 * sizeof( float * ) ) ) == NULL ){
    FOR( i = 0; i < dim1; i++ )
    {
        IF( ( localMem[i] = (float **) malloc( dim2 * sizeof( float * ) ) ) == NULL )
        {
            return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HRTF memory" );
        }
        IF( allocate_init_flag == 0 )
@@ -2113,11 +2115,11 @@ void ivas_binaural_add_LFE(
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
        {
            gain = GAIN_LFE;

        }
        else
        {
            gain = ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hHrtfCrend != NULL ) ) ? st_ivas->hCrendWrapper->hHrtfCrend->gain_lfe : GAIN_LFE;
        }
            gain = ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hHrtfCrend != NULL ) ) ? st_ivas->hCrendWrapper->hHrtfCrend->gain_lfe : GAIN_LFE;        }

        for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ )
        {
+2 −0
Original line number Diff line number Diff line
@@ -529,6 +529,7 @@ ivas_error ivas_core_dec(
        Q_syn_Overl = s_min( Q_fer_samples, Q_syn_Overl ) - 1;
        IF( st->hHQ_core )
        {

        }
        IF( st->hTcxDec )
        {
@@ -592,6 +593,7 @@ ivas_error ivas_core_dec(
        fixedToFloat_arrL( st->cldfbBPF->cldfb_state_fx, st->cldfbBPF->cldfb_state, Q11, st->cldfbBPF->cldfb_state_length );
        IF( st->hHQ_core )
        {

        }
        IF( st->hFdCngDec )
        {
+29 −23
Original line number Diff line number Diff line
@@ -198,7 +198,11 @@ static ivas_error ivas_ism_bitrate_switching_dec_fx(
                }
                IF ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
                    IF ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
#else
                    IF ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_config, NULL, st_ivas->hBinRendererTd->HrFiltSet_p->lr_energy_and_iac_fx, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
#endif
                    {
                        return error;
                    }
@@ -697,7 +701,8 @@ static ivas_error ivas_ism_bitrate_switching_dec(
        /* Deallocate the ParamISM struct */
        ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ), &( st_ivas->hSpatParamRendCom ), st_ivas->hDecoderConfig->output_config );

        if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB
        )
        {
            /* close the parametric binaural renderer */
            ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );
@@ -782,7 +787,7 @@ static ivas_error ivas_ism_bitrate_switching_dec(
                    return error;
                }
#endif // IVAS_FLOAT_FIXED
                if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
#ifdef FIX_CREND_CHANGES_AND_HRTF_FILE_FORMAT
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
@@ -841,7 +846,8 @@ static ivas_error ivas_ism_bitrate_switching_dec(
            return error;
        }

        if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB
        )
        {
#ifdef IVAS_FLOAT_FIXED
            /* open the parametric binaural renderer */
@@ -858,9 +864,9 @@ static ivas_error ivas_ism_bitrate_switching_dec(
                    fixedToFloat_arr(st_ivas->hHrtfParambin->hrtfShCoeffsIm_fx[i][j], st_ivas->hHrtfParambin->hrtfShCoeffsIm[i][j], 14, HRTF_NUM_BINS );
                }
            }
            fixedToFloat_arr( st_ivas->hHrtfParambin->parametricReverberationTimes_fx, st_ivas->hHrtfParambin->parametricReverberationTimes, 31, CLDFB_NO_CHANNELS_MAX );
            fixedToFloat_arr( st_ivas->hHrtfParambin->parametricReverberationEneCorrections_fx, st_ivas->hHrtfParambin->parametricReverberationEneCorrections, 31, CLDFB_NO_CHANNELS_MAX );
            fixedToFloat_arr( st_ivas->hHrtfParambin->parametricEarlyPartEneCorrection_fx, st_ivas->hHrtfParambin->parametricEarlyPartEneCorrection, 31, CLDFB_NO_CHANNELS_MAX );
            fixedToFloat_arrL(st_ivas->hHrtfParambin->parametricReverberationTimes_fx, st_ivas->hHrtfParambin->parametricReverberationTimes, 31, CLDFB_NO_CHANNELS_MAX );
            fixedToFloat_arrL(st_ivas->hHrtfParambin->parametricReverberationEneCorrections_fx, st_ivas->hHrtfParambin->parametricReverberationEneCorrections, 31, CLDFB_NO_CHANNELS_MAX );
            fixedToFloat_arrL(st_ivas->hHrtfParambin->parametricEarlyPartEneCorrection_fx, st_ivas->hHrtfParambin->parametricEarlyPartEneCorrection, 31, CLDFB_NO_CHANNELS_MAX );
#endif
#else
            if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
Loading