Commit 49653d6f authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '396-use-correct-bandwidth-in-ism-dtx-cng' into 'main'

[non-BE]Resolve "Use correct bandwidth in ISM DTX CNG"

See merge request !536
parents a79309f3 31baeb3f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@
#endif
#define DISABLE_ADAP_RES_COD_TMP                        /* temporary fix for IVAS-403, disables adaptive residual coding */
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define FIX_ISM_DTX_CNG_BWIDTH_ALT                      /* VA: issue 396 - alternative fix for bw changes on CNG frames in ISM DTX for objects that use the decoder-side noise estimation */

#define FIX_398_MASA_DIRECTION_ALIGNMENT                /* Nokia: Issue 398: in 2dir MASA, dynamically adjust directions to be consistent */
#define REND_DEBUGGING_REVISION                         /* VA: encapsulate rendering debugging options with DEBUGGING */
+4 −0
Original line number Diff line number Diff line
@@ -4500,6 +4500,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 )
#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
@@ -732,7 +732,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
    st->is_ism_format = 0;


Loading