Commit ea83b952 authored by norvell's avatar norvell
Browse files

Merge branch '2451-hq-core-harmonization-issue-classification-in-hq_ecu_fx' into 'main'

[Non-BE] Fix HQ FEC selector in IVAS BASOP

Closes #2451

See merge request !2876
parents b78eb05e 028544a5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@
/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define FIX_BASOP_2451_HQ_FEC_SELECTOR                  /* Eri: Resolve basop issue 2451, wrong condition on env_stab_plc_fx */
#define FIX_2398_PRECISSION_ORIENTATION_TRACKING        /* FhG: use refinement of Sqrt32 within certain functions*/


+4 −0
Original line number Diff line number Diff line
@@ -304,7 +304,11 @@ void window_ola_fx(
            p4 = oldgapsynth + n;
            FOR( i = 0; i < temp; i++ )
            {
#ifdef FIX_BASOP_2451_HQ_FEC_SELECTOR
                *p1 = add_sat( mult( *p1, *p2 ), mult( *p4, *p3 ) ); /*   auOut[i]*SS2[i]+ oldgapsynth[i+n]*(SS2[L-n-i-1]);*/
#else
                *p1 = add( mult( *p1, *p2 ), mult( *p4, *p3 ) ); /*   auOut[i]*SS2[i]+ oldgapsynth[i+n]*(SS2[L-n-i-1]);*/
#endif
                move16();
                p1++;
                p2++;
+9 −0
Original line number Diff line number Diff line
@@ -3301,10 +3301,18 @@ void hq_ecu_fx(
    test();
    test();
    test();
#ifdef FIX_BASOP_2451_HQ_FEC_SELECTOR
    evs_mode_selection = ( GE_32( st_fx->total_brate, 48000 ) && ( GE_16( output_frame, L_FRAME16k ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) &&
                                                                   ( ph_ecu_HqVoicing || ( ( ( NE_16( hHQ_core->env_stab_plc_fx, 0 ) ) && ( LT_16( corr, 19661 ) /* 0.6 in Q15 */ ) ) || ( !( NE_16( hHQ_core->env_stab_plc_fx, 0 ) ) && ( GT_16( corr, 27853 ) /* 0.85 in Q15 */ ) ) ) ) ) ) ||
                         ( LT_32( st_fx->total_brate, 48000 ) && ( ( ph_ecu_HqVoicing || GT_16( corr, 27853 ) /* 0.85 in Q15 */ ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) ) );

#else
    evs_mode_selection = ( GE_32( st_fx->total_brate, 48000 ) && ( GE_16( output_frame, L_FRAME16k ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) &&
                                                                   ( ph_ecu_HqVoicing || ( ( ( GT_16( hHQ_core->env_stab_plc_fx, 16384 ) /* 0.5 in Q15 */ ) && ( LT_16( corr, 19661 ) /* 0.6 in Q15 */ ) ) || ( LT_16( hHQ_core->env_stab_plc_fx, 16384 ) /* 0.5 in Q15 */ && ( GT_16( corr, 27853 ) /* 0.85 in Q15 */ ) ) ) ) ) ) ||
                         ( LT_32( st_fx->total_brate, 48000 ) && ( ( ph_ecu_HqVoicing || GT_16( corr, 27853 ) /* 0.85 in Q15 */ ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) ) );
#endif

#ifndef FIX_BASOP_2451_HQ_FEC_SELECTOR
#ifdef HARM_HQ_CORE_KEEP_BE
    IF( st_fx->element_mode == EVS_MONO )
    {
@@ -3327,6 +3335,7 @@ void hq_ecu_fx(
                                                                       ( NE_16( ph_ecu_HqVoicing, 0 ) || ( ( ( NE_16( hHQ_core->env_stab_plc_fx, 0 ) ) && ( LT_16( corr, 19661 ) ) ) || ( !( NE_16( hHQ_core->env_stab_plc_fx, 0 ) ) && ( GT_16( corr, 27853 ) ) ) ) ) ) ) ||
                             ( LT_32( st_fx->total_brate, 48000 ) && ( ( ph_ecu_HqVoicing || GT_16( corr, 27853 ) ) && !prev_bfi && ( !old_is_transient[0] || old_is_transient[1] ) ) );
    }
#endif
#endif

    test();