Loading lib_com/bits_alloc_fx.c +4 −2 Original line number Diff line number Diff line Loading @@ -439,6 +439,7 @@ static Word16 fcb_table( * Routine to allocate fixed innovation codebook bit-budget *--------------------------------------------------------------------*/ #ifndef REMOVE_EVS_DUPLICATES static ivas_error acelp_FCB_allocator( Word16 *nBits, /* i/o: available bit-budget */ Word16 fixed_cdk_index[], /* o : codebook index Q0 */ Loading Loading @@ -599,7 +600,7 @@ static ivas_error acelp_FCB_allocator( return error; } #endif static ivas_error acelp_FCB_allocator_ivas( Word16 *nBits, /* i/o: available bit-budget */ Word16 fixed_cdk_index[], /* o : codebook index Q0 */ Loading Loading @@ -761,6 +762,7 @@ static ivas_error acelp_FCB_allocator_ivas( * - per channel bitrate minimum is 13250 kbps for ACELP@16kHz *--------------------------------------------------------------------*/ #ifndef REMOVE_EVS_DUPLICATES ivas_error config_acelp1( const Word16 enc_dec, /* i : encoder/decoder flag */ const Word32 total_brate, /* i : total bitrate */ Loading Loading @@ -1885,7 +1887,7 @@ ivas_error config_acelp1( * - should be in range of <6700; 24350> for ACELP@12.8kHz * - per channel bitrate minimum is 13250 kbps for ACELP@16kHz *--------------------------------------------------------------------*/ #endif ivas_error config_acelp1_IVAS( const Word16 enc_dec, /* i : encoder/decoder flag */ const Word32 total_brate, /* i : total bitrate */ Loading lib_com/cnst.h +4 −0 Original line number Diff line number Diff line Loading @@ -532,12 +532,16 @@ enum IND_STEREO_ICBWE_MSFLAG, IND_SHB_ENER_SF, IND_SHB_RES_GS, #ifndef FIX_1486_IND_SHB_RES IND_SHB_RES_GS1, IND_SHB_RES_GS2, IND_SHB_RES_GS3, IND_SHB_RES_GS4, IND_SHB_RES_GS5, IND_SHB_VF, #else IND_SHB_VF = IND_SHB_RES_GS + 5, #endif IND_SHB_LSF, IND_SHB_MIRROR = IND_SHB_LSF + 5, IND_SHB_GRID, Loading lib_com/gs_inact_switching_fx.c +54 −16 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ /* RETURN ARGUMENTS : */ /* _ None */ /*========================================================================*/ #ifndef REMOVE_EVS_DUPLICATES void Inac_swtch_ematch_fx( Word16 exc2[], /* i/o: CELP/GSC excitation buffer Q_exc*/ Word16 dct_exc_tmp[], /* i : GSC excitation in DCT domain */ Loading Loading @@ -155,8 +157,7 @@ void Inac_swtch_ematch_fx( return; } #endif void Inac_switch_ematch_ivas_fx( Word16 exc2[], /* i/o: CELP/GSC excitation buffer Q_exc*/ Word16 dct_exc_tmp[], /* i : GSC excitation in DCT domain */ Loading Loading @@ -250,6 +251,21 @@ void Inac_switch_ematch_ivas_fx( exp = sub( exp, 14 ); IF( LT_16( i, 2 ) ) { #ifdef REMOVE_EVS_DUPLICATES IF( EQ_16( element_mode, EVS_MONO ) ) { FOR( j = 0; j < 8; j++ ) { L_tmp = L_mult( *pt_exc, ftmp ); L_tmp = L_shl_sat( L_tmp, add( exp, 15 ) ); /* Q(Q_exc) -> Q(15+Q_exc)*/ *pt_exc = round_fx_sat( L_tmp ); /*Q_exc - 1*/ move16(); pt_exc++; } } ELSE #endif { FOR( j = 0; j < 8; j++ ) { L_tmp = L_mult0( *pt_exc, ftmp ); Loading @@ -259,8 +275,24 @@ void Inac_switch_ematch_ivas_fx( pt_exc++; } } } ELSE { #ifdef REMOVE_EVS_DUPLICATES IF( EQ_16( element_mode, EVS_MONO ) ) { FOR( j = 0; j < 16; j++ ) { L_tmp = L_mult( *pt_exc, ftmp ); L_tmp = L_shl_sat( L_tmp, add( exp, 15 ) ); /* Q(Q_exc) -> Q(15+Q_exc)*/ *pt_exc = round_fx_sat( L_tmp ); /*Q_exc - 1*/ move16(); pt_exc++; } } ELSE #endif { FOR( j = 0; j < 16; j++ ) { L_tmp = L_mult0( *pt_exc, ftmp ); Loading @@ -271,10 +303,16 @@ void Inac_switch_ematch_ivas_fx( } } } } /* Going back to time */ #ifdef REMOVE_EVS_DUPLICATES IF( GT_16( element_mode, EVS_MONO ) ) #endif { Scale_sig( dct_exc_tmp, 240, 1 ); // Q_exc Scale_sig( exc2, 240, 1 ); // Q_exc } edct_16fx( dct_exc_tmp, exc2, L_frame, 5, element_mode ); } Loading lib_com/gs_noisefill_fx.c +42 −18 Original line number Diff line number Diff line Loading @@ -1332,6 +1332,21 @@ void highband_exc_dct_in_ivas_fx( } } #ifdef REMOVE_EVS_DUPLICATES IF( EQ_16( element_mode, EVS_MONO ) ) { Comp_and_apply_gain_fx( exc_diffQ, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 0, Qexc_diffQ, *Q_exc ); IF( exc_wo_nf != NULL ) { Comp_and_apply_gain_fx( exc_wo_nf, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 1, Qexc_diffQ, *Q_exc ); Vr_add( exc_dct_in, exc_wo_nf, exc_wo_nf, L_frame ); } } ELSE { #endif Word16 Q_tmp = *Q_exc; move16(); Word16 Q_old = *Q_exc; Loading @@ -1358,6 +1373,10 @@ void highband_exc_dct_in_ivas_fx( { Scale_sig( exc_dct_in, L_frame, sub( *Q_exc, Q_old ) ); } #ifdef REMOVE_EVS_DUPLICATES } #endif /*--------------------------------------------------------------------------------------* * add the correction layer to the LF bins, * and add the quantized pulses or the noise for the higher part of the spectrum Loading Loading @@ -1397,7 +1416,12 @@ void highband_exc_dct_in_ivas_fx( Q_hb_exc = 0; move16(); envelop_modify_fx( exc_diffQ, seed_tcx, last_bin, Ener_per_bd_iQ, *Q_exc, &Q_hb_exc ); #ifdef REMOVE_EVS_DUPLICATES test(); IF( GT_16( *Q_exc, Q_hb_exc ) && GT_16( element_mode, EVS_MONO ) ) #else IF( GT_16( *Q_exc, Q_hb_exc ) ) #endif { Scale_sig( exc_wo_nf, L_frame, sub( Q_hb_exc, *Q_exc ) ); *Q_exc = Q_hb_exc; Loading lib_com/ivas_prot_fx.h +2 −1 Original line number Diff line number Diff line Loading @@ -2711,7 +2711,8 @@ void stereo_coder_tcx_fx( Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV], /* i/o: inverse spectrum */ Word32 *inv_mdst_spectrum_fx[CPE_CHANNELS][NB_DIV], /* i/o: inverse MDST spectrum */ const Word16 mct_on, /* i : flag mct block (1) or stereo (0) */ Word16 q_spec ); Word16 exp_spec, Word16 exp_mdst_spec ); // bw_detect_fx.c Word16 set_bw_mct_fx( Loading Loading
lib_com/bits_alloc_fx.c +4 −2 Original line number Diff line number Diff line Loading @@ -439,6 +439,7 @@ static Word16 fcb_table( * Routine to allocate fixed innovation codebook bit-budget *--------------------------------------------------------------------*/ #ifndef REMOVE_EVS_DUPLICATES static ivas_error acelp_FCB_allocator( Word16 *nBits, /* i/o: available bit-budget */ Word16 fixed_cdk_index[], /* o : codebook index Q0 */ Loading Loading @@ -599,7 +600,7 @@ static ivas_error acelp_FCB_allocator( return error; } #endif static ivas_error acelp_FCB_allocator_ivas( Word16 *nBits, /* i/o: available bit-budget */ Word16 fixed_cdk_index[], /* o : codebook index Q0 */ Loading Loading @@ -761,6 +762,7 @@ static ivas_error acelp_FCB_allocator_ivas( * - per channel bitrate minimum is 13250 kbps for ACELP@16kHz *--------------------------------------------------------------------*/ #ifndef REMOVE_EVS_DUPLICATES ivas_error config_acelp1( const Word16 enc_dec, /* i : encoder/decoder flag */ const Word32 total_brate, /* i : total bitrate */ Loading Loading @@ -1885,7 +1887,7 @@ ivas_error config_acelp1( * - should be in range of <6700; 24350> for ACELP@12.8kHz * - per channel bitrate minimum is 13250 kbps for ACELP@16kHz *--------------------------------------------------------------------*/ #endif ivas_error config_acelp1_IVAS( const Word16 enc_dec, /* i : encoder/decoder flag */ const Word32 total_brate, /* i : total bitrate */ Loading
lib_com/cnst.h +4 −0 Original line number Diff line number Diff line Loading @@ -532,12 +532,16 @@ enum IND_STEREO_ICBWE_MSFLAG, IND_SHB_ENER_SF, IND_SHB_RES_GS, #ifndef FIX_1486_IND_SHB_RES IND_SHB_RES_GS1, IND_SHB_RES_GS2, IND_SHB_RES_GS3, IND_SHB_RES_GS4, IND_SHB_RES_GS5, IND_SHB_VF, #else IND_SHB_VF = IND_SHB_RES_GS + 5, #endif IND_SHB_LSF, IND_SHB_MIRROR = IND_SHB_LSF + 5, IND_SHB_GRID, Loading
lib_com/gs_inact_switching_fx.c +54 −16 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ /* RETURN ARGUMENTS : */ /* _ None */ /*========================================================================*/ #ifndef REMOVE_EVS_DUPLICATES void Inac_swtch_ematch_fx( Word16 exc2[], /* i/o: CELP/GSC excitation buffer Q_exc*/ Word16 dct_exc_tmp[], /* i : GSC excitation in DCT domain */ Loading Loading @@ -155,8 +157,7 @@ void Inac_swtch_ematch_fx( return; } #endif void Inac_switch_ematch_ivas_fx( Word16 exc2[], /* i/o: CELP/GSC excitation buffer Q_exc*/ Word16 dct_exc_tmp[], /* i : GSC excitation in DCT domain */ Loading Loading @@ -250,6 +251,21 @@ void Inac_switch_ematch_ivas_fx( exp = sub( exp, 14 ); IF( LT_16( i, 2 ) ) { #ifdef REMOVE_EVS_DUPLICATES IF( EQ_16( element_mode, EVS_MONO ) ) { FOR( j = 0; j < 8; j++ ) { L_tmp = L_mult( *pt_exc, ftmp ); L_tmp = L_shl_sat( L_tmp, add( exp, 15 ) ); /* Q(Q_exc) -> Q(15+Q_exc)*/ *pt_exc = round_fx_sat( L_tmp ); /*Q_exc - 1*/ move16(); pt_exc++; } } ELSE #endif { FOR( j = 0; j < 8; j++ ) { L_tmp = L_mult0( *pt_exc, ftmp ); Loading @@ -259,8 +275,24 @@ void Inac_switch_ematch_ivas_fx( pt_exc++; } } } ELSE { #ifdef REMOVE_EVS_DUPLICATES IF( EQ_16( element_mode, EVS_MONO ) ) { FOR( j = 0; j < 16; j++ ) { L_tmp = L_mult( *pt_exc, ftmp ); L_tmp = L_shl_sat( L_tmp, add( exp, 15 ) ); /* Q(Q_exc) -> Q(15+Q_exc)*/ *pt_exc = round_fx_sat( L_tmp ); /*Q_exc - 1*/ move16(); pt_exc++; } } ELSE #endif { FOR( j = 0; j < 16; j++ ) { L_tmp = L_mult0( *pt_exc, ftmp ); Loading @@ -271,10 +303,16 @@ void Inac_switch_ematch_ivas_fx( } } } } /* Going back to time */ #ifdef REMOVE_EVS_DUPLICATES IF( GT_16( element_mode, EVS_MONO ) ) #endif { Scale_sig( dct_exc_tmp, 240, 1 ); // Q_exc Scale_sig( exc2, 240, 1 ); // Q_exc } edct_16fx( dct_exc_tmp, exc2, L_frame, 5, element_mode ); } Loading
lib_com/gs_noisefill_fx.c +42 −18 Original line number Diff line number Diff line Loading @@ -1332,6 +1332,21 @@ void highband_exc_dct_in_ivas_fx( } } #ifdef REMOVE_EVS_DUPLICATES IF( EQ_16( element_mode, EVS_MONO ) ) { Comp_and_apply_gain_fx( exc_diffQ, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 0, Qexc_diffQ, *Q_exc ); IF( exc_wo_nf != NULL ) { Comp_and_apply_gain_fx( exc_wo_nf, Ener_per_bd_iQ, Ener_per_bd_yQ, last_bin, 1, Qexc_diffQ, *Q_exc ); Vr_add( exc_dct_in, exc_wo_nf, exc_wo_nf, L_frame ); } } ELSE { #endif Word16 Q_tmp = *Q_exc; move16(); Word16 Q_old = *Q_exc; Loading @@ -1358,6 +1373,10 @@ void highband_exc_dct_in_ivas_fx( { Scale_sig( exc_dct_in, L_frame, sub( *Q_exc, Q_old ) ); } #ifdef REMOVE_EVS_DUPLICATES } #endif /*--------------------------------------------------------------------------------------* * add the correction layer to the LF bins, * and add the quantized pulses or the noise for the higher part of the spectrum Loading Loading @@ -1397,7 +1416,12 @@ void highband_exc_dct_in_ivas_fx( Q_hb_exc = 0; move16(); envelop_modify_fx( exc_diffQ, seed_tcx, last_bin, Ener_per_bd_iQ, *Q_exc, &Q_hb_exc ); #ifdef REMOVE_EVS_DUPLICATES test(); IF( GT_16( *Q_exc, Q_hb_exc ) && GT_16( element_mode, EVS_MONO ) ) #else IF( GT_16( *Q_exc, Q_hb_exc ) ) #endif { Scale_sig( exc_wo_nf, L_frame, sub( Q_hb_exc, *Q_exc ) ); *Q_exc = Q_hb_exc; Loading
lib_com/ivas_prot_fx.h +2 −1 Original line number Diff line number Diff line Loading @@ -2711,7 +2711,8 @@ void stereo_coder_tcx_fx( Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV], /* i/o: inverse spectrum */ Word32 *inv_mdst_spectrum_fx[CPE_CHANNELS][NB_DIV], /* i/o: inverse MDST spectrum */ const Word16 mct_on, /* i : flag mct block (1) or stereo (0) */ Word16 q_spec ); Word16 exp_spec, Word16 exp_mdst_spec ); // bw_detect_fx.c Word16 set_bw_mct_fx( Loading