Commit 6d2d3bdf authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM

parent c469b1b3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@
#define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_MSVQ_Interpol_Tran_fx /* FhG: Fix saturation crash in MSVQ_Interpol_Tran_fx() */
#define NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT_FIX_2527    /* Fix crash from issue #2527 */
#define FIX_FLOAT_1539_G192_FORMAT_SWITCH               /* VA/Nokia: reintroduce format switching for g192 bitstreams */
#define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM           /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */
#define HARMONIZE_2499_CONFIGUREFDCNGDEC                /* FhG: basop issue 2499: harmonoize configureFdCngDec */
#define FIX_BASOP_2530_IVAS_DECISION_MAT                /* VA: Fix ambiguous usage of extract_l() */

+0 −4
Original line number Diff line number Diff line
@@ -7212,12 +7212,8 @@ ivas_error ppp_quarter_decoder_fx(
void open_decoder_LPD_fx(
    Decoder_State *st,
    const Word32 total_brate, /* Q0 */
#ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM
    const Word16 bwidth /* Q0 */
#else
    const Word16 bwidth, /* Q0 */
    const Word16 is_init /* i  : indicate call during initialization    */
#endif
);

void open_decoder_LPD_ivas_fx(
+0 −70
Original line number Diff line number Diff line
@@ -20,12 +20,8 @@
void open_decoder_LPD_fx(
    Decoder_State *st,
    const Word32 total_brate, /* Q0 */
#ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM
    const Word16 bwidth /* Q0 */
#else
    const Word16 bwidth, /* Q0 */
    const Word16 is_init /* i  : indicate call during initialization    */
#endif
)
{
    Word16 i;
@@ -211,7 +207,6 @@ void open_decoder_LPD_fx(
        set16_fx( hBWE_TD->cur_sub_Aq_fx, 0, M + 1 ); /* Q12 */
    }

#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM
    IF( st->hIGFDec != NULL )
    {
        test();
@@ -233,71 +228,6 @@ void open_decoder_LPD_fx(
    {
        resetTecDec_Fx( st->hTECDec );
    }
#else
    /*TCX config*/
    st->hTcxCfg->preemph_fac = st->preemph_fac;
    move16();
    st->hTcxCfg->tcx_mdct_window_length_old = st->hTcxCfg->tcx_mdct_window_length;
    move16();
    init_TCX_config( st->hTcxCfg, st->L_frame, st->fscale, hTcxDec->L_frameTCX, fscaleFB ); // TEMPORARY  should be rename to  init_TCX_config
    IF( st->ini_frame == 0 )
    {
        st->hTcxCfg->tcx_last_overlap_mode = st->hTcxCfg->tcx_curr_overlap_mode = ALDO_WINDOW;
        move16();
        move16();
    }

    /* TCX Offset */
    st->hTcxCfg->tcx_offset = shr( st->hTcxCfg->tcx_mdct_window_delay, 1 ); /* Q0 */
    move16();
    st->hTcxCfg->tcx_offsetFB = shr( st->hTcxCfg->tcx_mdct_window_delayFB, 1 ); /* Q0 */
    move16();

    /* Initialize FAC */
    st->hTcxCfg->lfacNext = sub( st->hTcxCfg->tcx_offset, shr( st->L_frame, 2 ) ); /* Q0 */
    move16();
    st->hTcxCfg->lfacNextFB = sub( st->hTcxCfg->tcx_offsetFB, shr( hTcxDec->L_frameTCX, 2 ) ); /* Q0 */
    move16();

    /* set number of coded lines */
    st->hTcxCfg->tcx_coded_lines = getNumTcxCodedLines( st->bwidth );
    move16();

    /* TNS in TCX */
    st->hTcxCfg->pCurrentTnsConfig = NULL;
    st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( st->total_brate, st->igf, st->element_mode );
    move16();

    IF( st->hTcxCfg->fIsTNSAllowed != 0 )
    {
        InitTnsConfigs_fx( st->bwidth, st->hTcxCfg->tcx_coded_lines, st->hTcxCfg->tnsConfig, st->hIGFDec->infoIGFStopFreq, st->total_brate, st->element_mode, 0 /*is_mct*/ );
    }
    /*Constraint for adaptive BPF, otherwise parameter estimation and post-processing not time aligned*/
    if ( st->tcxonly == 0 )
    {
        assert( 0 == ( st->hTcxCfg->lfacNext > 0 ? st->hTcxCfg->lfacNext : 0 ) );
    }

    IF( 1 ) // st->element_mode == EVS_MONO)
    {
        IF( st->hTECDec == NULL )
        {
            IF( ( st->hTECDec = (TEC_DEC_HANDLE) malloc( sizeof( TEC_DEC_DATA ) ) ) == NULL )
            {
                // return (IVAS_ERROR(IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TEC\n"));
                assert( 0 );
            }
        }
    }
    ELSE
    {
        st->hTECDec = NULL;
    }
    resetTecDec_Fx( st->hTECDec );

    /* Initialize decoder delay */

#endif

    if ( NE_16( st->element_mode, IVAS_SCE ) )
    {
+0 −4
Original line number Diff line number Diff line
@@ -89,11 +89,7 @@ void mode_switch_decoder_LPD_fx(
    test();
    IF( NE_16( fscale, st->fscale ) || ( switchWB != 0 ) || ( bSwitchFromAmrwbIO != 0 ) || EQ_16( st->last_codec_mode, MODE1 ) || st->force_lpd_reset )
    {
#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM
        open_decoder_LPD_fx( st, total_brate, bwidth, 0 );
#else
        open_decoder_LPD_fx( st, total_brate, bwidth );
#endif
    }
    ELSE
    {
+0 −4
Original line number Diff line number Diff line
@@ -881,11 +881,7 @@ ivas_error init_decoder_fx(
    /* Init Decoder */
    IF( st_fx->element_mode == EVS_MONO )
    {
#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM
        open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth, 1 );
#else
        open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth );
#endif
    }
    ELSE
    {