Loading lib_util/ivas_rtp_pi_data.c +11 −4 Original line number Diff line number Diff line Loading @@ -37,9 +37,6 @@ #endif #ifdef ISM_PI_DATA #include <stdlib.h> #ifdef COMPACT_ORIENTATION_PI_DATA #include "tools.c" #endif #ifndef min #define min( x, y ) ( ( x ) < ( y ) ? ( x ) : ( y ) ) Loading Loading @@ -122,7 +119,17 @@ static uint32_t packQuaternion( IVAS_QUATERNION orientation, uint8_t *buffer ) q[2] = orientation.y; q[3] = orientation.z; max_q_idx = maximumAbs( q, 4, &q_max ); max_q_idx = 0; q_max = (float) fabs( q[0] ); for ( n = 1; n < 4; n++ ) { if ( (float) fabs( q[n] ) > q_max ) { q_max = (float) fabs( q[n] ); max_q_idx = n; } } if ( q[max_q_idx] < 0 ) { for ( n = 0; n < 4; n++ ) Loading Loading
lib_util/ivas_rtp_pi_data.c +11 −4 Original line number Diff line number Diff line Loading @@ -37,9 +37,6 @@ #endif #ifdef ISM_PI_DATA #include <stdlib.h> #ifdef COMPACT_ORIENTATION_PI_DATA #include "tools.c" #endif #ifndef min #define min( x, y ) ( ( x ) < ( y ) ? ( x ) : ( y ) ) Loading Loading @@ -122,7 +119,17 @@ static uint32_t packQuaternion( IVAS_QUATERNION orientation, uint8_t *buffer ) q[2] = orientation.y; q[3] = orientation.z; max_q_idx = maximumAbs( q, 4, &q_max ); max_q_idx = 0; q_max = (float) fabs( q[0] ); for ( n = 1; n < 4; n++ ) { if ( (float) fabs( q[n] ) > q_max ) { q_max = (float) fabs( q[n] ); max_q_idx = n; } } if ( q[max_q_idx] < 0 ) { for ( n = 0; n < 4; n++ ) Loading