Commit 14342eff authored by multrus's avatar multrus
Browse files

[cleanup] accept CR_FIX_698_SBA_MSAN

parent 12de3d7c
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -4941,12 +4941,8 @@ void ivas_copy_band_coeffs_idx_to_arr(

void ivas_clear_band_coeffs( 
    ivas_band_coeffs_t *pband_coeffs, 
#ifdef CR_FIX_698_SBA_MSAN
    const uint16_t num_bands,
    const uint16_t num_ts
#else
    const uint16_t num_bands
#endif

);

+0 −23
Original line number Diff line number Diff line
@@ -293,33 +293,13 @@ void ivas_copy_band_coeffs_idx_to_arr(

void ivas_clear_band_coeffs(
    ivas_band_coeffs_t *pband_coeffs,
#ifdef CR_FIX_698_SBA_MSAN
    const uint16_t num_bands,
    const uint16_t num_ts )
#else
    const uint16_t num_bands )
#endif
{
#ifdef CR_FIX_698_SBA_MSAN
    uint16_t i, j;
#else
    uint16_t i;
#endif

#ifdef CR_FIX_698_SBA_MSAN
    for ( j = 0; j < num_ts; j++ )
#else
    for ( i = 0; i < num_bands; i++ )
#endif
    {
#ifndef CR_FIX_698_SBA_MSAN
        set_zero( (float *) pband_coeffs[i].C_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) );
        set_zero( (float *) pband_coeffs[i].P_re, ( IVAS_SPAR_MAX_CH - 1 ) );
        set_zero( (float *) pband_coeffs[i].C_quant_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) );
        set_zero( (float *) pband_coeffs[i].P_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) );
        set_zero( pband_coeffs[i].pred_re, ( IVAS_SPAR_MAX_CH - 1 ) );
#endif
#ifdef CR_FIX_698_SBA_MSAN
        for ( i = 0; i < num_bands; i++ )
        {
            set_zero( (float *) pband_coeffs[i + j * num_bands].C_re, ( IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS ) * ( IVAS_SPAR_MAX_DMX_CHS - 1 ) );
@@ -330,9 +310,6 @@ void ivas_clear_band_coeffs(

            set_zero( pband_coeffs[i + j * num_bands].pred_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) );
        }
#else
        set_zero( pband_coeffs[i].pred_quant_re, ( IVAS_SPAR_MAX_CH - 1 ) );
#endif
    }

    return;
+0 −1
Original line number Diff line number Diff line
@@ -173,7 +173,6 @@
/* any switch which is non-be wrt operation points tested in selection */
/* all switches in this category should start with "CR_" */

#define CR_FIX_698_SBA_MSAN                             /* Dlb: issue 698: Uninitialized memory read in SBA init */

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

+0 −8
Original line number Diff line number Diff line
@@ -498,11 +498,7 @@ ivas_error ivas_spar_md_dec_init(
)
{
    int16_t i, j;
#ifdef CR_FIX_698_SBA_MSAN
    int16_t nchan_transport, num_md_sub_frames;
#else
    int16_t nchan_transport;
#endif
    float pFC[IVAS_MAX_NUM_BANDS], PR_minmax[2];

    ivas_sba_get_spar_hoa_md_flag( sba_order, hDecoderConfig->ivas_total_brate, &hMdDec->spar_hoa_md_flag, &hMdDec->spar_hoa_dirac2spar_md_flag );
@@ -545,13 +541,9 @@ ivas_error ivas_spar_md_dec_init(
    hMdDec->spar_plc_enable_fadeout_flag = 1;
    hMdDec->dtx_md_smoothing_cntr = 1;

#ifdef CR_FIX_698_SBA_MSAN
    num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( sba_order, hDecoderConfig->ivas_total_brate, hDecoderConfig->ivas_total_brate );

    ivas_clear_band_coeffs( hMdDec->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS, num_md_sub_frames );
#else
    ivas_clear_band_coeffs( hMdDec->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS );
#endif
    ivas_clear_band_coeff_idx( hMdDec->spar_md.band_coeffs_idx, IVAS_MAX_NUM_BANDS );
    ivas_clear_band_coeff_idx( hMdDec->spar_md_prev.band_coeffs_idx, IVAS_MAX_NUM_BANDS );
    ivas_clear_band_coeff_idx( hMdDec->spar_md_prev.band_coeffs_idx_mapped, IVAS_MAX_NUM_BANDS );
+0 −4
Original line number Diff line number Diff line
@@ -303,11 +303,7 @@ ivas_error ivas_spar_md_enc_init(
        }
    }

#ifdef CR_FIX_698_SBA_MSAN
    ivas_clear_band_coeffs( hMdEnc->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS, 1 );
#else
    ivas_clear_band_coeffs( hMdEnc->spar_md.band_coeffs, IVAS_MAX_NUM_BANDS );
#endif
    ivas_clear_band_coeff_idx( hMdEnc->spar_md.band_coeffs_idx, IVAS_MAX_NUM_BANDS );
    ivas_clear_band_coeff_idx( hMdEnc->spar_md_prior.band_coeffs_idx, IVAS_MAX_NUM_BANDS );
    ivas_clear_band_coeff_idx( hMdEnc->spar_md_prior.band_coeffs_idx_mapped, IVAS_MAX_NUM_BANDS );