Commit f51918fc authored by norvell's avatar norvell
Browse files

Merge branch 'main' into 2451-hq-core-harmonization-issue-classification-in-hq_ecu_fx

parents 1bc75593 398d808c
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@
#define HARMONIZE_2446_CON_TCX_FX                       /* FhG: basop issue: 2446 harmonization of function con_tcx_fx() */
#define FIX_BASOP_2478_HARM_ENC_PRM_HM                  /* FhG: basop issue 2478: harmonize enc_prm_hm() and enc_prm_hm_ivas_fx() */
#define FIX_2433_ARITH_OVERFLOW_IN_QMETA_ENC            /* Nokia: Fix to convert non-converted binary operations */
#define FIX_2455_HARMONIZE_generate_comfort_noise_enc /* FhG: harmonize generate_comfort_noise_enc and generate_comfort_noise_enc_ivas */
#define FIX_2455_HARMONIZE_configureFdCngEnc          /* FhG: harmonize generate_comfort_noise_enc and generate_comfort_noise_enc_ivas */

/* #################### End BE switches ################################## */

@@ -112,6 +114,7 @@
#define FIX_BASOP_REMOVE_SYNTH2_FX                      /* FhG: Replace 32bit olapBufferSynth2_fx with 16bit olapBufferSynth2 buffer */
#define FIX_BASOP_2451_HQ_FEC_SELECTOR                  /* Eri: Resolve basop issue 2451, wrong condition on env_stab_plc_fx */
#define FIX_FLOAT_1528_5MS_REND_ISM_META_DELAY_COMPENSATION  /* Nokia: float issue 1528: Fixes incorrect compensation for ISM metadata delay in 5ms TD rendering */
#define FIX_2398_PRECISSION_ORIENTATION_TRACKING        /* FhG: use refinement of Sqrt32 within certain functions*/
#define FIX_2462_PARCOR_FIX                             /* VA: issue 2462: Fix bug in calculating parcor coefficient in Calc_rc0_h() */

/* ##################### End NON-BE switches ########################### */
+2 −0
Original line number Diff line number Diff line
@@ -10051,11 +10051,13 @@ void core_coder_mode_switch_ivas_fx(
    const Word16 MCT_flag          /* i  : hMCT handle allocated (1) or not (0)*/
);

#ifndef FIX_2455_HARMONIZE_configureFdCngEnc
void configureFdCngEnc_ivas_fx(
    HANDLE_FD_CNG_ENC hFdCngEnc, /* i/o: Contains the variables related to the FD-based CNG process */
    const Word16 bwidth,         /* Q0 */
    const Word32 total_brate     /* Q0 */
);
#endif

