diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 0378ef22660d31c55be8b5cecb50397e512ad763..e3aa386d88ab34678c3be3e2564770e318ec9d6d 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -795,9 +795,7 @@ void dtx_read_padding_bits( ); void ivas_apply_non_diegetic_panning( -#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING float *input_f, /* i : non-diegetic object */ -#endif float *output_f[], /* o : core-coder transport mono channel/stereo output */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ const int16_t output_frame /* i : output frame length per channel */ @@ -3508,14 +3506,6 @@ ivas_error ivas_cldfb_dec_reconfig( int16_t numCldfbAnalyses_old, /* i : number of CLDFB analysis instances in previous frame */ const int16_t numCldfbSyntheses_old /* i : number of CLDFB synthesis instances in previous frame */ ); -#ifndef FIX_993_REMOVE_SBA_GET_ORDER -/*! r: Ambisonic (SBA) order */ -int16_t ivas_sba_get_order( - const int16_t nb_channels, /* i : Number of ambisonic channels */ - const int16_t sba_planar /* i : SBA planar flag */ -); - -#endif /*! r: Ambisonic (SBA) order used for analysis and coding */ int16_t ivas_sba_get_analysis_order( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ diff --git a/lib_com/ivas_sba_config.c b/lib_com/ivas_sba_config.c index 6a985e53e613712bce1211100d0932ebe960f7a9..fc336656468bbae2c55fad66521c54832a4eae97 100644 --- a/lib_com/ivas_sba_config.c +++ b/lib_com/ivas_sba_config.c @@ -64,23 +64,7 @@ void ivas_sba_config( int16_t *element_mode /* o : element mode of the core coder */ ) { -#ifndef FIX_993_REMOVE_SBA_GET_ORDER - if ( ( sba_order < 0 ) && ( nb_channels < 0 ) ) - { - assert( 0 && "Either order or number of channels must be positive" ); - } - else if ( sba_order < 0 ) - { - sba_order = ivas_sba_get_order( nb_channels, sba_planar ); - } - else if ( nb_channels < 0 ) - { - nb_channels = ivas_sba_get_nchan( sba_order, sba_planar ); - } - else -#else if ( nb_channels > 0 ) -#endif { if ( sba_planar ) { @@ -121,37 +105,6 @@ void ivas_sba_config( return; } -#ifndef FIX_993_REMOVE_SBA_GET_ORDER -/*-------------------------------------------------------------------* - * ivas_sba_get_order() - * - * Get Ambisonic order from number of ambisonic channels - *-------------------------------------------------------------------*/ - -/*! r: Ambisonic (SBA) order */ -int16_t ivas_sba_get_order( - const int16_t nb_channels, /* i : Number of ambisonic channels */ - const int16_t sba_planar /* i : SBA Planar flag */ -) -{ - int16_t sba_order; - - if ( sba_planar ) - { - sba_order = ( nb_channels - 1 ) / 2; - assert( ( 2 * sba_order + 1 == nb_channels ) && "Number of channels not supported in Planar SBA!" ); - } - else - { - sba_order = (int16_t) sqrtf( (float) nb_channels ) - 1; - assert( ( ( sba_order + 1 ) * ( sba_order + 1 ) == nb_channels ) && "Number of channels not supported in SBA!" ); - } - - assert( ( sba_order <= 3 ) && "Error: SBA order must be <= 3!" ); - - return ( sba_order ); -} -#endif /*-------------------------------------------------------------------* * ivas_sba_get_analysis_order() diff --git a/lib_com/options.h b/lib_com/options.h index 7c139fad83253627df0813ece340bd50f6cc4088..c1a3f4433c4fd9f0258294f5a5a8fb527cbec87c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -180,8 +180,6 @@ #ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM #define NONBE_FIX_AVG_IAC_CLDFB_REVERB #endif -#define FIX_993_REMOVE_SBA_GET_ORDER /* VA: issue 993: remove unused function ivas_sba_get_order() */ -#define FIX_960_SYN_OUTPUT /* VA: issue 960: unused function syn_output() is removed */ #define USE_NEW_HRTF_BINARY_FILE_FORMAT /* Orange: to activate when decided to change the hrtf binary file format */ //#define NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES /* Philips: Use pre-computed HRTF average L/R energies and IAC in all renderers */ @@ -189,17 +187,8 @@ #define FIX_WARNING_RENDER_CONFIG /* Orange: fix warning on windows build */ #define FIX_INV_DIFFUSE_WEIGHT /* Orange : Fix error in energy compensation in late binaural */ -#define FIX_1002_DEC_PHASE_ECU_USAN_OF_PHASE /* Eri: issue #1002, usan-value-out-of-range-for-int16, kept BE for PLC-conditions */ //#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ -#define FIX_1020_AEID_SELECTION_ERRORS /* Philips: issue #1020: fix for acoustic environment ID selection errors */ -#define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ /* #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF */ /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ -#define FIX_1009_ISM_NONDIEGETIC_PANNING /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan */ -#define NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER /* FhG: issues #1012, 1013: JBM flush function uses wrong output buffer */ -#define FIX_998_UNUSED_FUNCTION /* FhG: issue 998: delete unused funtion ivas_dirac_dec_get_response_split_order */ -#define NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO /* FhG: issues #1014, #1015, #1016: fix tc buffer info update in the discrete ism renderer */ -#define NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING /* FhG: issue 987: solution b: downmix HOA3 to stereo a input for the reverberator */ -#define NONBE_FIX_1006_PAST_DMX_NRG_ERROR /* Eri/FhG: Issue 1006: Bug fix in ivas_stereo_dft_dec not replicated in ivas_stereo_dft_dec_dmx */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_com/prot.h b/lib_com/prot.h index 943882b717df402926bfdac6d0dfeaba1a8f2360..42013ceec23257529b13edd4a9be8c8cdcb74f69 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -4790,14 +4790,6 @@ void dec_acelp_4t64( float code[], /* o : algebraic (fixed) codebook excitation */ const int16_t Opt_AMR_WB /* i : flag indicating AMR-WB IO mode */ ); -#ifndef FIX_960_SYN_OUTPUT -uint32_t syn_output( - float *synth, /* i/o: float synthesis signal */ - const int16_t output_frame, /* i : output frame length */ - int16_t *synth_out /* o : integer 16 bits synthesis signal */ -); - -#endif void FEC_exc_estim( Decoder_State *st, /* i/o: Decoder static memory */ const int16_t L_frame, /* i : length of the frame */ diff --git a/lib_dec/FEC_HQ_phase_ecu.c b/lib_dec/FEC_HQ_phase_ecu.c index e6b9f83bdf329d133e3ecc719025e4f1e8ab0341..4ad3f28fb15c9e5182cb5a383d9a051f8ac787bb 100644 --- a/lib_dec/FEC_HQ_phase_ecu.c +++ b/lib_dec/FEC_HQ_phase_ecu.c @@ -1093,12 +1093,8 @@ static void subst_spec( Xph = corr_phase[m]; -#ifdef FIX_1002_DEC_PHASE_ECU_USAN_OF_PHASE /* extract fractional phase integer index in the range [0...1023] */ Xph_short = (int16_t) ( 0x000003ff & (int32_t) ( ( Xph * 512 ) / EVS_PI ) ); -#else - Xph_short = (int16_t) ( ( (int32_t) ( Xph * 512 / EVS_PI ) ) % 32768 ) & 0x03ff; -#endif if ( Xph_short >= 512 ) { sin_F = -sincos_t_ext[Xph_short - 512]; @@ -1142,11 +1138,7 @@ static void subst_spec( mag_chg_local *= 0.5f + ( 1.0f - ( 1.0f / PHASE_DITH ) * ph_dith ) * 0.5f; } -#ifdef FIX_1002_DEC_PHASE_ECU_USAN_OF_PHASE Xph_short = (int16_t) ( ( (int32_t) ( ( Xph * 512 ) / EVS_PI ) ) & 0x000003ff ); -#else - Xph_short = (int16_t) ( Xph * 512 / EVS_PI ) & 0x03ff; -#endif if ( Xph_short >= 512 ) { diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 563e264374437440a466c52b5e7212ff603a910b..c76f6ba430f597ae7877799cfd3e8e930289497b 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -881,7 +881,6 @@ static void ivas_binaural_obtain_DMX( set_zero( outRealRightPtr, CLDFB_NO_CHANNELS_MAX ); set_zero( outImagRightPtr, CLDFB_NO_CHANNELS_MAX ); -#ifdef NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING /*Ambisonics input requires different processing*/ if ( hBinRenderer->nInChannels == 16 ) { @@ -904,7 +903,6 @@ static void ivas_binaural_obtain_DMX( } } else -#endif { for ( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { @@ -1213,11 +1211,7 @@ ivas_error ivas_binRenderer_open( #ifdef NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 ) #else -#ifdef NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 && hBinRenderer->nInChannels != HOA3_CHANNELS ) -#else - if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 ) -#endif #endif { for ( k = 0; k < 11; k++ ) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 167e80a9fb1e145ede87b9a350588c47677b4f08..49c6736aa86f191b974e479bbb92a5bd78cd3737 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1808,39 +1808,6 @@ void ivas_dirac_dec_render_sf( set_zero( surCohRatio, hSpatParamRendCom->num_freq_bands ); } } -#ifndef FIX_998_UNUSED_FUNCTION - - if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[st_ivas->hCombinedOrientationData->subframe_idx] && st_ivas->hCombinedOrientationData->shd_rot_max_order == 1 ) - { - ivas_dirac_dec_compute_directional_responses( hSpatParamRendCom, - hDirACRend, - st_ivas->hVBAPdata, - st_ivas->hMasa == NULL ? NULL : st_ivas->hMasa->data.band_mapping, - st_ivas->hMasaIsmData, - azimuth, - elevation, - md_idx, - surCohRatio, - st_ivas->hCombinedOrientationData->shd_rot_max_order, - p_Rmat, - hodirac_flag ); - } - else - { - ivas_dirac_dec_compute_directional_responses( hSpatParamRendCom, - hDirACRend, - st_ivas->hVBAPdata, - st_ivas->hMasa == NULL ? NULL : st_ivas->hMasa->data.band_mapping, - st_ivas->hMasaIsmData, - azimuth, - elevation, - md_idx, - surCohRatio, - 0, - NULL, - hodirac_flag ); - } -#else ivas_dirac_dec_compute_directional_responses( hSpatParamRendCom, hDirACRend, st_ivas->hVBAPdata, @@ -1851,8 +1818,6 @@ void ivas_dirac_dec_render_sf( md_idx, surCohRatio, hodirac_flag ); - -#endif } if ( st_ivas->ivas_format == MASA_ISM_FORMAT && nchan_transport == 2 ) @@ -2182,44 +2147,6 @@ void ivas_dirac_dec_render_sf( } /*Compute PSDs*/ -#ifndef FIX_998_UNUSED_FUNCTION - if ( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[st_ivas->hCombinedOrientationData->subframe_idx] && st_ivas->hCombinedOrientationData->shd_rot_max_order > 0 ) - { - ivas_dirac_dec_output_synthesis_process_slot( reference_power, - p_onset_filter, - azimuth, - elevation, - hSpatParamRendCom->diffuseness_vector[md_idx], - hSpatParamRendCom, - hDirACRend, - st_ivas->hCombinedOrientationData->shd_rot_max_order, - p_Rmat, - st_ivas->hVBAPdata, - hDirACRend->hOutSetup, - nchan_transport, - md_idx, - hodirac_flag, - hDirAC->hConfig->dec_param_estim ); - } - else - { - ivas_dirac_dec_output_synthesis_process_slot( reference_power, - p_onset_filter, - azimuth, - elevation, - hSpatParamRendCom->diffuseness_vector[md_idx], - hSpatParamRendCom, - hDirACRend, - 0, - 0, - st_ivas->hVBAPdata, - hDirACRend->hOutSetup, - nchan_transport, - md_idx, - hodirac_flag, - hDirAC->hConfig->dec_param_estim ); - } -#else ivas_dirac_dec_output_synthesis_process_slot( reference_power, p_onset_filter, azimuth, @@ -2234,7 +2161,6 @@ void ivas_dirac_dec_render_sf( hodirac_flag, hDirAC->hConfig->dec_param_estim ); -#endif if ( hDirAC->hConfig->dec_param_estim ) { diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 6d5b5f3e2718224e7b491c2d24576063612ed5c6..1c12fcdaa9eb6747ffa85dbb39ac82979d95242e 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -281,13 +281,9 @@ void ivas_ism_render_sf( ivas_combined_orientation_update_index( st_ivas->hCombinedOrientationData, n_samples_in_subframe ); n_samples_rendered_loop += n_samples_in_subframe; -#ifdef NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO /* update rendered subframe and slots info for all cases apart from a following crend call, the update will then happen in the crend call*/ if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) -#else - if ( st_ivas->renderer_type == RENDERER_TD_PANNING ) -#endif { st_ivas->hTcBuffer->subframes_rendered += 1; st_ivas->hTcBuffer->slots_rendered += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 2ce6d0620247d6f4d2986fa8197b32a9ff97b887..03225fb895168c1a434331f2579a7d961ccae3ae 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1061,11 +1061,7 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { -#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING ivas_apply_non_diegetic_panning( p_tc[0], p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered ); -#else - ivas_apply_non_diegetic_panning( p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered ); -#endif } #ifdef DEBUGGING @@ -1483,12 +1479,7 @@ ivas_error ivas_jbm_dec_flush_renderer( int16_t n_slots_still_available; int16_t n_samples_to_render; DECODER_TC_BUFFER_HANDLE hTcBuffer; -#ifdef NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER float *p_output[MAX_CICP_CHANNELS + MAX_NUM_OBJECTS]; -#else - float output[MAX_CICP_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; - float *p_output[MAX_CICP_CHANNELS]; -#endif if ( !st_ivas->hDecoderConfig->Opt_tsm ) { @@ -1533,17 +1524,10 @@ ivas_error ivas_jbm_dec_flush_renderer( hTcBuffer->n_samples_flushed = n_samples_to_render; hTcBuffer->n_samples_rendered = 0; -#ifdef NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER for ( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) { p_output[ch_idx] = st_ivas->p_output_f[ch_idx]; } -#else - for ( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ ) - { - p_output[ch_idx] = output[ch_idx]; - } -#endif if ( st_ivas->ivas_format == ISM_FORMAT ) { diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 6344ba3409db2546172b720b25bbe00eb973cda1..c93161d2bca7c2136e9f058a6c55f36c766fd0a0 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -142,12 +142,10 @@ ivas_error ivas_masa_decode( st->next_bit_pos = (int16_t) ( ( masa_brate / FRAMES_PER_SEC ) - 1 ); } -#ifdef NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS if ( ivas_format == MASA_FORMAT && ( masa_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) ) { hMasa->config.numberOfDirections = 1; } -#endif if ( !st->bfi && ivas_total_brate > IVAS_SID_5k2 ) { diff --git a/lib_dec/ivas_mono_dmx_renderer.c b/lib_dec/ivas_mono_dmx_renderer.c index 07d6011aa69a339d937762c62240026315a38129..b3003bfc975c15f3292566b1bc4f1778db5a5cbd 100644 --- a/lib_dec/ivas_mono_dmx_renderer.c +++ b/lib_dec/ivas_mono_dmx_renderer.c @@ -220,9 +220,7 @@ void ivas_mono_stereo_downmix_mcmasa( *------------------------------------------------------------------------*/ void ivas_apply_non_diegetic_panning( -#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - float *input_f, /* i : non-diegetic object */ -#endif + float *input_f, /* i : non-diegetic object */ float *output_f[], /* o: core-coder transport mono channel/stereo output */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ const int16_t output_frame /* i : output frame length per channel */ @@ -233,13 +231,8 @@ void ivas_apply_non_diegetic_panning( pan_left = ( non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; -#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING v_multc( input_f, pan_right, output_f[1], output_frame ); v_multc( input_f, pan_left, output_f[0], output_frame ); -#else - v_multc( output_f[0], pan_right, output_f[1], output_frame ); - v_multc( output_f[0], pan_left, output_f[0], output_frame ); -#endif return; } diff --git a/lib_dec/ivas_stereo_dft_dec_dmx.c b/lib_dec/ivas_stereo_dft_dec_dmx.c index 2fba8e5e197f3289910f7b8bc3418684da0706dc..982680517667be7d5bd2b174b3764e730ade594d 100644 --- a/lib_dec/ivas_stereo_dft_dec_dmx.c +++ b/lib_dec/ivas_stereo_dft_dec_dmx.c @@ -229,11 +229,7 @@ void stereo_dft_unify_dmx( if ( st0->bfi && !prev_bfi ) { int16_t idx_k0, idx_k1; -#ifdef NONBE_FIX_1006_PAST_DMX_NRG_ERROR idx_k0 = ( hStereoDft->past_DMX_pos + STEREO_DFT_PAST_MAX - 1 ) % STEREO_DFT_PAST_MAX; -#else - idx_k0 = ( hStereoDft->past_DMX_pos + 1 ) % STEREO_DFT_PAST_MAX; -#endif idx_k1 = ( idx_k0 + 1 ) % STEREO_DFT_PAST_MAX; /*dmx energy memory*/ diff --git a/lib_dec/syn_outp.c b/lib_dec/syn_outp.c index b5332088505931612d1ba9ae876335ee257c9a06..0720d38c978e2d8915a8f68ed46272b91a99ef0a 100644 --- a/lib_dec/syn_outp.c +++ b/lib_dec/syn_outp.c @@ -44,29 +44,6 @@ #include "prot.h" #include "wmc_auto.h" -#ifndef FIX_960_SYN_OUTPUT -/*-------------------------------------------------------------------* - * syn_output() - * - * Output synthesis signal with compensation for saturation - * returns number of clipped samples - *-------------------------------------------------------------------*/ - -/*! r: number of clipped samples */ -uint32_t syn_output( - float *synth, /* i/o: float synthesis signal */ - const int16_t output_frame, /* i : output frame length */ - int16_t *synth_out /* o : integer 16 bits synthesis signal */ -) -{ - /*-----------------------------------------------------------------* - * float to integer conversion with saturation control - *-----------------------------------------------------------------*/ - - /* integer conversion */ - return mvr2s( synth, synth_out, output_frame ); -} -#endif /*-------------------------------------------------------------------* * AGC_dec() diff --git a/lib_rend/ivas_dirac_output_synthesis_dec.c b/lib_rend/ivas_dirac_output_synthesis_dec.c index d2ca7315bf73e48cd82530e72e296dbdbbc01bed..34103627ce5fe4502eaafef7adcdc5a9620ecef4 100644 --- a/lib_rend/ivas_dirac_output_synthesis_dec.c +++ b/lib_rend/ivas_dirac_output_synthesis_dec.c @@ -542,13 +542,9 @@ void ivas_dirac_dec_output_synthesis_process_slot( const float *diffuseness, SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ -#ifndef FIX_998_UNUSED_FUNCTION - const int16_t sh_rot_max_order, - const float *p_Rmat, /* i : rotation matrix */ -#endif - const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ - const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ - const int16_t nchan_transport, /* i : number of transport channels*/ + const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ + const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ + const int16_t nchan_transport, /* i : number of transport channels*/ const int16_t md_idx, const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ const int16_t dec_param_estim ) @@ -592,10 +588,6 @@ void ivas_dirac_dec_output_synthesis_process_slot( elevation, md_idx, NULL, -#ifndef FIX_998_UNUSED_FUNCTION - 2, - p_Rmat, -#endif hodirac_flag ); } @@ -642,10 +634,6 @@ void ivas_dirac_dec_output_synthesis_process_slot( elevation, md_idx, NULL, -#ifndef FIX_998_UNUSED_FUNCTION - sh_rot_max_order, - p_Rmat, -#endif hodirac_flag ); if ( hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) @@ -1576,171 +1564,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( return; } -#ifndef FIX_998_UNUSED_FUNCTION - -/*------------------------------------------------------------------------- - * ivas_dirac_dec_get_response_split_order() - * - * calculate reponse, 1 degree resolution - *------------------------------------------------------------------------*/ - -static void ivas_dirac_dec_get_response_split_order( - const int16_t azimuth, - const int16_t elevation, - float *response, - const int16_t shd_rot_max_order, - const float *p_Rmat ) -{ - int16_t index_azimuth, index_elevation; - int16_t el, e, az; - float cos_1, cos_2, sin_1, cos_az[3]; - float sin_az[3]; - float f, c; - int16_t l, m; - int16_t b, b1, b_2, b1_2, a; - float dv_0, dv_1, dv_2, dv_r_0, dv_r_1, dv_r_2; - float w; - - push_wmops( "ivas_dirac_dec_get_response_split_order" ); - - index_azimuth = ( azimuth + 180 ) % 360; - index_elevation = elevation + 90; - e = index_elevation > 90 ? -1 : 1; - el = index_elevation > 90 ? 180 - index_elevation : index_elevation; - - az = index_azimuth > 180 ? 360 - index_azimuth : index_azimuth; - f = index_azimuth > 180 ? -1.0f : 1.0f; - - cos_1 = dirac_gains_trg_term[az][0]; - sin_1 = f * dirac_gains_trg_term[az][1]; - - cos_2 = cos_1 * cos_1; - - cos_az[0] = cos_1; - cos_az[1] = 2.0f * cos_2 - 1.0f; - cos_az[2] = 2.0f * cos_1 * cos_az[1] - cos_az[0]; - sin_az[0] = sin_1; - sin_az[1] = sin_1 * 2.0f * cos_1; - sin_az[2] = sin_1 * ( 4.0f * cos_2 - 1.0f ); - - response[0] = 1.0f; - for ( l = 1; l <= shd_rot_max_order; l++ ) - { - b_2 = l * l; - b1_2 = l * l + 2 * l; - for ( m = 0; m < l; m += 2 ) - { - b = b_2 + m; - a = dirac_gains_P_idx[b]; - c = SQRT2 * dirac_gains_norm_term[a] * dirac_gains_Pnm[el][a]; - - response[b] = c * sin_az[l - m - 1]; - - b1 = b1_2 - m; - response[b1] = c * cos_az[l - m - 1]; - } - - for ( m = 1; m < l; m += 2 ) - { - b = b_2 + m; - a = dirac_gains_P_idx[b]; - c = SQRT2 * dirac_gains_norm_term[a] * dirac_gains_Pnm[el][a]; - c = c * e; - - response[b] = c * sin_az[l - m - 1]; - - b1 = b1_2 - m; - response[b1] = c * cos_az[l - m - 1]; - } - - b = b_2 + l; - a = dirac_gains_P_idx[b]; - c = dirac_gains_norm_term[a] * dirac_gains_Pnm[el][a]; - if ( l % 2 == 1 ) - { - c = c * e; - } - - response[b] = c; - } - - /*Conversion spherical to cartesian coordinates*/ - w = -dirac_gains_trg_term[el][1]; - dv_0 = w * cos_1; - dv_1 = w * sin_1; - dv_2 = e * dirac_gains_trg_term[el][0]; - - /*Rotation mtx multiplication*/ - dv_r_0 = p_Rmat[0] * dv_0 + p_Rmat[1] * dv_1 + p_Rmat[2] * dv_2; - dv_r_1 = p_Rmat[3] * dv_0 + p_Rmat[4] * dv_1 + p_Rmat[5] * dv_2; - dv_r_2 = p_Rmat[6] * dv_0 + p_Rmat[7] * dv_1 + p_Rmat[8] * dv_2; - - index_azimuth = ( (int16_t) ( atan2f( dv_r_1, dv_r_0 ) * _180_OVER_PI ) + 180 ) % 360; - index_elevation = (int16_t) ( atan2f( dv_r_2, sqrtf( dv_r_0 * dv_r_0 + dv_r_1 * dv_r_1 ) ) * _180_OVER_PI ) + 90; - e = index_elevation > 90 ? -1 : 1; - el = index_elevation > 90 ? 180 - index_elevation : index_elevation; - - az = index_azimuth > 180 ? 360 - index_azimuth : index_azimuth; - f = index_azimuth > 180 ? -1.0f : 1.0f; - - cos_1 = dirac_gains_trg_term[az][0]; - sin_1 = f * dirac_gains_trg_term[az][1]; - - cos_2 = cos_1 * cos_1; - - cos_az[0] = cos_1; - cos_az[1] = 2.0f * cos_2 - 1.0f; - cos_az[2] = 2.0f * cos_1 * cos_az[1] - cos_az[0]; - sin_az[0] = sin_1; - sin_az[1] = sin_1 * 2.0f * cos_1; - sin_az[2] = sin_1 * ( 4.0f * cos_2 - 1.0f ); - - for ( l = shd_rot_max_order + 1; l <= 3; l++ ) - { - b_2 = l * l; - b1_2 = l * l + 2 * l; - for ( m = 0; m < l; m += 2 ) - { - b = b_2 + m; - a = dirac_gains_P_idx[b]; - c = SQRT2 * dirac_gains_norm_term[a] * dirac_gains_Pnm[el][a]; - - response[b] = c * sin_az[l - m - 1]; - - b1 = b1_2 - m; - response[b1] = c * cos_az[l - m - 1]; - } - - for ( m = 1; m < l; m += 2 ) - { - b = b_2 + m; - a = dirac_gains_P_idx[b]; - c = SQRT2 * dirac_gains_norm_term[a] * dirac_gains_Pnm[el][a]; - c = c * e; - - response[b] = c * sin_az[l - m - 1]; - - b1 = b1_2 - m; - response[b1] = c * cos_az[l - m - 1]; - } - - b = b_2 + l; - a = dirac_gains_P_idx[b]; - c = dirac_gains_norm_term[a] * dirac_gains_Pnm[el][a]; - if ( l % 2 == 1 ) - { - c = c * e; - } - - response[b] = c; - } - - pop_wmops(); - - return; -} - -#endif /*------------------------------------------------------------------------- * ivas_dirac_dec_compute_directional_responses() @@ -1758,10 +1581,6 @@ void ivas_dirac_dec_compute_directional_responses( const int16_t *elevation, const int16_t md_idx, const float *surCohRatio, -#ifndef FIX_998_UNUSED_FUNCTION - const int16_t shd_rot_max_order, /* i : split-order rotation method */ - const float *p_Rmat, /* i : rotation matrix */ -#endif const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ) { @@ -1832,28 +1651,12 @@ void ivas_dirac_dec_compute_directional_responses( set_f( direct_response_hoa, 1.0f, MAX_OUTPUT_CHANNELS ); set_f( direct_response_dir2, 1.0f, MAX_OUTPUT_CHANNELS ); -#ifndef FIX_998_UNUSED_FUNCTION - if ( p_Rmat != 0 ) - { - ivas_dirac_dec_get_response_split_order( azimuth[k], elevation[k], direct_response_hoa, shd_rot_max_order, p_Rmat ); + ivas_dirac_dec_get_response( azimuth[k], elevation[k], direct_response_hoa, hDirACRend->hOutSetup.ambisonics_order ); - if ( hodirac_flag ) - { - ivas_dirac_dec_get_response_split_order( azimuth2[k], elevation2[k], direct_response_dir2, shd_rot_max_order, p_Rmat ); - } - } - else + if ( hodirac_flag ) { -#endif - ivas_dirac_dec_get_response( azimuth[k], elevation[k], direct_response_hoa, hDirACRend->hOutSetup.ambisonics_order ); - - if ( hodirac_flag ) - { - ivas_dirac_dec_get_response( azimuth2[k], elevation2[k], direct_response_dir2, hDirACRend->hOutSetup.ambisonics_order ); - } -#ifndef FIX_998_UNUSED_FUNCTION + ivas_dirac_dec_get_response( azimuth2[k], elevation2[k], direct_response_dir2, hDirACRend->hOutSetup.ambisonics_order ); } -#endif if ( masa_band_mapping == NULL && hDirACRend->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { diff --git a/lib_rend/ivas_dirac_rend.c b/lib_rend/ivas_dirac_rend.c index c0b7de3c37762767d505ff87498d7913cbf0da63..9480e6374b0875378ce9f5aba99db7b816323175 100644 --- a/lib_rend/ivas_dirac_rend.c +++ b/lib_rend/ivas_dirac_rend.c @@ -2216,10 +2216,6 @@ static void ivas_masa_ext_dirac_render_sf( elevation, md_idx, surCohRatio, -#ifndef FIX_998_UNUSED_FUNCTION - 0, - NULL, -#endif 0 ); @@ -2374,10 +2370,6 @@ static void ivas_masa_ext_dirac_render_sf( hSpatParamRendCom->diffuseness_vector[md_idx], hSpatParamRendCom, hDirACRend, -#ifndef FIX_998_UNUSED_FUNCTION - 0, - 0, -#endif hMasaExtRend->hVBAPdata, hDirACRend->hOutSetup, nchan_transport, diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index dc490831b08bb28e0f95b777b1f88d5338f4b9d8..3bf8bfb319507c7850e0b26c6984f34a09c9f922 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -435,10 +435,6 @@ void ivas_dirac_dec_output_synthesis_process_slot( const float *diffuseness, SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ -#ifndef FIX_998_UNUSED_FUNCTION - const int16_t sh_rot_max_order, - const float *p_Rmat, /* i : rotation matrix */ -#endif const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ const int16_t nchan_transport, /* i : number of transport channels */ @@ -505,10 +501,6 @@ void ivas_dirac_dec_compute_directional_responses( const int16_t *elevation, const int16_t md_idx, const float *surCohRatio, -#ifndef FIX_998_UNUSED_FUNCTION - const int16_t shd_rot_max_order, /* i : split-order rotation method */ - const float *p_Rmat, /* i : rotation matrix */ -#endif const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index e9c8b00916f5e5669cabbe3cd082dbf85a5da44f..82d134040f1113e13ca3eacb2865bcbddde7f49a 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -2239,11 +2239,7 @@ ivas_error RenderConfigReader_read( return IVAS_ERR_INVALID_RENDER_CONFIG; } idx = strtol( strtok( NULL, ":" ), NULL, 0 ); -#ifdef FIX_1020_AEID_SELECTION_ERRORS pRenderConfigReader->pAE[acIdx].id = idx; -#else - pRenderConfigReader->pAE->id = idx; -#endif aeHasFgIdx = aeHasPredelay = aeHasRt60 = aeHasDsr = FALSE; aeHasERsize = aeHasERabs = FALSE;