Loading lib_com/ivas_cnst.h +7 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,13 @@ #define Q31_0_99 2126008811 #define Q31_0_01 21474836 #endif #define PI_OVER_4_Q29 421657440 #define PI_OVER_Q29 1686629760 #define PI2_C_ADP_RATE_Q31 449767936 //(2.0f * EVS_PI * pOTR->centerAdaptationRate)// #define PI2_C_Q28 1686629760 #define OFF_C_ADP_RATE_Q31 268435456 #define C_ADP_RATE_Q31 71582792 #define SQRT2 1.414213562373095f #define SQRT2_FIXED 1518500250 // Q30 Loading lib_dec/lib_dec_fx.c +9 −1 Original line number Diff line number Diff line Loading @@ -1441,10 +1441,17 @@ ivas_error IVAS_DEC_FeedHeadTrackData( Euler2Quat( deg2rad( orientation.x ), deg2rad( orientation.y ), deg2rad( orientation.z ), &orientation ); } #ifdef IVAS_FLOAT_FIXED IF((error = ivas_orient_trk_Process_fx(hHeadTrackData->OrientationTracker, orientation, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[subframe_idx])) != IVAS_ERR_OK) { return error; } #else IF( ( error = ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[subframe_idx] ) ) != IVAS_ERR_OK ) { return error; } #endif hHeadTrackData->Pos[subframe_idx].x = Pos.x; hHeadTrackData->Pos[subframe_idx].y = Pos.y; Loading Loading @@ -1524,12 +1531,13 @@ ivas_error IVAS_DEC_FeedRefVectorData( refPos_fx.y_fx = float_to_fix( refPos.y, refPos_fx.y_qfact ); refPos_fx.z_fx = float_to_fix( refPos.z, refPos_fx.z_qfact ); pOTR_fx->orientation_tracking_fx = pOtr->orientation_tracking; ivas_orient_trk_SetReferenceVector_fx( pOTR_fx, listenerPos_fx, refPos_fx ); ivas_error error_fx = ivas_orient_trk_SetReferenceVector_fx( pOTR_fx, listenerPos_fx, refPos_fx ); pOtr->refRot.w = me2f( pOTR_fx->refRot_fx.w_fx, 31- pOTR_fx->refRot_fx.w_qfact ); pOtr->refRot.x = me2f( pOTR_fx->refRot_fx.x_fx, 31 -pOTR_fx->refRot_fx.x_qfact ); pOtr->refRot.y = me2f( pOTR_fx->refRot_fx.y_fx, 31- pOTR_fx->refRot_fx.y_qfact ); pOtr->refRot.z = me2f( pOTR_fx->refRot_fx.z_fx, 31 -pOTR_fx->refRot_fx.z_qfact ); free(pOTR_fx); return error_fx; #else return ivas_orient_trk_SetReferenceVector( pOtr, listenerPos, refPos ); #endif Loading lib_rend/ivas_orient_trk.c +292 −143 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_rend/ivas_prot_rend.h +23 −0 Original line number Diff line number Diff line Loading @@ -1791,6 +1791,13 @@ void QuaternionInverse_fx( const IVAS_QUATERNION_FX q, IVAS_QUATERNION_FX *const r ); void QuaternionSlerp_fx( const IVAS_QUATERNION_FX q1, const IVAS_QUATERNION_FX q2, const Word32 t, IVAS_QUATERNION_FX *const r ); #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -1836,6 +1843,15 @@ ivas_error ivas_orient_trk_Process( #ifdef IVAS_FLOAT_FIXED ivas_error ivas_orient_trk_Init_fx( ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ ); ivas_error ivas_orient_trk_SetReferenceRotation_fx( ivas_orient_trk_state_t_fx *pOTR_fx, /* i/o: orientatoin trakcer handle */ const IVAS_QUATERNION_FX refRot /* i : reference rotation */ ); ivas_error ivas_orient_trk_SetReferenceVector_fx( ivas_orient_trk_state_t_fx *pOTR, /* i/o: orientation tracker handle */ const IVAS_VECTOR3_FX listenerPos, /* i : Listener position */ Loading @@ -1856,6 +1872,13 @@ ivas_error ivas_orient_trk_GetTrackedRotation_fx( ivas_orient_trk_state_t_fx *pOTR, /* i/o: orientation tracker handle */ IVAS_QUATERNION_FX *pRotation /* i/o: processed rotation */ ); ivas_error ivas_orient_trk_Process_fx( ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ IVAS_QUATERNION absRot, /* i : absolute head rotation */ float updateRate, /* i : rotation update rate [Hz] */ IVAS_QUATERNION *pTrkRot /* o : tracked rotation */ ); #endif /*----------------------------------------------------------------------------------* Loading lib_rend/ivas_rotation.c +7 −1 Original line number Diff line number Diff line Loading @@ -136,12 +136,18 @@ ivas_error ivas_headTrack_open( { return IVAS_ERROR(IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking"); } #endif if ((error = ivas_orient_trk_Init_fx((*hHeadTrackData)->OrientationTracker)) != IVAS_ERR_OK) { return error; } #else if ( ( error = ivas_orient_trk_Init( ( *hHeadTrackData )->OrientationTracker ) ) != IVAS_ERR_OK ) { return error; } #endif /* Initialise Rmat_prev to I, Rmat will be computed later */ for ( i = 0; i < 3; i++ ) Loading Loading
lib_com/ivas_cnst.h +7 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,13 @@ #define Q31_0_99 2126008811 #define Q31_0_01 21474836 #endif #define PI_OVER_4_Q29 421657440 #define PI_OVER_Q29 1686629760 #define PI2_C_ADP_RATE_Q31 449767936 //(2.0f * EVS_PI * pOTR->centerAdaptationRate)// #define PI2_C_Q28 1686629760 #define OFF_C_ADP_RATE_Q31 268435456 #define C_ADP_RATE_Q31 71582792 #define SQRT2 1.414213562373095f #define SQRT2_FIXED 1518500250 // Q30 Loading
lib_dec/lib_dec_fx.c +9 −1 Original line number Diff line number Diff line Loading @@ -1441,10 +1441,17 @@ ivas_error IVAS_DEC_FeedHeadTrackData( Euler2Quat( deg2rad( orientation.x ), deg2rad( orientation.y ), deg2rad( orientation.z ), &orientation ); } #ifdef IVAS_FLOAT_FIXED IF((error = ivas_orient_trk_Process_fx(hHeadTrackData->OrientationTracker, orientation, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[subframe_idx])) != IVAS_ERR_OK) { return error; } #else IF( ( error = ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[subframe_idx] ) ) != IVAS_ERR_OK ) { return error; } #endif hHeadTrackData->Pos[subframe_idx].x = Pos.x; hHeadTrackData->Pos[subframe_idx].y = Pos.y; Loading Loading @@ -1524,12 +1531,13 @@ ivas_error IVAS_DEC_FeedRefVectorData( refPos_fx.y_fx = float_to_fix( refPos.y, refPos_fx.y_qfact ); refPos_fx.z_fx = float_to_fix( refPos.z, refPos_fx.z_qfact ); pOTR_fx->orientation_tracking_fx = pOtr->orientation_tracking; ivas_orient_trk_SetReferenceVector_fx( pOTR_fx, listenerPos_fx, refPos_fx ); ivas_error error_fx = ivas_orient_trk_SetReferenceVector_fx( pOTR_fx, listenerPos_fx, refPos_fx ); pOtr->refRot.w = me2f( pOTR_fx->refRot_fx.w_fx, 31- pOTR_fx->refRot_fx.w_qfact ); pOtr->refRot.x = me2f( pOTR_fx->refRot_fx.x_fx, 31 -pOTR_fx->refRot_fx.x_qfact ); pOtr->refRot.y = me2f( pOTR_fx->refRot_fx.y_fx, 31- pOTR_fx->refRot_fx.y_qfact ); pOtr->refRot.z = me2f( pOTR_fx->refRot_fx.z_fx, 31 -pOTR_fx->refRot_fx.z_qfact ); free(pOTR_fx); return error_fx; #else return ivas_orient_trk_SetReferenceVector( pOtr, listenerPos, refPos ); #endif Loading
lib_rend/ivas_orient_trk.c +292 −143 File changed.Preview size limit exceeded, changes collapsed. Show changes
lib_rend/ivas_prot_rend.h +23 −0 Original line number Diff line number Diff line Loading @@ -1791,6 +1791,13 @@ void QuaternionInverse_fx( const IVAS_QUATERNION_FX q, IVAS_QUATERNION_FX *const r ); void QuaternionSlerp_fx( const IVAS_QUATERNION_FX q1, const IVAS_QUATERNION_FX q2, const Word32 t, IVAS_QUATERNION_FX *const r ); #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -1836,6 +1843,15 @@ ivas_error ivas_orient_trk_Process( #ifdef IVAS_FLOAT_FIXED ivas_error ivas_orient_trk_Init_fx( ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ ); ivas_error ivas_orient_trk_SetReferenceRotation_fx( ivas_orient_trk_state_t_fx *pOTR_fx, /* i/o: orientatoin trakcer handle */ const IVAS_QUATERNION_FX refRot /* i : reference rotation */ ); ivas_error ivas_orient_trk_SetReferenceVector_fx( ivas_orient_trk_state_t_fx *pOTR, /* i/o: orientation tracker handle */ const IVAS_VECTOR3_FX listenerPos, /* i : Listener position */ Loading @@ -1856,6 +1872,13 @@ ivas_error ivas_orient_trk_GetTrackedRotation_fx( ivas_orient_trk_state_t_fx *pOTR, /* i/o: orientation tracker handle */ IVAS_QUATERNION_FX *pRotation /* i/o: processed rotation */ ); ivas_error ivas_orient_trk_Process_fx( ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ IVAS_QUATERNION absRot, /* i : absolute head rotation */ float updateRate, /* i : rotation update rate [Hz] */ IVAS_QUATERNION *pTrkRot /* o : tracked rotation */ ); #endif /*----------------------------------------------------------------------------------* Loading
lib_rend/ivas_rotation.c +7 −1 Original line number Diff line number Diff line Loading @@ -136,12 +136,18 @@ ivas_error ivas_headTrack_open( { return IVAS_ERROR(IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking"); } #endif if ((error = ivas_orient_trk_Init_fx((*hHeadTrackData)->OrientationTracker)) != IVAS_ERR_OK) { return error; } #else if ( ( error = ivas_orient_trk_Init( ( *hHeadTrackData )->OrientationTracker ) ) != IVAS_ERR_OK ) { return error; } #endif /* Initialise Rmat_prev to I, Rmat will be computed later */ for ( i = 0; i < 3; i++ ) Loading