void SetModeIndex_ivas_fx(
    Encoder_State *st,              /* i  : Encoder state                          */
+8 −1
Original line number Diff line number Diff line
@@ -366,8 +366,11 @@ ivas_error acelp_core_enc_fx(
                    st->hDtxEnc->last_CNG_L_frame = st->L_frame;
                    move16();
                }

#ifdef FIX_2455_HARMONIZE_generate_comfort_noise_enc
                generate_comfort_noise_enc_fx( st, Q_new, 1, st->element_mode );
#else
                generate_comfort_noise_enc_fx( st, Q_new, 1 );
#endif

                FdCng_exc( st->hFdCngEnc->hFdCngCom, &st->hDtxEnc->CNG_mode, st->L_frame, st->lsp_old_fx,
                           st->hDtxEnc->first_CNG, st->hDtxEnc->lspCNG_fx, Aq, lsp_new, lsf_new_fx, exc_fx, exc2_fx, bwe_exc_fx );
@@ -423,7 +426,11 @@ ivas_error acelp_core_enc_fx(
                st->hFdCngEnc->hFdCngCom->cngNoiseLevelExp = sub( st->hFdCngEnc->hFdCngCom->cngNoiseLevelExp, Q_cngNoise );
                move16();

#ifdef FIX_2455_HARMONIZE_generate_comfort_noise_enc
                generate_comfort_noise_enc_fx( st, Q_new, 1, st->element_mode );
#else
                generate_comfort_noise_enc_ivas_fx( st, Q_new, 1 );
#endif
                st->hTcxEnc->q_Txnq = Q_new;
                move16();

+4 −0
Original line number Diff line number Diff line
@@ -92,7 +92,11 @@ void enc_acelp_tcx_main_fx(
        }

        /* Generate Comfort Noise */
#ifdef FIX_2455_HARMONIZE_generate_comfort_noise_enc
        generate_comfort_noise_enc_fx( st, *Q_new, 1, EVS_MONO );
#else
        generate_comfort_noise_enc_fx( st, *Q_new, 1 );
#endif

        /* Update Core Encoder */
        core_encode_update_cng_fx( st, st->hFdCngEnc->hFdCngCom->timeDomainBuffer, st->hFdCngEnc->hFdCngCom->A_cng, Aw, *Q_new, *shift );
+51 −3
Original line number Diff line number Diff line
@@ -159,11 +159,20 @@ void initFdCngEnc_fx(
 * Configure FD_CNG                 *
 ************************************/

#ifdef FIX_2455_HARMONIZE_configureFdCngEnc
void configureFdCngEnc_fx(
    HANDLE_FD_CNG_ENC hsEnc,  /* i/o: Contains the variables related to the FD-based CNG process */
    const Word16 bandwidth,   /* i  : bandwidth    Q0 */
    const Word32 bitrate,     /* i  : bitrate Q0 */
    const Word16 element_mode /* i  : element mode Q0 */
)
#else
void configureFdCngEnc_fx(
    HANDLE_FD_CNG_ENC hsEnc, /* i/o: Contains the variables related to the FD-based CNG process */
    const Word16 bandwidth,  /* i  :   bandwidth    Q0*/
    const Word32 bitrate     /* Q0 */
)
#endif
{
    HANDLE_FD_CNG_COM hsCom = hsEnc->hFdCngCom;
    Word16 psizeDec[NPART];
@@ -265,12 +274,28 @@ void configureFdCngEnc_fx(
    SWITCH( hsCom->fftlen )
    {
        case 512:
#ifdef FIX_2455_HARMONIZE_configureFdCngEnc
            if ( GT_16( element_mode, EVS_MONO ) )
            {
                hsCom->fftSineTab_fx = NULL;
                hsCom->olapWinAna_fx = olapWinAna512_fx; /* Q30 */
                hsCom->olapWinSyn_fx = olapWinSyn256_fx; /* Q15 */
            }
#endif
            hsCom->fftlenShift = 8;
            move16();
            hsCom->fftlenFac = 32767 /*1.0 Q15*/;
            move16();
            BREAK;
        case 640:
#ifdef FIX_2455_HARMONIZE_configureFdCngEnc
            if ( GT_16( element_mode, EVS_MONO ) )
            {
                hsCom->fftSineTab_fx = fftSineTab640_fx; /* Q15 */
                hsCom->olapWinAna_fx = olapWinAna640_fx; /* Q30 */
                hsCom->olapWinSyn_fx = olapWinSyn320_fx; /* Q15 */
            }
#endif
            hsCom->fftlenShift = 9;
            move16();
            hsCom->fftlenFac = 20480 /*0.625 Q15*/;
@@ -288,6 +313,7 @@ void configureFdCngEnc_fx(
    return;
}

#ifndef FIX_2455_HARMONIZE_configureFdCngEnc
void configureFdCngEnc_ivas_fx(
    HANDLE_FD_CNG_ENC hFdCngEnc, /* i/o: Contains the variables related to the FD-based CNG process */
    const Word16 bwidth,         /* Q0 */
@@ -422,7 +448,7 @@ void configureFdCngEnc_ivas_fx(

    return;
}

#endif /*FIX_2455_HARMONIZE_configureFdCngEnc*/

/**************************************
 * Delete the instance of type FD_CNG *
@@ -1268,7 +1294,7 @@ void FdCng_encodeSID_fx(
    return;
}


#ifndef FIX_2455_HARMONIZE_generate_comfort_noise_enc
void generate_comfort_noise_enc_fx(
    Encoder_State *stcod,
    Word16 Q_new,
@@ -1651,12 +1677,20 @@ void generate_comfort_noise_enc_fx(

    return;
}
#endif


#ifdef FIX_2455_HARMONIZE_generate_comfort_noise_enc
void generate_comfort_noise_enc_fx(
    Encoder_State *stcod,
    Word16 Q_new,
    Word16 gen_exc,
    Word16 element_mode )
#else
void generate_comfort_noise_enc_ivas_fx(
    Encoder_State *stcod,
    Word16 Q_new,
    Word16 gen_exc )
#endif
{
    Word16 i, s, sn, cnt;
    Word16 startBand2;
@@ -1779,9 +1813,23 @@ void generate_comfort_noise_enc_ivas_fx(
    }

    /* Perform STFT synthesis */
#ifdef FIX_2455_HARMONIZE_generate_comfort_noise_enc
    IF( EQ_16( element_mode, EVS_MONO ) )
    {
        SynthesisSTFT( fftBuffer, fftBufferExp, timeDomainOutput, st->olapBufferSynth, st->olapWinSyn,
                       tcx_transition, st, gen_exc, &Q_new, -1, -1 );
    }
    ELSE
    {
        SynthesisSTFT_enc_ivas_fx( fftBuffer, fftBufferExp, timeDomainOutput, st->olapBufferSynth, st->olapWinSyn,
                                   tcx_transition, st, gen_exc, &Q_new, -1, -1 );
    }
    IF( ( ( hTdCngEnc != NULL ) && ( NE_16( element_mode, EVS_MONO ) ) ) || EQ_16( element_mode, EVS_MONO ) )
#else
    SynthesisSTFT_enc_ivas_fx( fftBuffer, fftBufferExp, timeDomainOutput, st->olapBufferSynth, st->olapWinSyn,
                               tcx_transition, st, gen_exc, &Q_new, -1, -1 );
    IF( hTdCngEnc != NULL )
#endif
    {
        Word32 Lener, att;
        Word16 exp;
Loading