Loading lib_com/hq2_core_com_fx.c +2 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ void mdct_spectrum_denorm_fx( return; } #ifndef CLEANUP_HQ_CORE void mdct_spectrum_denorm_ivas_fx( const Word32 inp_vector[], /* i : Q0 : */ Word32 L_y2[], /* i/o : Qs : decoded spectrum */ Loading Loading @@ -373,6 +373,7 @@ void mdct_spectrum_denorm_ivas_fx( return; } #endif /*==========================================================================*/ /* FUNCTION : void hq2_core_configure_fx() */ Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ #define FIX_1904_HARM_GSC_ENC /* VA: #1904 Harmonization of EVS and IVAS GSC code */ #define FIX_2271_OOB_INDEXING_IN_PIT_OL2 /* VA: Fix for issue 2271, to silence clang18 */ #define FIX_2273_OOB_INDEXING_IN_PIT_FR4 /* VA: Fix to silence clang on ptr init */ #define CLEANUP_HQ_CORE /* #################### End BE switches ################################## */ Loading lib_com/prot_fx.h +4 −2 Original line number Diff line number Diff line Loading @@ -2277,6 +2277,7 @@ void mdct_spectrum_denorm_fx( const Word16 pd_thresh_fx /* i : Q15 : */ ); #ifndef CLEANUP_HQ_CORE void mdct_spectrum_denorm_ivas_fx( const Word32 inp_vector[], /* i : Q0 : */ Word32 L_y2[], /* i/o : Qs : decoded spectrum */ Loading @@ -2289,7 +2290,7 @@ void mdct_spectrum_denorm_ivas_fx( const Word16 ld_slope_fx, /* i : Q15 : */ const Word16 pd_thresh_fx /* i : Q15 : */ ); #endif void hq2_core_configure_fx( const Word16 frame_length, /* Q0 */ const Word16 num_bits, /* Q0 */ Loading Loading @@ -3880,6 +3881,7 @@ void swb_bwe_enc_lr_fx( Word16 *ni_seed_fx /* i/o: random seed for search buffer NI */ ); #ifndef CLEANUP_HQ_CORE void swb_bwe_enc_lr_ivas_fx( Encoder_State *st_fx, /* i/o: encoder state structure */ const Word32 L_m_core[], /* i : lowband synthesis */ Loading @@ -3904,7 +3906,7 @@ void swb_bwe_enc_lr_ivas_fx( const Word32 L_y2_ni[], /* i : band_width information */ Word16 *ni_seed_fx /* i/o: random seed for search buffer NI */ ); #endif void isf_enc_amr_wb_fx( Encoder_State *st, /* i/o: state structure */ Word16 *isf_new, /* i/o: quantized ISF vector */ Loading lib_dec/hq_core_dec_fx.c +19 −3 Original line number Diff line number Diff line Loading @@ -565,6 +565,9 @@ void ivas_hq_core_dec_fx( } ELSE { #ifdef CLEANUP_HQ_CORE /* this cannot happen in IVAS */ #else core_switching_hq_prepare_dec_fx( st_fx, &num_bits, output_frame ); /* During ACELP->HQ core switching, limit the HQ core bitrate to 48kbps */ Loading @@ -573,6 +576,7 @@ void ivas_hq_core_dec_fx( num_bits = (Word16) ( HQ_48k / 50 ); move16(); } #endif } } IF( hq_recovery_flag ) Loading Loading @@ -625,11 +629,12 @@ void ivas_hq_core_dec_fx( } } #ifndef CLEANUP_HQ_CORE IF( EQ_16( output_frame, L_FRAME8k ) ) { hq_configure_bfi_fx( &nb_sfm, &num_Sb, num_bands_p, &sfmsize, &sfm_start, &sfm_end ); } #endif /*-------------------------------------------------------------------------- * transform-domain decoding *--------------------------------------------------------------------------*/ Loading @@ -645,11 +650,13 @@ void ivas_hq_core_dec_fx( &hHQ_core->last_fec, hHQ_core->ph_ecu_HqVoicing, &hHQ_core->ph_ecu_active, gapsynth_fx, st_fx->prev_bfi, hHQ_core->old_is_transient, hHQ_core->mag_chg_1st_fx, hHQ_core->Xavg_fx, &hHQ_core->beta_mute_fx, output_frame, st_fx ); } #ifndef CLEANUP_HQ_CORE ELSE { HQ_FEC_processing_fx( st_fx, t_audio_q, is_transient, hHQ_nbfec->ynrm_values_fx, hHQ_nbfec->r_p_values_fx, num_Sb, nb_sfm, num_bands_p, output_frame, sfm_start, sfm_end ); } #endif hHQ_core->old_is_transient[2] = hHQ_core->old_is_transient[1]; /* Q0 */ move16(); Loading @@ -675,6 +682,10 @@ void ivas_hq_core_dec_fx( { IF( EQ_16( hq_core_type, LOW_RATE_HQ_CORE ) ) { #ifdef CLEANUP_HQ_CORE /* this cannot happen in IVAS */ #else IF( EQ_16( st_fx->prev_bfi, 1 ) ) { set32_fx( hHQ_core->last_ni_gain_fx, 0, BANDS_MAX ); Loading @@ -685,6 +696,7 @@ void ivas_hq_core_dec_fx( /* HQ low rate decoder */ hq_lr_dec_fx( st_fx, t_audio_q, inner_frame, num_bits, &is_transient ); #endif hqswb_clas = is_transient; /* Q0 */ move16(); Q_audio = 12; Loading Loading @@ -914,6 +926,7 @@ void ivas_hq_core_dec_fx( move16(); } #ifndef CLEANUP_HQ_CORE IF( EQ_16( output_frame, L_FRAME8k ) ) { test(); Loading Loading @@ -951,6 +964,7 @@ void ivas_hq_core_dec_fx( } } ELSE #endif { test(); IF( EQ_16( st_fx->bfi, 1 ) && GE_16( output_frame, L_FRAME16k ) ) Loading Loading @@ -986,6 +1000,7 @@ void ivas_hq_core_dec_fx( } } #ifndef CLEANUP_HQ_CORE test(); test(); test(); Loading @@ -1007,7 +1022,7 @@ void ivas_hq_core_dec_fx( } waveform_adj2_fix( st_fx->hPlcInfo, st_fx->hTonalMDCTConc->secondLastPcmOut, synth, 0, add( extract_l( st_fx->hPlcInfo->nbLostCmpt ), 1 ), st_fx->bfi ); } #endif IF( GE_16( output_frame, L_FRAME16k ) ) { IF( EQ_16( hHQ_core->ph_ecu_HqVoicing, 1 ) ) Loading @@ -1034,13 +1049,14 @@ void ivas_hq_core_dec_fx( move16(); } #ifndef CLEANUP_HQ_CORE IF( EQ_16( output_frame, L_FRAME8k ) ) { Copy32( wtda_audio, hHQ_nbfec->oldIMDCTout_fx, L_FRAME8k / 2 ); /* q_wtda */ Copy( &hHQ_nbfec->old_auOut_2fr_fx[output_frame], hHQ_nbfec->old_auOut_2fr_fx, output_frame ); /* Q_old_auOut */ Copy_Scale_sig( synth, &hHQ_nbfec->old_auOut_2fr_fx[output_frame], output_frame, negate( *Q_synth ) ); /* Q0 */ } #endif /* prepare synthesis output buffer (as recent as possible) for HQ FEC */ { Loading lib_enc/hq_core_enc_fx.c +4 −1 Original line number Diff line number Diff line Loading @@ -505,8 +505,11 @@ void hq_core_enc_ivas_fx( move16(); IF( EQ_16( hq_core_type, LOW_RATE_HQ_CORE ) ) { #ifdef CLEANUP_HQ_CORE /* this cannot happen in IVAS */ #else hq_lr_enc_ivas_fx( st, t_audio_fx, inner_frame, &num_bits, is_transient ); #endif } ELSE { Loading Loading
lib_com/hq2_core_com_fx.c +2 −1 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ void mdct_spectrum_denorm_fx( return; } #ifndef CLEANUP_HQ_CORE void mdct_spectrum_denorm_ivas_fx( const Word32 inp_vector[], /* i : Q0 : */ Word32 L_y2[], /* i/o : Qs : decoded spectrum */ Loading Loading @@ -373,6 +373,7 @@ void mdct_spectrum_denorm_ivas_fx( return; } #endif /*==========================================================================*/ /* FUNCTION : void hq2_core_configure_fx() */ Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ #define FIX_1904_HARM_GSC_ENC /* VA: #1904 Harmonization of EVS and IVAS GSC code */ #define FIX_2271_OOB_INDEXING_IN_PIT_OL2 /* VA: Fix for issue 2271, to silence clang18 */ #define FIX_2273_OOB_INDEXING_IN_PIT_FR4 /* VA: Fix to silence clang on ptr init */ #define CLEANUP_HQ_CORE /* #################### End BE switches ################################## */ Loading
lib_com/prot_fx.h +4 −2 Original line number Diff line number Diff line Loading @@ -2277,6 +2277,7 @@ void mdct_spectrum_denorm_fx( const Word16 pd_thresh_fx /* i : Q15 : */ ); #ifndef CLEANUP_HQ_CORE void mdct_spectrum_denorm_ivas_fx( const Word32 inp_vector[], /* i : Q0 : */ Word32 L_y2[], /* i/o : Qs : decoded spectrum */ Loading @@ -2289,7 +2290,7 @@ void mdct_spectrum_denorm_ivas_fx( const Word16 ld_slope_fx, /* i : Q15 : */ const Word16 pd_thresh_fx /* i : Q15 : */ ); #endif void hq2_core_configure_fx( const Word16 frame_length, /* Q0 */ const Word16 num_bits, /* Q0 */ Loading Loading @@ -3880,6 +3881,7 @@ void swb_bwe_enc_lr_fx( Word16 *ni_seed_fx /* i/o: random seed for search buffer NI */ ); #ifndef CLEANUP_HQ_CORE void swb_bwe_enc_lr_ivas_fx( Encoder_State *st_fx, /* i/o: encoder state structure */ const Word32 L_m_core[], /* i : lowband synthesis */ Loading @@ -3904,7 +3906,7 @@ void swb_bwe_enc_lr_ivas_fx( const Word32 L_y2_ni[], /* i : band_width information */ Word16 *ni_seed_fx /* i/o: random seed for search buffer NI */ ); #endif void isf_enc_amr_wb_fx( Encoder_State *st, /* i/o: state structure */ Word16 *isf_new, /* i/o: quantized ISF vector */ Loading
lib_dec/hq_core_dec_fx.c +19 −3 Original line number Diff line number Diff line Loading @@ -565,6 +565,9 @@ void ivas_hq_core_dec_fx( } ELSE { #ifdef CLEANUP_HQ_CORE /* this cannot happen in IVAS */ #else core_switching_hq_prepare_dec_fx( st_fx, &num_bits, output_frame ); /* During ACELP->HQ core switching, limit the HQ core bitrate to 48kbps */ Loading @@ -573,6 +576,7 @@ void ivas_hq_core_dec_fx( num_bits = (Word16) ( HQ_48k / 50 ); move16(); } #endif } } IF( hq_recovery_flag ) Loading Loading @@ -625,11 +629,12 @@ void ivas_hq_core_dec_fx( } } #ifndef CLEANUP_HQ_CORE IF( EQ_16( output_frame, L_FRAME8k ) ) { hq_configure_bfi_fx( &nb_sfm, &num_Sb, num_bands_p, &sfmsize, &sfm_start, &sfm_end ); } #endif /*-------------------------------------------------------------------------- * transform-domain decoding *--------------------------------------------------------------------------*/ Loading @@ -645,11 +650,13 @@ void ivas_hq_core_dec_fx( &hHQ_core->last_fec, hHQ_core->ph_ecu_HqVoicing, &hHQ_core->ph_ecu_active, gapsynth_fx, st_fx->prev_bfi, hHQ_core->old_is_transient, hHQ_core->mag_chg_1st_fx, hHQ_core->Xavg_fx, &hHQ_core->beta_mute_fx, output_frame, st_fx ); } #ifndef CLEANUP_HQ_CORE ELSE { HQ_FEC_processing_fx( st_fx, t_audio_q, is_transient, hHQ_nbfec->ynrm_values_fx, hHQ_nbfec->r_p_values_fx, num_Sb, nb_sfm, num_bands_p, output_frame, sfm_start, sfm_end ); } #endif hHQ_core->old_is_transient[2] = hHQ_core->old_is_transient[1]; /* Q0 */ move16(); Loading @@ -675,6 +682,10 @@ void ivas_hq_core_dec_fx( { IF( EQ_16( hq_core_type, LOW_RATE_HQ_CORE ) ) { #ifdef CLEANUP_HQ_CORE /* this cannot happen in IVAS */ #else IF( EQ_16( st_fx->prev_bfi, 1 ) ) { set32_fx( hHQ_core->last_ni_gain_fx, 0, BANDS_MAX ); Loading @@ -685,6 +696,7 @@ void ivas_hq_core_dec_fx( /* HQ low rate decoder */ hq_lr_dec_fx( st_fx, t_audio_q, inner_frame, num_bits, &is_transient ); #endif hqswb_clas = is_transient; /* Q0 */ move16(); Q_audio = 12; Loading Loading @@ -914,6 +926,7 @@ void ivas_hq_core_dec_fx( move16(); } #ifndef CLEANUP_HQ_CORE IF( EQ_16( output_frame, L_FRAME8k ) ) { test(); Loading Loading @@ -951,6 +964,7 @@ void ivas_hq_core_dec_fx( } } ELSE #endif { test(); IF( EQ_16( st_fx->bfi, 1 ) && GE_16( output_frame, L_FRAME16k ) ) Loading Loading @@ -986,6 +1000,7 @@ void ivas_hq_core_dec_fx( } } #ifndef CLEANUP_HQ_CORE test(); test(); test(); Loading @@ -1007,7 +1022,7 @@ void ivas_hq_core_dec_fx( } waveform_adj2_fix( st_fx->hPlcInfo, st_fx->hTonalMDCTConc->secondLastPcmOut, synth, 0, add( extract_l( st_fx->hPlcInfo->nbLostCmpt ), 1 ), st_fx->bfi ); } #endif IF( GE_16( output_frame, L_FRAME16k ) ) { IF( EQ_16( hHQ_core->ph_ecu_HqVoicing, 1 ) ) Loading @@ -1034,13 +1049,14 @@ void ivas_hq_core_dec_fx( move16(); } #ifndef CLEANUP_HQ_CORE IF( EQ_16( output_frame, L_FRAME8k ) ) { Copy32( wtda_audio, hHQ_nbfec->oldIMDCTout_fx, L_FRAME8k / 2 ); /* q_wtda */ Copy( &hHQ_nbfec->old_auOut_2fr_fx[output_frame], hHQ_nbfec->old_auOut_2fr_fx, output_frame ); /* Q_old_auOut */ Copy_Scale_sig( synth, &hHQ_nbfec->old_auOut_2fr_fx[output_frame], output_frame, negate( *Q_synth ) ); /* Q0 */ } #endif /* prepare synthesis output buffer (as recent as possible) for HQ FEC */ { Loading
lib_enc/hq_core_enc_fx.c +4 −1 Original line number Diff line number Diff line Loading @@ -505,8 +505,11 @@ void hq_core_enc_ivas_fx( move16(); IF( EQ_16( hq_core_type, LOW_RATE_HQ_CORE ) ) { #ifdef CLEANUP_HQ_CORE /* this cannot happen in IVAS */ #else hq_lr_enc_ivas_fx( st, t_audio_fx, inner_frame, &num_bits, is_transient ); #endif } ELSE { Loading