Loading lib_com/gs_gains_fx.c +20 −2 Original line number Diff line number Diff line Loading @@ -285,6 +285,10 @@ void Ener_per_band_comp_fx( const Word16 Q_exc, /* i : frame length */ const Word16 Mband, /* i : Max band */ const Word16 Eflag /* i : flag of highest band */ #ifdef HARM_GSC_ENC_PART3 , const Word16 L_frame /* i : frame length */ #endif ) { const Word16 *pt_fx; Loading @@ -311,10 +315,23 @@ void Ener_per_band_comp_fx( move16(); pt_fx += 32; } #ifdef HARM_GSC_ENC_PART3 IF( EQ_16( L_frame, L_FRAME16k ) ) { y_gain4_fx[j + 2] = Comp_band_log_ener( pt_fx, 32, Q_exc, -1 ); /*Q12*/ move16(); #ifdef FIX_BUG_IN_IVAS_GSC pt_fx += 32; y_gain4_fx[j + 3] = Comp_band_log_ener( pt_fx, 32, Q_exc, -1 ); /*Q12*/ #else y_gain4_fx[j + 3] = Comp_band_log_ener( pt_fx, 64, Q_exc, -1 ); /*Q12*/ #endif move16(); } #endif return; } //#ifndef HARM_GSC_ENC_PART3 void Ener_per_band_comp_ivas_fx( const Word16 exc_diff_fx[], /* i : target signal Q_exc_diff */ Word16 y_gain4_fx[], /* o : Energy per band to quantize Q12 */ Loading Loading @@ -360,6 +377,7 @@ void Ener_per_band_comp_ivas_fx( return; } //#endif HARM_GSC_ENC_PART3 /*-------------------------------------------------------------------* Loading lib_com/gs_noisefill_fx.c +8 −1 Original line number Diff line number Diff line Loading @@ -801,12 +801,19 @@ void highband_exc_dct_in_fx( test(); IF( EQ_32( core_brate, ACELP_8k00 ) && NE_16( bwidth, NB ) ) { #ifdef HARM_GSC_ENC_PART3 Ener_per_band_comp_fx( exc_diffQ, Ener_per_bd_yQ, Qexc_diffQ, add( last_bin, 1 ), 0, L_frame ); #else Ener_per_band_comp_fx( exc_diffQ, Ener_per_bd_yQ, Qexc_diffQ, add( last_bin, 1 ), 0 ); #endif } ELSE { #ifdef HARM_GSC_ENC_PART3 Ener_per_band_comp_fx( exc_diffQ, Ener_per_bd_yQ, Qexc_diffQ, MBANDS_GN, 1, L_frame ); #else Ener_per_band_comp_fx( exc_diffQ, Ener_per_bd_yQ, Qexc_diffQ, MBANDS_GN, 1 ); #endif IF( LT_16( nb_subfr, 4 ) && LT_16( L_frame, L_FRAME16k ) ) { FOR( i = L_FRAME - 16; i < L_FRAME; i++ ) Loading lib_com/options.h +7 −2 Original line number Diff line number Diff line Loading @@ -87,7 +87,11 @@ #define FIX_1435_MOVE_STEREO_PANNING /* VA: issue 1435: do the EVS stereo panning in the renderer */ #define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */ #define FIX_2245_INIT_FD_CNG_EVS /* Dolby/VA: Issue 2245: initialize FD CNG with EVS-type of init function */ #define HARM_GSC_ENC /* VA: Harmonization of EVS and IVAS GSC code */ #define HARM_GSC_ENC_PART2 #define HARM_GSC_ENC_PART3 #define HARM_GSC_ENC_PART4 #define BE_COMPL_RED /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ Loading @@ -97,7 +101,8 @@ #define FIX_2015_PREMPH_SAT_ALT_PART2 /* VA: Add missing scaling factor to be passed to AVQ_cod() */ #define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */ #define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */ //#define FIX_EVS_LR_PG_BUG /* VA: EVS bug on how the lowrate pitch gain is compared to threshold, not used in IVAS */ //#define FIX_BUG_IN_IVAS_GSC /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ Loading lib_com/pred_lt4_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -58,9 +58,14 @@ void pred_lt4_ivas_fx( FOR( i = 0; i < nb_coef; i++ ) { /*s += (*x1--) * (*c1) + (*x2++) * (*c2);*/ #ifdef BE_COMPL_RED s64 = W_mac_32_32( s64, L_deposit_l( *x1-- ), ( *c1 ) ); /* Q_exc + Q32 */ s64 = W_mac_32_32( s64, L_deposit_l( *x2++ ), ( *c2 ) ); /* Q_exc + Q32 */ #else s64 = W_mac_32_16( s64, ( *c1 ), *x1-- ); /* Q_exc + Q32 */ s64 = W_mac_32_16( s64, ( *c2 ), *x2++ ); /* Q_exc + Q32 */ #endif c1 += up_sample; c2 += up_sample; } Loading lib_com/prot_fx.h +6 −1 Original line number Diff line number Diff line Loading @@ -1758,7 +1758,12 @@ void Ener_per_band_comp_fx( Word16 y_gain4[], /* o : Energy per band to quantize Q12 */ const Word16 Q_exc_diff, const Word16 Mband, /* i : Max band */ const Word16 Eflag ); const Word16 Eflag #ifdef HARM_GSC_ENC_PART3 , const Word16 L_frame /* i : frame length */ #endif ); void Ener_per_band_comp_ivas_fx( const Word16 exc_diff_fx[], /* i : target signal Q_exc_diff */ Loading Loading
lib_com/gs_gains_fx.c +20 −2 Original line number Diff line number Diff line Loading @@ -285,6 +285,10 @@ void Ener_per_band_comp_fx( const Word16 Q_exc, /* i : frame length */ const Word16 Mband, /* i : Max band */ const Word16 Eflag /* i : flag of highest band */ #ifdef HARM_GSC_ENC_PART3 , const Word16 L_frame /* i : frame length */ #endif ) { const Word16 *pt_fx; Loading @@ -311,10 +315,23 @@ void Ener_per_band_comp_fx( move16(); pt_fx += 32; } #ifdef HARM_GSC_ENC_PART3 IF( EQ_16( L_frame, L_FRAME16k ) ) { y_gain4_fx[j + 2] = Comp_band_log_ener( pt_fx, 32, Q_exc, -1 ); /*Q12*/ move16(); #ifdef FIX_BUG_IN_IVAS_GSC pt_fx += 32; y_gain4_fx[j + 3] = Comp_band_log_ener( pt_fx, 32, Q_exc, -1 ); /*Q12*/ #else y_gain4_fx[j + 3] = Comp_band_log_ener( pt_fx, 64, Q_exc, -1 ); /*Q12*/ #endif move16(); } #endif return; } //#ifndef HARM_GSC_ENC_PART3 void Ener_per_band_comp_ivas_fx( const Word16 exc_diff_fx[], /* i : target signal Q_exc_diff */ Word16 y_gain4_fx[], /* o : Energy per band to quantize Q12 */ Loading Loading @@ -360,6 +377,7 @@ void Ener_per_band_comp_ivas_fx( return; } //#endif HARM_GSC_ENC_PART3 /*-------------------------------------------------------------------* Loading
lib_com/gs_noisefill_fx.c +8 −1 Original line number Diff line number Diff line Loading @@ -801,12 +801,19 @@ void highband_exc_dct_in_fx( test(); IF( EQ_32( core_brate, ACELP_8k00 ) && NE_16( bwidth, NB ) ) { #ifdef HARM_GSC_ENC_PART3 Ener_per_band_comp_fx( exc_diffQ, Ener_per_bd_yQ, Qexc_diffQ, add( last_bin, 1 ), 0, L_frame ); #else Ener_per_band_comp_fx( exc_diffQ, Ener_per_bd_yQ, Qexc_diffQ, add( last_bin, 1 ), 0 ); #endif } ELSE { #ifdef HARM_GSC_ENC_PART3 Ener_per_band_comp_fx( exc_diffQ, Ener_per_bd_yQ, Qexc_diffQ, MBANDS_GN, 1, L_frame ); #else Ener_per_band_comp_fx( exc_diffQ, Ener_per_bd_yQ, Qexc_diffQ, MBANDS_GN, 1 ); #endif IF( LT_16( nb_subfr, 4 ) && LT_16( L_frame, L_FRAME16k ) ) { FOR( i = L_FRAME - 16; i < L_FRAME; i++ ) Loading
lib_com/options.h +7 −2 Original line number Diff line number Diff line Loading @@ -87,7 +87,11 @@ #define FIX_1435_MOVE_STEREO_PANNING /* VA: issue 1435: do the EVS stereo panning in the renderer */ #define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */ #define FIX_2245_INIT_FD_CNG_EVS /* Dolby/VA: Issue 2245: initialize FD CNG with EVS-type of init function */ #define HARM_GSC_ENC /* VA: Harmonization of EVS and IVAS GSC code */ #define HARM_GSC_ENC_PART2 #define HARM_GSC_ENC_PART3 #define HARM_GSC_ENC_PART4 #define BE_COMPL_RED /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ Loading @@ -97,7 +101,8 @@ #define FIX_2015_PREMPH_SAT_ALT_PART2 /* VA: Add missing scaling factor to be passed to AVQ_cod() */ #define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */ #define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */ //#define FIX_EVS_LR_PG_BUG /* VA: EVS bug on how the lowrate pitch gain is compared to threshold, not used in IVAS */ //#define FIX_BUG_IN_IVAS_GSC /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ Loading
lib_com/pred_lt4_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -58,9 +58,14 @@ void pred_lt4_ivas_fx( FOR( i = 0; i < nb_coef; i++ ) { /*s += (*x1--) * (*c1) + (*x2++) * (*c2);*/ #ifdef BE_COMPL_RED s64 = W_mac_32_32( s64, L_deposit_l( *x1-- ), ( *c1 ) ); /* Q_exc + Q32 */ s64 = W_mac_32_32( s64, L_deposit_l( *x2++ ), ( *c2 ) ); /* Q_exc + Q32 */ #else s64 = W_mac_32_16( s64, ( *c1 ), *x1-- ); /* Q_exc + Q32 */ s64 = W_mac_32_16( s64, ( *c2 ), *x2++ ); /* Q_exc + Q32 */ #endif c1 += up_sample; c2 += up_sample; } Loading
lib_com/prot_fx.h +6 −1 Original line number Diff line number Diff line Loading @@ -1758,7 +1758,12 @@ void Ener_per_band_comp_fx( Word16 y_gain4[], /* o : Energy per band to quantize Q12 */ const Word16 Q_exc_diff, const Word16 Mband, /* i : Max band */ const Word16 Eflag ); const Word16 Eflag #ifdef HARM_GSC_ENC_PART3 , const Word16 L_frame /* i : frame length */ #endif ); void Ener_per_band_comp_ivas_fx( const Word16 exc_diff_fx[], /* i : target signal Q_exc_diff */ Loading