diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index 06494a4a70239232fd7e58dae51396db16840d38..501c91a359ed8bdca3784d70fb894eef3fca262f 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -1155,9 +1155,7 @@ void ivas_mono_stereo_downmix_mcmasa_fx( ); void ivas_apply_non_diegetic_panning_fx( -#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING Word32 *input_f_fx, /* i : non-diegetic object */ -#endif Word32 *output_f_fx[], /* i/o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain */ const Word16 output_frame /* i : output frame length per channel */ @@ -4923,13 +4921,6 @@ ivas_error ivas_cldfb_dec_reconfig_fx( ivas_error ivas_sba_enc_reconfigure_fx( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); -#ifndef FIX_993_REMOVE_SBA_GET_ORDER -Word16 ivas_sba_get_order_fx( - const Word16 nb_channels, /* i : Number of ambisonic channels */ - const Word16 sba_planar /* i : SBA planar flag */ -); - -#endif /*! r: Ambisonic (SBA) order used for analysis and coding */ Word16 ivas_sba_get_analysis_order( const Word32 ivas_total_brate, /* i : IVAS total bitrate */ diff --git a/lib_com/ivas_sba_config_fx.c b/lib_com/ivas_sba_config_fx.c index 6dbe215ea842e24be517c491a7fab7b0aa95ce02..ab4d931ad2cfe6a180c22060f41619324763f018 100644 --- a/lib_com/ivas_sba_config_fx.c +++ b/lib_com/ivas_sba_config_fx.c @@ -60,24 +60,7 @@ void ivas_sba_config_fx( Word16 *element_mode /* o : element mode of the core coder */ ) { -#ifndef FIX_993_REMOVE_SBA_GET_ORDER - test(); - 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_fx( nb_channels, sba_planar ); - } - ELSE IF( nb_channels < 0 ) - { - nb_channels = ivas_sba_get_nchan_fx( sba_order, sba_planar ); - } - ELSE -#else IF( nb_channels > 0 ) -#endif { IF( sba_planar ) { @@ -128,57 +111,6 @@ void ivas_sba_config_fx( return; } -#ifndef FIX_993_REMOVE_SBA_GET_ORDER -/*-------------------------------------------------------------------* - * ivas_sba_get_order() - * - * Get Ambisonic order from number of ambisonic channels - *-------------------------------------------------------------------*/ - -/*! r: Ambisonic (SBA) order */ -Word16 ivas_sba_get_order_fx( - const Word16 nb_channels, /* i : Number of ambisonic channels */ - const Word16 sba_planar /* i : SBA Planar flag */ -) -{ - Word16 sba_order; - - /* sba_order = (int16_t) sqrtf( (float) nb_channels ) - 1 */ - Word16 sba_order_non_sba_planar[MAX_INPUT_CHANNELS] = { 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3 }; - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - move16(); - - IF( sba_planar ) - { - sba_order = shr( sub( nb_channels, 1 ), 1 ); - assert( ( EQ_16( add( shl( sba_order, 1 ), 1 ), nb_channels ) ) && "Number of channels not supported in Planar SBA!" ); - } - ELSE - { - sba_order = sba_order_non_sba_planar[nb_channels - 1]; - move16(); - assert( ( EQ_16( mult( add( sba_order, 1 ), add( 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 662fb2be24f4d2c00ea8eb1fe427adfd80728b46..1926ef74201502e790a43d7f19ec969a456a7c64 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -119,17 +119,9 @@ #define FIX_INV_DIFFUSE_WEIGHT /* Orange : Fix error in energy compensation in late binaural */ -#define FIX_993_REMOVE_SBA_GET_ORDER /* VA: issue 993: remove unused function ivas_sba_get_order() */ //#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ -#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 activate 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_dec/ivas_binRenderer_internal_fx.c b/lib_dec/ivas_binRenderer_internal_fx.c index 75b746ae7653afb7e7ea57ce2a6130fc114572ab..cf2f4a9a02e4792f90b9a429f6a4996eb410d5e7 100644 --- a/lib_dec/ivas_binRenderer_internal_fx.c +++ b/lib_dec/ivas_binRenderer_internal_fx.c @@ -1015,7 +1015,6 @@ static void ivas_binaural_obtain_DMX_fx( set32_fx( outRealRightPtr_fx, 0, CLDFB_NO_CHANNELS_MAX ); set32_fx( outImagRightPtr_fx, 0, CLDFB_NO_CHANNELS_MAX ); -#ifdef NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING /*Ambisonics input requires different processing*/ if ( EQ_16( hBinRenderer->nInChannels, HOA3_CHANNELS ) ) { @@ -1038,7 +1037,6 @@ static void ivas_binaural_obtain_DMX_fx( } } else -#endif { FOR( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ ) { @@ -1397,11 +1395,7 @@ ivas_error ivas_binRenderer_open_fx( #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 && NE_16( 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_fx.c b/lib_dec/ivas_dirac_dec_fx.c index e3b32d3fcab322564a565c85fd1b1036f8a2bd78..391f598bacc4405b9428dc936c1a67a693c0d825 100644 --- a/lib_dec/ivas_dirac_dec_fx.c +++ b/lib_dec/ivas_dirac_dec_fx.c @@ -2752,42 +2752,6 @@ void ivas_dirac_dec_render_sf_fx( { masa_band_mapping = st_ivas->hMasa->data.band_mapping; } -#ifndef FIX_998_UNUSED_FUNCTION - test(); - test(); - IF( st_ivas->hCombinedOrientationData && st_ivas->hCombinedOrientationData->enableCombinedOrientation[st_ivas->hCombinedOrientationData->subframe_idx] && EQ_16( st_ivas->hCombinedOrientationData->shd_rot_max_order, 1 ) ) - { - ivas_dirac_dec_compute_directional_responses_fx( hSpatParamRendCom, - hDirACRend, - st_ivas->hVBAPdata, - masa_band_mapping, - st_ivas->hMasaIsmData, - azimuth, - elevation, - md_idx, - surCohRatio_fx, - surCohRatio_q_fx, - st_ivas->hCombinedOrientationData->shd_rot_max_order, - p_Rmat_fx, - hodirac_flag ); - } - ELSE - { - ivas_dirac_dec_compute_directional_responses_fx( hSpatParamRendCom, - hDirACRend, - st_ivas->hVBAPdata, - masa_band_mapping, - st_ivas->hMasaIsmData, - azimuth, - elevation, - md_idx, - surCohRatio_fx, - surCohRatio_q_fx, - 0, - NULL, - hodirac_flag ); - } -#else ivas_dirac_dec_compute_directional_responses_fx( hSpatParamRendCom, hDirACRend, st_ivas->hVBAPdata, @@ -2799,8 +2763,6 @@ void ivas_dirac_dec_render_sf_fx( surCohRatio_fx, surCohRatio_q_fx, hodirac_flag ); - -#endif } test(); @@ -3316,50 +3278,6 @@ void ivas_dirac_dec_render_sf_fx( move16(); } -#ifndef FIX_998_UNUSED_FUNCTION - test(); - test(); - 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_fx( reference_power_fx, - DirAC_mem.reference_power_q, - p_onset_filter_fx, - azimuth, - elevation, - hSpatParamRendCom->diffuseness_vector_fx[md_idx], - hSpatParamRendCom->q_diffuseness_vector, - hSpatParamRendCom, - hDirACRend, - st_ivas->hCombinedOrientationData->shd_rot_max_order, - p_Rmat_fx, - st_ivas->hVBAPdata, - hDirACRend->hOutSetup, - nchan_transport, - md_idx, - hodirac_flag, - hDirAC->hConfig->dec_param_estim ); - } - ELSE - { - ivas_dirac_dec_output_synthesis_process_slot_fx( reference_power_fx, - DirAC_mem.reference_power_q, - p_onset_filter_fx, - azimuth, - elevation, - hSpatParamRendCom->diffuseness_vector_fx[md_idx], - hSpatParamRendCom->q_diffuseness_vector, - 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_fx( reference_power_fx, DirAC_mem.reference_power_q, p_onset_filter_fx, @@ -3376,7 +3294,6 @@ void ivas_dirac_dec_render_sf_fx( hodirac_flag, hDirAC->hConfig->dec_param_estim ); -#endif IF( hDirAC->hConfig->dec_param_estim ) { diff --git a/lib_dec/ivas_ism_renderer_fx.c b/lib_dec/ivas_ism_renderer_fx.c index 370905afda9659b887cf1c52e0be448256ad5737..f303ac7619ea70bbccdf2efed13666aa7985b6d7 100644 --- a/lib_dec/ivas_ism_renderer_fx.c +++ b/lib_dec/ivas_ism_renderer_fx.c @@ -327,13 +327,9 @@ void ivas_ism_render_sf_fx( ivas_combined_orientation_update_index( st_ivas->hCombinedOrientationData, n_samples_in_subframe ); n_samples_rendered_loop = add( 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 ( NE_16( st_ivas->renderer_type, RENDERER_BINAURAL_MIXER_CONV_ROOM ) ) -#else - IF( EQ_16( st_ivas->renderer_type, RENDERER_TD_PANNING ) ) -#endif { st_ivas->hTcBuffer->subframes_rendered = add( st_ivas->hTcBuffer->subframes_rendered, 1 ); st_ivas->hTcBuffer->slots_rendered = add( st_ivas->hTcBuffer->slots_rendered, st_ivas->hTcBuffer->subframe_nbslots[subframe_idx] ); diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index c7863bb9850a9ab1100d3f4b26e6c26489b25501..bc4a732e07f7ccb62c934ae28bf67552a65e8816 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -1962,11 +1962,7 @@ ivas_error ivas_jbm_dec_render_fx( } ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_NON_DIEGETIC_DOWNMIX ) ) { -#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING ivas_apply_non_diegetic_panning_fx( p_tc_fx[0], p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); -#else - ivas_apply_non_diegetic_panning_fx( p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); -#endif } #ifdef DEBUGGING ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) ) @@ -2598,12 +2594,7 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( Word16 n_slots_still_available; Word16 n_samples_to_render; DECODER_TC_BUFFER_HANDLE hTcBuffer; -#ifdef NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER Word32 *p_output_fx[MAX_CICP_CHANNELS + MAX_NUM_OBJECTS]; -#else - Word32 output_fx[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; - Word32 *p_output_fx[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; -#endif Word16 nchan_in, nchan_out; IF( !st_ivas->hDecoderConfig->Opt_tsm ) { @@ -2663,17 +2654,10 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( move16(); move16(); -#ifdef NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER FOR( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) { p_output_fx[ch_idx] = st_ivas->p_output_fx[ch_idx]; } -#else - FOR( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ ) - { - p_output_fx[ch_idx] = output_fx[ch_idx]; - } -#endif test(); IF( EQ_16( st_ivas->ivas_format, ISM_FORMAT ) ) @@ -2863,15 +2847,9 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( #ifndef DISABLE_LIMITER Word16 ch_idx, exp = 11; move16(); -#ifdef NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER FOR( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) { p_output_fx[ch_idx] = st_ivas->p_output_fx[ch_idx]; -#else - FOR( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ ) - { - p_output_fx[ch_idx] = output_fx[ch_idx]; -#endif } ivas_limiter_dec_fx( st_ivas->hLimiter, p_output_fx, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect, exp ); #endif diff --git a/lib_dec/ivas_masa_dec_fx.c b/lib_dec/ivas_masa_dec_fx.c index 8bf808ed6cfe3ec1868b6337956f0ac07b94e826..8fdf80ee82624ef002d0345d8602dc66988d1e11 100644 --- a/lib_dec/ivas_masa_dec_fx.c +++ b/lib_dec/ivas_masa_dec_fx.c @@ -166,7 +166,6 @@ ivas_error ivas_masa_decode_fx( } move16(); -#ifdef NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS test(); test(); IF( EQ_32( ivas_format, MASA_FORMAT ) && ( EQ_32( masa_brate, IVAS_SID_5k2 ) || EQ_32( ivas_total_brate, FRAME_NO_DATA ) ) ) @@ -174,7 +173,6 @@ ivas_error ivas_masa_decode_fx( hMasa->config.numberOfDirections = 1; move16(); } -#endif test(); test(); diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index 4f04c4dd8da59f05cda720a60dc07a1fb8591bcc..848f457eb468cbf5486ec65b99905265ff1f82a0 100644 --- a/lib_dec/ivas_mono_dmx_renderer_fx.c +++ b/lib_dec/ivas_mono_dmx_renderer_fx.c @@ -318,9 +318,7 @@ void ivas_mono_stereo_downmix_mcmasa_fx( *------------------------------------------------------------------------*/ void ivas_apply_non_diegetic_panning_fx( -#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - Word32 *input_f_fx, /* i : non-diegetic object */ -#endif + Word32 *input_f_fx, /* i : non-diegetic object */ Word32 *output_f_fx[], /* o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain Q15*/ const Word16 output_frame /* i : output frame length per channel Q11*/ @@ -331,13 +329,8 @@ void ivas_apply_non_diegetic_panning_fx( pan_left_fx = add( mult( non_diegetic_pan_gain_fx, 16384 ), 16384 ); // 0.5.Q15 = 16384 pan_right_fx = sub( 32767, pan_left_fx ); -#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING v_multc_fixed( input_f_fx, L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); v_multc_fixed( input_f_fx, L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); -#else - v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); - v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); -#endif return; } diff --git a/lib_dec/ivas_stereo_dft_dec_dmx_fx.c b/lib_dec/ivas_stereo_dft_dec_dmx_fx.c index 59ee077e8750f6ffa703550d4c583948bba0cbf9..6a369a14c407a2563ad115ff7986e406db292264 100644 --- a/lib_dec/ivas_stereo_dft_dec_dmx_fx.c +++ b/lib_dec/ivas_stereo_dft_dec_dmx_fx.c @@ -378,15 +378,8 @@ void stereo_dft_unify_dmx_fx( Word16 idx_k0, idx_k1; Word16 q_shift0; Word16 q_shift1; -#ifdef NONBE_FIX_1006_PAST_DMX_NRG_ERROR idx_k0 = add( hStereoDft->past_DMX_pos, STEREO_DFT_PAST_MAX - 1 ) & ( STEREO_DFT_PAST_MAX - 1 ); /* Q0 */ idx_k1 = add( idx_k0, 1 ) & ( STEREO_DFT_PAST_MAX - 1 ); -#else - idx_k0 = ( add( hStereoDft->past_DMX_pos, 1 ) ) % STEREO_DFT_PAST_MAX; - move16(); - idx_k1 = ( add( idx_k0, 1 ) ) % STEREO_DFT_PAST_MAX; - move16(); -#endif q_shift0 = sub( hStereoDft->q_dft, hStereoDft->q_DFT_past_DMX_fx[idx_k0] ); q_shift1 = sub( hStereoDft->q_dft, hStereoDft->q_DFT_past_DMX_fx[idx_k1] ); diff --git a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c index 548e06fb6bd342df52d80bae6b9a686251a4db79..d96967bcf9c2181e23d42cd52cce0b688e5504e8 100644 --- a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c +++ b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c @@ -650,13 +650,9 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx( Word16 q_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 Word16 sh_rot_max_order, - const Word32 *p_Rmat, /* i : rotation matrix Q30*/ -#endif - const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ - const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ - const Word16 nchan_transport, /* i : number of transport channels*/ + const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ + const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ + const Word16 nchan_transport, /* i : number of transport channels*/ const Word16 md_idx, const Word16 hodirac_flag, /* i : flag to indicate HO-DirAC mode */ const Word16 dec_param_estim ) @@ -707,10 +703,6 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx( md_idx, NULL, 0, -#ifndef FIX_998_UNUSED_FUNCTION - 2, - p_Rmat, -#endif hodirac_flag ); { @@ -781,10 +773,6 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx( md_idx, NULL, 0, -#ifndef FIX_998_UNUSED_FUNCTION - sh_rot_max_order, - p_Rmat, -#endif hodirac_flag ); { @@ -2818,291 +2806,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx( 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_fx( - const Word16 azimuth, /*q0*/ - const Word16 elevation, /*q0*/ - Word32 *response, /*q_response*/ - const Word16 shd_rot_max_order, - const Word32 *p_Rmat /* Q30 */, - Word16 *q_response ) -{ - Word16 index_azimuth, index_elevation; - Word16 el, e, az; - Word32 cos_1, cos_2, sin_1, cos_az[3]; - Word32 sin_az[3]; - Word32 f, c; - Word16 l, m; - Word16 b, b1, b_2, b1_2, a; - Word32 dv_0, dv_1, dv_2, dv_r_0, dv_r_1, dv_r_2; - Word32 w; - Word16 tmp; - Word32 temp; - Word16 exp; - - push_wmops( "ivas_dirac_dec_get_response_split_order" ); - - /* Corner case for handling crash in idiv1616 when numerator is 0 */ - IF( EQ_16( azimuth, -180 ) ) - { - tmp = 0; - move16(); - } - ELSE - { - tmp = idiv1616( add( azimuth, 180 ), 360 ); - } - index_azimuth = sub( add( azimuth, 180 ), i_mult( tmp, 360 ) ); // index_azimuth = (azimuth + 180) % 360 - index_elevation = add( elevation, 90 ); - - IF( GT_16( index_elevation, 90 ) ) - { - e = -ONE_IN_Q14; /*-1 in Q14*/ - move16(); - el = sub( 180, index_elevation ); - } - ELSE - { - e = ONE_IN_Q14; /*1 in Q14*/ - move16(); - el = index_elevation; - move16(); - } - - IF( GT_16( index_azimuth, 180 ) ) - { - az = sub( 360, index_azimuth ); - f = -ONE_IN_Q30; /*-1 Q30*/ - move32(); - } - ELSE - { - az = index_azimuth; - move16(); - f = ONE_IN_Q30; /*1 Q30*/ - move32(); - } - - // dirac_gains_trg_term_int Q30 - cos_1 = L_shr( dirac_gains_trg_term_int[az][0], 1 ); // Q29 - cos_2 = L_shl( Mpy_32_32( cos_1, cos_1 ), 2 ); // Q29 - sin_1 = Mpy_32_32( f, dirac_gains_trg_term_int[az][1] ); // Q29 - - cos_az[0] = cos_1; // Q29 - move32(); - cos_az[1] = L_shl( L_sub( Mpy_32_32( TWO_IN_Q29, cos_2 ), ONE_IN_Q27 ), 2 ); // Q29 - move32(); - cos_az[2] = L_sub( L_shl( Mpy_32_32( Mpy_32_32( TWO_IN_Q29, cos_1 ), cos_az[1] ), 4 ), cos_az[0] ); // Q29 - move32(); - - sin_az[0] = sin_1; // Q29 - move32(); - sin_az[1] = L_shl( Mpy_32_32( Mpy_32_32( sin_1, TWO_IN_Q29 ), cos_1 ), 4 ); // Q29 - move32(); - sin_az[2] = L_shl( Mpy_32_32( sin_1, L_sub( Mpy_32_32( FOUR_IN_Q28, cos_2 ), ONE_IN_Q26 ) ), 5 ); // Q29 - move32(); - - response[0] = ONE_IN_Q29; - move32(); - - FOR( l = 1; l <= shd_rot_max_order; l++ ) - { - b_2 = i_mult( l, l ); - b1_2 = add( b_2, i_mult( 2, l ) ); - FOR( m = 0; m < l; m += 2 ) - { - b = add( b_2, m ); - a = dirac_gains_P_idx[b]; - move16(); - - c = Mpy_32_32( Mpy_32_32( SQRT2_FIXED, dirac_gains_norm_term_int[a] ), dirac_gains_Pnm_int[el][a] ); // Q25 - - response[b] = L_shl( Mpy_32_32( c, sin_az[l - m - 1] ), 6 ); // Q29 - move32(); - - b1 = sub( b1_2, m ); - response[b1] = L_shl( Mpy_32_32( c, cos_az[l - m - 1] ), 6 ); // Q29 - move32(); - } - - FOR( m = 1; m < l; m += 2 ) - { - b = add( b_2, m ); - a = dirac_gains_P_idx[b]; - move16(); - - c = Mpy_32_32( Mpy_32_32( SQRT2_FIXED, dirac_gains_norm_term_int[a] ), dirac_gains_Pnm_int[el][a] ); // Q25 - c = Mpy_32_16_1( c, e ); // Q24 - - response[b] = L_shl( Mpy_32_32( c, sin_az[l - m - 1] ), 7 ); // Q29 - move32(); - - b1 = sub( b1_2, m ); - response[b1] = L_shl( Mpy_32_32( c, cos_az[l - m - 1] ), 7 ); // Q29 - move32(); - } - - b = add( b_2, l ); - a = dirac_gains_P_idx[b]; - move16(); - - c = L_shl( Mpy_32_32( dirac_gains_norm_term_int[a], dirac_gains_Pnm_int[el][a] ), 3 ); // Q29 - IF( EQ_16( l % 2, 1 ) ) - { - c = L_shl( Mpy_32_16_1( c, e ), 1 ); // Q29 - } - - response[b] = c; // Q29 - move32(); - } - - /*Conversion spherical to cartesian coordinates*/ - w = L_negate( dirac_gains_trg_term_int[el][1] ); // Q30 - dv_0 = Mpy_32_32( w, cos_1 ); // Q28 - dv_1 = Mpy_32_32( w, sin_1 ); // Q28 - dv_2 = L_shr( Mpy_32_16_1( dirac_gains_trg_term_int[el][0], e ), 1 ); // Q28 - - /*Rotation mtx multiplication*/ - dv_r_0 = Madd_32_32( Madd_32_32( Mpy_32_32( L_shr( p_Rmat[0], Q1 ), dv_0 ), L_shr( p_Rmat[1], Q1 ), dv_1 ), L_shr( p_Rmat[2], Q1 ), dv_2 ); // Q26 - dv_r_1 = Madd_32_32( Madd_32_32( Mpy_32_32( L_shr( p_Rmat[3], Q1 ), dv_0 ), L_shr( p_Rmat[4], Q1 ), dv_1 ), L_shr( p_Rmat[5], Q1 ), dv_2 ); // Q26 - dv_r_2 = Madd_32_32( Madd_32_32( Mpy_32_32( L_shr( p_Rmat[6], Q1 ), dv_0 ), L_shr( p_Rmat[7], Q1 ), dv_1 ), L_shr( p_Rmat[8], Q1 ), dv_2 ); // Q26 - - tmp = BASOP_util_atan2( dv_r_1, dv_r_0, 0 ); // Q13 - index_azimuth = shr( mult( tmp, _180_OVER_PI_Q9 ), 7 ); // Q0; - IF( EQ_16( index_azimuth, -180 ) ) - { - tmp = 0; - move16(); - } - ELSE - { - tmp = idiv1616( add( index_azimuth, 180 ), 360 ); - } - index_azimuth = sub( add( index_azimuth, 180 ), i_mult( tmp, 360 ) ); // index_azimuth = (index_azimuth + 180) % 360 - - temp = L_add( Mpy_32_32( dv_r_0, dv_r_0 ), Mpy_32_32( dv_r_1, dv_r_1 ) ); // Q21 - exp = sub( 31, Q21 ); - temp = Sqrt32( temp, &exp ); - - tmp = BASOP_util_atan2( dv_r_2, temp, sub( sub( 31, Q26 ), exp ) ); // Q13 - index_elevation = shr( mult( tmp, _180_OVER_PI_Q9 ), Q7 ); // Q0 - index_elevation = add( index_elevation, 90 ); - - IF( GT_16( index_elevation, 90 ) ) - { - e = -ONE_IN_Q14; /*-1 Q14*/ - move16(); - el = sub( 180, index_elevation ); - } - ELSE - { - e = ONE_IN_Q14; /*1 Q14*/ - move16(); - el = index_elevation; - move16(); - } - - IF( GT_16( index_azimuth, 180 ) ) - { - az = sub( 360, index_azimuth ); - f = -ONE_IN_Q30; /*-1 Q30*/ - move32(); - } - ELSE - { - az = index_azimuth; - move16(); - f = ONE_IN_Q30; /*1 Q30*/ - move32(); - } - - // dirac_gains_trg_term_int Q30 - cos_1 = L_shr( dirac_gains_trg_term_int[az][0], 1 ); // Q29 - cos_2 = L_shl( Mpy_32_32( cos_1, cos_1 ), 2 ); // Q29 - sin_1 = Mpy_32_32( f, dirac_gains_trg_term_int[az][1] ); // Q29 - - cos_az[0] = cos_1; // Q29 - move32(); - cos_az[1] = L_shl( L_sub( Mpy_32_32( TWO_IN_Q29, cos_2 ), ONE_IN_Q27 ), 2 ); // Q29 - move32(); - cos_az[2] = L_sub( L_shl( Mpy_32_32( Mpy_32_32( TWO_IN_Q29, cos_1 ), cos_az[1] ), 4 ), cos_az[0] ); // Q29 - move32(); - - sin_az[0] = sin_1; // Q29 - move32(); - sin_az[1] = L_shl( Mpy_32_32( Mpy_32_32( sin_1, TWO_IN_Q29 ), cos_1 ), 4 ); // Q29 - move32(); - sin_az[2] = L_shl( Mpy_32_32( sin_1, L_sub( Mpy_32_32( FOUR_IN_Q28, cos_2 ), ONE_IN_Q26 ) ), 5 ); // Q29 - move32(); - - FOR( l = shd_rot_max_order + 1; l <= 3; l++ ) - { - b_2 = i_mult( l, l ); - b1_2 = add( b_2, i_mult( 2, l ) ); - - FOR( m = 0; m < l; m += 2 ) - { - b = add( b_2, m ); - a = dirac_gains_P_idx[b]; - move16(); - - c = Mpy_32_32( Mpy_32_32( SQRT2_FIXED, dirac_gains_norm_term_int[a] ), dirac_gains_Pnm_int[el][a] ); // Q25 - - response[b] = L_shl( Mpy_32_32( c, sin_az[l - m - 1] ), 6 ); // Q29 - move32(); - - b1 = sub( b1_2, m ); - response[b1] = L_shl( Mpy_32_32( c, cos_az[l - m - 1] ), 6 ); // Q29 - move32(); - } - - FOR( m = 1; m < l; m += 2 ) - { - b = add( b_2, m ); - a = dirac_gains_P_idx[b]; - move16(); - - c = Mpy_32_32( Mpy_32_32( SQRT2_FIXED, dirac_gains_norm_term_int[a] ), dirac_gains_Pnm_int[el][a] ); // Q25 - c = Mpy_32_16_1( c, e ); // Q24 - - response[b] = L_shl( Mpy_32_32( c, sin_az[l - m - 1] ), 7 ); // Q29 - move32(); - - b1 = sub( b1_2, m ); - response[b1] = L_shl( Mpy_32_32( c, cos_az[l - m - 1] ), 7 ); // Q29 - move32(); - } - - b = add( b_2, l ); - a = dirac_gains_P_idx[b]; - move16(); - - c = L_shl( Mpy_32_32( dirac_gains_norm_term_int[a], dirac_gains_Pnm_int[el][a] ), 3 ); // Q29 - - IF( EQ_16( l % 2, 1 ) ) - { - c = L_shl( Mpy_32_16_1( c, e ), 1 ); // Q29 - } - - response[b] = c; // Q29 - move32(); - } - - *q_response = Q29; - move16(); - - pop_wmops(); - - return; -} -#endif /*------------------------------------------------------------------------- * ivas_dirac_dec_compute_directional_responses() @@ -3121,10 +2824,6 @@ void ivas_dirac_dec_compute_directional_responses_fx( const Word16 md_idx, const Word32 *surCohRatio_fx, /*i:Q_surCohRatio*/ Word16 Q_surCohRatio, -#ifndef FIX_998_UNUSED_FUNCTION - const Word16 shd_rot_max_order, /* i : split-order rotation method */ - const Word32 *p_Rmat, /* i : rotation matrix Q30*/ -#endif const Word16 hodirac_flag /* i : flag to indicate HO-DirAC mode */ ) { @@ -3238,36 +2937,20 @@ void ivas_dirac_dec_compute_directional_responses_fx( exp_direct_response_dir2 = 0; move16(); -#ifndef FIX_998_UNUSED_FUNCTION - IF( p_Rmat != 0 ) - { - ivas_dirac_dec_get_response_split_order_fx( azimuth[k], elevation[k], direct_response_hoa_fx, shd_rot_max_order, p_Rmat, &Q_direct_response_hoa ); - - IF( hodirac_flag ) - { - ivas_dirac_dec_get_response_split_order_fx( azimuth2[k], elevation2[k], direct_response_dir2_fx, shd_rot_max_order, p_Rmat, &Q_direct_response_dir2 ); - } - } - ELSE - { -#endif #ifdef FIX_1310_SPEEDUP_ivas_dirac_dec_get_response_fx - ivas_dirac_dec_get_response_fx_29( azimuth[k], elevation[k], direct_response_hoa_fx, hDirACRend->hOutSetup.ambisonics_order ); + ivas_dirac_dec_get_response_fx_29( azimuth[k], elevation[k], direct_response_hoa_fx, hDirACRend->hOutSetup.ambisonics_order ); #else ivas_dirac_dec_get_response_fx( azimuth[k], elevation[k], direct_response_hoa_fx, hDirACRend->hOutSetup.ambisonics_order, Q_direct_response_hoa ); #endif - IF( hodirac_flag ) - { + IF( hodirac_flag ) + { #ifdef FIX_1310_SPEEDUP_ivas_dirac_dec_get_response_fx - ivas_dirac_dec_get_response_fx_29( azimuth2[k], elevation2[k], direct_response_dir2_fx, hDirACRend->hOutSetup.ambisonics_order ); + ivas_dirac_dec_get_response_fx_29( azimuth2[k], elevation2[k], direct_response_dir2_fx, hDirACRend->hOutSetup.ambisonics_order ); #else ivas_dirac_dec_get_response_fx( azimuth2[k], elevation2[k], direct_response_dir2_fx, hDirACRend->hOutSetup.ambisonics_order, Q_direct_response_dir2 ); #endif - } -#ifndef FIX_998_UNUSED_FUNCTION } -#endif test(); test(); diff --git a/lib_rend/ivas_dirac_rend_fx.c b/lib_rend/ivas_dirac_rend_fx.c index 02a02f863d2c7609ee108bd0cac35daf4f68c207..efcd1b0b44bde680d31dce5eac715e1df5d072af 100644 --- a/lib_rend/ivas_dirac_rend_fx.c +++ b/lib_rend/ivas_dirac_rend_fx.c @@ -4239,10 +4239,6 @@ static void ivas_masa_ext_dirac_render_sf_fx( md_idx, surCohRatio_fx, Q_surCohRatio, -#ifndef FIX_998_UNUSED_FUNCTION - 0, - NULL, -#endif 0 ); Word16 proto_direct_buffer_f_temp_q[60]; @@ -4621,10 +4617,6 @@ static void ivas_masa_ext_dirac_render_sf_fx( hSpatParamRendCom->q_diffuseness_vector, hSpatParamRendCom, hDirACRend, -#ifndef FIX_998_UNUSED_FUNCTION - 0, - 0, -#endif hMasaExtRend->hVBAPdata, hDirACRend->hOutSetup, nchan_transport, diff --git a/lib_rend/ivas_prot_rend_fx.h b/lib_rend/ivas_prot_rend_fx.h index 96774b44f019200f5ea8f03a8de24301b96dfffc..9524f0904c29471e49d4d64ec93dead44505f5b3 100644 --- a/lib_rend/ivas_prot_rend_fx.h +++ b/lib_rend/ivas_prot_rend_fx.h @@ -472,10 +472,6 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx( Word16 q_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 Word16 sh_rot_max_order, - const Word32 *p_Rmat, /* i : rotation matrix */ -#endif const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ const Word16 nchan_transport, /* i : number of transport channels*/ @@ -547,10 +543,6 @@ void ivas_dirac_dec_compute_directional_responses_fx( const Word16 md_idx, const Word32 *surCohRatio_fx, Word16 Q_surCohRatio, -#ifndef FIX_998_UNUSED_FUNCTION - const Word16 shd_rot_max_order, /* i : split-order rotation method */ - const Word32 *p_Rmat, /* i : rotation matrix */ -#endif const Word16 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 050658bdf70c3b4fad1d38d5d0634e1807d214ee..8df6c0d42330373039ab53821efa88d755856197 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -2191,11 +2191,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;