From b4639fc014d6eab1cddb62d28243f540b3fd8193 Mon Sep 17 00:00:00 2001 From: det Date: Mon, 13 Jan 2025 13:20:25 +0100 Subject: [PATCH] patched MR1317 into float-pc. --- lib_com/options.h | 1 + lib_rend/ivas_orient_trk.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index ee78db378..b9c3b1995 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -173,6 +173,7 @@ #define NONBE_1233_HQ_CLASSIFIER_DIV_BY_ZERO /* Eri: issue 1233: Address possible division by zero in hf_spectrum_sparseness() */ #define NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* DLB: adjust prerendering and mixing gain in OSBA encoder. This is fix to float codes*/ +#define FIX_954_OTR_REF_VEC /* FhG: Fix forward vector direction for OTR REF VEC mode */ /* #################### End FIXES switches ############################ */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index ee380cb6e..83e032c1b 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -589,7 +589,11 @@ ivas_error ivas_orient_trk_SetReferenceVector( 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( refPos, listenerPos ); +#else acousticFrontVector = VectorSubtract( listenerPos, refPos ); +#endif break; case IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV: /* ignore the height difference between listener position and reference position */ @@ -598,7 +602,11 @@ ivas_error ivas_orient_trk_SetReferenceVector( listenerPosLevel.y = listenerPos.y; refPosLevel.x = refPos.x; refPosLevel.y = refPos.y; +#ifdef FIX_954_OTR_REF_VEC + acousticFrontVector = VectorSubtract( refPosLevel, listenerPosLevel ); +#else acousticFrontVector = VectorSubtract( listenerPosLevel, refPosLevel ); +#endif break; default: return IVAS_ERR_WRONG_PARAMS; @@ -612,7 +620,11 @@ ivas_error ivas_orient_trk_SetReferenceVector( return IVAS_ERR_WRONG_PARAMS; } +#ifdef FIX_954_OTR_REF_VEC + ivasForwardVector.x = 1.0f; +#else ivasForwardVector.x = -1.0f; +#endif ivasForwardVector.y = 0.0f; ivasForwardVector.z = 0.0f; VectorRotationToQuaternion( ivasForwardVector, acousticFrontVector, &pOTR->refRot ); -- GitLab