Loading lib_com/cldfb.c +6 −4 Original line number Diff line number Diff line Loading @@ -1675,21 +1675,18 @@ ivas_error openCldfb_ivas_fx( // configureCldfb_ivas( hs, sampling_rate ); configureCldfb_ivas_fx( hs, sampling_rate ); hs->memory_flt = NULL; hs->FilterStates = NULL; hs->memory_length = 0; move16(); IF( EQ_32( type, CLDFB_ANALYSIS ) ) { buf_len = sub( hs->p_filter_length, hs->no_channels ); hs->FilterStates = (Word16 *) malloc( ( 9 + 16 ) * CLDFB_getNumChannels( sampling_rate ) * sizeof( Word16 ) ); hs->FilterStates_eg = 0; } ELSE { buf_len = hs->p_filter_length; move16(); hs->FilterStates = (Word16 *) malloc( 2 * ( 9 + 16 ) * CLDFB_getNumChannels( sampling_rate ) * sizeof( Word16 ) ); hs->FilterStates_eg = 0; } IF( ( hs->cldfb_state_fx = (Word32 *) malloc( buf_len * sizeof( Word32 ) ) ) == NULL ) Loading Loading @@ -2091,6 +2088,11 @@ void deleteCldfb_ivas( { free( hs->cldfb_state_fx ); } IF( hs->FilterStates ) { free( hs->FilterStates ); } #endif free( hs ); Loading lib_dec/ivas_init_dec.c +2 −2 Original line number Diff line number Diff line Loading @@ -3043,7 +3043,7 @@ ivas_error ivas_init_decoder_fx( FOR( i = 0; i < numCldfbAnalyses; i++ ) { IF( NE_32( ( error = openCldfb_ivas( &( st_ivas->cldfbAnaDec[i] ), CLDFB_ANALYSIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = openCldfb_ivas_fx( &( st_ivas->cldfbAnaDec[i] ), CLDFB_ANALYSIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ), IVAS_ERR_OK ) ) { return error; } Loading @@ -3055,7 +3055,7 @@ ivas_error ivas_init_decoder_fx( FOR( i = 0; i < numCldfbSyntheses; i++ ) { IF( NE_32( ( error = openCldfb_ivas( &( st_ivas->cldfbSynDec[i] ), CLDFB_SYNTHESIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = openCldfb_ivas_fx( &( st_ivas->cldfbSynDec[i] ), CLDFB_SYNTHESIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ), IVAS_ERR_OK ) ) { return error; } Loading lib_dec/ivas_spar_decoder.c +3 −0 Original line number Diff line number Diff line Loading @@ -3122,6 +3122,9 @@ void ivas_spar_dec_upmixer_sf_fx( * Prepare CLDFB buffers *---------------------------------------------------------------------*/ #ifdef MSAN_FIX set_zero_fx( &Pcm_tmp_fx[0][0], ( MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ) * L_FRAME48k ); #endif // MSAN_FIX /* set-up pointers */ IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) ) { Loading lib_enc/ivas_core_pre_proc_front.c +9 −0 Original line number Diff line number Diff line Loading @@ -996,7 +996,9 @@ ivas_error pre_proc_front_ivas_fx( Word32 imagBuffer_fx[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; Word16 sf_energySum[CLDFB_NO_CHANNELS_MAX]; #ifndef MSAN_FIX floatToFixed_arr( old_inp_12k8, old_inp_12k8_fx, 0, 496 ); #endif // MSAN_FIX #endif /*------------------------------------------------------------------* * Initialization Loading Loading @@ -1352,6 +1354,7 @@ ivas_error pre_proc_front_ivas_fx( { mvr2r( new_inp_12k8, st->buf_speech_enc_flt + L_FRAME32k, L_FRAME ); } #ifndef MSAN_FIX /*To be enabled when updations related to new_inp_12k8_fx is enabled */ #if 1 IF( EQ_16( element_mode, IVAS_CPE_DFT ) ) { Loading @@ -1369,6 +1372,7 @@ ivas_error pre_proc_front_ivas_fx( Scale_sig( st->buf_speech_enc + L_FRAME32k, L_FRAME, 1 ); } #endif #endif // !MSAN_FIX /*------------------------------------------------------------------* * Perform fixed preemphasis (12.8 kHz signal) through 1 - g*z^-1 *-----------------------------------------------------------------*/ Loading Loading @@ -1722,6 +1726,11 @@ ivas_error pre_proc_front_ivas_fx( { st->cldfbAnaEnc->scale = (Word16) ( st->cldfbAnaEnc->scale_flt * ( 1 << 8 ) ); floatToFixed_arr( st->input, st->input_fx, 0, 480 ); #ifdef MSAN_FIX st->lt_mean_NB_fx = (Word16) st->lt_mean_NB * ( 1 << 11 ); st->lt_mean_WB_fx = (Word16) st->lt_mean_WB * ( 1 << 11 ); st->lt_mean_SWB_fx = (Word16) st->lt_mean_SWB * ( 1 << 11 ); #endif bw_detect_fx( st, st->input_fx, NULL, enerBuffer_fx, sf_energySum, ivas_format, 0 ); Loading lib_enc/ivas_front_vad.c +11 −0 Original line number Diff line number Diff line Loading @@ -543,7 +543,9 @@ ivas_error front_vad_spar( // Q_bands = Q_factor_arrL( fr_bands[0], 2 * NB_BANDS ); floatToFixed_arrL( fr_bands[0], fr_bands_fx[0], Q_bands + QSCALE, 2 * NB_BANDS ); floatToFixed_arrL( hFrontVad->hNoiseEst->bckr, hFrontVad->hNoiseEst->bckr_fx, Q_bands + QSCALE, NB_BANDS ); #ifndef MSAN_FIX floatToFixed_arrL( tmpE, tmpE_fx, Q_bands + QSCALE, NB_BANDS ); #endif hFrontVad->hNoiseEst->totalNoise_fx = (Word16) ( hFrontVad->hNoiseEst->totalNoise * ONE_IN_Q8 ); Etot_fx[0] = (Word16) ( Etot[0] * ONE_IN_Q8 ); hFrontVad->hNoiseEst->Etot_last_fx = (Word16) ( hFrontVad->hNoiseEst->Etot_last * ONE_IN_Q8 ); Loading Loading @@ -626,7 +628,12 @@ ivas_error front_vad_spar( Q_inp_12k8 = Q9; // Q_factor_arr( inp_12k8-M, (3 * L_FRAME / 2)+M ); floatToFixed_arr( inp_12k8 - M, inp_12k8_fx - M, Q_inp_12k8, ( 3 * L_FRAME / 2 ) + M ); #ifdef MSAN_FIX floatToFixed_arr( A, A_fx, Q12, ( L_FRAME / L_SUBFR ) * ( M + 1 ) ); #else floatToFixed_arr( A, A_fx, Q12, NB_SUBFR16k * ( M + 1 ) ); #endif // MSAN_FIX st->mem_wsp_fx = (Word16) floatToFixed( st->mem_wsp, Q_inp_12k8 ); // find_wsp_fx( A_fx, inp_12k8_fx, wsp_fx, &st->mem_wsp_fx, TILT_FAC_FX, L_FRAME, L_LOOK_12k8, L_SUBFR, Aw_fx, GAMMA1, NB_SUBFR ); ivas_find_wsp( L_FRAME, L_SUBFR, NB_SUBFR, A_fx, Aw_fx, inp_12k8_fx, TILT_FAC_FX, wsp_fx, &st->mem_wsp_fx, GAMMA1, L_LOOK_12k8 ); Loading Loading @@ -767,7 +774,11 @@ ivas_error front_vad_spar( corr_shift_fx = (Word16) floatToFixed( corr_shift, Q15 ); hFrontVad->hVAD->running_avg_fx = (Word16) floatToFixed( hFrontVad->hVAD->running_avg, Q15 ); hFrontVad->hVAD->ra_deltasum_fx = (Word16) floatToFixed( hFrontVad->hVAD->ra_deltasum, Q15 ); #ifdef MSAN_FIX floatToFixed_arr( A, A_fx, Q12, ( L_FRAME / L_SUBFR ) * ( M + 1 ) ); #else floatToFixed_arr( A, A_fx, Q12, NB_SUBFR16k * ( M + 1 ) ); #endif // MSAN_FIX floatToFixed_arr( st->voicing, st->voicing_fx, Q15, 3 ); vad_param_updt_fx( st, st->pitch[1], corr_shift_fx, corr_shift_fx, A_fx, &hFrontVad, 1 ); hFrontVad->hVAD->running_avg = fixedToFloat( hFrontVad->hVAD->running_avg_fx, Q15 ); Loading Loading
lib_com/cldfb.c +6 −4 Original line number Diff line number Diff line Loading @@ -1675,21 +1675,18 @@ ivas_error openCldfb_ivas_fx( // configureCldfb_ivas( hs, sampling_rate ); configureCldfb_ivas_fx( hs, sampling_rate ); hs->memory_flt = NULL; hs->FilterStates = NULL; hs->memory_length = 0; move16(); IF( EQ_32( type, CLDFB_ANALYSIS ) ) { buf_len = sub( hs->p_filter_length, hs->no_channels ); hs->FilterStates = (Word16 *) malloc( ( 9 + 16 ) * CLDFB_getNumChannels( sampling_rate ) * sizeof( Word16 ) ); hs->FilterStates_eg = 0; } ELSE { buf_len = hs->p_filter_length; move16(); hs->FilterStates = (Word16 *) malloc( 2 * ( 9 + 16 ) * CLDFB_getNumChannels( sampling_rate ) * sizeof( Word16 ) ); hs->FilterStates_eg = 0; } IF( ( hs->cldfb_state_fx = (Word32 *) malloc( buf_len * sizeof( Word32 ) ) ) == NULL ) Loading Loading @@ -2091,6 +2088,11 @@ void deleteCldfb_ivas( { free( hs->cldfb_state_fx ); } IF( hs->FilterStates ) { free( hs->FilterStates ); } #endif free( hs ); Loading
lib_dec/ivas_init_dec.c +2 −2 Original line number Diff line number Diff line Loading @@ -3043,7 +3043,7 @@ ivas_error ivas_init_decoder_fx( FOR( i = 0; i < numCldfbAnalyses; i++ ) { IF( NE_32( ( error = openCldfb_ivas( &( st_ivas->cldfbAnaDec[i] ), CLDFB_ANALYSIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = openCldfb_ivas_fx( &( st_ivas->cldfbAnaDec[i] ), CLDFB_ANALYSIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ), IVAS_ERR_OK ) ) { return error; } Loading @@ -3055,7 +3055,7 @@ ivas_error ivas_init_decoder_fx( FOR( i = 0; i < numCldfbSyntheses; i++ ) { IF( NE_32( ( error = openCldfb_ivas( &( st_ivas->cldfbSynDec[i] ), CLDFB_SYNTHESIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ), IVAS_ERR_OK ) ) IF( NE_32( ( error = openCldfb_ivas_fx( &( st_ivas->cldfbSynDec[i] ), CLDFB_SYNTHESIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ), IVAS_ERR_OK ) ) { return error; } Loading
lib_dec/ivas_spar_decoder.c +3 −0 Original line number Diff line number Diff line Loading @@ -3122,6 +3122,9 @@ void ivas_spar_dec_upmixer_sf_fx( * Prepare CLDFB buffers *---------------------------------------------------------------------*/ #ifdef MSAN_FIX set_zero_fx( &Pcm_tmp_fx[0][0], ( MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ) * L_FRAME48k ); #endif // MSAN_FIX /* set-up pointers */ IF( NE_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_FOA ) ) { Loading
lib_enc/ivas_core_pre_proc_front.c +9 −0 Original line number Diff line number Diff line Loading @@ -996,7 +996,9 @@ ivas_error pre_proc_front_ivas_fx( Word32 imagBuffer_fx[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; Word16 sf_energySum[CLDFB_NO_CHANNELS_MAX]; #ifndef MSAN_FIX floatToFixed_arr( old_inp_12k8, old_inp_12k8_fx, 0, 496 ); #endif // MSAN_FIX #endif /*------------------------------------------------------------------* * Initialization Loading Loading @@ -1352,6 +1354,7 @@ ivas_error pre_proc_front_ivas_fx( { mvr2r( new_inp_12k8, st->buf_speech_enc_flt + L_FRAME32k, L_FRAME ); } #ifndef MSAN_FIX /*To be enabled when updations related to new_inp_12k8_fx is enabled */ #if 1 IF( EQ_16( element_mode, IVAS_CPE_DFT ) ) { Loading @@ -1369,6 +1372,7 @@ ivas_error pre_proc_front_ivas_fx( Scale_sig( st->buf_speech_enc + L_FRAME32k, L_FRAME, 1 ); } #endif #endif // !MSAN_FIX /*------------------------------------------------------------------* * Perform fixed preemphasis (12.8 kHz signal) through 1 - g*z^-1 *-----------------------------------------------------------------*/ Loading Loading @@ -1722,6 +1726,11 @@ ivas_error pre_proc_front_ivas_fx( { st->cldfbAnaEnc->scale = (Word16) ( st->cldfbAnaEnc->scale_flt * ( 1 << 8 ) ); floatToFixed_arr( st->input, st->input_fx, 0, 480 ); #ifdef MSAN_FIX st->lt_mean_NB_fx = (Word16) st->lt_mean_NB * ( 1 << 11 ); st->lt_mean_WB_fx = (Word16) st->lt_mean_WB * ( 1 << 11 ); st->lt_mean_SWB_fx = (Word16) st->lt_mean_SWB * ( 1 << 11 ); #endif bw_detect_fx( st, st->input_fx, NULL, enerBuffer_fx, sf_energySum, ivas_format, 0 ); Loading
lib_enc/ivas_front_vad.c +11 −0 Original line number Diff line number Diff line Loading @@ -543,7 +543,9 @@ ivas_error front_vad_spar( // Q_bands = Q_factor_arrL( fr_bands[0], 2 * NB_BANDS ); floatToFixed_arrL( fr_bands[0], fr_bands_fx[0], Q_bands + QSCALE, 2 * NB_BANDS ); floatToFixed_arrL( hFrontVad->hNoiseEst->bckr, hFrontVad->hNoiseEst->bckr_fx, Q_bands + QSCALE, NB_BANDS ); #ifndef MSAN_FIX floatToFixed_arrL( tmpE, tmpE_fx, Q_bands + QSCALE, NB_BANDS ); #endif hFrontVad->hNoiseEst->totalNoise_fx = (Word16) ( hFrontVad->hNoiseEst->totalNoise * ONE_IN_Q8 ); Etot_fx[0] = (Word16) ( Etot[0] * ONE_IN_Q8 ); hFrontVad->hNoiseEst->Etot_last_fx = (Word16) ( hFrontVad->hNoiseEst->Etot_last * ONE_IN_Q8 ); Loading Loading @@ -626,7 +628,12 @@ ivas_error front_vad_spar( Q_inp_12k8 = Q9; // Q_factor_arr( inp_12k8-M, (3 * L_FRAME / 2)+M ); floatToFixed_arr( inp_12k8 - M, inp_12k8_fx - M, Q_inp_12k8, ( 3 * L_FRAME / 2 ) + M ); #ifdef MSAN_FIX floatToFixed_arr( A, A_fx, Q12, ( L_FRAME / L_SUBFR ) * ( M + 1 ) ); #else floatToFixed_arr( A, A_fx, Q12, NB_SUBFR16k * ( M + 1 ) ); #endif // MSAN_FIX st->mem_wsp_fx = (Word16) floatToFixed( st->mem_wsp, Q_inp_12k8 ); // find_wsp_fx( A_fx, inp_12k8_fx, wsp_fx, &st->mem_wsp_fx, TILT_FAC_FX, L_FRAME, L_LOOK_12k8, L_SUBFR, Aw_fx, GAMMA1, NB_SUBFR ); ivas_find_wsp( L_FRAME, L_SUBFR, NB_SUBFR, A_fx, Aw_fx, inp_12k8_fx, TILT_FAC_FX, wsp_fx, &st->mem_wsp_fx, GAMMA1, L_LOOK_12k8 ); Loading Loading @@ -767,7 +774,11 @@ ivas_error front_vad_spar( corr_shift_fx = (Word16) floatToFixed( corr_shift, Q15 ); hFrontVad->hVAD->running_avg_fx = (Word16) floatToFixed( hFrontVad->hVAD->running_avg, Q15 ); hFrontVad->hVAD->ra_deltasum_fx = (Word16) floatToFixed( hFrontVad->hVAD->ra_deltasum, Q15 ); #ifdef MSAN_FIX floatToFixed_arr( A, A_fx, Q12, ( L_FRAME / L_SUBFR ) * ( M + 1 ) ); #else floatToFixed_arr( A, A_fx, Q12, NB_SUBFR16k * ( M + 1 ) ); #endif // MSAN_FIX floatToFixed_arr( st->voicing, st->voicing_fx, Q15, 3 ); vad_param_updt_fx( st, st->pitch[1], corr_shift_fx, corr_shift_fx, A_fx, &hFrontVad, 1 ); hFrontVad->hVAD->running_avg = fixedToFloat( hFrontVad->hVAD->running_avg_fx, Q15 ); Loading