Commit 8c599638 authored by Jan Kiene's avatar Jan Kiene
Browse files

Accept FIX_2584_TD_SM_ISSUE

parent 0c970c8f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define NONBE_FIX_ISSUE_2206_MDCT_STEREO_FIX_2549       /* FhG: Correct scale inconsistency of old_inp_16k_fx buffer scale. */
#define FIX_2584_TD_SM_ISSUE                            /* VA: Fix inconsistencies in the SM part of the TD stereo */
#define FIX_2556_ALIGN_CONDITIONS                       /* VA: Fix different conditions that were not exact between float and fix, BE on self-test */
#define FIX_2585_BIT_ALLOCATION_DIFF                    /* VA : issue 2585, bit allocation different behaviors between float and fixed-point for corner cases */
#define FIX_NONBE_2579_INCORRECT_LAG_CALCULATION        /* Dolby: fix 2579: Incorrect lag calculation */
+0 −23
Original line number Diff line number Diff line
@@ -975,11 +975,7 @@ static Word16 Get_dt_lt_ener_fx(
        test();
        IF( GE_16( *tdm_hyst_cnt, 2 ) && EQ_16( tmp_SM_flag, 1 ) && ( GT_16( sts[0]->tdm_pc, PC_LIMIT ) || GT_16( sts[1]->tdm_pc, PC_LIMIT ) ) )
        {
#ifndef FIX_2584_TD_SM_ISSUE
            tdm_hyst_cnt++;
#else
            *tdm_hyst_cnt = add( *tdm_hyst_cnt, 1 );
#endif
            *tdm_NOOP_SM_flag_loc = tmp_SM_flag;
            move16();
            *tdm_hyst_cnt = 0;
@@ -988,11 +984,7 @@ static Word16 Get_dt_lt_ener_fx(
        ELSE IF( GE_16( *tdm_hyst_cnt, 20 ) && tmp_SM_flag == 0 &&
                 ( GT_16( sts[0]->tdm_pc, PC_LIMIT ) || GT_16( sts[1]->tdm_pc, PC_LIMIT ) ) && ( LE_32( *tdm_LT_es_em, ONE_IN_Q20 /* 0.5f in Q21 */ ) || LT_32( es_em_fx, -20971520 /* -10.0f in Q21 */ ) ) )
        {
#ifndef FIX_2584_TD_SM_ISSUE
            tdm_hyst_cnt++;
#else
            *tdm_hyst_cnt = add( *tdm_hyst_cnt, 1 );
#endif
            *tdm_NOOP_SM_flag_loc = tmp_SM_flag;
            move16();
            *tdm_hyst_cnt = 0;
@@ -1585,24 +1577,14 @@ static Word16 stereo_tdm_ener_analysis_SM_fx(
    test();
    test();
    test();
#ifndef FIX_2584_TD_SM_ISSUE
    IF( ( LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q20 - Q24 ), RMS_MIN_FX_Q20 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q19 /* adjusted for 2 in RHS */ - Q24 ), RMS_MIN_FX_Q20 ) ) ||
        ( LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q20 - Q24 ), RMS_MIN_FX_Q20 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q19 /* adjusted for 2 in RHS */ - Q24 ), RMS_MIN_FX_Q20 ) ) ) /* Q20 */
#else
    IF( ( LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q20 - Q16 ), RMS_MIN_FX_Q20 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q19 /* adjusted for 2 in RHS */ - Q16 ), RMS_MIN_FX_Q20 ) ) ||
        ( LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q20 - Q16 ), RMS_MIN_FX_Q20 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q19 /* adjusted for 2 in RHS */ - Q16 ), RMS_MIN_FX_Q20 ) ) ) /* Q20 */
#endif
    {
        test();
        test();
        test();
#ifndef FIX_2584_TD_SM_ISSUE
        IF( ( LT_16( sts[0]->old_corr_fx, CORR_THRES_FX_Q15 ) && LT_16( sts[1]->old_corr_fx, CORR_THRES_FX_Q15 ) ) ||
            ( LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q21 - Q24 ), RMS_MIN2_FX_Q21 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q21 - Q24 ), RMS_MIN2_FX_Q21 ) ) )
#else
        IF( ( LT_16( sts[0]->old_corr_fx, CORR_THRES_FX_Q15 ) && LT_16( sts[1]->old_corr_fx, CORR_THRES_FX_Q15 ) ) ||
            ( LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q21 - Q16 ), RMS_MIN2_FX_Q21 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q21 - Q16 ), RMS_MIN2_FX_Q21 ) ) )
#endif
        {
            side_can_change = 1;
            move16();
@@ -1612,13 +1594,8 @@ static Word16 stereo_tdm_ener_analysis_SM_fx(
    test();
    test();
    test();
#ifndef FIX_2584_TD_SM_ISSUE
    IF( ( LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q21 - Q24 ), RMS_MIN2_FX_Q21 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q20 /* adjusted for 2 in RHS */ - Q24 ), RMS_MIN2_FX_Q21 ) ) ||
        ( LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q21 - Q24 ), RMS_MIN2_FX_Q21 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q20 /* adjusted for 2 in RHS */ - Q24 ), RMS_MIN2_FX_Q21 ) ) ) /* Q21 */
#else
    IF( ( LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q21 - Q16 ), RMS_MIN2_FX_Q21 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q20 /* adjusted for 2 in RHS */ - Q16 ), RMS_MIN2_FX_Q21 ) ) ||
        ( LE_32( L_shl( hStereoTD->tdm_lt_rms_R_SM_fx, Q21 - Q16 ), RMS_MIN2_FX_Q21 ) && LE_32( L_shl( hStereoTD->tdm_lt_rms_L_SM_fx, Q20 /* adjusted for 2 in RHS */ - Q16 ), RMS_MIN2_FX_Q21 ) ) ) /* Q21 */
#endif
    {
        test();
        test();