Commit 8e526968 authored by multrus's avatar multrus
Browse files

Merge branch 'main' into 20260501_release_FX-3_1__SA4#136

parents 0d8c2f45 06686cc2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -104,7 +104,9 @@
#define FIX_2095_REMOVE_UNUSED_ISAR_TABLES              /* Dolby: remove unused ISAR */
#define FIX_BASOP_2560_STEREO_DFT_DEC_RESET             /* FhG: BASOP issue 2560: align reset of hStereoDft->res_gains_ind_fx[][] between BASOP and float */
#define HARMONIZE_2539_cng_energy                       /* FhG: basop issue 2539: harmonize cng_energy with its ivas derivate */
#define FIX_1585_ASAN_FORMAT_SW_ALT                     /* VA: float issue 1585: alternative fix memory leaks with format switching */
#define FIX_1585_ASAN_FORMAT_SW_ALT                     /* VA,FhG: float issues 1585,1593: alternative fix memory leaks with format switching */
#define FIX_BASOP_2573_RF_MODE_UPDATE                   /* FhG: BASOP issue 2573: remove duplicated update of rf_mode parameters from evs_enc_fx(); was already done in updt_enc_common_fx() */
#define FIX_2570_BUF_OVFL                               /* Orange: basop issue 2570: global-buffer-overflow in lib_rend/ivas_objectRenderer_sources_fx.c */

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

@@ -126,6 +128,7 @@
#define FIX_BASOP_2517_CLICK_IN_OMASA_LTV               /* FhG: BASOP #2517: preserve precision by removing one-bit headroom from Q_min and allowing saturation during buffer scaling */
#define NONBE_FIX_ISSUE_2518                            /* FhG: Fix issue 2518, noise during ACELP switching from 16KHz to 12k8Hz by improving Q_new calculation. */
#define NONBE_FIX_ISSUE_2518_TRANSENC_SAT_FIX           /* FhG: Fix issue 2518, fix wrong amplitude because of saturation of x_tran in transf_cdbk_enc_fx() for transient signals. */
#define NONBE_FIX_ISSUE_2569                            /* FhG: Fix issue 2569, overflow of mem_preemph16k_fx in LTV test. */
#define FIX_BASOP_2559_Q_SYNTH_HISTORY_RESET            /* FhG: BASOP issue 2559: reset hTcxDec->q_synth_history_fx in allocate_CoreCoder_TCX_fx() */
#define FIX_FLOAT_1578_OMASA_REND_SPIKES                /* Nokia: Float issue 1578: Fix spikes and collapsed perception in OMASA/MASA rendering to FOA/HOA */
#define FIX_1521_SBA_LOUDNESS_STEREO                    /* FhG: issue 1521: Fix loudness for SBA to stereo rendering */
+3 −6
Original line number Diff line number Diff line
@@ -2765,12 +2765,6 @@ ivas_error ivas_init_decoder_fx(
        set32_fx( st_ivas->mem_hp20_out_fx[i], 0, L_HP20_MEM + 2 );
    }

#ifdef FIX_1585_ASAN_FORMAT_SW_ALT
    FOR( ; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ )
    {
        st_ivas->mem_hp20_out_fx[i] = NULL;
    }
#endif

    /*-------------------------------------------------------------------*
     * Allocate and initialize rendering handles
@@ -3467,6 +3461,9 @@ void ivas_initialize_handles_dec(
    FOR( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ )
    {
        st_ivas->p_output_fx[i] = NULL;
#ifdef FIX_1585_ASAN_FORMAT_SW_ALT
        st_ivas->mem_hp20_out_fx[i] = NULL;
#endif
    }

    return;
+7 −1
Original line number Diff line number Diff line
@@ -76,12 +76,16 @@ ivas_error evs_enc_fx(
    Word16 pitch_orig[3]; /* original open-loop pitch values that might be altered in core_acelp_tcx20_switching_fx() within MODE2 */
#endif
    ivas_error error;
#ifndef FIX_BASOP_2573_RF_MODE_UPDATE
    SC_VBR_ENC_HANDLE hSC_VBR = st->hSC_VBR;
#endif
    TD_CNG_ENC_HANDLE hTdCngEnc = st->hTdCngEnc;
    LPD_state_HANDLE hLPDmem = st->hLPDmem;
    TD_BWE_ENC_HANDLE hBWE_TD = st->hBWE_TD;
    BSTR_ENC_HANDLE hBstr = st->hBstr;
