Commit 543a97c3 authored by norvell's avatar norvell
Browse files

Merge branch '2452-hq-core-harmonization-issue-peak_avrg_ratio_fx-in-lr-hq' into 'main'

Resolve "HQ core harmonization issue: peak_avrg_ratio_fx() in LR-HQ"

Closes #2452

See merge request !2893
parents 88d2208d b56a651a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 ################################## */

+4 −0
Original line number Diff line number Diff line
@@ -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();
+4 −0
Original line number Diff line number Diff line
@@ -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
        }