Commit ae4e680d authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into...

Merge remote-tracking branch 'remotes/origin/main' into basop-2280-back-and-forth-scaling-in-core-coder
parents 8ae38f57 a1d113d6
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@
#define FIX_BASOP_2332_ASAN_OVERFLOW_IN_EXT_DIRAC_REND  /* Nokia: basop issue 2332: Uses predefined memory sizes instead computing wrong */
#define FIX_BASOP_2333_MCMASA_ANA_MEMORY_LEAK           /* Nokia: basop issue 2333: Add missing free for direction_vector_e to ivas_mcmasa_ana_fx.c */
#define HARM_COREDECODER_FUNCTIONS                      /* VA: basop issue 2347: Remove various duplicated code in core-decoder  */
#define FIX_BASOP_2358_SCALING_OOB                      /* Eri: Basip issue 2358: Clang-18 reports OOB access where scaling is applied to L_FRAME48k instead of output_frame */
#define FIX_BASOP_2351_EXTREND_SCALE                    /* FhG: basop issue 2351: Only scale initialized samples in renderer, related to 2326 */
#define FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE           /* FhG: Fix issue 2331: Uninitialized variable */
#define FIX_2362_TOTAL_BRATE_CALCULATION                /* FhG: basop issue 2362: fix calculation of st->total_brate in ivas_cpe_enc_fx() */
@@ -122,6 +123,7 @@
#define FIX_1500_ISM_MD_DTX                             /* VA: float issue 1500: fix ISM elevation metadata smoothing in DTX */
#define FIX_2348_REPLACE_FEC_ENC                        /* VA: basop issue 2348: replace FEC_encode_ivas_fx with FEC_encode_fx  */
#define FIX_2338_HARM_GSC_GAIN_COMP                     /* VA: basop issue 2338: harmonization of band gain computation for both EVS and IVAS */
#define FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG       /* Eri: Basop issue 2317: Uninitialized value read in case of DTX and BW switching   */

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

+6 −0
Original line number Diff line number Diff line
@@ -3953,10 +3953,16 @@ static void stereo_dft_enc_compute_prm_fx(
     * Compute Side gains
     *-----------------------------------------------------------------*/

#ifdef FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG
    Copy32( pSideGain, hStereoDft->sidSideGain_fx, STEREO_DFT_BAND_MAX ); /* Copy all sideGain values since BW change may be reverted during CNG */
#endif

    FOR( b = 0; b < hStereoDft->nbands; b++ )
    {
#ifndef FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG
        hStereoDft->sidSideGain_fx[b] = *( pSideGain + b );
        move32();
#endif

        /* Quantization */
        IF( flag_quant )
+16 −0
Original line number Diff line number Diff line
@@ -434,9 +434,17 @@ ivas_error ivas_td_binaural_renderer_unwrap_fx(
        {
            Word16 i;

#ifdef FIX_BASOP_2358_SCALING_OOB
            FOR( i = 0; i < num_src; ++i )
#else
            FOR( i = 0; i < MAX_OUTPUT_CHANNELS; ++i )
#endif
            {
#ifdef FIX_BASOP_2358_SCALING_OOB
                scale_sig32( output_fx[i], output_frame, -4 ); // Q11 - 4 = Q7
#else
                scale_sig32( output_fx[i], L_FRAME48k, -4 ); // Q11 - 4 = Q7
#endif
            }

            IF( NE_32( ( error = ivas_reverb_process_fx( hReverb, transport_config, 0, output_fx, p_reverb_signal_fx, subframe_idx ) ), IVAS_ERR_OK ) ) // Q p_reverb_signal_fx = Q output_fx - 2 = 5
@@ -444,9 +452,17 @@ ivas_error ivas_td_binaural_renderer_unwrap_fx(
                return error;
            }

#ifdef FIX_BASOP_2358_SCALING_OOB
            FOR( i = 0; i < num_src; ++i )
#else
            FOR( i = 0; i < MAX_OUTPUT_CHANNELS; ++i )
#endif
            {
#ifdef FIX_BASOP_2358_SCALING_OOB
                scale_sig32( output_fx[i], output_frame, 4 ); // Q7 + 4 = Q11
#else
                scale_sig32( output_fx[i], L_FRAME48k, 4 ); // Q7 + 4 = Q11
#endif
            }

            FOR( i = 0; i < BINAURAL_CHANNELS; ++i )