Commit c9ed0dbf authored by vaclav's avatar vaclav
Browse files

Merge branch '1855-basop-PortFlpMr1611' into 'main'

[non-BE] [allow-regression] Port MR1611 from float to BASOP

Closes #1855

See merge request !2053
parents 81fd0d1d d3c538ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@
#define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART             /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */
#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR            /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */
#define NONBE_FIX_1052_SBA_EXT_FIX                      /* VA: SBA external output support fix - do not overwrite "output_config" parameter */
#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING       /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */

#define NONBE_1894_OSBA_SCALING                          /* FhG: do not scale OSBA inputs by 0.5 any more */
#define NONBE_1360_LFE_DELAY                           /* Dlb: LFE delay alignment when rendering in CLDFB domain*/
+6 −2
Original line number Diff line number Diff line
@@ -1373,6 +1373,7 @@ static void FindEmEs_fx(
    /* long-term estimate */
    *lt_es_em_fx = L_add( Mpy_32_32( 858993459, *lt_es_em_fx ), Mpy_32_32( 1288490188, es_em_fx ) ); /* Q24 */
    move32();

    return;
}

@@ -1422,13 +1423,17 @@ void stereo_cna_update_params_fx(
    {
        FindEmEs_fx( output_fx[0], output_fx[1], output_frame, &hCPE->lt_es_em_fx );


        hCPE->hStereoCng->first_SID_after_TD = 1; /* Q0 */
        move16();
        stereo_cng_compute_LRcorr_fx( hCPE, output_fx, output_frame, tdm_ratio_idx );
    }
    ELSE
    {
#ifdef NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING
        hFdCngDec->first_cna_noise_updated = 0;
        move16();
#endif

        return;
    }

@@ -1568,7 +1573,6 @@ void stereo_cna_update_params_fx(
        set16_fx( hFdCngDec->cna_cm_fx, hFdCngDec->cna_LR_LT_fx, hFdCngDec->cna_nbands );
    }


    /* Soft VAD for stereo CNA */
    test();
    IF( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) || EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) )
+6 −1
Original line number Diff line number Diff line
@@ -1986,6 +1986,12 @@ void stereo_switching_dec(

        Copy( sts[0]->lsf_old_fx, sts[1]->lsf_old_fx, M ); /* Q2.56 */
        Copy( sts[0]->lsp_old_fx, sts[1]->lsp_old_fx, M ); /* Q15 */

#ifdef NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING
        sts[1]->last_core_brate = sts[0]->last_core_brate;
        move16();
#endif

        IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) )
        {
            sts[1]->last_core = sts[0]->last_core; /* Q0 */
@@ -1993,7 +1999,6 @@ void stereo_switching_dec(
            sts[1]->last_coder_type = sts[0]->last_coder_type; /* Q0 */
            move16();


            // 32bit buffer
            Copy32( sts[0]->hHQ_core->old_out_fx32, sts[1]->hHQ_core->old_out_fx32, L_FRAME48k );           /* exp(exp_old_out) */
            Copy32( sts[0]->delay_buf_out32_fx, sts[1]->delay_buf_out32_fx, HQ_DELTA_MAX * HQ_DELAY_COMP ); /* Q11 */
+6 −0
Original line number Diff line number Diff line
@@ -906,8 +906,14 @@ void stereo_switching_enc_fx(
        Copy( sts[0]->lsf_old1_fx, sts[1]->lsf_old1_fx, M ); /* Qlog2(2.56) */
        Copy( sts[0]->lsp_old1_fx, sts[1]->lsp_old1_fx, M ); /* Q15 */

#ifdef NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING
        sts[1]->last_core_brate = sts[0]->last_core_brate;
        move16();
#endif

        sts[1]->GSC_noisy_speech = 0;
        move16();

        IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) )
        {
            /* cross-fade overlap region of DFT Stereo downmix and original stereo channels */