Commit 6a292e48 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

fixed EVS path

parent 1f213c90
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@
#define HARMONIZE_2553_TonalConceal_Init                /* FhG: Harmonize TonalMDCTConceal_Init with its ivas derivate */
#define HARMONIZE_2553_TonalConceal_SaveFreqSignal      /* FhG: Harmonize TonalConceal_SaveFreqSignal with its ivas derivate */
#define HARMONIZE_2553_TonalConceal_SaveTimeSignal      /* FhG: Harmonize TonalConceal_SaveTimeSignal with its ivas derivate */
//#define HARMONIZE_2583_open_decoder_LPD             /* FhG: harmonize open_decoder_LPD between EVS and IVAS versions */
#define HARMONIZE_2583_open_decoder_LPD             /* FhG: harmonize open_decoder_LPD between EVS and IVAS versions */

/* #################### End BE switches ################################## */

+24 −15
Original line number Diff line number Diff line
@@ -1185,9 +1185,6 @@ void open_decoder_LPD_ivas_fx(
        move16();
    }
    st->bits_frame = extract_l( L_shr( Mpy_32_16_1( L_shl( st->total_brate, 1 ), 20972 ), 6 ) ); /* 20972 = 0.01 * 64 * 32768 */
                                                                                                 // assert(FSCALE_DENOM == 512);
                                                                                                 // assert(st->fscale == 2 * st->L_frame); /* this assumption is true if operated in 20ms frames with FSCALE_DENOM == 512, which is the current default */
                                                                                                 // assert(st->bits_frame == (int16_t)(((float)st->L_frame / (float)st->fscale) * (float)FSCALE_DENOM / 128.0f * (float)total_brate / 100.0f + 0.49f));
    move16();
#ifdef HARMONIZE_2583_open_decoder_LPD
    IF( EQ_16( st->element_mode, EVS_MONO ) )
@@ -1257,11 +1254,9 @@ void open_decoder_LPD_ivas_fx(
        move16();
    }

    st->inv_gamma = GAMMA1_INV;
    move16();
    test();

#ifdef HARMONIZE_2583_open_decoder_LPD
    /*TODO: CHECK THIS*/
    IF( EQ_32( st->sr_core, INT_FS_16k ) )
    {
        st->gamma = GAMMA16k;
@@ -1273,6 +1268,8 @@ void open_decoder_LPD_ivas_fx(
    {
        st->gamma = GAMMA1;
        move16();
        st->inv_gamma = GAMMA1_INV;
        move16();
    }
#else
    IF( EQ_32( st->sr_core, INT_FS_16k ) )
@@ -1293,6 +1290,8 @@ void open_decoder_LPD_ivas_fx(
    {
        st->gamma = GAMMA1;
        move16();
        st->inv_gamma = GAMMA1_INV;
        move16();
    }
#endif

@@ -1381,14 +1380,23 @@ void open_decoder_LPD_ivas_fx(
            IF( EQ_16( st->element_mode, EVS_MONO ) )
            {
                set16_fx( hTcxDec->old_syn_Overl, 0, shr( L_FRAME32k, 1 ) ); /* hTcxDec->Q_syn_Overl_TDACFB */

                set16_fx( hTcxDec->syn_Overl_TDAC, 0, shr( L_FRAME32k, 1 ) );    /* hTcxDec->Q_syn_Overl_TDAC */
                set16_fx( hTcxDec->syn_Overl_TDACFB, 0, shr( L_FRAME_MAX, 1 ) ); /* hTcxDec->Q_syn_Overl_TDACFB */

                set16_fx( hTcxDec->syn_Overl, 0, shr( L_FRAME32k, 1 ) ); /* hTcxDec->Q_syn_Overl */

                set16_fx( hTcxDec->syn_OverlFB, 0, L_FRAME_MAX / 2 );      /* Qx */
                set16_fx( hTcxDec->old_synth, 0, OLD_SYNTH_INTERNAL_DEC ); /* hTcxDec->q_old_synth */
                hTcxDec->q_old_synth = 0;
                move16();
                set16_fx( hTcxDec->synth_history_fx, 0, add( L_PROT48k, L_FRAME_MAX ) ); /* hTcxDec->q_synth_history_fx */
                hTcxDec->q_synth_history_fx = 0;
                move16();
            }
            ELSE
            {
                reset_tcx_overl_buf_fx( st->hTcxDec );
            }
                set16_fx( hTcxDec->syn_OverlFB, 0, L_FRAME_MAX / 2 );      /* Qx */
                set16_fx( hTcxDec->old_synth, 0, OLD_SYNTH_INTERNAL_DEC ); /* hTcxDec->q_old_synth */
                hTcxDec->q_old_synth = 0;
@@ -1396,6 +1404,7 @@ void open_decoder_LPD_ivas_fx(
                set16_fx( hTcxDec->synth_history_fx, 0, L_PROT48k + L_FRAME_MAX ); /* hTcxDec->q_synth_history_fx */
                hTcxDec->q_synth_history_fx = 0;
                move16();
            }
#else
            reset_tcx_overl_buf_fx( st->hTcxDec );
            set16_fx( hTcxDec->syn_OverlFB, 0, L_FRAME_MAX / 2 );      /* Qx */