diff --git a/lib_com/options.h b/lib_com/options.h index 973366665467eda6f0eaf6e7cb9f0b20c7e88a10..daede4c0d2584ef73b77d4b5f9700e8bceb2fe1c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -89,7 +89,7 @@ #define FIX_2455_HARMONIZE_generate_comfort_noise_enc /* FhG: harmonize generate_comfort_noise_enc and generate_comfort_noise_enc_ivas */ #define FIX_2455_HARMONIZE_configureFdCngEnc /* FhG: harmonize generate_comfort_noise_enc and generate_comfort_noise_enc_ivas */ #define FIX_2463_EVS_BWE_LSF /* VA: basop issue 2463: harmonize calling of Quant_BWE_LSF_fx() */ - +#define FIX_2452_HQ_CORE_PEAQ_AVR_RATIO_HARM /* Eri: Basop issue 2453: Fix alignment of peak_avrg_ratio_fx */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/hq_classifier_enc_fx.c b/lib_enc/hq_classifier_enc_fx.c index a17b078760c38c638937e2fd0f821f8be4a51334..c9cf8856b0db18a94fc6d8176d3eee4612e21224 100644 --- a/lib_enc/hq_classifier_enc_fx.c +++ b/lib_enc/hq_classifier_enc_fx.c @@ -387,7 +387,11 @@ Word16 peak_avrg_ratio_fx( test(); test(); test(); +#ifdef FIX_2452_HQ_CORE_PEAQ_AVR_RATIO_HARM + IF( ( GE_16( add( k, k1 ), 5 ) && GT_16( k1, 2 ) && LT_32( total_brate, HQ_BWE_CROSSOVER_BRATE ) && GT_32( total_brate, HQ_16k40 ) ) || ( ( ( GE_16( add( k, k1 ), 10 ) && GT_16( k1, 5 ) ) || GE_16( *mode_count, 5 ) ) && LT_16( *mode_count1, 5 ) ) ) +#else IF( ( GE_16( add( k, k1 ), 5 ) && GT_16( k1, 2 ) && LT_32( total_brate, HQ_BWE_CROSSOVER_BRATE ) ) || ( ( ( GE_16( add( k, k1 ), 10 ) && GT_16( k1, 5 ) ) || GE_16( *mode_count, 5 ) ) && LT_16( *mode_count1, 5 ) ) ) +#endif { hqswb_clas = HQ_HARMONIC; move16(); diff --git a/lib_enc/hq_lr_enc_fx.c b/lib_enc/hq_lr_enc_fx.c index 663cee4b9be46a1d4f80bdbfeff0e304aaeed92c..e60f66bdc66150f6032c2c284cd62a105df6ebc0 100644 --- a/lib_enc/hq_lr_enc_fx.c +++ b/lib_enc/hq_lr_enc_fx.c @@ -206,10 +206,14 @@ void hq_lr_enc_fx( } ELSE { +#ifdef FIX_2452_HQ_CORE_PEAQ_AVR_RATIO_HARM + hqswb_clas_fx = peak_avrg_ratio_fx( st_fx->total_brate, L_t_audio, NUMC_N, &hHQ_core->mode_count, &hHQ_core->mode_count1, SWB_BWE_LR_Qs ); /* Q0 */ +#else #ifdef HARM_HQ_CORE_KEEP_BE hqswb_clas_fx = peak_avrg_ratio_fx( HQ_BWE_CROSSOVER_BRATE, L_t_audio, NUMC_N, &hHQ_core->mode_count, &hHQ_core->mode_count1, SWB_BWE_LR_Qs ); /* Q0 */ #else hqswb_clas_fx = peak_avrg_ratio_fx( st_fx->total_brate, L_t_audio, NUMC_N, &hHQ_core->mode_count, &hHQ_core->mode_count1, SWB_BWE_LR_Qs ); /* Q0 */ +#endif #endif }