Commit 7defce0b authored by vaclav's avatar vaclav
Browse files

get rid of parameter st->read_sid_info; under FIX_ISM_DTX_CNG_BWIDTH_ALT

parent c9464483
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4502,6 +4502,10 @@ ivas_error acelp_core_dec(
    const int16_t flag_sec_CNA,          /* i  : CNA flag for secondary channel      */
    const int16_t nchan_out,             /* i  : number of output channels           */
    STEREO_CNG_DEC_HANDLE hStereoCng     /* i  :  stereo CNG handle                  */
#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
    ,
    const int16_t read_sid_info /* i  : read SID info flag                  */
#endif
);

void bass_psfilter_init(
+13 −0
Original line number Diff line number Diff line
@@ -77,6 +77,10 @@ ivas_error acelp_core_dec(
    const int16_t flag_sec_CNA,          /* i  : CNA flag for secondary channel                                          */
    const int16_t nchan_out,             /* i  : number of output channels                                               */
    STEREO_CNG_DEC_HANDLE hStereoCng     /* i  : stereo CNG handle                                                       */
#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
    ,
    const int16_t read_sid_info /* i  : read SID info flag                                                      */
#endif
)
{
    float old_exc[L_EXC_DEC], *exc;                                              /* excitation signal buffer              */
@@ -512,7 +516,11 @@ ivas_error acelp_core_dec(
            }
            else
            {
#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
                if ( st->core_brate == SID_2k40 && st->element_mode != IVAS_CPE_MDCT && read_sid_info )
#else
                if ( st->core_brate == SID_2k40 && st->element_mode != IVAS_CPE_MDCT && st->read_sid_info )
#endif
                {
                    FdCng_decodeSID( st );
                    *sid_bw = 0;
@@ -528,8 +536,13 @@ ivas_error acelp_core_dec(
                    }
                    ApplyFdCng( syn, NULL, realBuffer, imagBuffer, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) );
                }

#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
                if ( !read_sid_info )
#else
                if ( !st->read_sid_info )
                // if (!st->read_sid_info && st->cng_ism_flag) /* read_sid_info can only be 0 in ParamISM mode */
#endif
                {
                    float noise_lvl_highest;

+4 −0
Original line number Diff line number Diff line
@@ -261,7 +261,11 @@ ivas_error evs_dec(
        if ( st->core == ACELP_CORE )
        {
            /* ACELP core decoder */
#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
            if ( ( error = acelp_core_dec( st, NULL, synth, NULL, bwe_exc_extended, voice_factors, old_syn_12k8_16k, sharpFlag, pitch_buf, &unbits, &sid_bw, NULL, NULL, NULL, 0, EVS_MONO, 0, 0, 1, NULL, 1 ) ) != IVAS_ERR_OK )
#else
            if ( ( error = acelp_core_dec( st, NULL, synth, NULL, bwe_exc_extended, voice_factors, old_syn_12k8_16k, sharpFlag, pitch_buf, &unbits, &sid_bw, NULL, NULL, NULL, 0, EVS_MONO, 0, 0, 1, NULL ) ) != IVAS_ERR_OK )
#endif
            {
                return error;
            }
+2 −0
Original line number Diff line number Diff line
@@ -739,7 +739,9 @@ ivas_error init_decoder(
    st->cna_dirac_flag = 0;
    st->cng_sba_flag = 0;
    st->cng_ism_flag = 0;
#ifndef FIX_ISM_DTX_CNG_BWIDTH_ALT
    st->read_sid_info = 1; /* by default read the sid info from bitstream */
#endif
#ifdef DISCRETE_ISM_DTX_CNG
    st->is_ism_format = 0;
#endif
+19 −0
Original line number Diff line number Diff line
@@ -90,6 +90,9 @@ ivas_error ivas_core_dec(
    int16_t use_cldfb_for_dft;
    float *p_output_mem;
    int16_t flag_sec_CNA;
#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
    int16_t read_sid_info;
#endif
    int16_t last_element_mode;
    int16_t nchan_out;
    float *save_hb_synth;
@@ -105,6 +108,9 @@ ivas_error ivas_core_dec(

    use_cldfb_for_dft = 0;
    tdm_LRTD_flag = -1;
#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
    read_sid_info = 1; /* read SID by default */
#endif

    if ( hSCE != NULL )
    {
@@ -116,6 +122,15 @@ ivas_error ivas_core_dec(
        hStereoTD = NULL;
        p_output_mem = NULL;
        nchan_out = 1;
#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
        if ( st_ivas != NULL && st_ivas->ivas_format == ISM_FORMAT )
        {
            if ( st_ivas->hISMDTX.sce_id_dtx != hSCE->sce_id )
            {
                read_sid_info = 0;
            }
        }
#endif
    }
    else
    {
@@ -332,7 +347,11 @@ ivas_error ivas_core_dec(
        if ( st->core == ACELP_CORE )
        {
            /* ACELP core decoder */
#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT
            if ( ( error = acelp_core_dec( st, output[n], synth[n], save_hb_synth, bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], sharpFlag[n], pitch_buf[n], &unbits[n], &sid_bw[n], hStereoTD, tdm_lspQ_PCh, tdm_lsfQ_PCh, use_cldfb_for_dft, last_element_mode, last_element_brate, flag_sec_CNA, nchan_out, hCPE == NULL ? NULL : hCPE->hStereoCng, read_sid_info ) ) != IVAS_ERR_OK )
#else
            if ( ( error = acelp_core_dec( st, output[n], synth[n], save_hb_synth, bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], sharpFlag[n], pitch_buf[n], &unbits[n], &sid_bw[n], hStereoTD, tdm_lspQ_PCh, tdm_lsfQ_PCh, use_cldfb_for_dft, last_element_mode, last_element_brate, flag_sec_CNA, nchan_out, hCPE == NULL ? NULL : hCPE->hStereoCng ) ) != IVAS_ERR_OK )
#endif
            {
                return error;
            }
Loading