Commit 72c43a3b authored by Vidhya V P's avatar Vidhya V P
Browse files

Fix for the assertion error

[x] Applied fix for the assertion error when DTX and SBA BR switching
parent 67925149
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -225,6 +225,10 @@ ivas_error pre_proc_front_ivas(
    const int16_t front_vad_dtx_flag,                           /* i  : front-VAD DTX flag to overwrite VAD decision*/
    const int32_t ivas_total_brate,                             /* i  : IVAS total bitrate                         */
    const int16_t ivas_format                                   /* i  : IVAS format                                */
#ifdef SBA_BR_SWITCHING_RECONFIG
    ,
    const int16_t sba_dtx_init_flag
#endif
);

ivas_error pre_proc_ivas(
+4 −0
Original line number Diff line number Diff line
@@ -3861,6 +3861,10 @@ void dtx(
    const int32_t ivas_total_brate, /* i  : IVAS total bitrate                */
    const int16_t vad,              /* i  : VAD flag for DTX                            */
    const float speech[]            /* i  : Pointer to the speech frame                 */
#ifdef SBA_BR_SWITCHING_RECONFIG
    ,
    const int16_t sba_dtx_init_flag
#endif
);

void dtx_hangover_control(
+4 −2
Original line number Diff line number Diff line
@@ -310,9 +310,11 @@ void amr_wb_enc(
    {
        st->fd_cng_reset_flag = 0;
    }

#ifdef SBA_BR_SWITCHING_RECONFIG
    dtx( st, -1, vad_flag_dtx, inp, 0 );
#else
    dtx( st, -1, vad_flag_dtx, inp );

#endif
    /*----------------------------------------------------------------*
     * Noise energy down-ward update and total noise energy estimation
     * Long-term energies and relative frame energy updates
+14 −1
Original line number Diff line number Diff line
@@ -83,6 +83,10 @@ void dtx(
    const int32_t ivas_total_brate, /* i  : IVAS total bitrate                 */
    const int16_t vad,              /* i  : VAD flag for DTX                   */
    const float speech[]            /* i  : Pointer to the speech frame        */
#ifdef SBA_BR_SWITCHING_RECONFIG
    ,
    const int16_t sba_dtx_init_flag
#endif
)
{
    float alpha;
@@ -90,8 +94,17 @@ void dtx(
    DTX_ENC_HANDLE hDtxEnc = st->hDtxEnc;

    int16_t last_br_cng_flag, last_br_flag, br_dtx_flag;

#ifdef SBA_BR_SWITCHING_RECONFIG
    if ( sba_dtx_init_flag )
    {
        last_br_cng_flag = 0;
        last_br_flag = 0;
        br_dtx_flag = 0;
    }
    else if ( st->dtx_sce_sba != 0 )
#else
    if ( st->dtx_sce_sba != 0 )
#endif
    {
        last_br_cng_flag = 1;
        last_br_flag = 1;
+10 −2
Original line number Diff line number Diff line
@@ -108,7 +108,12 @@ ivas_error pre_proc_front_ivas(
    const int16_t force_front_vad,                             /* i  : flag to force VAD decision               */
    const int16_t front_vad_dtx_flag,                          /* i  : front-VAD DTX flag to overwrite VAD decision*/
    const int32_t ivas_total_brate,                            /* i  : IVAS total bitrate - for setting the DTX */
    const int16_t ivas_format )
    const int16_t ivas_format
#ifdef SBA_BR_SWITCHING_RECONFIG
    ,
    const int16_t sba_dtx_init_flag
#endif
)
{
    float *inp_12k8, *new_inp_12k8;        /* pointers to current frame and new data       */
    float *wsp;                            /* weighted input signal buffer                 */
@@ -553,8 +558,11 @@ ivas_error pre_proc_front_ivas(
    {
        st->cng_type = LP_CNG;
    }

#ifdef SBA_BR_SWITCHING_RECONFIG
    dtx( st, ivas_total_brate, *vad_flag_dtx, inp_12k8, sba_dtx_init_flag );
#else
    dtx( st, ivas_total_brate, *vad_flag_dtx, inp_12k8 );
#endif

    if ( hCPE != NULL && hCPE->hStereoDft != NULL && st->core_brate == SID_2k40 )
    {
Loading