#ifndef FIX_BASOP_2573_RF_MODE_UPDATE
    RF_ENC_HANDLE hRF = st->hRF;
#endif

    error = IVAS_ERR_OK;

@@ -574,12 +578,14 @@ ivas_error evs_enc_fx(
        st->codec_mode = MODE1;
        move16();
    }

    if ( hTdCngEnc->lp_cng_mode2 )
    {
        st->codec_mode = MODE2;
        move16();
    }

#ifndef FIX_BASOP_2573_RF_MODE_UPDATE
    IF( EQ_16( st->rf_mode, 1 ) )
    {
        IF( EQ_16( hRF->rf_frame_type, RF_NELP ) )
@@ -599,7 +605,7 @@ ivas_error evs_enc_fx(
        st->L_frame = L_FRAME;
        st->rf_mode = 1;
    }

#endif
#ifdef DEBUG_MODE_INFO
    dbgwrite( &st->codec_mode, sizeof( short ), 1, input_frame, "res/codec" );
    dbgwrite( &st->core, sizeof( short ), 1, input_frame, "res/core" );
+25 −3
Original line number Diff line number Diff line
@@ -2241,6 +2241,8 @@ static void IGF_CalculateEnvelope_ivas_fx(
                        sfbEnergyTileR_e = 0;
                        move16();
                        move16();
                        zeroNrg = 1;
                        move16();
                    }
                    BASOP_Util_Divide_MantExp( round_fx_sat( sfbEnergyTileR ), sfbEnergyTileR_e, width, 15, &sfbEnergyTileR16, &sfbEnergyTileR_e );

@@ -2265,6 +2267,13 @@ static void IGF_CalculateEnvelope_ivas_fx(
                    sfbEnergyC_e = 0;
                    move32();
                    move16();
#ifdef FIX_2346_DUPLICATED_IGF_FUNCTIONS_2
                    IF( element_mode == EVS_MONO )
                    {
                        zeroNrg = 1;
                        move16();
                    }
#endif
                }
                IF( sfbEnergyTileC == 0 )
                {
@@ -2274,8 +2283,21 @@ static void IGF_CalculateEnvelope_ivas_fx(
                    sfbEnergyTileC = EPSILON_FX;
#endif
                    sfbEnergyTileC_e = 0;
#ifdef FIX_2346_DUPLICATED_IGF_FUNCTIONS_2
                    IF( element_mode > EVS_MONO )
                    {
#endif
                        temp = BASOP_Util_Divide3232_Scale( sfbEnergyC, sfbEnergyTileC, &tmp_e );
                        tmp_e = add( tmp_e, sub( sfbEnergyC_e, sfbEnergyTileC_e ) );
#ifdef FIX_2346_DUPLICATED_IGF_FUNCTIONS_2
                    }
                    ELSE
                    {
                        BASOP_Util_Divide_MantExp( round_fx_sat( sfbEnergyC ), sfbEnergyC_e, round_fx_sat( sfbEnergyTileC ), sfbEnergyTileC_e, &tmp, &tmp_e );
                        zeroNrg = 1;
                        move16();
                    }
#endif
                    move32();
                    move16();
                }
@@ -2681,7 +2703,7 @@ static void IGF_CalculateEnvelope_ivas_fx(

                    IF( sfbEnergyR == 0 )
                    {
                        sfbEnergyR = EPSILON_FX;
                        sfbEnergyR = 0x00010000;
                        move32();
                        sfbEnergyR_e = 0;
                        move16();
+3 −0
Original line number Diff line number Diff line
@@ -755,6 +755,9 @@ void pre_proc_front_ivas_fx(

    /* Avoid saturation of resampling/delay decimation buffer. */
    shift = s_min( shift, st->q_mem_decim16k_fx );
#ifdef NONBE_FIX_ISSUE_2569
    shift = s_min( shift, add( -1, norm_arr( &st->mem_preemph16k_fx, 1 ) ) );
#endif

    /* Limit Q_new here to st->q_inp because inside ivas_compute_core_buffers_fx() st->input is rescaled to Q_new */
    shift = s_min( shift, st->q_inp );
Loading