Commit ad92c9b3 authored by vaclav's avatar vaclav
Browse files

fix dtx_fx()

parent e0258465
Loading
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -82,6 +82,19 @@ void dtx_ivas_fx(
    TD_CNG_ENC_HANDLE hTdCngEnc = st_fx->hTdCngEnc;
    Word16 last_br_cng_flag, last_br_flag, br_dtx_flag;
    Word32 total_brate_ref;
#ifdef HARM_PREPROC
    Word16 flag_lp_noise;

    IF( st_fx->element_mode == EVS_MONO )
    {
        flag_lp_noise = LT_16( st_fx->lp_noise_fx, DTX_THR * 256 );
    }
    ELSE
    {
        flag_lp_noise = LT_32( ( st_fx->lp_noise_32fx ), DTX_THR * 16777216 );
    }
    move16();
#endif

    total_brate_ref = st_fx->total_brate;
    move32();
@@ -98,7 +111,11 @@ void dtx_ivas_fx(
        test();
        test();
        test();
#ifdef HARM_PREPROC
        last_br_cng_flag = LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_EVS ) || flag_lp_noise || ( EQ_16( st_fx->element_mode, IVAS_SCE ) && LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_IVAS ) );
#else
        last_br_cng_flag = LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_EVS ) || LT_32( ( st_fx->lp_noise_32fx ), DTX_THR * 16777216 ) || ( EQ_16( st_fx->element_mode, IVAS_SCE ) && LE_32( st_fx->last_total_brate_cng, MAX_BRATE_DTX_IVAS ) );
#endif

        test();
        test();
@@ -106,7 +123,11 @@ void dtx_ivas_fx(
        test();
        last_br_flag = ( st_fx->element_mode == EVS_MONO && LE_32( st_fx->last_total_brate, MAX_BRATE_DTX_EVS ) ) ||
                       ( st_fx->element_mode != EVS_MONO && LE_32( last_ivas_total_brate, MAX_BRATE_DTX_IVAS ) ) ||
#ifdef HARM_PREPROC
                       flag_lp_noise;
#else
                       LT_32( ( st_fx->lp_noise_32fx ), DTX_THR * 16777216 );
#endif
    }

    /* Initialization */
@@ -221,7 +242,11 @@ void dtx_ivas_fx(
        test();
        br_dtx_flag = ( ( st_fx->element_mode == EVS_MONO ) && LE_32( st_fx->total_brate, MAX_BRATE_DTX_EVS ) ) ||
                      ( ( st_fx->element_mode != EVS_MONO ) && LE_32( ivas_total_brate, MAX_BRATE_DTX_IVAS ) ) ||
#ifdef HARM_PREPROC
                      flag_lp_noise;
#else
                      LT_16( extract_h( st_fx->lp_noise_32fx ), DTX_THR * 256 );
#endif
    }

    test();
+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ void dtx_ivas_fx(
    const Word32 ivas_total_brate,      /* i  : IVAS total bitrate                       Q0*/
    const Word16 vad,                   /* i  : vad flag for DTX                         Q0*/
    const Word16 speech[],              /* i  : Pointer to the speech frame        Q_speech*/
    Word16 Q_speech                     /* i  : Q factor for speech                        */
    const Word16 Q_speech               /* i  : Q factor for speech                        */
);

Word16 dtx_hangover_addition_fx(