From 7fa13c7bf6f11ef277e9497a580c1115e05f7181 Mon Sep 17 00:00:00 2001 From: det Date: Mon, 13 Jan 2025 13:25:31 +0100 Subject: [PATCH] patched MR1317 into main-pc. --- lib_com/options.h | 2 ++ lib_rend/ivas_orient_trk.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index a914c8e66..4ada2f47a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -101,5 +101,7 @@ #define FIX_1109_OPTIM_MCT_STEREO_IGF_DEC /* FhG: optimize mctStereoIGF_dec_fx() */ #define FIX_1110_OPTIM_DIRAC_DECORR_PROC /* FhG: optimize ivas_dirac_dec_decorr_process() */ #define FIX_1100_REMOVE_LPC_RESCALING /* VA: Remove the rescaling of LPC coefficient to Q12 as residu and syn-filt are already taking care of it*/ +#define FIX_954_OTR_REF_VEC /* FhG: Fix forward vector direction for OTR REF VEC mode */ + #endif diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index a3e833455..eaedb69f3 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -790,7 +790,11 @@ ivas_error ivas_orient_trk_SetReferenceVector_fx( case IVAS_HEAD_ORIENT_TRK_REF: case IVAS_HEAD_ORIENT_TRK_AVG: case IVAS_HEAD_ORIENT_TRK_REF_VEC: +#ifdef FIX_954_OTR_REF_VEC + acousticFrontVector = VectorSubtract_fx( refPos, listenerPos ); +#else acousticFrontVector = VectorSubtract_fx( listenerPos, refPos ); +#endif BREAK; case IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV: /* ignore the height difference between listener position and reference position */ @@ -817,7 +821,11 @@ ivas_error ivas_orient_trk_SetReferenceVector_fx( refPosLevel.q_fact = q_min; move16(); +#ifdef FIX_954_OTR_REF_VEC + acousticFrontVector = VectorSubtract_fx( refPosLevel, listenerPosLevel ); +#else acousticFrontVector = VectorSubtract_fx( listenerPosLevel, refPosLevel ); +#endif BREAK; default: return IVAS_ERR_WRONG_PARAMS; @@ -834,7 +842,11 @@ ivas_error ivas_orient_trk_SetReferenceVector_fx( return IVAS_ERR_WRONG_PARAMS; } +#ifdef FIX_954_OTR_REF_VEC + ivasForwardVector.x_fx = ONE_IN_Q31; +#else ivasForwardVector.x_fx = L_negate( ONE_IN_Q31 ); +#endif move32(); ivasForwardVector.y_fx = 0; move32(); -- GitLab