Commit d8922680 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Move patch macro within options.h and rename it.

parent dc8c2baf
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@
#define FIX_ISSUE_1764                       /* NTT: update renorm and use abs */
#define FIX_ISSUE_1817_REPLACE_CARRY_OVERFLOW  /* FhG: bit-exact, replace carry and overflow operations by 64-bit operations, MR 1931 */
#define FIX_1844_MISSING_FREE                                /* FhG: add missing free in ivas_binRenderer_convModuleClose_fx() */

#define FIX_1781_SPECTRAL_GAPS                    /* FhG: Change internal calculation of tcx_noise_factor_ivas_fx() to 32-bit*/
/* #################### Start BASOP porting switches ############################ */

#define FIX_1372_ISAR_POST_REND
@@ -141,7 +141,6 @@
#define NONBE_1360_LFE_DELAY                           /* Dlb: LFE delay alignment when rendering in CLDFB domain*/

#define NONBE_1229_FIX_ISM1_DPID                        /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */
#define NONBE_1781_FIX_SPECTRAL_GAPS                    /* FhG: Change internal calculation of tcx_noise_factor_ivas_fx() to 32-bit*/
/* #################### End BASOP porting switches ############################ */

#define FIX_1766_TCX2ACELP_BWE_ISSUE    /* VA : Fix rare BWE issue when switching from TCX to ACELP */
+7 −7
Original line number Diff line number Diff line
@@ -2509,7 +2509,7 @@ void tcx_noise_factor_ivas_fx(
    Word16 i, k, win, segmentOffset, j;
    Word32 sqErrorNrg = 0, n;
    move32();
#ifdef NONBE_1781_FIX_SPECTRAL_GAPS
#ifdef FIX_1781_SPECTRAL_GAPS
    Word32 inv_gain2, tilt_factor;
    Word16 inv_gain2_e, nTransWidth_1, exp_sqErrorNrg = 0;
#else
@@ -2544,7 +2544,7 @@ void tcx_noise_factor_ivas_fx(
    /* tilt_factor = 1.0f /(float)pow(max(0.375f, tiltCompFactor), 1.0f/(float)L_frame); */
    tmp32 = BASOP_Util_Log2( L_deposit_h( s_max( 0x3000, tiltCompFactor ) ) ); /* 6Q25 */
    tmp32 = L_shr( Mpy_32_16_1( tmp32, negate( tmp1 ) ), 6 );
#ifdef NONBE_1781_FIX_SPECTRAL_GAPS
#ifdef FIX_1781_SPECTRAL_GAPS
    tilt_factor = BASOP_Util_InvLog2( L_sub( tmp32, 0x2000000 ) ); /* 1Q30 */
#else
    tilt_factor = round_fx( BASOP_Util_InvLog2( L_sub( tmp32, 0x2000000 ) ) ); /* 1Q14 */
@@ -2552,13 +2552,13 @@ void tcx_noise_factor_ivas_fx(

    /* inv_gain2 = 1.0f / ((float)(nTransWidth * nTransWidth) * gain_tcx); */
    tmp32 = L_mult( imult1616( nTransWidth, nTransWidth ), gain_tcx ); /* 15Q16 */
#ifdef NONBE_1781_FIX_SPECTRAL_GAPS
#ifdef FIX_1781_SPECTRAL_GAPS
    inv_gain2 = BASOP_Util_Divide3232_Scale_newton( MAX_32, tmp32, &inv_gain2_e );
#else
    inv_gain2 = BASOP_Util_Divide3232_Scale( MAX_32, tmp32, &inv_gain2_e );
#endif
    inv_gain2_e = add( inv_gain2_e, sub( 0, add( 15, gain_tcx_e ) ) );
#ifdef NONBE_1781_FIX_SPECTRAL_GAPS
#ifdef FIX_1781_SPECTRAL_GAPS
    inv_gain2 = L_shr( inv_gain2, 2 ); /* 2 bits headroom */
#else
    inv_gain2 = shr( inv_gain2, 2 ); /* 2 bits headroom */
@@ -2588,7 +2588,7 @@ void tcx_noise_factor_ivas_fx(
        /* inv_gain2 *= (float)pow(tilt_factor, (float)i); */
        FOR( k = 0; k < i; k++ )
        {
#ifdef NONBE_1781_FIX_SPECTRAL_GAPS
#ifdef FIX_1781_SPECTRAL_GAPS
            inv_gain2 = L_shl( Mpy_32_32( inv_gain2, tilt_factor ), 1 );
#else
            inv_gain2 = shl( mult( inv_gain2, tilt_factor ), 1 );
@@ -2660,7 +2660,7 @@ void tcx_noise_factor_ivas_fx(

    FOR( ; i < lowpassLine; i++ )
    {
#ifdef NONBE_1781_FIX_SPECTRAL_GAPS
#ifdef FIX_1781_SPECTRAL_GAPS
        inv_gain2 = L_shl( Mpy_32_32( inv_gain2, tilt_factor ), 1 );
#else
        inv_gain2 = shl( mult( inv_gain2, tilt_factor ), 1 );
@@ -2732,7 +2732,7 @@ void tcx_noise_factor_ivas_fx(
                win = add( win, 1 );
            }
            /* update segment sum: magnitudes scaled by smoothing function */
#ifdef NONBE_1781_FIX_SPECTRAL_GAPS
#ifdef FIX_1781_SPECTRAL_GAPS
            sqQ[i] = Mpy_32_32( imult3216( L_abs( x_orig[i] ), win ), inv_gain2 );
#else
            sqQ[i] = Mpy_32_16_1( imult3216( L_abs( x_orig[i] ), win ), inv_gain2 );