Loading lib_util/ivas_rtp_pi_data.c +19 −20 Original line number Diff line number Diff line Loading @@ -109,20 +109,6 @@ static int16_t ivasPayload_convertToQ9( float value ) return (int16_t) ( value ); } /*-----------------------------------------------------------------------* * ivasPayload_convertToQ7() * * Convert a float value into a Q7 encoded value. *-----------------------------------------------------------------------*/ static int16_t ivasPayload_convertToQ7( float value ) { value = ( value * 128.0f ); value = value > +128.0f ? +128.0f : value; value = value < -128.0f ? -128.0f : value; return (int16_t) ( value ); } #endif #ifdef COMPACT_ORIENTATION_PI_DATA static uint32_t packQuaternion( IVAS_QUATERNION orientation, uint8_t *buffer ) { Loading Loading @@ -200,6 +186,21 @@ static ivas_error unpackQuaternion( const uint8_t *buffer, IVAS_QUATERNION *orie return IVAS_ERR_OK; } #else /*-----------------------------------------------------------------------* * ivasPayload_convertToQ7() * * Convert a float value into a Q7 encoded value. *-----------------------------------------------------------------------*/ static int16_t ivasPayload_convertToQ7( float value ) { value = ( value * 128.0f ); value = value > +128.0f ? +128.0f : value; value = value < -128.0f ? -128.0f : value; return (int16_t) ( value ); } #endif #endif static ivas_error packUnsupportedData( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) Loading Loading @@ -879,8 +880,6 @@ static ivas_error unpackPositionCompact( const uint8_t *buffer, uint32_t numData // uint16_t value2_uint16 = (uint16_t) value2; position->size = sizeof( IVAS_PIDATA_POSITION ); compactRead = ( (int32_t) buffer[0] << 24 ) | ( (int32_t) buffer[1] << 16 ) | ( (int32_t) buffer[2] << 8 ) | ( (int32_t) buffer[3] ); Loading Loading
lib_util/ivas_rtp_pi_data.c +19 −20 Original line number Diff line number Diff line Loading @@ -109,20 +109,6 @@ static int16_t ivasPayload_convertToQ9( float value ) return (int16_t) ( value ); } /*-----------------------------------------------------------------------* * ivasPayload_convertToQ7() * * Convert a float value into a Q7 encoded value. *-----------------------------------------------------------------------*/ static int16_t ivasPayload_convertToQ7( float value ) { value = ( value * 128.0f ); value = value > +128.0f ? +128.0f : value; value = value < -128.0f ? -128.0f : value; return (int16_t) ( value ); } #endif #ifdef COMPACT_ORIENTATION_PI_DATA static uint32_t packQuaternion( IVAS_QUATERNION orientation, uint8_t *buffer ) { Loading Loading @@ -200,6 +186,21 @@ static ivas_error unpackQuaternion( const uint8_t *buffer, IVAS_QUATERNION *orie return IVAS_ERR_OK; } #else /*-----------------------------------------------------------------------* * ivasPayload_convertToQ7() * * Convert a float value into a Q7 encoded value. *-----------------------------------------------------------------------*/ static int16_t ivasPayload_convertToQ7( float value ) { value = ( value * 128.0f ); value = value > +128.0f ? +128.0f : value; value = value < -128.0f ? -128.0f : value; return (int16_t) ( value ); } #endif #endif static ivas_error packUnsupportedData( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) Loading Loading @@ -879,8 +880,6 @@ static ivas_error unpackPositionCompact( const uint8_t *buffer, uint32_t numData // uint16_t value2_uint16 = (uint16_t) value2; position->size = sizeof( IVAS_PIDATA_POSITION ); compactRead = ( (int32_t) buffer[0] << 24 ) | ( (int32_t) buffer[1] << 16 ) | ( (int32_t) buffer[2] << 8 ) | ( (int32_t) buffer[3] ); Loading