Commit 8cf2978c authored by emerit's avatar emerit
Browse files

fix DTX CNG

parent 157f3b8e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@
#ifdef ISM_NO_DIEGETIC_PAN
#define ISM_MAX_NO_DIEGETIC_PAN_DIFF_IDX ( ISM_NO_DIEGETIC_PAN_NBITS - 1 /*zero*/ - 1 /*sign*/ )
#endif
#define ISM_MAX_RADIUS_DIFF_IDX ( ISM_RADIUS_NBITS - 1 /*zero*/ - 1 /*sign*/ )

#define ISM_FEC_MAX 10

@@ -273,7 +272,14 @@ ivas_error ivas_ism_metadata_enc(
        else if ( ism_mode == ISM_MODE_DISC )
        {
#ifdef DISCRETE_ISM_DTX_CNG
#ifdef ISM_NO_DIEGETIC_PAN
            if ( ( localVAD[ch] == 0 ) && hSCE[ch]->hCoreCoder[0]->lp_noise <= 10 )
            {
                hIsmMeta[ch]->ism_metadata_flag = 0;
            }
#else
            hIsmMeta[ch]->ism_metadata_flag = localVAD[ch] || hSCE[ch]->hCoreCoder[0]->lp_noise > 10;
#endif
#else
            /* In case of low level noise for low bitrate inactive frames, do not sent metadata */
            if ( localVAD[ch] == 0 && !( hSCE[ch]->hCoreCoder[0]->tcxonly ) && ( hSCE[ch]->hCoreCoder[0]->lp_noise <= 10 ) )