Commit bc9f98af authored by TYAGIRIS's avatar TYAGIRIS
Browse files

fix for UBSAN issue 615

parent b492f395
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1750,7 +1750,11 @@ void ivas_get_spar_md_from_dirac(
    {
        for ( band = start_band; band < end_band; band++ )
        {
#ifdef FIX_615_UBSAN_SPAR_TO_DIRAC
            ndm = hSpar_md_cfg->num_dmx_chans_per_band[band];
#else
            ndm = hSpar_md_cfg->num_dmx_chans_per_band[band - 1];
#endif

            /*SPAR from DirAC*/
            set_f( response_avg, 0.0f, MAX_OUTPUT_CHANNELS );
+1 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@

#define SPLIT_REND_WITH_HEAD_ROT                        /* Dlb,FhG: Split Rendering contributions 21 and 35 */

#define FIX_615_UBSAN_SPAR_TO_DIRAC                     /*Dlb : Fix for UBSAN issue 615*/
/* ################## End BE DEVELOPMENT switches ######################### */


+4 −1
Original line number Diff line number Diff line
@@ -571,8 +571,11 @@ static ivas_error ivas_spar_enc_process(
        float Wscale_d[IVAS_MAX_NUM_BANDS];
        int16_t d_start_band, d_end_band;
        int16_t dirac_band_idx;

#ifdef FIX_615_UBSAN_SPAR_TO_DIRAC
        d_start_band = SPAR_DIRAC_SPLIT_START_BAND;
#else
        d_start_band = hSpar->enc_param_start_band;
#endif
        d_end_band = IVAS_MAX_NUM_BANDS;

        for ( b = d_start_band; b < d_end_band; b++ )