Commit fef3281d authored by brownstef's avatar brownstef
Browse files

Merge branch 'Fix-368-review-bitrate-range-for-dtx' into 'main'

[Non-BE] Fix for issue#368 in SBA

See merge request !591
parents b32873b6 ec7259e4
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@
#define FIX_SP2A                                        /* VA: Issue 412: Adjust threshold for the S_p2a feature in the tonal detector */
#define FIX_413_SBA_DTX                                 /* Dlb: Fix for issue 413, SBA DTX CNG in 2TC mode*/
#define FIX_417_TD_DECORR_BRATE_SW                      /* VA: Issue 417: fix incorrect use of TD decorrelator in bitrate switching */
#define FIX_368_SBA_MODE                                /* Dlb: Fix for issue 368 */
#define FIX_427_MAXIMUM_S_INDEX                         /* VA: issue 427: fix return index of function maximum_s() */
#define FIX_431_PARAMMC_PLC_INTERPOLATOR                /* FhG: Issue 431: fix missing interpolator reset for ParamMC PCL */
#define FIX_391_SBA                                     /* Dlb: Fix for issue 391 for SBA */
+6 −6
Original line number Diff line number Diff line
@@ -64,8 +64,11 @@
#define LTE_VAR -4.0f

#define MAX_BRATE_DTX_EVS ACELP_24k40 /* maximum bitrate to which the default DTX is applied in EVS; otherwise DTX is applied only in silence */
#ifndef FIX_368_SBA_MODE
#define MAX_BRATE_DTX_IVAS IVAS_64k /* maximum bitrate to which the default DTX is applied in IVAS; otherwise DTX is applied only in silence */

#else
#define MAX_BRATE_DTX_IVAS IVAS_80k /* maximum bitrate to which the default DTX is applied in IVAS; otherwise DTX is applied only in silence */
#endif
/*-------------------------------------------------------------------*
 * Local function prototypes
 *-------------------------------------------------------------------*/
@@ -86,9 +89,7 @@ void dtx(
)
{
    float alpha;

    DTX_ENC_HANDLE hDtxEnc = st->hDtxEnc;

    int16_t last_br_cng_flag, last_br_flag, br_dtx_flag;
    if ( st->dtx_sce_sba != 0 )
    {
@@ -99,7 +100,6 @@ void dtx(
    else
    {
        last_br_cng_flag = st->last_total_brate_cng <= MAX_BRATE_DTX_EVS || st->lp_noise < 15 || ( st->element_mode == IVAS_SCE && st->last_total_brate_cng <= MAX_BRATE_DTX_IVAS );

        last_br_flag = st->last_total_brate <= MAX_BRATE_DTX_EVS || st->lp_noise < 15 || ( st->element_mode == IVAS_SCE && st->last_total_brate <= MAX_BRATE_DTX_IVAS );
        br_dtx_flag = 0;
    }
+0 −1
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ ivas_error ivas_cpe_enc(
    hCPE = st_ivas->hCPE[cpe_id];
    sts = hCPE->hCoreCoder;
    hEncoderConfig = st_ivas->hEncoderConfig;

    max_bwidth = hEncoderConfig->max_bwidth;
    ivas_format = hEncoderConfig->ivas_format;
    input_Fs = hEncoderConfig->input_Fs;
+0 −2
Original line number Diff line number Diff line
@@ -430,9 +430,7 @@ ivas_error front_vad_spar(

        noise_est_down( fr_bands[0], hFrontVad->hNoiseEst->bckr, tmpN, tmpE, st->min_band, st->max_band, &hFrontVad->hNoiseEst->totalNoise, Etot[0], &hFrontVad->hNoiseEst->Etot_last, &hFrontVad->hNoiseEst->Etot_v_h2 );
        corr_shift = correlation_shift( hFrontVad->hNoiseEst->totalNoise );

        dtx( st, hEncoderConfig->ivas_total_brate, vad_flag_dtx[0], inp_12k8 );

        /* linear prediction analysis */
        alw_pitch_lag_12k8[0] = st->old_pitch_la;
        alw_pitch_lag_12k8[1] = st->old_pitch_la;
+0 −1
Original line number Diff line number Diff line
@@ -254,7 +254,6 @@ void pre_proc(
     * Select SID or FRAME_NO_DATA frame if DTX enabled
     *-----------------------------------------------------------------*/
    dtx( st, -1, vad_flag_dtx, inp_12k8 );

    /*----------------------------------------------------------------*
     * Adjust FD-CNG Noise Estimator
     *----------------------------------------------------------------*/