Commit 0e9875bd authored by JÜRGEN Gerstacker's avatar JÜRGEN Gerstacker
Browse files

FIX 2385, getTcxonly_ivas_fx()

parent ae3fc3c5
Loading
Loading
Loading
Loading
Loading
+16 −22
Original line number Diff line number Diff line
@@ -186,16 +186,6 @@ Word16 getTcxonly_ivas_fx(
    Word16 tcxonly = 0;
    move16();
    Word32 temp_flag;
    if ( MCT_flag )
    {
        temp_flag = IVAS_32k;
        move32();
    }
    else
    {
        temp_flag = IVAS_48k;
        move32();
    }

    SWITCH( element_mode )
    {
@@ -207,24 +197,19 @@ Word16 getTcxonly_ivas_fx(
            }
            BREAK;
        case IVAS_SCE:
            temp_flag = MAX_ACELP_BRATE;
            move32();
            if ( is_ism_format )
            {
                if ( GT_32( total_brate, MAX_ACELP_BRATE_ISM ) )
                {
                    tcxonly = 1;
                    move16();
                }
                temp_flag = MAX_ACELP_BRATE_ISM;
                move32();
            }
            else
            {
                if ( GT_32( total_brate, MAX_ACELP_BRATE ) )
            if ( GT_32( total_brate, temp_flag ) )
            {
                tcxonly = 1;
                move16();
            }
            }
            BREAK;

        case IVAS_CPE_DFT:
        case IVAS_CPE_TD:
            if ( GT_32( total_brate, MAX_ACELP_BRATE ) )
@@ -234,6 +219,13 @@ Word16 getTcxonly_ivas_fx(
            }
            BREAK;
        case IVAS_CPE_MDCT:
            temp_flag = IVAS_48k;
            move32();
            if ( MCT_flag )
            {
                temp_flag = IVAS_32k;
                move32();
            }
            if ( GE_32( total_brate, temp_flag ) )
            {
                tcxonly = 1;
@@ -261,6 +253,7 @@ Word16 getTcxonly(
    return tcxonly; /*Q0*/
}

#ifndef FIX_2385_GETTCXONLY
Word16 getTcxonly_fx(
    const Word16 element_mode, /* i  : IVAS element mode                    Q0*/
    const Word32 total_brate,  /* i  : total bitrate                        Q0*/
@@ -331,6 +324,7 @@ Word16 getTcxonly_fx(

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

/*-------------------------------------------------------------------*
 * getCtxHm()
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@
#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_1904_HARM_GSC_ENC                           /* VA: #1904 Harmonization of EVS and IVAS GSC code */
#define FIX_2388_INITTNSCONFIGURATION                   /* FhG: issue 2388 : harmonizing InitTnsConfiguration() function */
#define FIX_2385_GETTCXONLY                             /* FhG: issue 2385 : harmonizing getTcxonly_ivas_fx() and getTcxonly_ivas_fx() functions */
#define FIX_2397_COPY_AQ_MDCT_CORE_BFI                  /* FhG: prevent copying of uninit memory in MDCT stereo core if bfi is set */
#define HARMONIZE_TBE                                   /* VA: harmonize core-coder TBE function duplications */
#define FIX_2405_HARM_SMC_INIT                          /* VA, basop 2405, harmonisation of SMC init */
+4 −0
Original line number Diff line number Diff line
@@ -1184,7 +1184,11 @@ void open_decoder_LPD_ivas_fx(
        }
    }

#ifdef FIX_2385_GETTCXONLY
    st->tcxonly = getTcxonly_ivas_fx( st->element_mode, total_brate, MCT_flag, st->is_ism_format );
#else
    st->tcxonly = getTcxonly_fx( st->element_mode, total_brate, MCT_flag, st->is_ism_format );
#endif
    move16();

    /* the TD TCX PLC in MODE1 still runs with 80ms subframes */
+4 −0
Original line number Diff line number Diff line
@@ -119,7 +119,11 @@ void stereo_tcx_init_dec_fx(

    IF( EQ_16( st->element_mode, IVAS_SCE ) )
    {
#ifdef FIX_2385_GETTCXONLY
        st->tcxonly = getTcxonly_ivas_fx( st->element_mode, L_mult0( st->bits_frame_nominal, FRAMES_PER_SEC ), MCT_flag, st->is_ism_format ); /* Q0 */
#else
        st->tcxonly = getTcxonly_fx( st->element_mode, L_mult0( st->bits_frame_nominal, FRAMES_PER_SEC ), MCT_flag, st->is_ism_format ); /* Q0 */
#endif /* FIX_2385_GETTCXONLY */
        move16();

        /* LPC quantization */
+8 −0
Original line number Diff line number Diff line
@@ -255,7 +255,11 @@ void core_coder_mode_switch_ivas_fx(
        move16();
    }

#ifdef FIX_2385_GETTCXONLY
    tcxonly_tmp = getTcxonly_ivas_fx( st->element_mode, st->total_brate, MCT_flag, st->is_ism_format );
#else
    tcxonly_tmp = getTcxonly_fx( st->element_mode, st->total_brate, MCT_flag, st->is_ism_format );
#endif /* FIX_2385_GETTCXONLY */

    if ( NE_32( tcxonly_tmp, st->tcxonly ) )
    {
@@ -271,7 +275,11 @@ void core_coder_mode_switch_ivas_fx(
        move16();
        st->L_frame = extract_l( Mpy_32_32_r( sr_core, ONE_BY_FRAMES_PER_SEC_Q31 ) );

#ifdef FIX_2385_GETTCXONLY
        st->tcxonly = getTcxonly_ivas_fx( st->element_mode, st->total_brate, MCT_flag, st->is_ism_format );
#else
        st->tcxonly = getTcxonly_fx( st->element_mode, st->total_brate, MCT_flag, st->is_ism_format );
#endif /* FIX_2385_GETTCXONLY */
        move16();

        Word16 exp_tmp1 = 0;