Unverified Commit 3203f2e4 authored by norvell's avatar norvell
Browse files

Correct buffer length in output scaling in ivas_objectRenderer_fx.c

parent a9c6f8d8
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 */

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

+8 −0
Original line number Diff line number Diff line
@@ -436,7 +436,11 @@ ivas_error ivas_td_binaural_renderer_unwrap_fx(

            FOR( i = 0; i < MAX_OUTPUT_CHANNELS; ++i )
            {
#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
@@ -446,7 +450,11 @@ ivas_error ivas_td_binaural_renderer_unwrap_fx(

            FOR( i = 0; i < MAX_OUTPUT_CHANNELS; ++i )
            {
#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 )