Loading lib_com/ivas_prot_fx.h +14 −1 Original line number Diff line number Diff line Loading @@ -1567,7 +1567,12 @@ void ivas_mdct_core_tns_ns_fx( Word32 *x_fx[CPE_CHANNELS][NB_DIV], /* o : synthesis @internal_FS */ Word32 Aq_fx[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* o : LP coefficients */ const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ Word16 x_e[CPE_CHANNELS][NB_DIV] ); #ifdef OPT_SBA_DEC_V2_NBE Word16 x_e #else /* OPT_SBA_DEC_V2_NBE */ Word16 x_e[CPE_CHANNELS][NB_DIV] #endif /* OPT_SBA_DEC_V2_NBE */ ); void decoder_tcx_imdct_fx( Decoder_State *st, /* i/o: coder memory state */ Loading Loading @@ -1928,9 +1933,17 @@ void ivas_mdct_core_invQ_fx( Word16 fUseTns[CPE_CHANNELS][NB_DIV], /* i : flag TNS enabled */ STnsData tnsData[CPE_CHANNELS][NB_DIV], /* i : TNS parameter */ Word32 *x_0[CPE_CHANNELS][NB_DIV], /* i/o: signal buffer */ #ifdef OPT_SBA_DEC_V2_NBE Word16 x_0_e, #else /* OPT_SBA_DEC_V2_NBE */ Word16 x_0_e[CPE_CHANNELS][NB_DIV], #endif /* OPT_SBA_DEC_V2_NBE */ Word32 *x[CPE_CHANNELS][NB_DIV], /* i/o: signal buffer */ #ifdef OPT_SBA_DEC_V2_NBE Word16 x_e, #else /* OPT_SBA_DEC_V2_NBE */ Word16 x_e[CPE_CHANNELS][NB_DIV], #endif /* OPT_SBA_DEC_V2_NBE */ Word16 x_len[CPE_CHANNELS][NB_DIV], Word16 Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* i : LP coefficients */ Word16 ms_mask[NB_DIV][MAX_SFB], /* i : M/S mask */ Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,8 @@ #define FIX_1379_MASA_ANGLE_ROUND /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ #define OPT_REND_V1_NBE #define OPT_SBA_DEC_V2_NBE #define OPT_SBA_REND_V1_BE #define OPT_HEAD_ROT_REND_V1_BE #define OPT_SBA_DEC_V2_BE Loading lib_com/prot_fx.h +6 −2 Original line number Diff line number Diff line Loading @@ -6435,7 +6435,11 @@ void TonalMDCTConceal_Apply( void TonalMDCTConceal_Apply_ivas_fx( TonalMDCTConcealPtr hTonalMDCTConc, /*IN */ Word32 *mdctSpectrum, /*IN/OUT*/ #ifdef OPT_SBA_DEC_V2_NBE Word16 mdctSpectrum_exp, /*IN */ #else /* OPT_SBA_DEC_V2_NBE */ Word16 mdctSpectrum_exp[L_FRAME48k], /*IN */ #endif /* OPT_SBA_DEC_V2_NBE */ const PsychoacousticParameters *psychParamsCurrent ); void TonalMDCTConceal_InsertNoise_ivas_fx( Loading lib_com/swb_tbe_com_fx.c +28 −3 Original line number Diff line number Diff line Loading @@ -6982,6 +6982,7 @@ void synthesise_fb_high_band_fx( elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx ); #endif } /* temp1 = sum2_f( tmp, L_FRAME48k ) + 0.001f */ temp1 = sum2_fx_mod( tmp, L_FRAME48k ); L_tmp = L_max( 1, fb_exc_energy ); /*Q(2*Q_fb_exc + 1)*/ Loading @@ -6990,9 +6991,33 @@ void synthesise_fb_high_band_fx( tmp1 = sub( add( Q_fb_exc, Q_fb_exc ), 8 ); /* 1-9*/ exp = sub( sub( 31, tmp1 ), exp ); IF( element_mode != EVS_MONO ) { Word16 sft, t_Q; Word64 P_ONE = 33; /* 0.001f in Q15 */ move64(); Word64 W_temp; t_Q = sub( shl( exp_tmp, 1 ), 8 ); P_ONE = W_shl( P_ONE, sub( t_Q, 15 ) ); W_temp = W_add( P_ONE, temp1 ); sft = W_norm( W_temp ); W_temp = W_shl( W_temp, sft ); temp1 = W_extract_h( W_temp ); t_Q = sub( add( t_Q, sft ), 32 ); tmp2 = extract_h( temp1 ); exp2 = sub( 31, t_Q ); } ELSE { exp2 = norm_l( temp1 ); tmp2 = extract_h( L_shl( temp1, exp2 ) ); exp2 = sub( sub( 31, sub( shl( exp_tmp, 1 ), 8 ) ), exp2 ); /* in Q15 (temp1 in Q9)*/ } exp = sub( exp2, exp ); /* Denormalize and substract */ IF( GT_16( tmp2, tmp3 ) ) Loading lib_dec/dec_tcx_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -4761,14 +4761,19 @@ void decoder_tcx_noiseshaping_igf_fx( test(); IF( bfi && st->tonal_mdct_plc_active && NE_16( st->element_mode, IVAS_CPE_MDCT ) ) { #ifndef OPT_SBA_DEC_V2_NBE Word16 tmp_x_fx_exp[L_FRAME48k], temp; temp = -MAX_16; move16(); set16_fx( tmp_x_fx_exp, *x_e, L_frameTCX ); TonalMDCTConceal_Apply_ivas_fx( st->hTonalMDCTConc, x_fx, tmp_x_fx_exp, st->hTcxCfg->psychParamsCurrent ); #else /* OPT_SBA_DEC_V2_NBE */ TonalMDCTConceal_Apply_ivas_fx( st->hTonalMDCTConc, x_fx, *x_e, st->hTcxCfg->psychParamsCurrent ); #endif /* OPT_SBA_DEC_V2_NBE */ /* If exponent has been updated after TonalMDCTConceal_Apply, then shift the spectrum to common exponent. */ #ifndef OPT_SBA_DEC_V2_NBE FOR( i = 0; i < L_frameTCX; i++ ) { temp = s_max( temp, tmp_x_fx_exp[i] ); Loading @@ -4783,6 +4788,7 @@ void decoder_tcx_noiseshaping_igf_fx( move32(); } } #endif /* OPT_SBA_DEC_V2_NBE */ } test(); Loading Loading
lib_com/ivas_prot_fx.h +14 −1 Original line number Diff line number Diff line Loading @@ -1567,7 +1567,12 @@ void ivas_mdct_core_tns_ns_fx( Word32 *x_fx[CPE_CHANNELS][NB_DIV], /* o : synthesis @internal_FS */ Word32 Aq_fx[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* o : LP coefficients */ const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0) */ Word16 x_e[CPE_CHANNELS][NB_DIV] ); #ifdef OPT_SBA_DEC_V2_NBE Word16 x_e #else /* OPT_SBA_DEC_V2_NBE */ Word16 x_e[CPE_CHANNELS][NB_DIV] #endif /* OPT_SBA_DEC_V2_NBE */ ); void decoder_tcx_imdct_fx( Decoder_State *st, /* i/o: coder memory state */ Loading Loading @@ -1928,9 +1933,17 @@ void ivas_mdct_core_invQ_fx( Word16 fUseTns[CPE_CHANNELS][NB_DIV], /* i : flag TNS enabled */ STnsData tnsData[CPE_CHANNELS][NB_DIV], /* i : TNS parameter */ Word32 *x_0[CPE_CHANNELS][NB_DIV], /* i/o: signal buffer */ #ifdef OPT_SBA_DEC_V2_NBE Word16 x_0_e, #else /* OPT_SBA_DEC_V2_NBE */ Word16 x_0_e[CPE_CHANNELS][NB_DIV], #endif /* OPT_SBA_DEC_V2_NBE */ Word32 *x[CPE_CHANNELS][NB_DIV], /* i/o: signal buffer */ #ifdef OPT_SBA_DEC_V2_NBE Word16 x_e, #else /* OPT_SBA_DEC_V2_NBE */ Word16 x_e[CPE_CHANNELS][NB_DIV], #endif /* OPT_SBA_DEC_V2_NBE */ Word16 x_len[CPE_CHANNELS][NB_DIV], Word16 Aq[CPE_CHANNELS][( NB_SUBFR16k + 1 ) * ( M + 1 )], /* i : LP coefficients */ Word16 ms_mask[NB_DIV][MAX_SFB], /* i : M/S mask */ Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,8 @@ #define FIX_1379_MASA_ANGLE_ROUND /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ #define OPT_REND_V1_NBE #define OPT_SBA_DEC_V2_NBE #define OPT_SBA_REND_V1_BE #define OPT_HEAD_ROT_REND_V1_BE #define OPT_SBA_DEC_V2_BE Loading
lib_com/prot_fx.h +6 −2 Original line number Diff line number Diff line Loading @@ -6435,7 +6435,11 @@ void TonalMDCTConceal_Apply( void TonalMDCTConceal_Apply_ivas_fx( TonalMDCTConcealPtr hTonalMDCTConc, /*IN */ Word32 *mdctSpectrum, /*IN/OUT*/ #ifdef OPT_SBA_DEC_V2_NBE Word16 mdctSpectrum_exp, /*IN */ #else /* OPT_SBA_DEC_V2_NBE */ Word16 mdctSpectrum_exp[L_FRAME48k], /*IN */ #endif /* OPT_SBA_DEC_V2_NBE */ const PsychoacousticParameters *psychParamsCurrent ); void TonalMDCTConceal_InsertNoise_ivas_fx( Loading
lib_com/swb_tbe_com_fx.c +28 −3 Original line number Diff line number Diff line Loading @@ -6982,6 +6982,7 @@ void synthesise_fb_high_band_fx( elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx ); #endif } /* temp1 = sum2_f( tmp, L_FRAME48k ) + 0.001f */ temp1 = sum2_fx_mod( tmp, L_FRAME48k ); L_tmp = L_max( 1, fb_exc_energy ); /*Q(2*Q_fb_exc + 1)*/ Loading @@ -6990,9 +6991,33 @@ void synthesise_fb_high_band_fx( tmp1 = sub( add( Q_fb_exc, Q_fb_exc ), 8 ); /* 1-9*/ exp = sub( sub( 31, tmp1 ), exp ); IF( element_mode != EVS_MONO ) { Word16 sft, t_Q; Word64 P_ONE = 33; /* 0.001f in Q15 */ move64(); Word64 W_temp; t_Q = sub( shl( exp_tmp, 1 ), 8 ); P_ONE = W_shl( P_ONE, sub( t_Q, 15 ) ); W_temp = W_add( P_ONE, temp1 ); sft = W_norm( W_temp ); W_temp = W_shl( W_temp, sft ); temp1 = W_extract_h( W_temp ); t_Q = sub( add( t_Q, sft ), 32 ); tmp2 = extract_h( temp1 ); exp2 = sub( 31, t_Q ); } ELSE { exp2 = norm_l( temp1 ); tmp2 = extract_h( L_shl( temp1, exp2 ) ); exp2 = sub( sub( 31, sub( shl( exp_tmp, 1 ), 8 ) ), exp2 ); /* in Q15 (temp1 in Q9)*/ } exp = sub( exp2, exp ); /* Denormalize and substract */ IF( GT_16( tmp2, tmp3 ) ) Loading
lib_dec/dec_tcx_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -4761,14 +4761,19 @@ void decoder_tcx_noiseshaping_igf_fx( test(); IF( bfi && st->tonal_mdct_plc_active && NE_16( st->element_mode, IVAS_CPE_MDCT ) ) { #ifndef OPT_SBA_DEC_V2_NBE Word16 tmp_x_fx_exp[L_FRAME48k], temp; temp = -MAX_16; move16(); set16_fx( tmp_x_fx_exp, *x_e, L_frameTCX ); TonalMDCTConceal_Apply_ivas_fx( st->hTonalMDCTConc, x_fx, tmp_x_fx_exp, st->hTcxCfg->psychParamsCurrent ); #else /* OPT_SBA_DEC_V2_NBE */ TonalMDCTConceal_Apply_ivas_fx( st->hTonalMDCTConc, x_fx, *x_e, st->hTcxCfg->psychParamsCurrent ); #endif /* OPT_SBA_DEC_V2_NBE */ /* If exponent has been updated after TonalMDCTConceal_Apply, then shift the spectrum to common exponent. */ #ifndef OPT_SBA_DEC_V2_NBE FOR( i = 0; i < L_frameTCX; i++ ) { temp = s_max( temp, tmp_x_fx_exp[i] ); Loading @@ -4783,6 +4788,7 @@ void decoder_tcx_noiseshaping_igf_fx( move32(); } } #endif /* OPT_SBA_DEC_V2_NBE */ } test(); Loading