Commit f5249812 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_2385_GETTCXONLY

parent 33c2396b
Loading
Loading
Loading
Loading
+0 −166
Original line number Diff line number Diff line
@@ -169,7 +169,6 @@ Word16 get_codec_mode(
    return codec_mode; /*Q0*/
}

#ifdef FIX_2385_GETTCXONLY
/*-------------------------------------------------------------------*
 * getTcxonly()
 *
@@ -236,171 +235,6 @@ Word16 getTcxonly_fx(

    return tcxonly; /*Q0*/
}
#else
/*-------------------------------------------------------------------*
 * getTcxonly_ivas()
 *
 *
 *-------------------------------------------------------------------*/

Word16 getTcxonly_ivas_fx(
    const Word16 element_mode, /* i  : IVAS element mode                    Q0*/
    const Word32 total_brate,  /* i  : total bitrate                        Q0*/
    const Word16 MCT_flag,     /* i  : hMCT handle allocated (1) or not (0) Q0*/
    const Word16 is_ism_format /* i  : flag indicating ISM format           Q0*/
)
{
    Word16 tcxonly = 0;
    move16();
    Word32 temp_flag;
    if ( MCT_flag )
    {
        temp_flag = IVAS_32k;
        move32();
    }
    else
    {
        temp_flag = IVAS_48k;
        move32();
    }

    SWITCH( element_mode )
    {
        case EVS_MONO:
            if ( GT_32( total_brate, ACELP_32k ) )
            {
                tcxonly = 1;
                move16();
            }
            BREAK;
        case IVAS_SCE:
            if ( is_ism_format )
            {
                if ( GT_32( total_brate, MAX_ACELP_BRATE_ISM ) )
                {
                    tcxonly = 1;
                    move16();
                }
            }
            else
            {
                if ( GT_32( total_brate, MAX_ACELP_BRATE ) )
                {
                    tcxonly = 1;
                    move16();
                }
            }
            BREAK;

        case IVAS_CPE_DFT:
        case IVAS_CPE_TD:
            if ( GT_32( total_brate, MAX_ACELP_BRATE ) )
            {
                tcxonly = 1;
                move16();
            }
            BREAK;
        case IVAS_CPE_MDCT:
            if ( GE_32( total_brate, temp_flag ) )
            {
                tcxonly = 1;
                move16();
            }
            BREAK;
    }

    return tcxonly; /*Q0*/
}
#endif /* FIX_2385_GETTCXONLY */
#ifndef FIX_2385_GETTCXONLY

Word16 getTcxonly(
    const Word32 total_brate /* i  : total bitrate                       */
)
{

    Word16 tcxonly;
    tcxonly = 0;
    move16();
    if ( GT_32( total_brate, 32000 ) )
    {
        tcxonly = 1;
        move16();
    }
    return tcxonly; /*Q0*/
}

Word16 getTcxonly_fx(
    const Word16 element_mode, /* i  : IVAS element mode                    Q0*/
    const Word32 total_brate,  /* i  : total bitrate                        Q0*/
    const Word16 MCT_flag,     /* i  : hMCT handle allocated (1) or not (0) Q0*/
    const Word16 is_ism_format /* i  : flag indicating ISM format           Q0*/
)
{
    Word16 tcxonly;
    tcxonly = 0;
    move16();

    SWITCH( element_mode )
    {
        case EVS_MONO:
            if ( GT_32( total_brate, ACELP_32k ) )
            {
                tcxonly = 1;
                move16();
            }
            BREAK;
        case IVAS_SCE:
            IF( is_ism_format )
            {
                if ( GT_32( total_brate, MAX_ACELP_BRATE_ISM ) )
                {
                    tcxonly = 1;
                    move16();
                }
            }
            ELSE
            {
                if ( GT_32( total_brate, MAX_ACELP_BRATE ) )
                {
                    tcxonly = 1;
                    move16();
                }
            }
            BREAK;

        case IVAS_CPE_DFT:
        case IVAS_CPE_TD:
            if ( GT_32( total_brate, MAX_ACELP_BRATE ) )
            {
                tcxonly = 1;
                move16();
            }
            BREAK;
        case IVAS_CPE_MDCT:
            IF( MCT_flag )
            {

                if ( GE_32( total_brate, IVAS_32k ) )
                {
                    tcxonly = 1;
                    move16();
                }
            }
            ELSE
            {
                if ( GE_32( total_brate, IVAS_48k ) )
                {
                    tcxonly = 1;
                    move16();
                }
            }
            BREAK;
    }

    return tcxonly; /*Q0*/
}
#endif /* FIX_2385_GETTCXONLY */

