Commit a1d113d6 authored by norvell's avatar norvell
Browse files

Merge branch...

Merge branch 'fix-basop-2358-clang18-msan-use-of-uninitialized-value-in-lib_com-tools_fx-c-1487-16' into 'main'

Fix basop 2358 clang18 msan use of uninitialized value in lib com tools fx c 1487 16

See merge request !2749
parents 833d34a3 cb18b984
Loading
Loading
Loading
Loading
+1 −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() */
+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 )