Commit 6836c618 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

fix array indexing in object post-rendering to HOA3 in OSBA

parent d3d6d74e
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@

#define FIX_1033_MEMORY_LEAK_OMASA                      /* Nokia / Orange: issue #1033: Memory leak in OMASA to BINAURAL with HRTF with bitrate switching */
#define FIX_1043_JBM_MD_BUFFER                          /* VA: issue 1043: JBM MD handle allocation is avoided in non-JBM EXT operations */

#define FIX_1060_USAN_ARRAY_BOUNDS                      /* FhG: issue 1060: USAN array-bounds errors */

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

+5 −0
Original line number Diff line number Diff line
@@ -2317,8 +2317,13 @@ void ivas_dirac_dec_render_sf(

                                for ( l = 0; l < hSpatParamRendCom->num_freq_bands; l++ )
                                {
#ifdef FIX_1060_USAN_ARRAY_BOUNDS
                                    Cldfb_RealBuffer[j2][k][l] += g * *( tc_re++ );
                                    Cldfb_ImagBuffer[j2][k][l] += g * *( tc_im++ );
#else
                                    Cldfb_RealBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_re++ );
                                    Cldfb_ImagBuffer[j2][0][k * hSpatParamRendCom->num_freq_bands + l] += g * *( tc_im++ );
#endif
                                }
                                w1 += hSpatParamRendCom->num_freq_bands;
                            }