Commit 9da419d7 authored by vaclav's avatar vaclav
Browse files

Merge branch 'cleanup_20250408' into 'main'

Cleanup 20250408

See merge request !2075
parents e8b06066 dd577b6b
Loading
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -160,9 +160,7 @@

/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_1285_RENDER_CONFIG_PTR_COMPARE              /* Philips: Warning about pointer comparison in the render config reader */
#define FIX_1298_MEMORY_OPT_IVAS_CORE_ENC               /* VA: issue 1298: Memory saving in ivas_core_enc() */
#define SIMPLIFY_IVAS_CORE                              /* VA: simplify ivas core coder functions */


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

@@ -172,17 +170,12 @@
/* all switches in this category should start with "NONBE_" */

#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING           /* Ericsson: issue 1180, corrected long term mute loop attnuation after 200ms  in PhECU-PLC  */
#define NONBE_1293_CRASH_FIRST_FRAME_LOST               /* VA: issue 1293: fix G.192 decoder crash when first frame is lost */
#define NONBE_FIX_1297_SPAR_JBM_MEM_SAN                 /*Dolby: issue 1297, SPAR + JBM + BR switch memory sanitizer*/  
#define NONBE_1289_STEREO_SW_TO_MONO                    /* VA: issue 1289: Fix glitch when stereo signal is decoded to mono n TD->DFT switching */
#define NONBE_1122_JBM_FIX_PLAYOUT_DELAY_IN_DTX         /* FhG: Avoid JBM ignoring safety margin and setting playout delay to 0 during DTX */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define NONBE_1296_TDREND_ITD_OUT_OF_BOUNDS_ACCESS      /* Eri: issue 1296: ITD resampling can occasionally read out of bounds, especially when the requested subframes are short (1.25 ms). Seen for headtracking+JBM. */
#define NONBE_1303_GRANULARITY_OSBA_REND                /* VA: issue 1303: Correctly set the granularity in OSBA, Disc mode, and BINAURAL_ROOM_REVERB output */
#define NONBE_1118_EVS_LR_HQ_BITERROR                   /* VA: issue 1118: fix EVS decoder crash in LR-HQ in case of bit errors */
#define NONBE_1303_REND_GRANULARITY                     /* VA: issue 1303: Renderer granularity revision */


