Commit 3305e9d2 authored by eichenseer's avatar eichenseer
Browse files

Accepted PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC (part of PARAM_ISM_DTX_CNG).

parent 143eadea
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -157,7 +157,6 @@

#define PARAM_ISM_DTX_CNG                               /* Support of DTX/CNG for Param-ISM, includes updates */ 
#ifdef PARAM_ISM_DTX_CNG
#define PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC              /* Patch to estimate noise at decoder, includes USE_NOISE_EST_FROM_CORE_PARAM_ISM_DTX */
// choose one of the following:
//#define TMP_FIX                                         /* set cng_type to FD_CNG, quick hack; TODO: move init to correct place */
#define TMP_FIX3                                        /* cng_type here could work, seems to cause no BE issues */
+5 −7
Original line number Diff line number Diff line
@@ -512,7 +512,7 @@ ivas_error acelp_core_dec(
            }
            else
            {
#ifdef PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC
#ifdef PARAM_ISM_DTX_CNG
                if( st->core_brate == SID_2k40 && st->element_mode != IVAS_CPE_MDCT && st->read_sid_info )
#else
                if ( st->core_brate == SID_2k40 && st->element_mode != IVAS_CPE_MDCT )
@@ -532,11 +532,9 @@ ivas_error acelp_core_dec(
                    }
                    ApplyFdCng( syn, NULL, realBuffer, imagBuffer, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) );
                }
#ifdef PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC
                /* TODO: condition missing to do this only for param ism? */ 
                /* esr: use cng_paramISM_flag here? */
                // if (!st->read_sid_info)
                if (!st->read_sid_info && st->cng_paramISM_flag)
#ifdef PARAM_ISM_DTX_CNG
                if (!st->read_sid_info)
                // if (!st->read_sid_info && st->cng_paramISM_flag) /* read_sid_info can only be 0 in ParamISM mode */
                {
                    float noise_lvl_highest;
                    
@@ -1133,7 +1131,7 @@ ivas_error acelp_core_dec(
                st->lp_noise = st->hFdCngDec->lp_noise;
            }

#ifdef PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC
#ifdef PARAM_ISM_DTX_CNG
            if (st->element_mode != IVAS_CPE_TD && !st->cng_paramISM_flag)
#else
            if ( st->element_mode != IVAS_CPE_TD )
+0 −2
Original line number Diff line number Diff line
@@ -745,10 +745,8 @@ ivas_error init_decoder(
    st->cng_sba_flag = 0;
#ifdef PARAM_ISM_DTX_CNG
    st->cng_paramISM_flag = 0;
#ifdef PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC
    st->read_sid_info = 1;  /* by default read the sid info from bitstream */
#endif 
#endif 


    return error;
+0 −6
Original line number Diff line number Diff line
@@ -149,12 +149,6 @@ ivas_error ivas_dec(
            {
                ivas_param_ism_metadata_dtx_dec(st_ivas);
                nb_bits_metadata[1] = nb_bits_metadata[0];
#ifndef PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC
                for (n = 0; n < st_ivas->nchan_transport; n++)
                {
                    st_ivas->hSCE[n]->hCoreCoder[0]->cng_paramISM_flag = 1;
                }
#endif 
            }
#endif
        }
+1 −3
Original line number Diff line number Diff line
@@ -1461,10 +1461,8 @@ void ivas_param_ism_metadata_dtx_dec(
    /* read the noisy speech flag */
    hParamIsm->flag_noisy_speech = get_next_indice( st0, 1 );

#ifdef PARAM_ISM_DTX_CNG_EST_RES_SPEC_DEC
    /* write sce id */
    /* read sce id */
    hParamIsm->sce_id_dtx = get_next_indice( st0, 1 );
#endif

    /* get the DOA'S */
    for ( i = 0; i < hParamIsm->num_obj; i++ )
Loading