Loading lib_com/ivas_fb_mixer.c +2 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,8 @@ ivas_error ivas_FB_mixer_open_fx( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } set32_fx( hFbMixer->ppFilterbank_prior_input_fx[i], 0, fb_cfg->prior_input_length ); hFbMixer->q_ppFilterbank_prior_input_fx[i] = Q31; move16(); } test(); Loading lib_com/ivas_prot_fx.h +0 −1 Original line number Diff line number Diff line Loading @@ -2990,7 +2990,6 @@ Word16 ivas_acelp_tcx20_switching_fx( Word16 stab_fac, /* i : LP filter stability */ Word32 *res_cod_SNR_M, Word16 *res_cod_SNR_M_e, Word16 *tcx_mdct_window_fx, const Word16 flag_16k_smc /* i : flag to indicate if the OL SMC is run at 16 kHz */ ); Loading lib_com/lerp.c +18 −3 Original line number Diff line number Diff line Loading @@ -617,6 +617,7 @@ static void L_lerp_proc_fx( Word32 pos_fx, shift_fx, diff_fx; Word32 buf_fx[2 * L_FRAME_MAX]; Word16 tmp; Word32 ffxsub; IF( EQ_16( bufferNewSize, bufferOldSize ) ) { Loading Loading @@ -644,8 +645,15 @@ static void L_lerp_proc_fx( ELSE { idx = extract_l( L_shr( pos_fx, 21 ) ); diff_fx = L_sub( pos_fx, L_shl( idx, 21 ) ); /*Q21*/ buf_fx[0] = L_add( f_fx[idx], L_shl( Mpy_32_32( diff_fx, L_sub( f_fx[( idx + 1 )], f_fx[idx] ) ), 31 - 21 ) ); /*Qx*/ diff_fx = L_sub( pos_fx, L_shl( idx, 21 ) ); ffxsub = L_sub( f_fx[idx + 1], f_fx[idx] ); Word64 f_fx64 = W_shl( f_fx[idx], 21 ); Word64 mult64 = W_mult0_32_32( diff_fx, ffxsub ); Word64 add64 = W_add( f_fx64, mult64 ); buf_fx[0] = W_extract_l( W_shr( add64, 21 ) ); move32(); } Loading @@ -656,8 +664,15 @@ static void L_lerp_proc_fx( idx = extract_l( L_shr( pos_fx, 21 ) ); diff_fx = L_sub( pos_fx, L_shl( idx, 21 ) ); /*Q21*/ buf_fx[i] = L_add( f_fx[idx], L_shl( Mpy_32_32( diff_fx, L_sub( f_fx[idx + 1], f_fx[idx] ) ), 31 - 21 ) ); /*Qx*/ ffxsub = L_sub( f_fx[idx + 1], f_fx[idx] ); Word64 f_fx64 = W_shl( f_fx[idx], 21 ); Word64 mult64 = W_mult0_32_32( diff_fx, ffxsub ); Word64 add64 = W_add( f_fx64, mult64 ); buf_fx[i] = W_extract_l( W_shr( add64, 21 ) ); move32(); pos_fx = L_add( pos_fx, shift_fx ); /*Q21*/ } Loading lib_com/prot.h +16 −20 Original line number Diff line number Diff line Loading @@ -2391,25 +2391,21 @@ ivas_error acelp_core_enc( ivas_error acelp_core_enc( Encoder_State *st, /* i/o: encoder state structure */ /*const*/ float inp[], /* i : input signal of the current frame */ // const float ener, /* i : residual energy from Levinson-Durbin */ float A[NB_SUBFR16k * ( M + 1 )], /* i : A(z) unquantized for the 4 subframes */ float Aw[NB_SUBFR16k * ( M + 1 )], /* i : weighted A(z) unquant. for subframes */ const float epsP[M + 1], /* i : LP prediction errors */ float lsp_new[M], /* i : LSPs at the end of the frame */ float lsp_mid[M], /* i : LSPs in the middle of the frame */ const int16_t vad_hover_flag, /* i : VAD hangover flag */ const int16_t attack_flag, /* i : attack flag (GSC or TC) */ Word16 A[NB_SUBFR16k * ( M + 1 )], /* i : A(z) unquantized for the 4 subframes */ Word16 Aw[NB_SUBFR16k * ( M + 1 )], /* i : weighted A(z) unquant. for subframes */ const Word32 epsP[M + 1], /* i : LP prediction errors */ Word16 lsp_new[M], /* i : LSPs at the end of the frame */ Word16 lsp_mid[M], /* i : LSPs in the middle of the frame */ const Word16 vad_hover_flag, /* i : VAD hangover flag */ const Word16 attack_flag, /* i : attack flag (GSC or TC) */ Word32 bwe_exc_extended_fx[], /* i/o: bandwidth extended excitation 2*Q_new */ #ifndef IVAS_FLOAT_FIXED float *voice_factors, /* o : voicing factors */ #else Word16 *voice_factors_fx, /* o : voicing factors Q15 */ #endif float old_syn_12k8_16k[], /* o : ACELP core synthesis at 12.8kHz or 16kHz to be used by SWB BWE */ float pitch_buf[NB_SUBFR16k], /* o : floating pitch for each subframe */ int16_t *unbits, /* o : number of unused bits */ Word16 old_syn_12k8_16k[], /* o : ACELP core synthesis at 12.8kHz or 16kHz to be used by SWB BWE */ Word16 *q_old_syn_12k8_16, Word16 pitch_buf[NB_SUBFR16k], /* o : floating pitch for each subframe */ Word16 *unbits, /* o : number of unused bits */ STEREO_TD_ENC_DATA_HANDLE hStereoTD, /* i/o: TD stereo encoder handle */ float tdm_lsfQ_PCh[M], /* i : Q LSFs for primary channel */ Word16 tdm_lsfQ_PCh[M], /* i : Q LSFs for primary channel */ Word16 Q_new ); #endif Loading lib_com/swb_tbe_com_fx.c +2 −3 Original line number Diff line number Diff line Loading @@ -3727,12 +3727,11 @@ void GenShapedSHBExcitation_ivas_fx( Word16 nbSubFr, lSubFr; Word16 tempQ15; Word32 tempQ31; /*nbSubFr = ( bitrate < ACELP_24k40 )? NB_SUBFR : NB_SUBFR16k;*/ nbSubFr = NB_SUBFR16k; lSubFr = ( L_FRAME16k / NB_SUBFR16k ); move16(); move16(); IF( LT_32( bitrate, ACELP_24k40 ) ) IF( LT_32( extl_brate, SWB_TBE_2k8 ) ) { nbSubFr = NB_SUBFR; move16(); Loading @@ -3744,7 +3743,7 @@ void GenShapedSHBExcitation_ivas_fx( FOR( i = 0; i < nbSubFr; i++ ) { test(); IF( EQ_16( coder_type, VOICED ) && ( LT_32( bitrate, ACELP_24k40 ) ) ) IF( EQ_16( coder_type, VOICED ) && ( LT_32( extl_brate, SWB_TBE_2k8 ) ) ) { exp = 0; move16(); Loading Loading
lib_com/ivas_fb_mixer.c +2 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,8 @@ ivas_error ivas_FB_mixer_open_fx( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer encoder" ); } set32_fx( hFbMixer->ppFilterbank_prior_input_fx[i], 0, fb_cfg->prior_input_length ); hFbMixer->q_ppFilterbank_prior_input_fx[i] = Q31; move16(); } test(); Loading
lib_com/ivas_prot_fx.h +0 −1 Original line number Diff line number Diff line Loading @@ -2990,7 +2990,6 @@ Word16 ivas_acelp_tcx20_switching_fx( Word16 stab_fac, /* i : LP filter stability */ Word32 *res_cod_SNR_M, Word16 *res_cod_SNR_M_e, Word16 *tcx_mdct_window_fx, const Word16 flag_16k_smc /* i : flag to indicate if the OL SMC is run at 16 kHz */ ); Loading
lib_com/lerp.c +18 −3 Original line number Diff line number Diff line Loading @@ -617,6 +617,7 @@ static void L_lerp_proc_fx( Word32 pos_fx, shift_fx, diff_fx; Word32 buf_fx[2 * L_FRAME_MAX]; Word16 tmp; Word32 ffxsub; IF( EQ_16( bufferNewSize, bufferOldSize ) ) { Loading Loading @@ -644,8 +645,15 @@ static void L_lerp_proc_fx( ELSE { idx = extract_l( L_shr( pos_fx, 21 ) ); diff_fx = L_sub( pos_fx, L_shl( idx, 21 ) ); /*Q21*/ buf_fx[0] = L_add( f_fx[idx], L_shl( Mpy_32_32( diff_fx, L_sub( f_fx[( idx + 1 )], f_fx[idx] ) ), 31 - 21 ) ); /*Qx*/ diff_fx = L_sub( pos_fx, L_shl( idx, 21 ) ); ffxsub = L_sub( f_fx[idx + 1], f_fx[idx] ); Word64 f_fx64 = W_shl( f_fx[idx], 21 ); Word64 mult64 = W_mult0_32_32( diff_fx, ffxsub ); Word64 add64 = W_add( f_fx64, mult64 ); buf_fx[0] = W_extract_l( W_shr( add64, 21 ) ); move32(); } Loading @@ -656,8 +664,15 @@ static void L_lerp_proc_fx( idx = extract_l( L_shr( pos_fx, 21 ) ); diff_fx = L_sub( pos_fx, L_shl( idx, 21 ) ); /*Q21*/ buf_fx[i] = L_add( f_fx[idx], L_shl( Mpy_32_32( diff_fx, L_sub( f_fx[idx + 1], f_fx[idx] ) ), 31 - 21 ) ); /*Qx*/ ffxsub = L_sub( f_fx[idx + 1], f_fx[idx] ); Word64 f_fx64 = W_shl( f_fx[idx], 21 ); Word64 mult64 = W_mult0_32_32( diff_fx, ffxsub ); Word64 add64 = W_add( f_fx64, mult64 ); buf_fx[i] = W_extract_l( W_shr( add64, 21 ) ); move32(); pos_fx = L_add( pos_fx, shift_fx ); /*Q21*/ } Loading
lib_com/prot.h +16 −20 Original line number Diff line number Diff line Loading @@ -2391,25 +2391,21 @@ ivas_error acelp_core_enc( ivas_error acelp_core_enc( Encoder_State *st, /* i/o: encoder state structure */ /*const*/ float inp[], /* i : input signal of the current frame */ // const float ener, /* i : residual energy from Levinson-Durbin */ float A[NB_SUBFR16k * ( M + 1 )], /* i : A(z) unquantized for the 4 subframes */ float Aw[NB_SUBFR16k * ( M + 1 )], /* i : weighted A(z) unquant. for subframes */ const float epsP[M + 1], /* i : LP prediction errors */ float lsp_new[M], /* i : LSPs at the end of the frame */ float lsp_mid[M], /* i : LSPs in the middle of the frame */ const int16_t vad_hover_flag, /* i : VAD hangover flag */ const int16_t attack_flag, /* i : attack flag (GSC or TC) */ Word16 A[NB_SUBFR16k * ( M + 1 )], /* i : A(z) unquantized for the 4 subframes */ Word16 Aw[NB_SUBFR16k * ( M + 1 )], /* i : weighted A(z) unquant. for subframes */ const Word32 epsP[M + 1], /* i : LP prediction errors */ Word16 lsp_new[M], /* i : LSPs at the end of the frame */ Word16 lsp_mid[M], /* i : LSPs in the middle of the frame */ const Word16 vad_hover_flag, /* i : VAD hangover flag */ const Word16 attack_flag, /* i : attack flag (GSC or TC) */ Word32 bwe_exc_extended_fx[], /* i/o: bandwidth extended excitation 2*Q_new */ #ifndef IVAS_FLOAT_FIXED float *voice_factors, /* o : voicing factors */ #else Word16 *voice_factors_fx, /* o : voicing factors Q15 */ #endif float old_syn_12k8_16k[], /* o : ACELP core synthesis at 12.8kHz or 16kHz to be used by SWB BWE */ float pitch_buf[NB_SUBFR16k], /* o : floating pitch for each subframe */ int16_t *unbits, /* o : number of unused bits */ Word16 old_syn_12k8_16k[], /* o : ACELP core synthesis at 12.8kHz or 16kHz to be used by SWB BWE */ Word16 *q_old_syn_12k8_16, Word16 pitch_buf[NB_SUBFR16k], /* o : floating pitch for each subframe */ Word16 *unbits, /* o : number of unused bits */ STEREO_TD_ENC_DATA_HANDLE hStereoTD, /* i/o: TD stereo encoder handle */ float tdm_lsfQ_PCh[M], /* i : Q LSFs for primary channel */ Word16 tdm_lsfQ_PCh[M], /* i : Q LSFs for primary channel */ Word16 Q_new ); #endif Loading
lib_com/swb_tbe_com_fx.c +2 −3 Original line number Diff line number Diff line Loading @@ -3727,12 +3727,11 @@ void GenShapedSHBExcitation_ivas_fx( Word16 nbSubFr, lSubFr; Word16 tempQ15; Word32 tempQ31; /*nbSubFr = ( bitrate < ACELP_24k40 )? NB_SUBFR : NB_SUBFR16k;*/ nbSubFr = NB_SUBFR16k; lSubFr = ( L_FRAME16k / NB_SUBFR16k ); move16(); move16(); IF( LT_32( bitrate, ACELP_24k40 ) ) IF( LT_32( extl_brate, SWB_TBE_2k8 ) ) { nbSubFr = NB_SUBFR; move16(); Loading @@ -3744,7 +3743,7 @@ void GenShapedSHBExcitation_ivas_fx( FOR( i = 0; i < nbSubFr; i++ ) { test(); IF( EQ_16( coder_type, VOICED ) && ( LT_32( bitrate, ACELP_24k40 ) ) ) IF( EQ_16( coder_type, VOICED ) && ( LT_32( extl_brate, SWB_TBE_2k8 ) ) ) { exp = 0; move16(); Loading