diff --git a/lib_com/options.h b/lib_com/options.h index e071c4da678c7022791a2a589b437df89ff6c0c0..240c9430d0dab93ad2067a322d6bd25f6776cdb5 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -67,6 +67,7 @@ #define BASOP_NOGLOB_DECLARE_LOCAL #endif +#define FIX_954_OTR_REF_VEC /* FhG: Fix forward vector direction for OTR REF VEC mode */ #define FIX_867_CLDFB_NRG_SCALE #define FIX_1378_ACELP_OUT_OF_BOUNDS diff --git a/lib_rend/ivas_orient_trk_fx.c b/lib_rend/ivas_orient_trk_fx.c index 34dd661d61e909725df830a1e913950ca86bbf6b..da2891bb7b9b23f51d11a61c7e446798cdbd9dd7 100644 --- a/lib_rend/ivas_orient_trk_fx.c +++ b/lib_rend/ivas_orient_trk_fx.c @@ -799,7 +799,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 */ @@ -826,7 +830,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; @@ -843,7 +851,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();