diff --git a/lib_com/options.h b/lib_com/options.h index 102346ef189a42013f7a762b86af49b500222360..2299ff1629d49800475b7ce07b33fdf623329dcc 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -144,6 +144,7 @@ #define FIX_1372_OSBA_OBJECT_EDITING /* VA: issue 1372: Fix OSBA object-editing in BINAURAL_ROOM_IR */ #define FIX_2140_OBJECT_EDITING_SANITIZER_ISSUES /* Nokia: Issue 2140, fixes three different sanitizer issues persisting in object editing code. */ #define NONBE_FIX_1172_OBJ_EDIT_JBM /* VA: issue 1172: fix OMASA object editing in JBM */ +#define FIX_2193_ISM_GAINS_WITH_OE /* FhG: fix issue 2193: use edited angles in ISM gain calculation */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_ism_param_dec_fx.c b/lib_dec/ivas_ism_param_dec_fx.c index bdb341658a6eae768f366813b84377b3bc6a6dc4..6af94ea97a7efca424d9449a686046f953daaa08 100644 --- a/lib_dec/ivas_ism_param_dec_fx.c +++ b/lib_dec/ivas_ism_param_dec_fx.c @@ -1069,8 +1069,13 @@ void ivas_ism_dec_digest_tc_fx( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) ) { /*get HOA gets for direction (ACN/SN3D)*/ - Word16 azi = shr( extract_h( st_ivas->hIsmMetaData[i]->azimuth_fx ), 22 - 16 ); // Q0 - Word16 ele = shr( extract_h( st_ivas->hIsmMetaData[i]->elevation_fx ), 22 - 16 ); // Q0 +#ifdef FIX_2193_ISM_GAINS_WITH_OE + Word16 azi = round_fx( L_shr( st_ivas->hIsmMetaData[i]->edited_azimuth_fx, Q22 - Q16 ) ); // Q0 + Word16 ele = round_fx( L_shr( st_ivas->hIsmMetaData[i]->edited_elevation_fx, Q22 - Q16 ) ); // Q0 +#else + Word16 azi = shr( extract_h( st_ivas->hIsmMetaData[i]->azimuth_fx ), 22 - 16 ); // Q0 + Word16 ele = shr( extract_h( st_ivas->hIsmMetaData[i]->elevation_fx ), 22 - 16 ); // Q0 +#endif ivas_dirac_dec_get_response_fx( azi, ele, st_ivas->hIsmRendererData->gains_fx[i], st_ivas->hIntSetup.ambisonics_order, Q30 );