diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index e83aa7e6174a85bb02b6be3cb08d87c7034d8c2c..84f375622dd5f9298e39fe8b45704387d99c459a 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -2873,9 +2873,6 @@ void ivas_spar_to_dirac( float dvx[IVAS_MAX_NUM_BANDS], dvy[IVAS_MAX_NUM_BANDS], dvz[IVAS_MAX_NUM_BANDS]; float radius; float en_ratio, res_pow; -#ifdef ENABLE_DITHER - int16_t *seed_ptr; -#endif int16_t num_slots_in_subfr; int16_t tmp_write_idx_param_band; int16_t tmp_write_idx_band; @@ -2898,9 +2895,6 @@ void ivas_spar_to_dirac( if ( hDirAC != NULL && ivas_get_hodirac_flag( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->sba_analysis_order ) == 0 ) { band_grouping = hDirAC->band_grouping; -#ifdef ENABLE_DITHER - seed_ptr = &hDirAC->dithering_seed; -#endif num_slots_in_subfr = st_ivas->hDirAC->hConfig->dec_param_estim ? CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES : 1; for ( band = start_band; band < end_band; band++ ) @@ -2975,18 +2969,11 @@ void ivas_spar_to_dirac( for ( band = start_band; band < end_band; band++ ) { -#ifdef ENABLE_DITHER - int16_t diff_idx, azi_dith, ele_dith; -#else int16_t azi_dith, ele_dith; -#endif tmp_write_idx_param_band = hDirAC->spar_to_dirac_write_idx; en_ratio = 1.0f - diffuseness[band]; -#ifdef ENABLE_DITHER - diff_idx = -#endif - masa_sq( 1.0f - en_ratio, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); + masa_sq( 1.0f - en_ratio, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); qmf_band_start = band_grouping[band]; qmf_band_end = band_grouping[band + 1]; @@ -3000,16 +2987,8 @@ void ivas_spar_to_dirac( for ( b = qmf_band_start; b < qmf_band_end; b++ ) { -#ifdef ENABLE_DITHER - azi_dith = (int16_t) ( azi[band] + rand_triangular_signed( seed_ptr ) * dirac_dithering_azi_scale[diff_idx] + 0.5f ); - ele_dith = (int16_t) ( ele[band] + rand_triangular_signed( seed_ptr ) * dirac_dithering_ele_scale[diff_idx] + 0.5f ); - /* limit the elevation to [-90, 90] */ - ele_dith = min( 90, ele_dith ); - ele_dith = max( -90, ele_dith ); -#else azi_dith = azi[band]; ele_dith = ele[band]; -#endif hDirAC->energy_ratio1[block][b] = en_ratio; tmp_write_idx_band = tmp_write_idx_param_band;