Loading lib_com/cnst.h +1 −1 Original line number Diff line number Diff line Loading @@ -3040,7 +3040,7 @@ extern const Word16 Idx2Freq_Tbl[]; /* 'x' is converted to Q6, 'Freq_Tbl'/1000 in Q9 */ /* only works for 'fs' = [8000,12800,16000,25600,32000,48000] (unpredictable otherwise) */ /* 15625 is 1000000.0f/Q6 but we use the calculated value to avoid float point code */ #define NS2SA_fx2(fs,x) (chk_fs(fs) mult((&Idx2Freq_Tbl[-2])[L_and(L_shr(fs,8),7)], (Word16)((x)/15625))) #define NS2SA_FX2(fs,x) (chk_fs(fs) mult((&Idx2Freq_Tbl[-2])[L_and(L_shr(fs,8),7)], (Word16)((x)/15625))) #define L_FRAME_12k8 256 /* Frame size at 12k8Hz: 20ms = 256 samples */ #define L_FRAME_16k 320 /* Frame size at 16kHz: 20ms = 320 samples */ Loading lib_com/core_com_config.c +5 −5 Original line number Diff line number Diff line Loading @@ -1446,13 +1446,13 @@ void init_tcx_window_cfg_fx( /*ALDO windows for MODE2*/ mdct_window_aldo( hTcxCfg->tcx_aldo_window_1, hTcxCfg->tcx_aldo_window_1_trunc, hTcxCfg->tcx_aldo_window_2, L_frame ); mdct_window_aldo( hTcxCfg->tcx_aldo_window_1_FB, hTcxCfg->tcx_aldo_window_1_FB_trunc, hTcxCfg->tcx_aldo_window_2_FB, NS2SA_fx2( input_Fs, FRAME_SIZE_NS ) ); mdct_window_aldo( hTcxCfg->tcx_aldo_window_1_FB, hTcxCfg->tcx_aldo_window_1_FB_trunc, hTcxCfg->tcx_aldo_window_2_FB, NS2SA_FX2( input_Fs, FRAME_SIZE_NS ) ); /*1.25ms transition window for ACELP->TCX*/ hTcxCfg->tcx_mdct_window_trans_length = NS2SA_fx2( sr_core, ACELP_TCX_TRANS_NS ); hTcxCfg->tcx_mdct_window_trans_length = NS2SA_FX2( sr_core, ACELP_TCX_TRANS_NS ); move16(); mdct_window_sine_IVAS_updated( hTcxCfg->tcx_mdct_window_trans, sr_core, hTcxCfg->tcx_mdct_window_trans_length, TRANSITION_OVERLAP, element_mode ); hTcxCfg->tcx_mdct_window_trans_lengthFB = NS2SA_fx2( input_Fs, ACELP_TCX_TRANS_NS ); hTcxCfg->tcx_mdct_window_trans_lengthFB = NS2SA_FX2( input_Fs, ACELP_TCX_TRANS_NS ); move16(); IF( EQ_16( hTcxCfg->tcx_mdct_window_trans_length, hTcxCfg->tcx_mdct_window_trans_lengthFB ) ) { Loading @@ -1464,8 +1464,8 @@ void init_tcx_window_cfg_fx( } /*Mid-OLA*/ /*compute minimum length for "half" window: lookahead - 5ms. It must be also multiple of 2*/ hTcxCfg->tcx_mdct_window_half_length = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA_fx2( 12800, 5000000L ), sr2fscale( sr_core ) ), LD_FSCALE_DENOM ) ); hTcxCfg->tcx_mdct_window_half_lengthFB = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA_fx2( 12800, 5000000L ), sr2fscale( input_Fs ) ), LD_FSCALE_DENOM ) ); hTcxCfg->tcx_mdct_window_half_length = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA_FX2( 12800, 5000000L ), sr2fscale( sr_core ) ), LD_FSCALE_DENOM ) ); hTcxCfg->tcx_mdct_window_half_lengthFB = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA_FX2( 12800, 5000000L ), sr2fscale( input_Fs ) ), LD_FSCALE_DENOM ) ); move16(); move16(); assert( GT_16( hTcxCfg->tcx_mdct_window_half_length, 16 ) && "Half window can not be large enough!" ); Loading lib_com/ivas_lfe_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -192,7 +192,7 @@ void ivas_lfe_window_init_fx( move16(); /* 8ms of latency */ hLFEWindow->fade_len = NS2SA_fx2( sampling_rate, IVAS_LFE_FADE_NS ); hLFEWindow->fade_len = NS2SA_FX2( sampling_rate, IVAS_LFE_FADE_NS ); hLFEWindow->zero_pad_len = ( mult( IVAS_ZERO_PAD_LEN_MULT_FAC_fx, sub( hLFEWindow->dct_len, hLFEWindow->fade_len ) ) ); hLFEWindow->full_len = add( add( hLFEWindow->zero_pad_len, hLFEWindow->fade_len ), hLFEWindow->dct_len ); move16(); Loading lib_com/tcx_ltp_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1704,7 +1704,7 @@ void tcx_ltp_post32( filtIdx = 0; /* just to avoid comilation warnings */ move16(); tcx_buf_len = NS2SA_fx2( st->output_Fs, TCXLTP_DELAY_NS ); tcx_buf_len = NS2SA_FX2( st->output_Fs, TCXLTP_DELAY_NS ); move16(); SideInfoOnly = 0; move16(); Loading lib_dec/FEC_HQ_phase_ecu_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -3279,7 +3279,7 @@ static void rec_wtda_fx( p_ecu++; } timesh = NS2SA_fx2( fs, 10000000L - PH_ECU_ALDO_OLP2_NS ); timesh = NS2SA_FX2( fs, 10000000L - PH_ECU_ALDO_OLP2_NS ); move16(); set16_fx( rec_buf, 0, output_frame ); Loading Loading
lib_com/cnst.h +1 −1 Original line number Diff line number Diff line Loading @@ -3040,7 +3040,7 @@ extern const Word16 Idx2Freq_Tbl[]; /* 'x' is converted to Q6, 'Freq_Tbl'/1000 in Q9 */ /* only works for 'fs' = [8000,12800,16000,25600,32000,48000] (unpredictable otherwise) */ /* 15625 is 1000000.0f/Q6 but we use the calculated value to avoid float point code */ #define NS2SA_fx2(fs,x) (chk_fs(fs) mult((&Idx2Freq_Tbl[-2])[L_and(L_shr(fs,8),7)], (Word16)((x)/15625))) #define NS2SA_FX2(fs,x) (chk_fs(fs) mult((&Idx2Freq_Tbl[-2])[L_and(L_shr(fs,8),7)], (Word16)((x)/15625))) #define L_FRAME_12k8 256 /* Frame size at 12k8Hz: 20ms = 256 samples */ #define L_FRAME_16k 320 /* Frame size at 16kHz: 20ms = 320 samples */ Loading
lib_com/core_com_config.c +5 −5 Original line number Diff line number Diff line Loading @@ -1446,13 +1446,13 @@ void init_tcx_window_cfg_fx( /*ALDO windows for MODE2*/ mdct_window_aldo( hTcxCfg->tcx_aldo_window_1, hTcxCfg->tcx_aldo_window_1_trunc, hTcxCfg->tcx_aldo_window_2, L_frame ); mdct_window_aldo( hTcxCfg->tcx_aldo_window_1_FB, hTcxCfg->tcx_aldo_window_1_FB_trunc, hTcxCfg->tcx_aldo_window_2_FB, NS2SA_fx2( input_Fs, FRAME_SIZE_NS ) ); mdct_window_aldo( hTcxCfg->tcx_aldo_window_1_FB, hTcxCfg->tcx_aldo_window_1_FB_trunc, hTcxCfg->tcx_aldo_window_2_FB, NS2SA_FX2( input_Fs, FRAME_SIZE_NS ) ); /*1.25ms transition window for ACELP->TCX*/ hTcxCfg->tcx_mdct_window_trans_length = NS2SA_fx2( sr_core, ACELP_TCX_TRANS_NS ); hTcxCfg->tcx_mdct_window_trans_length = NS2SA_FX2( sr_core, ACELP_TCX_TRANS_NS ); move16(); mdct_window_sine_IVAS_updated( hTcxCfg->tcx_mdct_window_trans, sr_core, hTcxCfg->tcx_mdct_window_trans_length, TRANSITION_OVERLAP, element_mode ); hTcxCfg->tcx_mdct_window_trans_lengthFB = NS2SA_fx2( input_Fs, ACELP_TCX_TRANS_NS ); hTcxCfg->tcx_mdct_window_trans_lengthFB = NS2SA_FX2( input_Fs, ACELP_TCX_TRANS_NS ); move16(); IF( EQ_16( hTcxCfg->tcx_mdct_window_trans_length, hTcxCfg->tcx_mdct_window_trans_lengthFB ) ) { Loading @@ -1464,8 +1464,8 @@ void init_tcx_window_cfg_fx( } /*Mid-OLA*/ /*compute minimum length for "half" window: lookahead - 5ms. It must be also multiple of 2*/ hTcxCfg->tcx_mdct_window_half_length = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA_fx2( 12800, 5000000L ), sr2fscale( sr_core ) ), LD_FSCALE_DENOM ) ); hTcxCfg->tcx_mdct_window_half_lengthFB = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA_fx2( 12800, 5000000L ), sr2fscale( input_Fs ) ), LD_FSCALE_DENOM ) ); hTcxCfg->tcx_mdct_window_half_length = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA_FX2( 12800, 5000000L ), sr2fscale( sr_core ) ), LD_FSCALE_DENOM ) ); hTcxCfg->tcx_mdct_window_half_lengthFB = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA_FX2( 12800, 5000000L ), sr2fscale( input_Fs ) ), LD_FSCALE_DENOM ) ); move16(); move16(); assert( GT_16( hTcxCfg->tcx_mdct_window_half_length, 16 ) && "Half window can not be large enough!" ); Loading
lib_com/ivas_lfe_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -192,7 +192,7 @@ void ivas_lfe_window_init_fx( move16(); /* 8ms of latency */ hLFEWindow->fade_len = NS2SA_fx2( sampling_rate, IVAS_LFE_FADE_NS ); hLFEWindow->fade_len = NS2SA_FX2( sampling_rate, IVAS_LFE_FADE_NS ); hLFEWindow->zero_pad_len = ( mult( IVAS_ZERO_PAD_LEN_MULT_FAC_fx, sub( hLFEWindow->dct_len, hLFEWindow->fade_len ) ) ); hLFEWindow->full_len = add( add( hLFEWindow->zero_pad_len, hLFEWindow->fade_len ), hLFEWindow->dct_len ); move16(); Loading
lib_com/tcx_ltp_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1704,7 +1704,7 @@ void tcx_ltp_post32( filtIdx = 0; /* just to avoid comilation warnings */ move16(); tcx_buf_len = NS2SA_fx2( st->output_Fs, TCXLTP_DELAY_NS ); tcx_buf_len = NS2SA_FX2( st->output_Fs, TCXLTP_DELAY_NS ); move16(); SideInfoOnly = 0; move16(); Loading
lib_dec/FEC_HQ_phase_ecu_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -3279,7 +3279,7 @@ static void rec_wtda_fx( p_ecu++; } timesh = NS2SA_fx2( fs, 10000000L - PH_ECU_ALDO_OLP2_NS ); timesh = NS2SA_FX2( fs, 10000000L - PH_ECU_ALDO_OLP2_NS ); move16(); set16_fx( rec_buf, 0, output_frame ); Loading