Commit 6806869b authored by Manuel Jander's avatar Manuel Jander
Browse files

resolve merge conflict.

parents d6ebdec9 b95eb136
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -139,6 +139,8 @@
#define NONBE_FIX_2493_CHECK_EXTRACT_L_estDownmixGain_fx /* FhG: Fix extract_l overflow inside estDownmixGain_fx() */
#define FIX_2493_CHECK_EXTRACT_L_swb_pre_proc_fx_BE_EVS /* FhG: Keep EVS bitexact within the fix in swb_pre_proc_fx() */
#define NONBE_FIX_2493_EXTRACT_L_spectral_balancer_fx16 /* FhG: Fix extract_l overflow inside spectral_balancer_fx16() */
#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 */

/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -265,7 +265,11 @@ void FEC_scale_syn_fx(
                        ener_max = *lp_ener_FEC_max; /*Q0*/
                        move32();
                        test();
#ifdef FIX_2556_ALIGN_CONDITIONS
                        if ( ( LE_16( clas, VOICED_TRANSITION ) && element_mode > EVS_MONO ) || EQ_16( clas, VOICED_TRANSITION ) || ( GE_16( clas, INACTIVE_CLAS ) ) )
#else
                        if ( EQ_16( clas, VOICED_TRANSITION ) || ( GE_16( clas, INACTIVE_CLAS ) ) )
#endif
                        {
                            ener_max = *lp_ener_FEC_av; /*Q0*/
                            move32();
+4 −0
Original line number Diff line number Diff line
@@ -1838,7 +1838,11 @@ ivas_error core_switching_pre_dec_fx(
    {
        hHQ_core->pastpre = sub( hHQ_core->pastpre, 1 );
        move16();
#ifdef FIX_2556_ALIGN_CONDITIONS
        IF( hHQ_core->pastpre <= 0 )
#else
        IF( hHQ_core->pastpre < 0 )
#endif
        {
            reset_preecho_dec_fx( hHQ_core );
        }
+6 −3
Original line number Diff line number Diff line
@@ -182,9 +182,12 @@ void decod_unvoiced_fx(
        }
        voice_factors_fx[tmp_idx] = 0;
        move16();

#ifdef FIX_2556_ALIGN_CONDITIONS
        IF( st_fx->hBWE_TD != NULL )
#endif
        {
            interp_code_5over2_fx( &exc_fx[i_subfr_fx], &bwe_exc_fx[( ( i_subfr_fx * 2 * HIBND_ACB_L_FAC ) >> 1 )], L_SUBFR );

        }
        p_Aq_fx += ( M + 1 );
        pt_pitch_fx++;
        st_fx->tilt_code_dec_fx[tmp_idx] = st_fx->tilt_code_fx;
+27 −0
Original line number Diff line number Diff line
@@ -242,7 +242,11 @@ Word16 stereo_tdm_ener_analysis_fx(
    {
        test();
        test();
#ifdef FIX_2556_ALIGN_CONDITIONS
        if ( ( EQ_16( hCPE->hStereoClassif->lrtd_mode, 1 ) || EQ_16( hCPE->hStereoTD->prev_fr_LRTD_TD_dec, 1 ) ) && ( LT_32( L_add( L_sub( hCPE->element_brate, 50 * FRAMES_PER_SEC ), L_add( hCPE->brate_surplus, hCPE->brate_surplus ) ), IVAS_BRATE_OMASA_STEREO_SW_THR ) ) )
#else
        if ( ( EQ_16( hCPE->hStereoClassif->lrtd_mode, 1 ) || EQ_16( hCPE->hStereoTD->prev_fr_LRTD_TD_dec, 1 ) ) && ( LE_32( L_add( L_sub( hCPE->element_brate, 50 * FRAMES_PER_SEC ), L_add( hCPE->brate_surplus, hCPE->brate_surplus ) ), IVAS_BRATE_OMASA_STEREO_SW_THR ) ) )
#endif
        {
            hStereoTD->prev_fr_LRTD_TD_dec = 0;
            move16();
@@ -971,7 +975,11 @@ 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;
@@ -980,7 +988,11 @@ 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;
@@ -1573,14 +1585,24 @@ 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();
@@ -1590,8 +1612,13 @@ 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();
Loading