Commit ab8d27ec authored by multrus's avatar multrus
Browse files

Merge branch 'main' into basop-2493-usage-of-extract_l-with-values-out-of-range-2

parents ebccd1b1 68e28ee5
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -896,7 +896,6 @@ Word16 shr_o( Word16 var1, Word16 var2, Flag *Overflow )

Word16 shr( Word16 var1, Word16 var2 )
{
#ifdef FIX_BASOP_2563_CRASH_HQ_GENERIC_DEC
    Flag Overflow;
    Word16 result;

@@ -908,9 +907,6 @@ Word16 shr( Word16 var1, Word16 var2 )
        assert( 0 );
    }
    return result;
#else
    return shr_o( var1, var2, NULL );
#endif
}
Word16 shr_sat( Word16 var1, Word16 var2 )
{
+4 −0
Original line number Diff line number Diff line
@@ -349,7 +349,11 @@ Word32 ivas_interformat_brate_fx(

    limit_high = IVAS_512k / FRAMES_PER_SEC;
    move16();
#ifdef FIX_2636_OMASA_INTERFORMAT_BRATE
    IF( LT_32( element_brate, SCE_CORE_16k_LOW_LIMIT ) )
#else
    IF( LE_32( element_brate, SCE_CORE_16k_LOW_LIMIT ) )
#endif
    {
        limit_high = ACELP_12k8_HIGH_LIMIT / FRAMES_PER_SEC;
        move16();
+3 −0
Original line number Diff line number Diff line
@@ -96,6 +96,9 @@
#define FIX_FLOAT_1600_OMASA_WRONG_RENDER_PATH          /* Nokia: float issue 1600: fix initialization condition of stereo type detection for OMASA */
#define FIX_BASOP_2627_PARAM_MC_ILD_REMAP_EXP           /* FhG: BASOP #2627: accumulate 10^(ILD/10) using a dynamic exponent */
#define FIX_BASOP_2635_EFAP_ADD_VERTEX_ELE_ROUND        /* FhG: BASOP #2635: round |elevation| with anint_fx before the 90deg subtraction in add_vertex_fx */
#define FIX_BASOP_2639_INCORRECT_ARRAY_INDEX            /* Dolby: BASOP #2639: incorrect array index in ivas_spar_unquant_dtx_indicies */
#define FIX_BASOP_2640_MASA_STEREO_TYPE_ASSERT          /* Nokia: BASOP issue 2640: Fix assert by saturating shift when exponent difference is very large. */
#define FIX_2636_OMASA_INTERFORMAT_BRATE                /* VA: basop issue 2636: Correct condition in function ivas_interformat_brate_fx() */

#define FIX_2493_CHECK_64BIT                            /* FhG: Verify that 64 bit ops do not encounter an overflow. */
#define NONBE_FIX_2493_EXTRACT_L_estDownmixGain_fx     /* FhG: Fix extract_l overflow inside estDownmixGain_fx() */
+4 −0
Original line number Diff line number Diff line
@@ -2618,7 +2618,11 @@ static void ivas_spar_unquant_dtx_indicies(
            move32();
        }

#ifdef FIX_BASOP_2639_INCORRECT_ARRAY_INDEX
        FOR( i = 0; i < ( FOA_CHANNELS - ndm_per_band[( bw * b )] ); i++ )
#else
        FOR( i = 0; i < ( FOA_CHANNELS - ndm_per_band[( bw - b )] ); i++ )
#endif
        {
            q_lvl = dtx_pd_real_q_levels[( ndm_per_band[( bw * b )] - 1 )][i]; /*Q0*/
            move16();
+8 −0
Original line number Diff line number Diff line
@@ -2063,13 +2063,21 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx(
            subtract_target_ratio = L_sub( BASOP_Util_Log2( masa_stereo_type_detect->subtract_power_y_smooth_fx ),
                                           BASOP_Util_Log2( masa_stereo_type_detect->target_power_y_smooth_fx ) ); // Q25
            exp = sub( masa_stereo_type_detect->q_subtract_power_y_smooth, masa_stereo_type_detect->q_target_power_y_smooth );
#ifdef FIX_BASOP_2640_MASA_STEREO_TYPE_ASSERT
            L_tmp = Mpy_32_32( L_sub( subtract_target_ratio, L_shl_sat( exp, 25 ) ), LOG10_2_Q31 ); // Q25
#else
            L_tmp = Mpy_32_32( L_sub( subtract_target_ratio, L_shl( exp, 25 ) ), LOG10_2_Q31 ); // Q25
#endif
        }
        ELSE
        {
            subtract_target_ratio = BASOP_Util_Log2( masa_stereo_type_detect->subtract_power_y_smooth_fx ); // Q25
            exp = sub( 31, masa_stereo_type_detect->q_subtract_power_y_smooth );
#ifdef FIX_BASOP_2640_MASA_STEREO_TYPE_ASSERT
            L_tmp = L_sub( Mpy_32_32( L_add( subtract_target_ratio, L_shl_sat( exp, 25 ) ), LOG10_2_Q31 ), -503316480 /* L_shl( -15, 25 ) */ /*log(EPSILON)*/ ); // Q25
#else
            L_tmp = L_sub( Mpy_32_32( L_add( subtract_target_ratio, L_shl( exp, 25 ) ), LOG10_2_Q31 ), -503316480 /* L_shl( -15, 25 ) */ /*log(EPSILON)*/ ); // Q25
#endif
        }
        subtract_target_ratio_db = Mpy_32_32( 1342177280 /* 10.0f * in Q27*/, L_tmp ); // (Q27, (Q25, Q31)) -> (Q27, Q25) -> Q21