/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+4 −7
Original line number Diff line number Diff line
@@ -5909,9 +5909,6 @@ ivas_error core_switching_post_dec(
    float *synth,                        /* i/o: output synthesis                        */
    float *output,                       /* i/o: LB synth/upsampled LB synth             */
    float output_mem[],                  /* i  : OLA memory from last TCX/HQ frame       */
#ifndef SIMPLIFY_IVAS_CORE
    const IVAS_FORMAT ivas_format, /* i  : IVAS format                             */
#endif
    const int16_t use_cldfb_for_dft,     /* i  : flag to use of CLDFB for DFT Stereo     */
    const int16_t output_frame,          /* i  : frame length                            */
    const int16_t core_switching_flag,   /* i  : ACELP->HQ switching frame flag          */
+7 −22
Original line number Diff line number Diff line
@@ -263,9 +263,7 @@ static void trans_ana(
    const int16_t time_offs,     /* i  : Time offset                                          */
    const float est_mus_content, /* i  : 0.0=speech_like ... 1.0=Music    (==st->env_stab )   */
    const int16_t last_fec,      /* i  : signal that previous frame was concealed with fec_alg*/
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING
    const int16_t element_mode,  /* i  :  element_mode req to handle EVS_MONO specific BE path*/
#endif
    float *alpha,                /* o  : Magnitude modification factors for fade to average   */
    float *beta,                 /* o  : Magnitude modification factors for fade to average   */
    float *beta_mute,            /* o  : Factor for long-term mute                            */
@@ -419,7 +417,7 @@ static void trans_ana(
            {
                mag_chg[k] = 0;
            }
#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING

            if ( element_mode != EVS_MONO )
            {
                if ( k == 0 && burst_len > BETA_MUTE_THR ) /* beta_mute final long term attenuation adjusted only once per frame in the first sub-band, Ref   Eq(184) in 26.447 */
@@ -434,12 +432,7 @@ static void trans_ana(
                    *beta_mute *= BETA_MUTE_FAC;
                }
            }
#else
            if ( burst_len > BETA_MUTE_THR )
            {
                *beta_mute *= BETA_MUTE_FAC;
            }
#endif

            alpha[k] = mag_chg[k];
            beta[k] = (float) ( sqrt( 1.0f - SQR( alpha[k] ) ) * *beta_mute );
            if ( k >= LGW32k - 1 )
@@ -2114,11 +2107,7 @@ static void hq_phase_ecu(
            *time_offs = 0; /* IVAS reset of offset time counter, timeoffset variable later also used to calculate burst length */
        }

#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING
        trans_ana( prevsynth + 2 * output_frame - Lprot - *time_offs + ph_ecu_lookahead, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, *last_fec, element_mode, alpha, beta, beta_mute, Xavg );
#else
        trans_ana( prevsynth + 2 * output_frame - Lprot - *time_offs + ph_ecu_lookahead, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, *last_fec, alpha, beta, beta_mute, Xavg );
#endif
        spec_ana( prevsynth + 2 * output_frame - Lprot - *time_offs + ph_ecu_lookahead, plocs, plocsi, num_p, X_sav, output_frame, bwidth, element_mode, &noise_fac, pcorr );

        if ( prev_bfi && *last_fec )
@@ -2146,11 +2135,7 @@ static void hq_phase_ecu(
            *time_offs = (int16_t) INT16_MAX; /* high value --> continued muting will ensure that the now saturated  seed is not creating tones */
        }

#ifdef NONBE_FIX_1180_HQMDCT_PHECU_LT_MUTING
        trans_ana( prevsynth + 2 * output_frame - Lprot, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, 0, element_mode, alpha, beta, beta_mute, Xavg ); /* 1.0 stable-music,  0.0 speech-like */
#else
        trans_ana( prevsynth + 2 * output_frame - Lprot, mag_chg, &ph_dith, mag_chg_1st, output_frame, *time_offs, env_stab, 0, alpha, beta, beta_mute, Xavg ); /* 1.0 stable-music,  0.0 speech-like */
#endif
    }

    mvr2r( X_sav, X, Lprot );
+4 −11
Original line number Diff line number Diff line
@@ -557,9 +557,6 @@ ivas_error core_switching_post_dec(
    float *synth,                        /* i/o: output synthesis                    */
    float *output,                       /* i/o: LB synth/upsampled LB synth         */
    float output_mem[],                  /* i  : OLA memory from last TCX/HQ frame   */
#ifndef SIMPLIFY_IVAS_CORE
    const IVAS_FORMAT ivas_format, /* i  : IVAS format                         */
#endif
    const int16_t use_cldfb_for_dft,     /* i  : flag to use of CLDFB for DFT Stereo */
    const int16_t output_frame,          /* i  : frame length                        */
    const int16_t core_switching_flag,   /* i  : ACELP->HQ switching flag            */
@@ -681,11 +678,7 @@ ivas_error core_switching_post_dec(
                    synth[i + delay_comp] = ( synth[i + delay_comp] * i + ( tmpDelta - i ) * st->previoussynth[i + delay_comp] ) / tmpDelta;
                }

#ifdef SIMPLIFY_IVAS_CORE
                if ( ( st->element_mode == IVAS_CPE_MDCT || ( st->is_ism_format && st->core == TCX_20_CORE /* <- means TCX in general, TCX10 is forbidden after ACELP */ ) ) && st->last_core_brate <= SID_2k40 && st->core_brate > SID_2k40 )
#else
                if ( ( st->element_mode == IVAS_CPE_MDCT || ( ivas_format == ISM_FORMAT && st->core == TCX_20_CORE /* <- means TCX in general, TCX10 is forbidden after ACELP */ ) ) && st->last_core_brate <= SID_2k40 && st->core_brate > SID_2k40 )
#endif
                {
                    /* smooth transitions to avoid pops in car noise items */
                    smoothTransitionDtxToTcx( synth, output_frame, delay_comp );
+0 −4
Original line number Diff line number Diff line
@@ -274,11 +274,7 @@ ivas_error evs_dec(
         * Postprocessing for ACELP/MDCT core switching
         *---------------------------------------------------------------------*/

#ifdef SIMPLIFY_IVAS_CORE
        if ( ( error = core_switching_post_dec( st, synth, NULL, NULL, 0, output_frame, core_switching_flag, 0, -1, EVS_MONO ) ) != IVAS_ERR_OK )
#else
        if ( ( error = core_switching_post_dec( st, synth, NULL, NULL, 0, MONO_FORMAT, output_frame, core_switching_flag, 0, -1, EVS_MONO ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
Loading