diff --git a/lib_com/options.h b/lib_com/options.h index c13b959e5fd33512a5e4f44c90e1d4bd6f2a81e9..c454e94f5d334d1f050c13ebb10b9374013e8904 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -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 */ diff --git a/lib_enc/dtx.c b/lib_enc/dtx.c index c99a8faf286fdd9f87c0acfd9ecb2a66dcee6162..b414347dcb810e394678af03ef4b7587e85ada1f 100644 --- a/lib_enc/dtx.c +++ b/lib_enc/dtx.c @@ -63,9 +63,12 @@ #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 */ -#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 */ - +#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; } diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index 72a737e64bc56b161413160ca26820f02fad947d..b60f8be45b3807ced769a80dbe65b106df875963 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -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; diff --git a/lib_enc/ivas_front_vad.c b/lib_enc/ivas_front_vad.c index be476b1244c1bd897f14d76ac2ac4879e106e3ff..3810df1de9b28e7e949841fec3c6baac389da498 100644 --- a/lib_enc/ivas_front_vad.c +++ b/lib_enc/ivas_front_vad.c @@ -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; diff --git a/lib_enc/pre_proc.c b/lib_enc/pre_proc.c index 4c4bf686749e22177ccd728598b50c398a29a09d..82436a7dfccfe66ee5927de25526545248d559bd 100644 --- a/lib_enc/pre_proc.c +++ b/lib_enc/pre_proc.c @@ -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 *----------------------------------------------------------------*/