/*-------------------------------------------------------------------*
 * getCtxHm()
+0 −1
Original line number Diff line number Diff line
@@ -83,7 +83,6 @@
#define FIX_1990_SANITIZER_IN_REVERB_LOAD               /* Nokia: Fix issue part of issue 1990 by introducing missing free of structure - keep until #2059 is addressed */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_2385_GETTCXONLY                             /* FhG: issue 2385 : harmonizing getTcxonly_ivas_fx() and getTcxonly_ivas_fx() functions */
#define FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT /* FhG: remove unreachable code in ivas_osba_stereo_add_channels */
#define FIX_OUTPUT_FRAME                                /* VA: harmonize "output_frame" parameter usage to correspond to FLP */
#define HARMONIZE_ISSUE_2435_WRITETNSDATA               /* FhG basop 2435: Harmonize WriteTnsData*_fx(), EncodeTnsData*_fx() */
+0 −15
Original line number Diff line number Diff line
@@ -3692,12 +3692,6 @@ Word16 get_cng_mode(
Word16 get_codec_mode(
    const Word32 total_brate /* i  : total bitrate   */
);
#ifndef FIX_2385_GETTCXONLY

Word16 getTcxonly(
    const Word32 total_brate /* i  : total bitrate                       */
);
#endif

Word16 getTcxonly_fx(
    const Word16 element_mode, /* i  : IVAS element mode                   */
@@ -10157,15 +10151,6 @@ void configureFdCngEnc_ivas_fx(
    const Word16 bwidth,         /* Q0 */
    const Word32 total_brate     /* Q0 */
);
#ifndef FIX_2385_GETTCXONLY

Word16 getTcxonly_ivas_fx(
    const Word16 element_mode, /* i  : IVAS element mode                   */
    const Word32 total_brate,  /* i  : total bitrate                       */
    const Word16 MCT_flag,     /* i  : hMCT handle allocated (1) or not (0)*/
    const Word16 is_ism_format /* i  : flag indicating ISM format          */
);
#endif

void SetModeIndex_ivas_fx(
    Encoder_State *st,              /* i  : Encoder state                          */
+0 −9
Original line number Diff line number Diff line
@@ -32,12 +32,10 @@ void open_decoder_LPD_fx(
    TCX_LTP_DEC_HANDLE hTcxLtpDec;
    HQ_DEC_HANDLE hHQ_core;
    TCX_DEC_HANDLE hTcxDec;
#ifdef FIX_2385_GETTCXONLY
    Word16 MCT_flag;

    MCT_flag = 0; /* TODO: workaround for future harmonization of functions */
    move16();
#endif

    hBPF = st->hBPF;
    hBWE_TD = st->hBWE_TD;
@@ -74,14 +72,7 @@ void open_decoder_LPD_fx(
        move16();
    }

#ifdef FIX_2385_GETTCXONLY
    st->tcxonly = getTcxonly_fx( st->element_mode, total_brate, MCT_flag, st->is_ism_format );
#else
    st->tcxonly = getTcxonly(
        st->total_brate
        /*, st->is_ism_format Needed in the last version of float IVAS */
    );
#endif
    move16();

    /* the TD TCX PLC in MODE1 still runs with 80ms subframes */
+0 −4
Original line number Diff line number Diff line
@@ -252,11 +252,7 @@ ivas_error evs_dec_fx(
    test();
    test();
    test();
#ifdef FIX_2385_GETTCXONLY
    IF( st_fx->use_partial_copy && ( ( sub( st_fx->last_core, HQ_CORE ) == 0 ) || ( sub( st_fx->last_core, TCX_10_CORE ) == 0 ) || ( ( sub( st_fx->last_core, TCX_20_CORE ) == 0 ) && getTcxonly_fx( EVS_MONO, st_fx->last_total_brate, 0, 0 ) ) ) )
#else
    IF( st_fx->use_partial_copy && ( ( sub( st_fx->last_core, HQ_CORE ) == 0 ) || ( sub( st_fx->last_core, TCX_10_CORE ) == 0 ) || ( ( sub( st_fx->last_core, TCX_20_CORE ) == 0 ) && getTcxonly( /*EVS_MONO, */ st_fx->last_total_brate /*, 0, 0*/ ) ) ) )
#endif
    {
        st_fx->bfi = 1;
        move16();
Loading