From 8906317ea92d1affc39c5110e963744ebcbd13cb Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:13:35 +0200 Subject: [PATCH 01/10] [cleanup] accept FIX_998_UNUSED_FUNCTION --- lib_com/options.h | 1 - lib_dec/ivas_dirac_dec_fx.c | 82 ----- lib_rend/ivas_dirac_output_synthesis_dec_fx.c | 317 ------------------ lib_rend/ivas_dirac_rend_fx.c | 8 - lib_rend/ivas_prot_rend_fx.h | 8 - 5 files changed, 416 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 662fb2be2..89e64da03 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -126,7 +126,6 @@ /* #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 */ diff --git a/lib_dec/ivas_dirac_dec_fx.c b/lib_dec/ivas_dirac_dec_fx.c index e3b32d3fc..1e14a1675 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, @@ -2800,7 +2764,6 @@ void ivas_dirac_dec_render_sf_fx( surCohRatio_q_fx, hodirac_flag ); -#endif } test(); @@ -3316,50 +3279,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 +3295,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_rend/ivas_dirac_output_synthesis_dec_fx.c b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c index 548e06fb6..3d4ec3077 100644 --- a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c +++ b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c @@ -650,10 +650,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 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*/ @@ -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,19 +2937,6 @@ 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 ); #else @@ -3265,9 +2951,6 @@ void ivas_dirac_dec_compute_directional_responses_fx( 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 02a02f863..efcd1b0b4 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 96774b44f..9524f0904 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 */ ); -- GitLab From 6f55992a7571fadcfc0b9dd394ffde622222fb8b Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:13:38 +0200 Subject: [PATCH 02/10] [cleanup] accept FIX_1009_ISM_NONDIEGETIC_PANNING --- lib_com/ivas_prot_fx.h | 2 -- lib_com/options.h | 1 - lib_dec/ivas_jbm_dec_fx.c | 4 ---- lib_dec/ivas_mono_dmx_renderer_fx.c | 7 ------- 4 files changed, 14 deletions(-) diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index 06494a4a7..6da0a6de2 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 */ diff --git a/lib_com/options.h b/lib_com/options.h index 89e64da03..dd5d2e2b9 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -124,7 +124,6 @@ //#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 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 */ diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index c7863bb98..ad9091ae0 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 ) ) diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index 4f04c4dd8..57d3fa1ad 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 *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; } -- GitLab From 2e4d664173a9597f42a1fd1d96633684b7549f88 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:13:41 +0200 Subject: [PATCH 03/10] [cleanup] accept FIX_1020_AEID_SELECTION_ERRORS --- lib_util/render_config_reader.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index 050658bdf..8df6c0d42 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; -- GitLab From 23f60a96eb66fe7a2e1c0bb3aa5df46f75581b56 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:13:45 +0200 Subject: [PATCH 04/10] [cleanup] accept FIX_993_REMOVE_SBA_GET_ORDER --- lib_com/ivas_prot_fx.h | 7 ---- lib_com/ivas_sba_config_fx.c | 68 ------------------------------------ lib_com/options.h | 1 - 3 files changed, 76 deletions(-) diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index 6da0a6de2..501c91a35 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -4921,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 6dbe215ea..ab4d931ad 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 dd5d2e2b9..2629fef4c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -119,7 +119,6 @@ #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 */ -- GitLab From 1b256acc1c7b58060a0e7735addf046e5f8d32e2 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:13:57 +0200 Subject: [PATCH 05/10] [cleanup] accept NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER --- lib_com/options.h | 1 - lib_dec/ivas_jbm_dec_fx.c | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 2629fef4c..20012eef3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -123,7 +123,6 @@ //#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 NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER /* FhG: issues #1012, 1013: JBM flush function uses wrong output buffer */ #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 */ diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index ad9091ae0..bc4a732e0 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -2594,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 ) { @@ -2659,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 ) ) @@ -2859,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 -- GitLab From 81e1438538ac45f8cd6efd392d6dad5e60c8c517 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:14:00 +0200 Subject: [PATCH 06/10] [cleanup] accept NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS --- lib_com/options.h | 1 - lib_dec/ivas_masa_dec_fx.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 20012eef3..5c6e0182d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -121,7 +121,6 @@ //#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 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 */ diff --git a/lib_dec/ivas_masa_dec_fx.c b/lib_dec/ivas_masa_dec_fx.c index 8bf808ed6..8fdf80ee8 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(); -- GitLab From 47d2dc631e93a3286ca249f0012ab3a51b7c3e2a Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:14:03 +0200 Subject: [PATCH 07/10] [cleanup] accept NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO --- lib_com/options.h | 1 - lib_dec/ivas_ism_renderer_fx.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 5c6e0182d..6a8396455 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -122,7 +122,6 @@ //#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ /* #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 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 */ diff --git a/lib_dec/ivas_ism_renderer_fx.c b/lib_dec/ivas_ism_renderer_fx.c index 370905afd..f303ac761 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] ); -- GitLab From a98343318ac9ba95d3d49758df1874ab38e29d08 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:14:07 +0200 Subject: [PATCH 08/10] [cleanup] accept NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING --- lib_com/options.h | 1 - lib_dec/ivas_binRenderer_internal_fx.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6a8396455..fa71cc503 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -122,7 +122,6 @@ //#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ /* #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 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 */ diff --git a/lib_dec/ivas_binRenderer_internal_fx.c b/lib_dec/ivas_binRenderer_internal_fx.c index 75b746ae7..cf2f4a9a0 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++ ) -- GitLab From be76af46001f3bf4f0b37072d72ad9e00092dd3e Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:14:10 +0200 Subject: [PATCH 09/10] [cleanup] accept NONBE_FIX_1006_PAST_DMX_NRG_ERROR --- lib_com/options.h | 1 - lib_dec/ivas_stereo_dft_dec_dmx_fx.c | 7 ------- 2 files changed, 8 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index fa71cc503..1926ef742 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -122,7 +122,6 @@ //#define FIX_777_COMBI_RENDER_CONFIG_FILE /* Philips: Fix for combined renderer config file support */ /* #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 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_stereo_dft_dec_dmx_fx.c b/lib_dec/ivas_stereo_dft_dec_dmx_fx.c index 59ee077e8..6a369a14c 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] ); -- GitLab From d3da440b6ff931fe8224f2f3d6f1d4a1335ebbc9 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 26 Jun 2025 10:19:53 +0200 Subject: [PATCH 10/10] formatting --- lib_dec/ivas_dirac_dec_fx.c | 1 - lib_dec/ivas_mono_dmx_renderer_fx.c | 2 +- lib_rend/ivas_dirac_output_synthesis_dec_fx.c | 16 ++++++++-------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib_dec/ivas_dirac_dec_fx.c b/lib_dec/ivas_dirac_dec_fx.c index 1e14a1675..391f598ba 100644 --- a/lib_dec/ivas_dirac_dec_fx.c +++ b/lib_dec/ivas_dirac_dec_fx.c @@ -2763,7 +2763,6 @@ void ivas_dirac_dec_render_sf_fx( surCohRatio_fx, surCohRatio_q_fx, hodirac_flag ); - } test(); diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index 57d3fa1ad..848f457eb 100644 --- a/lib_dec/ivas_mono_dmx_renderer_fx.c +++ b/lib_dec/ivas_mono_dmx_renderer_fx.c @@ -318,7 +318,7 @@ void ivas_mono_stereo_downmix_mcmasa_fx( *------------------------------------------------------------------------*/ void ivas_apply_non_diegetic_panning_fx( - Word32 *input_f_fx, /* i : non-diegetic object */ + 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*/ diff --git a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c index 3d4ec3077..d96967bcf 100644 --- a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c +++ b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c @@ -650,9 +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 */ - 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 ) @@ -2938,19 +2938,19 @@ void ivas_dirac_dec_compute_directional_responses_fx( move16(); #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 - } + } test(); test(); -- GitLab