Commit fa286175 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '1178_basop_fix_forward_vector' into 'main-pc'

[non-BE]patched MR1317 into main-pc.

See merge request !969
parents 83ee1ffb a8685bdd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+12 −0
Original line number Diff line number Diff line
@@ -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();