Commit 0400fc0f authored by Fabian Bauer's avatar Fabian Bauer
Browse files

fix condition, cleanup for easier review

parent 430a265e
Loading
Loading
Loading
Loading
Loading
+27 −19
Original line number Diff line number Diff line
@@ -965,7 +965,6 @@ void init_coder_ace_plus_ivas_fx(
    const Word16 MCT_flag          /* i  : hMCT handle allocated (1) or not (0)   */
#endif
)

{
    TCX_ENC_HANDLE hTcxEnc = st->hTcxEnc;
    Word16 L_frame_old; /*keep old frame size for switching */
@@ -1006,7 +1005,7 @@ void init_coder_ace_plus_ivas_fx(
        hTcxEnc->L_frameTCX = extract_l( Mult_32_16( st->input_Fs, INV_FRAME_PER_SEC_Q15 ) );
        move16();
#ifdef HARMONIZE_2567_init_coder_ace_plus
        IF( st->ini_frame == 0 && GT_16( st->element_mode, EVS_MONO ) )
        IF( ( st->ini_frame == 0 ) && GT_16( st->element_mode, EVS_MONO ) )
#else
        IF( st->ini_frame == 0 )
#endif
@@ -1026,7 +1025,7 @@ void init_coder_ace_plus_ivas_fx(
    test();
    test();
#ifdef HARMONIZE_2567_init_coder_ace_plus
    IF( ( st->element_mode == EVS_MONO && EQ_32( st->L_frame, L_FRAME16k ) && LE_32( st->total_brate, ACELP_32k ) ) )
    IF( ( ( st->element_mode == EVS_MONO ) && EQ_32( st->L_frame, L_FRAME16k ) && LE_32( st->total_brate, ACELP_32k ) ) || ( GT_16( st->element_mode, EVS_MONO ) && EQ_32( st->L_frame, L_FRAME16k ) && LE_32( st->total_brate, MAX_ACELP_BRATE ) ) )
#else
    IF( ( EQ_16( st->element_mode, EVS_MONO ) && EQ_32( st->L_frame, L_FRAME16k ) && LE_32( st->total_brate, ACELP_32k ) ) || ( GT_16( st->element_mode, EVS_MONO ) && EQ_32( st->L_frame, L_FRAME16k ) && LE_32( st->total_brate, MAX_ACELP_BRATE ) ) )
#endif
@@ -1192,11 +1191,11 @@ void init_coder_ace_plus_ivas_fx(
    }
    ELSE
    {
#endif
        init_sig_buffers_ivas_fx( st, L_frame_old, L_subfr, last_total_brate );
#ifdef HARMONIZE_2567_init_coder_ace_plus
    }
#else
    init_sig_buffers_ivas_fx( st, L_frame_old, L_subfr, last_total_brate );
#endif
    'ENDIF


    /* Initialize ACELP */
@@ -1207,31 +1206,39 @@ void init_coder_ace_plus_ivas_fx(
    }
    ELSE
    {
#ifdef NONBE_FIX_ISSUE_2518
        init_acelp_fx( st, L_frame_old, 0, last_total_brate );
#else
        init_acelp_fx( st, L_frame_old, 0, last_total_brate );
#endif
    }
#else
#ifdef NONBE_FIX_ISSUE_2518
        init_acelp_fx( st, L_frame_old, 0, last_total_brate );
#else
        init_acelp_fx( st, L_frame_old, 0, last_total_brate );
#endif
#ifdef HARMONIZE_2567_init_coder_ace_plus
    }
#endif


    if ( st->ini_frame == 0 )
    {
        st->tec_tfa = 0;
        move16();
    }

    IF( st->hTECEnc != NULL )
    {
        resetTecEnc_Fx( st->hTECEnc, st->tec_tfa );
    }

#ifdef HARMONIZE_2567_init_coder_ace_plus
    IF( EQ_16( st->element_mode, EVS_MONO ) )
    {
        if ( st->hTECEnc == NULL )
        {
            resetTecEnc_Fx( st->hTECEnc, 0 );
        }
        st->tec_tfa = 0;
        move16();
    }
#endif

    test();
    test();
    test();
@@ -1245,6 +1252,7 @@ void init_coder_ace_plus_ivas_fx(
        st->tec_tfa = 0;
        move16();
    }

    st->tec_flag = 0;
    move16();
    st->tfa_flag = 0;
@@ -1281,12 +1289,13 @@ void init_coder_ace_plus_ivas_fx(
    }
    ELSE
    {
#endif
        init_modes_ivas_fx( st, last_total_brate );
#ifdef HARMONIZE_2567_init_coder_ace_plus
    }
#else
    init_modes_ivas_fx( st, last_total_brate );
#endif


    /* Adaptive BPF */
#ifdef HARMONIZE_2567_init_coder_ace_plus
    IF( EQ_16( st->element_mode, EVS_MONO ) )
@@ -1304,12 +1313,11 @@ void init_coder_ace_plus_ivas_fx(
    }
    ELSE
    {
#endif
        set32_fx( st->mem_bpf_fx1, 0, 2 * L_FILT16k );
        set32_fx( st->mem_error_bpf_fx, 0, 2 * L_FILT16k );
#ifdef HARMONIZE_2567_init_coder_ace_plus
    }
#else
    set32_fx( st->mem_bpf_fx1, 0, 2 * L_FILT16k );
    set32_fx( st->mem_error_bpf_fx, 0, 2 * L_FILT16k );
#endif

    IF( st->ini_frame == 0 )