diff --git a/lib_com/ivas_rom_com_fx.c b/lib_com/ivas_rom_com_fx.c index a7a8bdcbfd6176743ab5f8571aa3cb82905bd5fc..ffb18d6d225b55471411e19b08a31ee25dc7bba0 100644 --- a/lib_com/ivas_rom_com_fx.c +++ b/lib_com/ivas_rom_com_fx.c @@ -1545,6 +1545,7 @@ const Word16 ivas_param_mc_quant_icc_fx[PARAM_MC_SZ_ICC_QUANTIZER] = { /* from 1 to 11 bits*/ /*q factor = 8*/ const Word32 no_phi_masa_inv_fx[NO_SPHERICAL_GRIDS][MAX_NO_THETA] = { +#ifndef FIX_1379_MASA_ANGLE_ROUND { 1073741824 }, { 536870912 }, { 536870912, 1073741824 }, @@ -1556,8 +1557,22 @@ const Word32 no_phi_masa_inv_fx[NO_SPHERICAL_GRIDS][MAX_NO_THETA] = { { 44739242, 45691141, 47721858, 52377649, 61356675, 76695844, 107374182, 178956970, 1073741824, 2147483647 }, { 35791394, 35791394, 37025580, 38347922, 39768215, 42949672, 46684427, 52377649, 59652323, 71582788, 93368854, 126322567, 214748364, 2147483647 }, { 24129029, 24129029, 24403223, 24970740, 25565281, 26512143, 27889398, 29417584, 31580641, 34087042, 37675151, 42107522, 48806446, 56512727, 71582788, 93368854, 143165576, 268435456, 2147483647 } +#else + { 1073741824 }, + { 536870912 }, + { 536870912, 1073741824 }, + { 268435456, 536870912 }, + { 178956971, 306783378, 1073741824, 2147483647 }, + { 153391689, 165191050, 238609294, 1073741824, 2147483647 }, + { 97612893, 102261126, 126322568, 195225786, 715827883, 2147483647 }, + { 65075262, 67108864, 74051160, 93368854, 126322568, 238609294, 2147483647 }, + { 44739243, 45691141, 47721859, 52377650, 61356676, 76695845, 107374182, 178956971, 1073741824, 2147483647 }, + { 35791394, 35791394, 37025580, 38347922, 39768216, 42949673, 46684427, 52377650, 59652324, 71582788, 93368854, 126322568, 214748365, 2147483647 }, + { 24129030, 24129030, 24403223, 24970740, 25565282, 26512144, 27889398, 29417584, 31580642, 34087042, 37675152, 42107523, 48806447, 56512728, 71582788, 93368854, 143165577, 268435456, 2147483647 }, +#endif }; + const Word32 azimuth_cb_fx[8] = { 0, -754974720, -377487360, 377487360, -188743680, 188743680, -566231040, 566231040 }; diff --git a/lib_com/options.h b/lib_com/options.h old mode 100755 new mode 100644 index 63c0bb1a5d6427804b73990d31db6a6e1d53f8bc..c228d4cc6d6fe121615ccd7bedac1e62d7fef302 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -69,7 +69,9 @@ #define FIX_867_CLDFB_NRG_SCALE -#define FIX_1378_ACELP_OUT_OF_BOUNDS +#define FIX_1378_ACELP_OUT_OF_BOUNDS + +#define FIX_1379_MASA_ANGLE_ROUND /* Note: each compile switch (FIX_1101_...) is independent from the other ones */ //#define OPT_STEREO_32KBPS_V1 /* Optimization made in stereo decoding path for 32kbps decoding */ diff --git a/lib_dec/ivas_dirac_dec_fx.c b/lib_dec/ivas_dirac_dec_fx.c index 064185e478e555cdf82dadfbfec159430732586b..dd48916cbdfba95cf9f66ab358ba2e65d5a658d6 100644 --- a/lib_dec/ivas_dirac_dec_fx.c +++ b/lib_dec/ivas_dirac_dec_fx.c @@ -3829,7 +3829,9 @@ void ivas_dirac_dec_render_sf_fx( { Word16 j, k, j2, l; Word16 num_objects, nchan_out_woLFE, lfe_index; +#ifndef FIX_1379_MASA_ANGLE_ROUND Word16 az1, el1; +#endif Word16 n_slots_to_render; Word16 n_samples_to_render; Word16 interp_offset; @@ -3863,13 +3865,20 @@ void ivas_dirac_dec_render_sf_fx( Word16 el_q0 = extract_l( L_shr( st_ivas->hIsmMetaData[i]->elevation_fx, Q22 ) ); Word32 az1_32, el1_32; rotateAziEle_fixed( az_q0, el_q0, &az1_32, &el1_32, st_ivas->hCombinedOrientationData->Rmat_fx[0], st_ivas->hIntSetup.is_planar_setup ); +#ifndef FIX_1379_MASA_ANGLE_ROUND az1 = extract_h( az1_32 ); el1 = extract_h( el1_32 ); +#endif IF( st_ivas->hEFAPdata != NULL ) { +#ifdef FIX_1379_MASA_ANGLE_ROUND + const Word32 azi_fx = L_shl( az1_32, Q22 - Q16 ); // Q16 -> Q22 + const Word32 ele_fx = L_shl( el1_32, Q22 - Q16 ); // Q16 -> Q22 +#else const Word32 azi_fx = L_shl( az1, Q22 ); // Q0 -> Q22 const Word32 ele_fx = L_shl( el1, Q22 ); // Q0 -> Q22 +#endif efap_determine_gains_fx( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains_fx[i], azi_fx, ele_fx, EFAP_MODE_EFAP ); } }