diff --git a/lib_com/options.h b/lib_com/options.h index ebaa43a69d47dee5ab80d23f1e1216a25f2284f5..b2897c3ba02826d6a630cf3d81a163e94b42d4b1 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,6 +150,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ /*#define SPLIT_REND_WITH_HEAD_ROT */ /* Dlb,FhG: Split Rendering contributions 21 and 35 */ +#define FIX_954_OTR_REF_VEC /* FhG: Fix forward vector direction for OTR REF VEC mode */ /* #################### End BE switches ################################## */ diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index ff24510c58bfd90e1c6870c8df34e017bbb83403..f4332a3b6839670d545ab323904be06faea711ec 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -545,7 +545,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 */ @@ -554,7 +558,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; @@ -568,7 +576,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 );