From e0e56caf8c868a8985b7e7bf0a2a5d59f6ae9b3e Mon Sep 17 00:00:00 2001 From: szczerba Date: Mon, 10 Oct 2022 16:46:37 +0200 Subject: [PATCH 001/140] Fix for orientation tracking in Crend --- lib_com/ivas_prot.h | 9 +++++++++ lib_com/options.h | 1 + lib_dec/ivas_crend.c | 3 +++ lib_dec/ivas_orient_trk.c | 5 +++++ lib_dec/ivas_rotation.c | 31 +++++++++++++++++++++++++++++++ 5 files changed, 49 insertions(+) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index fabcc5a0ed..d35423f75d 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -4516,6 +4516,15 @@ void Quat2Euler( float *roll /* o : roll */ ); +#ifdef FIX_I109_ORIENTATION_TRACKING +void Euler2Quat( + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const float roll, /* i : roll */ + Quaternion *quat /* o : quaternion describing the rotation */ +); +#endif + void rotateAziEle( float azi_in, /* i : output elevation */ float ele_in, /* i : input elevation */ diff --git a/lib_com/options.h b/lib_com/options.h index 5d0e0c6088..029f662b61 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -149,6 +149,7 @@ #define SPAR_SCALING_HARMONIZATION /* Issue 80: Changes to harmonize scaling in spar */ #define FIX_I98_HANDLES_TO_NULL /* Issue 98: do the setting of all handles to NULL in one place */ #define FIX_I102_SWB_TBE_SWITCH /* Issue 102: avoid IO->SWB switching code for IVAS, generate SHB ACB mem with lerp in case of switch */ +#define FIX_I109_ORIENTATION_TRACKING /* Issue 109: Harmonize head and orientation tracking */ #define FIX_DIRAC_CHANNELS /* Issue 71: lower number of DirAC analysis channels */ #define HARMONIZE_SBA_NCHAN_TRANSPORT /* harmonize setting of number of transport channels in SBA */ #define FIX_I13_TCX_TNS_ISSUE /* Issue 13: Fix reported artifacts. Bug in TNS with TCX5 */ diff --git a/lib_dec/ivas_crend.c b/lib_dec/ivas_crend.c index 796c4a9ed4..50b32aa1d1 100644 --- a/lib_dec/ivas_crend.c +++ b/lib_dec/ivas_crend.c @@ -1065,6 +1065,9 @@ ivas_error ivas_crend_process( ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hCrend->hTrack, st_ivas->hCrend->m_fYaw, st_ivas->hCrend->m_fPitch, st_ivas->hCrend->m_fRoll ); ivas_orient_trk_Process( st_ivas->hCrend->hTrack ); ivas_orient_trk_GetTrackedOrientation( st_ivas->hCrend->hTrack, &( st_ivas->hCrend->m_fYaw ), &( st_ivas->hCrend->m_fPitch ), &( st_ivas->hCrend->m_fRoll ) ); +#ifdef FIX_I109_ORIENTATION_TRACKING + Euler2Quat( st_ivas->hCrend->m_fYaw, st_ivas->hCrend->m_fPitch, st_ivas->hCrend->m_fRoll, &st_ivas->hHeadTrackData->Quaternions[subframe_idx] ); +#endif } /* Rotation in SHD for: diff --git a/lib_dec/ivas_orient_trk.c b/lib_dec/ivas_orient_trk.c index 4754062b56..858a77ae09 100644 --- a/lib_dec/ivas_orient_trk.c +++ b/lib_dec/ivas_orient_trk.c @@ -50,8 +50,13 @@ #define MAX_TRACKED_ANGLE_AVG_ORIENT PI_OVER_2 #define MAX_TRACKED_ANGLE_REF_ORIENT EVS_PI +#ifdef FIX_I109_ORIENTATION_TRACKING +/* TODO relate to frame rate - assumed here 200Hz, i.e. 5ms frame length */ +#define OTR_UPDATE_RATE ( 200.0f ) /* rate of the Process() calls [Hz]; 1x per IVAS frame */ +#else /* TODO relate to frame rate - assumed here 50Hz, i.e. 20ms frame length */ #define OTR_UPDATE_RATE ( 50.0f ) /* rate of the Process() calls [Hz]; 1x per IVAS frame */ +#endif /*------------------------------------------------------------------------------------------* diff --git a/lib_dec/ivas_rotation.c b/lib_dec/ivas_rotation.c index 77809d8270..255568039b 100644 --- a/lib_dec/ivas_rotation.c +++ b/lib_dec/ivas_rotation.c @@ -201,6 +201,37 @@ void Quat2Euler( return; } +#ifdef FIX_I109_ORIENTATION_TRACKING +/*------------------------------------------------------------------------- + * Quat2Euler() + * + * Euler handling: calculate corresponding Quaternions + *------------------------------------------------------------------------*/ + +void Euler2Quat( + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const float roll, /* i : roll */ + Quaternion *quat /* o : quaternion describing the rotation */ +) +{ + float cos_y_2, sin_y_2, cos_p_2, sin_p_2, cos_r_2, sin_r_2; + cos_y_2 = cosf( yaw * 0.5f ); + sin_y_2 = sinf( yaw * 0.5f ); + cos_p_2 = cosf( pitch * 0.5f ); + sin_p_2 = sinf( pitch * 0.5f ); + cos_r_2 = cosf( roll * 0.5f ); + sin_r_2 = sinf( roll * 0.5f ); + + quat->w = cos_y_2 * cos_p_2 * cos_r_2 + sin_y_2 * sin_p_2 * sin_r_2; + quat->x = cos_y_2 * cos_p_2 * sin_r_2 - sin_y_2 * sin_p_2 * cos_r_2; + quat->y = cos_y_2 * sin_p_2 * cos_r_2 + sin_y_2 * cos_p_2 * sin_r_2; + quat->z = sin_y_2 * cos_p_2 * cos_r_2 - cos_y_2 * sin_p_2 * sin_r_2; + + return; +} + +#endif /*------------------------------------------------------------------------- * rotateAziEle() -- GitLab From b10ca102b3578217a632f4b1423fb426f30ff5bc Mon Sep 17 00:00:00 2001 From: szczerba Date: Mon, 10 Oct 2022 17:15:56 +0200 Subject: [PATCH 002/140] Orientation tracking in all modes except ISM --- lib_com/ivas_prot.h | 13 +++ lib_dec/ivas_binauralRenderer.c | 11 ++ lib_dec/ivas_crend.c | 11 +- lib_dec/ivas_dirac_dec.c | 12 +++ lib_dec/ivas_dirac_dec_binaural_functions.c | 12 +++ lib_dec/ivas_init_dec.c | 18 ++++ lib_dec/ivas_rotation.c | 106 ++++++++++++++++++++ lib_dec/ivas_stat_dec.h | 39 ++++++- 8 files changed, 217 insertions(+), 5 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index d35423f75d..a5b3bdc661 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -4523,6 +4523,13 @@ void Euler2Quat( const float roll, /* i : roll */ Quaternion *quat /* o : quaternion describing the rotation */ ); + +void Euler2RotMat( + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const float roll, /* i : roll */ + float Rmat[3][3] /* o : real-space rotation matrix for this rotation */ +); #endif void rotateAziEle( @@ -4546,6 +4553,12 @@ ivas_error ivas_headTrack_open( HEAD_TRACK_DATA_HANDLE *hHeadTrackData /* o : head track handle */ ); +#ifdef FIX_I109_ORIENTATION_TRACKING +void ivas_headTrack_close( + HEAD_TRACK_DATA_HANDLE *hHeadTrackData /* i/o: head track handle */ +); +#endif + void rotateFrame_shd( HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i : head track handle */ float output[][L_FRAME48k], /* i/o: unrotated HOA3 signal buffer in TD */ diff --git a/lib_dec/ivas_binauralRenderer.c b/lib_dec/ivas_binauralRenderer.c index b3d298b562..bc5f0ee360 100644 --- a/lib_dec/ivas_binauralRenderer.c +++ b/lib_dec/ivas_binauralRenderer.c @@ -912,6 +912,9 @@ void ivas_binRenderer( { int16_t chIdx, k; int16_t numTimeSlots = MAX_PARAM_SPATIAL_SUBFRAMES; +#ifdef FIX_I109_ORIENTATION_TRACKING + float yaw, pitch, roll; +#endif wmops_sub_start( "fastconv_binaural_rendering" ); @@ -934,7 +937,15 @@ void ivas_binRenderer( /* Rotation in SHD (HOA3) */ if ( hHeadTrackData->shd_rot_max_order == -1 ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + Quat2Euler( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); + ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); + ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); + Euler2RotMat( yaw, pitch, roll, hHeadTrackData->Rmat ); +#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); +#endif rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hHeadTrackData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, 3 ); } diff --git a/lib_dec/ivas_crend.c b/lib_dec/ivas_crend.c index 50b32aa1d1..6b88e83bbd 100644 --- a/lib_dec/ivas_crend.c +++ b/lib_dec/ivas_crend.c @@ -689,10 +689,12 @@ ivas_error ivas_crend_open( hCrend->hReverb = NULL; hCrend->delay_line_rw_index = 0; hCrend->diffuse_delay_line_rw_index = 0; +#ifndef FIX_I109_ORIENTATION_TRACKING hCrend->hTrack = NULL; hCrend->m_fYaw = 0; hCrend->m_fPitch = 0; hCrend->m_fRoll = 0; +#endif hHrtf = st_ivas->hHrtf; @@ -760,6 +762,7 @@ ivas_error ivas_crend_open( hCrend->lfe_delay_line = NULL; } +#ifndef FIX_I109_ORIENTATION_TRACKING if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { if ( ( hCrend->hTrack = (ivas_orient_trk_state_t *) count_malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) @@ -773,6 +776,7 @@ ivas_error ivas_crend_open( { hCrend->hTrack = NULL; } +#endif if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->ivas_format == MC_FORMAT && st_ivas->hDecoderConfig->Opt_Headrotation ) { @@ -865,11 +869,13 @@ ivas_error ivas_crend_close( st_ivas->hCrend->freq_buffer_im_diffuse = NULL; } +#ifndef FIX_I109_ORIENTATION_TRACKING if ( st_ivas->hCrend->hTrack != NULL ) { count_free( st_ivas->hCrend->hTrack ); st_ivas->hCrend->hTrack = NULL; } +#endif } ivas_reverb_close( &st_ivas->hCrend->hReverb ); @@ -1049,6 +1055,7 @@ ivas_error ivas_crend_process( if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { /* Orientation tracking */ +#ifndef FIX_I109_ORIENTATION_TRACKING if ( st_ivas->hCrend->hTrack != NULL ) { if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_AVG ) @@ -1065,10 +1072,8 @@ ivas_error ivas_crend_process( ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hCrend->hTrack, st_ivas->hCrend->m_fYaw, st_ivas->hCrend->m_fPitch, st_ivas->hCrend->m_fRoll ); ivas_orient_trk_Process( st_ivas->hCrend->hTrack ); ivas_orient_trk_GetTrackedOrientation( st_ivas->hCrend->hTrack, &( st_ivas->hCrend->m_fYaw ), &( st_ivas->hCrend->m_fPitch ), &( st_ivas->hCrend->m_fRoll ) ); -#ifdef FIX_I109_ORIENTATION_TRACKING - Euler2Quat( st_ivas->hCrend->m_fYaw, st_ivas->hCrend->m_fPitch, st_ivas->hCrend->m_fRoll, &st_ivas->hHeadTrackData->Quaternions[subframe_idx] ); -#endif } +#endif /* Rotation in SHD for: MC with elevation (5_1_2 / 5_1_4 / 7_1_4) -> BINAURAL diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index b4da8ef020..fd66a59063 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1791,6 +1791,10 @@ void ivas_dirac_dec( float *reference_power, *reference_power_smooth; float *onset_filter, *onset_filter_subframe, *p_onset_filter = NULL; uint16_t coherence_flag; + +#ifdef FIX_I109_ORIENTATION_TRACKING + float yaw, pitch, roll; +#endif wmops_sub_start( "ivas_dirac_dec" ); /* Initialize aux buffers */ @@ -1859,7 +1863,15 @@ void ivas_dirac_dec( if ( st_ivas->hHeadTrackData ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + Quat2Euler( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); + ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); + ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); + Euler2RotMat( yaw, pitch, roll, st_ivas->hHeadTrackData->Rmat ); +#else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); +#endif p_Rmat = &st_ivas->hHeadTrackData->Rmat[0][0]; diff --git a/lib_dec/ivas_dirac_dec_binaural_functions.c b/lib_dec/ivas_dirac_dec_binaural_functions.c index 94f5049542..f2d51f27ba 100644 --- a/lib_dec/ivas_dirac_dec_binaural_functions.c +++ b/lib_dec/ivas_dirac_dec_binaural_functions.c @@ -357,6 +357,10 @@ static void ivas_dirac_dec_binaural_internal( int16_t max_band_decorr; DIFFUSE_DISTRIBUTION_DATA diffuseDistData; +#ifdef FIX_I109_ORIENTATION_TRACKING + float yaw, pitch, roll; +#endif + firstSlot = firstSubframe * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); slotEnd = ( firstSubframe + nSubframes ) * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -495,7 +499,15 @@ static void ivas_dirac_dec_binaural_internal( if ( st_ivas->hHeadTrackData && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + Quat2Euler( st_ivas->hHeadTrackData->Quaternions[firstSubframe], &( yaw ), &( pitch ), &( roll ) ); + ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); + ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); + Euler2RotMat( yaw, pitch, roll, Rmat ); +#else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[firstSubframe], Rmat ); +#endif if ( nchan_transport == 2 ) { diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 2ccf1efdce..11110120a5 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -676,6 +676,20 @@ ivas_error ivas_init_decoder( } } +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( st_ivas->hDecoderConfig->Opt_Headrotation ) + { + if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_AVG ) + { + ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_AVG_ORIENT ); + } + else + { + ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_REF_ORIENT ); + } + } +#endif + /*-----------------------------------------------------------------* * Allocate and initalize SCE/CPE and other handles *-----------------------------------------------------------------*/ @@ -1677,8 +1691,12 @@ void ivas_destroy_dec( /* Head track data handle */ if ( st_ivas->hHeadTrackData != NULL ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_headTrack_close( &st_ivas->hHeadTrackData ); +#else count_free( st_ivas->hHeadTrackData ); st_ivas->hHeadTrackData = NULL; +#endif } /* Time Domain binaural renderer handle */ diff --git a/lib_dec/ivas_rotation.c b/lib_dec/ivas_rotation.c index 255568039b..2e936270e7 100644 --- a/lib_dec/ivas_rotation.c +++ b/lib_dec/ivas_rotation.c @@ -85,6 +85,13 @@ ivas_error ivas_headTrack_open( ( *hHeadTrackData )->lrSwitchInterpVal = 0.0f; ( *hHeadTrackData )->lrSwitchedCurrent = 0; ( *hHeadTrackData )->lrSwitchedNext = 0; +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( ( ( *hHeadTrackData )->OrientationTracker = (ivas_orient_trk_state_t *) count_malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking" ); + } + ivas_orient_trk_Init( ( *hHeadTrackData )->OrientationTracker ); +#endif /* Initialise Rmat_prev to I, Rmat will be computed later */ for ( i = 0; i < 3; i++ ) @@ -96,6 +103,28 @@ ivas_error ivas_headTrack_open( return IVAS_ERR_OK; } +#ifdef FIX_I109_ORIENTATION_TRACKING +/*-----------------------------------------------------------------------* + * ivas_headTrack_closes() + * + * Deallocate Head-Tracking handle + *-----------------------------------------------------------------------*/ + +void ivas_headTrack_close( + HEAD_TRACK_DATA_HANDLE *hHeadTrackData /* i/o: head track handle */ +) +{ + if ( hHeadTrackData != NULL ) + { + if ( ( *hHeadTrackData )->OrientationTracker != NULL ) + { + count_free( ( *hHeadTrackData )->OrientationTracker ); + } + count_free( ( *hHeadTrackData ) ); + *hHeadTrackData = NULL; + } +} +#endif /*---------------------------------------------------------------------------------- * QuatToRotMat() @@ -181,9 +210,15 @@ void Quat2Euler( { if ( quat.w != -3.0 ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + *yaw = atan2f( 2.0f * ( quat.w * quat.z + quat.x * quat.y ), 1.0f - 2.0f * ( quat.y * quat.y + quat.z * quat.z ) ); + *pitch = asinf( 2.0f * ( quat.w * quat.y - quat.z * quat.x ) ); + *roll = atan2f( 2.0f * ( quat.w * quat.x + quat.y * quat.z ), 1.0f - 2.0f * ( quat.x * quat.x + quat.y * quat.y ) ); +#else *yaw = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); *roll = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); +#endif } else { @@ -231,6 +266,41 @@ void Euler2Quat( return; } +/*------------------------------------------------------------------------- + * Quat2Euler() + * + * Euler handling: calculate rotation matrices in real-space and SHD + *------------------------------------------------------------------------*/ +void Euler2RotMat( + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const float roll, /* i : roll */ + float Rmat[3][3] /* o : real-space rotation matrix for this rotation */ +) +{ + float c_1, c_2, c_3; + float s_1, s_2, s_3; + + c_1 = cosf( yaw ); + c_2 = cosf( pitch ); + c_3 = cosf( roll ); + + s_1 = sinf( yaw ); + s_2 = sinf( pitch ); + s_3 = sinf( roll ); + + Rmat[0][0] = c_1 * c_2; + Rmat[0][1] = c_1 * s_2 * s_3 - s_1 * c_3; + Rmat[0][2] = c_1 * s_2 * c_3 + s_1 * s_3; + + Rmat[1][0] = s_1 * c_2; + Rmat[1][1] = s_1 * s_2 * s_3 + c_1 * c_3; + Rmat[1][2] = s_1 * s_2 * c_3 - c_1 * s_3; + + Rmat[2][0] = -s_2; + Rmat[2][1] = c_2 * s_3; + Rmat[2][2] = c_2 * c_3; +} #endif /*------------------------------------------------------------------------- @@ -349,6 +419,10 @@ void rotateFrame_shd( float SHrotmat[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM]; float cross_fade[IVAS_FB_1MS_48K_SAMP]; +#ifdef FIX_I109_ORIENTATION_TRACKING + float yaw, pitch, roll; +#endif + shd_rot_max_order = hTransSetup.ambisonics_order; /* 1ms linear crossfade */ @@ -366,8 +440,16 @@ void rotateFrame_shd( set_zero( SHrotmat[i], HEADROT_SHMAT_DIM ); } +#ifdef FIX_I109_ORIENTATION_TRACKING + Quat2Euler( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); + ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); + ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); + Euler2RotMat( yaw, pitch, roll, hHeadTrackData->Rmat ); +#else /* get next quaternion */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); +#endif /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( SHrotmat_prev, hHeadTrackData->Rmat_prev, shd_rot_max_order ); @@ -466,6 +548,10 @@ void rotateFrame_sd( float output_tmp[MAX_CICP_CHANNELS][L_FRAME48k]; float cross_fade[IVAS_FB_1MS_48K_SAMP]; +#ifdef FIX_I109_ORIENTATION_TRACKING + float yaw, pitch, roll; +#endif + wmops_sub_start( "rotateFrame_sd" ); nchan = hTransSetup.nchan_out_woLFE + hTransSetup.num_lfe; @@ -479,8 +565,16 @@ void rotateFrame_sd( cross_fade[i] = ( i + 1 ) * tmp; } +#ifdef FIX_I109_ORIENTATION_TRACKING + Quat2Euler( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); + ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); + ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); + Euler2RotMat( yaw, pitch, roll, hHeadTrackData->Rmat ); +#else /* Get next quaternion and calculate rotation matrix */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); +#endif for ( ch_in = 0; ch_in < nchan; ch_in++ ) { @@ -700,6 +794,10 @@ void rotateFrame_sd_cldfb( int16_t nInChannels; int16_t isPlanar; +#ifdef FIX_I109_ORIENTATION_TRACKING + float yaw, pitch, roll; +#endif + wmops_sub_start( "rotateFrame_sd_cldfb" ); nInChannels = hOutputSetup->nchan_out_woLFE; @@ -713,8 +811,16 @@ void rotateFrame_sd_cldfb( } } +#ifdef FIX_I109_ORIENTATION_TRACKING + Quat2Euler( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); + ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); + ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); + Euler2RotMat( yaw, pitch, roll, Rmat ); +#else /* Get next quaternion and calculate rotation matrix */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], Rmat ); +#endif /* rotation of Euler angles */ for ( n = 0; n < nInChannels; n++ ) diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 43a30693e6..5a465014fc 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1364,6 +1364,36 @@ typedef struct Quaternion_struct } Quaternion; +#ifdef FIX_I109_ORIENTATION_TRACKING +/* Orientation tracking structure */ +typedef struct ivas_orient_trk_state_t +{ + OTR_TRACKING_T trackingType; + float centerAdaptationRate; + float offCenterAdaptationRate; + float adaptationAngle; + + float alpha; + + float absYaw; /* absolute orientation */ + float absPitch; + float absRoll; + + float absAvgYaw; /* average absolute orientation */ + float absAvgPitch; + float absAvgRoll; + + float refYaw; /* reference orientation */ + float refPitch; + float refRoll; + + float trkYaw; /* tracked orientation */ + float trkPitch; + float trkRoll; + +} ivas_orient_trk_state_t; +#endif + typedef struct ivas_binaural_head_track_struct { int16_t num_quaternions; @@ -1376,6 +1406,9 @@ typedef struct ivas_binaural_head_track_struct float lrSwitchInterpVal; int16_t shd_rot_max_order; +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_state_t *OrientationTracker; +#endif } HEAD_TRACK_DATA, *HEAD_TRACK_DATA_HANDLE; @@ -1815,7 +1848,7 @@ typedef struct ivas_reverb_state_t } REVERB_DATA, *REVERB_HANDLE; - +#ifndef FIX_I109_ORIENTATION_TRACKING typedef struct ivas_orient_trk_state_t { OTR_TRACKING_T trackingType; @@ -1842,7 +1875,7 @@ typedef struct ivas_orient_trk_state_t float trkRoll; } ivas_orient_trk_state_t; - +#endif /* Crend structures */ typedef struct ivas_crend_state_t @@ -1853,10 +1886,12 @@ typedef struct ivas_crend_state_t float *freq_buffer_im_diffuse; float *prev_out_buffer[BINAURAL_CHANNELS]; float *lfe_delay_line; +#ifndef FIX_I109_ORIENTATION_TRACKING float m_fYaw; float m_fPitch; float m_fRoll; ivas_orient_trk_state_t *hTrack; +#endif REVERB_HANDLE hReverb; int16_t delay_line_rw_index; int16_t diffuse_delay_line_rw_index; -- GitLab From 1757186e8eceef04357002da469babcc1ef8306d Mon Sep 17 00:00:00 2001 From: szczerba Date: Mon, 24 Oct 2022 15:42:30 +0200 Subject: [PATCH 003/140] Orientation tracking processing in quaternions instead of Euler --- .../3.24.2/CompilerIdC/CMakeCCompilerId.c | 838 ++++++++++++++++++ lib_com/ivas_prot.h | 12 +- lib_dec/ivas_binauralRenderer.c | 9 +- lib_dec/ivas_dirac_dec.c | 11 +- lib_dec/ivas_dirac_dec_binaural_functions.c | 10 +- lib_dec/ivas_ism_renderer.c | 11 + lib_dec/ivas_objectRenderer.c | 12 + lib_dec/ivas_orient_trk.c | 227 ++++- lib_dec/ivas_rotation.c | 29 +- lib_dec/ivas_stat_dec.h | 19 +- 10 files changed, 1124 insertions(+), 54 deletions(-) create mode 100644 CMakeFiles/3.24.2/CompilerIdC/CMakeCCompilerId.c diff --git a/CMakeFiles/3.24.2/CompilerIdC/CMakeCCompilerId.c b/CMakeFiles/3.24.2/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000000..2b43aa69b0 --- /dev/null +++ b/CMakeFiles/3.24.2/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,838 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__open_xl__) && defined(__clang__) +# define COMPILER_ID "IBMClang" +# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) +# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) +# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) + + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) +# define COMPILER_ID "LCC" +# define COMPILER_VERSION_MAJOR DEC(1) +# if defined(__LCC__) +# define COMPILER_VERSION_MINOR DEC(__LCC__- 100) +# endif +# if defined(__LCC_MINOR__) +# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) +# endif +# if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define SIMULATE_ID "GNU" +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(_ADI_COMPILER) +# define COMPILER_ID "ADSP" +#if defined(__VERSIONNUM__) + /* __VERSIONNUM__ = 0xVVRRPPTT */ +# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) +# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) +# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) +# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +# elif defined(_ADI_COMPILER) +# define PLATFORM_ID "ADSP" + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +# elif defined(__ADSPSHARC__) +# define ARCHITECTURE_ID "SHARC" + +# elif defined(__ADSPBLACKFIN__) +# define ARCHITECTURE_ID "Blackfin" + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if !defined(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_VERSION "90" +# else +# define C_VERSION +# endif +#elif __STDC_VERSION__ > 201710L +# define C_VERSION "23" +#elif __STDC_VERSION__ >= 201710L +# define C_VERSION "17" +#elif __STDC_VERSION__ >= 201000L +# define C_VERSION "11" +#elif __STDC_VERSION__ >= 199901L +# define C_VERSION "99" +#else +# define C_VERSION "90" +#endif +const char* info_language_standard_default = + "INFO" ":" "standard_default[" C_VERSION "]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index d6899ccf96..6ea17db6a8 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5503,10 +5503,14 @@ ivas_error ivas_orient_trk_SetTrackingType( ); ivas_error ivas_orient_trk_SetAbsoluteOrientation( - ivas_orient_trk_state_t *pOTR, + ivas_orient_trk_state_t *pOTR, +#ifdef FIX_I109_ORIENTATION_TRACKING + const Quaternion* pQuat +#else float yaw, float pitch, float roll +#endif ); ivas_error ivas_orient_trk_Process( @@ -5514,10 +5518,14 @@ ivas_error ivas_orient_trk_Process( ); ivas_error ivas_orient_trk_GetTrackedOrientation( - ivas_orient_trk_state_t *pOTR, + ivas_orient_trk_state_t *pOTR, +#ifdef FIX_I109_ORIENTATION_TRACKING + Quaternion *pQuat +#else float *yaw, float *pitch, float *roll +#endif ); void TonalMdctConceal_create_concealment_noise( diff --git a/lib_dec/ivas_binauralRenderer.c b/lib_dec/ivas_binauralRenderer.c index d954ae9e89..a9a762a7a0 100644 --- a/lib_dec/ivas_binauralRenderer.c +++ b/lib_dec/ivas_binauralRenderer.c @@ -874,7 +874,7 @@ void ivas_binRenderer( int16_t chIdx, k; int16_t numTimeSlots = MAX_PARAM_SPATIAL_SUBFRAMES; #ifdef FIX_I109_ORIENTATION_TRACKING - float yaw, pitch, roll; + Quaternion trackedHeadOrientation; #endif wmops_sub_start( "fastconv_binaural_rendering" ); @@ -899,11 +899,10 @@ void ivas_binRenderer( if ( hHeadTrackData->shd_rot_max_order == -1 ) { #ifdef FIX_I109_ORIENTATION_TRACKING - Quat2Euler( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); - ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, &( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++] ) ); ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); - Euler2RotMat( yaw, pitch, roll, hHeadTrackData->Rmat ); + ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); #endif diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 87fc4e467a..7b16a2429c 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1787,10 +1787,10 @@ void ivas_dirac_dec( float *reference_power, *reference_power_smooth; float *onset_filter, *onset_filter_subframe, *p_onset_filter = NULL; uint16_t coherence_flag; - #ifdef FIX_I109_ORIENTATION_TRACKING - float yaw, pitch, roll; + Quaternion trackedHeadOrientation; #endif + wmops_sub_start( "ivas_dirac_dec" ); /* Initialize aux buffers */ @@ -1856,11 +1856,10 @@ void ivas_dirac_dec( if ( st_ivas->hHeadTrackData ) { #ifdef FIX_I109_ORIENTATION_TRACKING - Quat2Euler( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); - ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, &( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++] ) ); ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); - Euler2RotMat( yaw, pitch, roll, st_ivas->hHeadTrackData->Rmat ); + ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, st_ivas->hHeadTrackData->Rmat ); #else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); #endif diff --git a/lib_dec/ivas_dirac_dec_binaural_functions.c b/lib_dec/ivas_dirac_dec_binaural_functions.c index a77b3ecc30..e294c57a65 100644 --- a/lib_dec/ivas_dirac_dec_binaural_functions.c +++ b/lib_dec/ivas_dirac_dec_binaural_functions.c @@ -337,9 +337,8 @@ static void ivas_dirac_dec_binaural_internal( uint8_t firstSlot, slotEnd; int16_t max_band_decorr; DIFFUSE_DISTRIBUTION_DATA diffuseDistData; - #ifdef FIX_I109_ORIENTATION_TRACKING - float yaw, pitch, roll; + Quaternion trackedHeadOrientation; #endif firstSlot = firstSubframe * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -474,11 +473,10 @@ static void ivas_dirac_dec_binaural_internal( if ( st_ivas->hHeadTrackData && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { #ifdef FIX_I109_ORIENTATION_TRACKING - Quat2Euler( st_ivas->hHeadTrackData->Quaternions[firstSubframe], &( yaw ), &( pitch ), &( roll ) ); - ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, &( st_ivas->hHeadTrackData->Quaternions[firstSubframe] ) ); ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); - Euler2RotMat( yaw, pitch, roll, Rmat ); + ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, Rmat ); #else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[firstSubframe], Rmat ); #endif diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 0e7f5f864a..7425fd0df7 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -109,6 +109,9 @@ void ivas_ism_render( int16_t num_objects, nchan_out_woLFE, lfe_index; int16_t azimuth, elevation; float Rmat[3][3]; +#ifdef FIX_I109_ORIENTATION_TRACKING + Quaternion trackedHeadOrientation; +#endif num_objects = st_ivas->nchan_transport; nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; @@ -132,8 +135,16 @@ void ivas_ism_render( if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, &st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++] ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); + ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + /* Calculate rotation matrix from the quaternion */ + QuatToRotMat( trackedHeadOrientation, Rmat ); +#else /* Calculate rotation matrix from the quaternion */ QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], Rmat ); +#endif } for ( i = 0; i < num_objects; i++ ) diff --git a/lib_dec/ivas_objectRenderer.c b/lib_dec/ivas_objectRenderer.c index 59e63bd9ff..846d00feac 100644 --- a/lib_dec/ivas_objectRenderer.c +++ b/lib_dec/ivas_objectRenderer.c @@ -224,6 +224,9 @@ void ObjRenderIVASFrame( int16_t subframe_length; int16_t subframe_idx; float reverb_signal[BINAURAL_CHANNELS][L_FRAME48k]; +#ifdef FIX_I109_ORIENTATION_TRACKING + Quaternion trackedHeadOrientation; +#endif subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ @@ -241,9 +244,18 @@ void ObjRenderIVASFrame( for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { /* Update the listener's location/orientation */ +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, &st_ivas->hHeadTrackData->Quaternions[subframe_idx] ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); + ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, + st_ivas->hDecoderConfig->Opt_Headrotation, + ( st_ivas->hHeadTrackData != NULL ) ? &trackedHeadOrientation : NULL ); +#else TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[subframe_idx] : NULL ); +#endif if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) { diff --git a/lib_dec/ivas_orient_trk.c b/lib_dec/ivas_orient_trk.c index 858a77ae09..e7676d5830 100644 --- a/lib_dec/ivas_orient_trk.c +++ b/lib_dec/ivas_orient_trk.c @@ -121,6 +121,29 @@ void ivas_orient_trk_Init( /* initial adaptivity filter coefficient, will be auto-adapted */ pOTR->alpha = sinf( PI2 * pOTR->offCenterAdaptationRate / OTR_UPDATE_RATE ); /* start adaptation at off-center rate = fastest rate */ +#ifdef FIX_I109_ORIENTATION_TRACKING + pOTR->absRot.x = 0.f; + pOTR->absRot.y = 0.f; + pOTR->absRot.z = 0.f; + pOTR->absRot.w = 1.f; + + pOTR->absAvgRot.x = 0.f; + pOTR->absAvgRot.y = 0.f; + pOTR->absAvgRot.z = 0.f; + pOTR->absAvgRot.w = 1.f; + + /* Use frontal and horiontal orientation as reference orientation, + unless/until overridden by ivas_orient_trk_SetAbsoluteOrientation() */ + pOTR->refRot.x = 0.f; + pOTR->refRot.y = 0.f; + pOTR->refRot.z = 0.f; + pOTR->refRot.w = 1.f; + + pOTR->trkRot.x = 0.f; + pOTR->trkRot.y = 0.f; + pOTR->trkRot.z = 0.f; + pOTR->trkRot.w = 1.f; +#else pOTR->absYaw = 0.0f; pOTR->absPitch = 0.0f; pOTR->absRoll = 0.0f; @@ -138,9 +161,9 @@ void ivas_orient_trk_Init( pOTR->trkYaw = 0.0f; pOTR->trkPitch = 0.0f; pOTR->trkRoll = 0.0f; +#endif } - /*-------------------------------------------------------------------* * ivas_orient_trk_SetTrackingType() * @@ -155,13 +178,22 @@ ivas_error ivas_orient_trk_SetTrackingType( return IVAS_ERR_OK; } - /*-------------------------------------------------------------------* * ivas_orient_trk_SetAbsoluteOrientation() * * *-------------------------------------------------------------------*/ +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error ivas_orient_trk_SetAbsoluteOrientation( + ivas_orient_trk_state_t *pOTR, + const Quaternion *pQuat ) +{ + pOTR->absRot = *pQuat; + + return IVAS_ERR_OK; +} +#else ivas_error ivas_orient_trk_SetAbsoluteOrientation( ivas_orient_trk_state_t *pOTR, float yaw, @@ -175,7 +207,103 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( return IVAS_ERR_OK; } +#endif + + +Quaternion quaternion_division( const Quaternion q1, const float d ) +{ + Quaternion r = q1; + r.w = r.w / d; + r.x = r.x / d; + r.y = r.y / d; + r.z = r.z / d; + return r; +} + +float quaternion_dot_product( const Quaternion a, const Quaternion b ) +{ + return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; +} + +Quaternion quaternion_normalize( const Quaternion q ) +{ + Quaternion r = q; + r = quaternion_division( r, sqrtf( quaternion_dot_product( r, r ) ) ); + return r; +} + +Quaternion quaternion_product( const Quaternion q1, const Quaternion q2 ) +{ + Quaternion r; + + r.w = q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z; + r.x = q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y; + r.y = q1.w * q2.y - q1.x * q2.z + q1.y * q2.w + q1.z * q2.x; + r.z = q1.w * q2.z + q1.x * q2.y - q1.y * q2.x + q1.z * q2.w; + + return r; +} + + +Quaternion quaternion_slerp( const Quaternion q1, const Quaternion q2, const float t ) +{ + Quaternion r; + float angle, denom, s, s2; + + angle = acosf( quaternion_dot_product( q1, q2 ) ); + denom = sinf( angle ); + + // check if denom is zero means same rotation + if ( denom < 0.0001F && denom > -0.0001F ) + { + return q2; + } + + s = sinf( 1 - t ) * angle; + s2 = sinf( t * angle ); + r.x = ( q1.x * s + q2.x * s2 ) / denom; + r.y = ( q1.y * s + q2.y * s2 ) / denom; + r.z = ( q1.z * s + q2.z * s2 ) / denom; + r.w = ( q1.w * s + q2.w * s2 ) / denom; + + return quaternion_normalize( r ); +} +float quaternion_norm( const Quaternion q ) +{ + return sqrtf( quaternion_dot_product( q, q ) ); +} + +Quaternion quaternion_conjugate( const Quaternion q ) +{ + Quaternion r = q; + r.x = -r.x; + r.y = -r.y; + r.z = -r.z; + return r; +} + +float quaternion_angle( const Quaternion q1, const Quaternion q2 ) +{ + Quaternion q12; + float angle; + + q12 = quaternion_product( quaternion_conjugate( q1 ), q2 ); + angle = 2.0f * atan2f( sqrtf( q12.x * q12.x + q12.y * q12.y + q12.z * q12.z ), q12.w ); + return angle; +} + + +Quaternion quaternion_inverse( const Quaternion q ) +{ + Quaternion r; + float dot_product; + + dot_product = quaternion_dot_product( q, q ); + r = quaternion_conjugate( q ); + r = quaternion_division( r, dot_product ); + return r; +} /*-------------------------------------------------------------------* * ivas_orient_trk_Process() @@ -186,6 +314,88 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( ivas_error ivas_orient_trk_Process( ivas_orient_trk_state_t *pOTR ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + Quaternion rot; + float normalizedOrientation; + float relativeOrientationRate; + float rateRange; + float cutoffFrequency; + float alpha = pOTR->alpha; + float ang; + if ( pOTR->trackingType == OTR_TRACKING_AVG_ORIENT ) + { + /* Copy absolute orientation as input to compute further on */ + rot = pOTR->absRot; + + /* Compute average (low-pass filtered) absolute orientation */ + pOTR->absAvgRot = quaternion_slerp( pOTR->absAvgRot, rot, alpha ); + + rot = pOTR->absAvgRot; + + /* Store relative orientation result as output */ + pOTR->trkRot = rot; + + /* Adapt LPF constant based on orientation excursion relative to current mean: + - low cutoff (slow adaptation) for small excursions (around center) + - high cutoff (fast adaptation) for large excursions (off-center) + */ + ang = quaternion_angle( rot, pOTR->absAvgRot ); + normalizedOrientation = ang * ang; + + relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; + /* 'if' assumed to perform comparison to 0 */ + if ( relativeOrientationRate > 1.0f ) + { + relativeOrientationRate = 1.0f; + } + + /* Compute range of the adaptation rate between center = lower rate and off-center = higher rate */ + rateRange = pOTR->offCenterAdaptationRate - pOTR->centerAdaptationRate; + /* 'if' assumed to perform comparison to 0 */ + if ( rateRange < 0.0f ) + { + rateRange = 0.0f; + } + + /* Compute adaptivity cutoff frequency: interpolate between minimum (center) and maximum (off-center) values */ + cutoffFrequency = pOTR->centerAdaptationRate + ( relativeOrientationRate * rateRange ); + + /* Compute filter coefficient corresponding to desired cutoff frequency */ + pOTR->alpha = sinf( 2.0f * EVS_PI * cutoffFrequency / OTR_UPDATE_RATE ); + } + else + { + /* 'if' assumed to perform comparison to 0 */ + if ( pOTR->trackingType == OTR_TRACKING_REF_ORIENT ) + { + /* Reset average orientation */ + pOTR->absAvgRot.w = pOTR->absRot.w; + pOTR->absAvgRot.x = pOTR->absRot.x; + pOTR->absAvgRot.y = pOTR->absRot.y; + pOTR->absAvgRot.z = pOTR->absRot.z; + + /* Reset adaptation filter - start adaptation at center rate */ + pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / OTR_UPDATE_RATE ); + + /* Copy absolute orientation as input to compute further on */ + rot.w = pOTR->absRot.w; + rot.x = pOTR->absRot.x; + rot.y = pOTR->absRot.y; + rot.z = pOTR->absRot.z; + + /* Compute relative orientation = (absolute orientation) - (reference orientation) */ + rot = quaternion_product( quaternion_inverse( pOTR->refRot ), rot ); + + /* Clip computed relative orientation to avoid wrap around and store as output */ + pOTR->trkRot = rot; + } + else + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Non-supported orientation tracking adaptation type" ); + } + } +#else + float yaw; float pitch; float roll; @@ -293,6 +503,7 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Non-supported orientation tracking adaptation type" ); } } +#endif return IVAS_ERR_OK; } @@ -306,13 +517,23 @@ ivas_error ivas_orient_trk_Process( ivas_error ivas_orient_trk_GetTrackedOrientation( ivas_orient_trk_state_t *pOTR, +#ifdef FIX_I109_ORIENTATION_TRACKING + Quaternion *trk ) +#else float *yaw, float *pitch, float *roll ) +#endif { +#ifdef FIX_I109_ORIENTATION_TRACKING + trk->w = pOTR->trkRot.w; + trk->x = pOTR->trkRot.x; + trk->y = pOTR->trkRot.y; + trk->z = pOTR->trkRot.z; +#else *yaw = pOTR->trkYaw; *pitch = pOTR->trkPitch; *roll = pOTR->trkRoll; - +#endif return IVAS_ERR_OK; } diff --git a/lib_dec/ivas_rotation.c b/lib_dec/ivas_rotation.c index 2e936270e7..c6bc080730 100644 --- a/lib_dec/ivas_rotation.c +++ b/lib_dec/ivas_rotation.c @@ -418,9 +418,8 @@ void rotateFrame_shd( float SHrotmat_prev[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM]; float SHrotmat[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM]; float cross_fade[IVAS_FB_1MS_48K_SAMP]; - #ifdef FIX_I109_ORIENTATION_TRACKING - float yaw, pitch, roll; + Quaternion trackedHeadOrientation; #endif shd_rot_max_order = hTransSetup.ambisonics_order; @@ -441,11 +440,10 @@ void rotateFrame_shd( } #ifdef FIX_I109_ORIENTATION_TRACKING - Quat2Euler( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); - ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, &( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++] ) ); ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); - Euler2RotMat( yaw, pitch, roll, hHeadTrackData->Rmat ); + ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else /* get next quaternion */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); @@ -549,7 +547,7 @@ void rotateFrame_sd( float cross_fade[IVAS_FB_1MS_48K_SAMP]; #ifdef FIX_I109_ORIENTATION_TRACKING - float yaw, pitch, roll; + Quaternion trackedHeadOrientation; #endif wmops_sub_start( "rotateFrame_sd" ); @@ -566,11 +564,10 @@ void rotateFrame_sd( } #ifdef FIX_I109_ORIENTATION_TRACKING - Quat2Euler( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); - ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, &( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++] ) ); ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); - Euler2RotMat( yaw, pitch, roll, hHeadTrackData->Rmat ); + ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else /* Get next quaternion and calculate rotation matrix */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); @@ -793,9 +790,8 @@ void rotateFrame_sd_cldfb( float *p_real, *p_imag; int16_t nInChannels; int16_t isPlanar; - #ifdef FIX_I109_ORIENTATION_TRACKING - float yaw, pitch, roll; + Quaternion trackedHeadOrientation; #endif wmops_sub_start( "rotateFrame_sd_cldfb" ); @@ -812,11 +808,10 @@ void rotateFrame_sd_cldfb( } #ifdef FIX_I109_ORIENTATION_TRACKING - Quat2Euler( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], &( yaw ), &( pitch ), &( roll ) ); - ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, yaw, pitch, roll ); + ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, &( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++] ) ); ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &( yaw ), &( pitch ), &( roll ) ); - Euler2RotMat( yaw, pitch, roll, Rmat ); + ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else /* Get next quaternion and calculate rotation matrix */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], Rmat ); diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index e5fc9b79e6..a3be5369b1 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1363,21 +1363,10 @@ typedef struct ivas_orient_trk_state_t float alpha; - float absYaw; /* absolute orientation */ - float absPitch; - float absRoll; - - float absAvgYaw; /* average absolute orientation */ - float absAvgPitch; - float absAvgRoll; - - float refYaw; /* reference orientation */ - float refPitch; - float refRoll; - - float trkYaw; /* tracked orientation */ - float trkPitch; - float trkRoll; + Quaternion absRot; /* absolute orientation */ + Quaternion absAvgRot; /* average absolute orientation */ + Quaternion refRot; /* reference orientation */ + Quaternion trkRot; /* tracked orientation */ } ivas_orient_trk_state_t; #endif -- GitLab From 86909c1763b6c65b4cba5a0fa7c9a325f8af8a1d Mon Sep 17 00:00:00 2001 From: szczerba Date: Tue, 25 Oct 2022 13:05:53 +0200 Subject: [PATCH 004/140] Orientation tracking update based on frame size. Refactoring --- lib_com/ivas_prot.h | 20 +- lib_dec/ivas_binauralRenderer.c | 4 +- lib_dec/ivas_dirac_dec.c | 7 +- lib_dec/ivas_dirac_dec_binaural_functions.c | 4 +- lib_dec/ivas_ism_renderer.c | 7 +- lib_dec/ivas_objectRenderer.c | 7 +- lib_dec/ivas_orient_trk.c | 303 +++++++++----------- lib_dec/ivas_rotation.c | 21 +- lib_dec/ivas_stat_dec.h | 2 - 9 files changed, 167 insertions(+), 208 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 6ea17db6a8..87580a09fb 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5502,31 +5502,33 @@ ivas_error ivas_orient_trk_SetTrackingType( OTR_TRACKING_T trackingType ); -ivas_error ivas_orient_trk_SetAbsoluteOrientation( - ivas_orient_trk_state_t *pOTR, #ifdef FIX_I109_ORIENTATION_TRACKING - const Quaternion* pQuat +ivas_error ivas_orient_trk_Process( + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + Quaternion absRot, /* i : absolute head rotation */ + float updateRate, /* i : rotation update rate [Hz] */ + Quaternion *pTrkRot /* o : tracked rotation */ +); + #else +ivas_error ivas_orient_trk_SetAbsoluteOrientation( + ivas_orient_trk_state_t *pOTR, float yaw, float pitch, float roll -#endif ); ivas_error ivas_orient_trk_Process( - ivas_orient_trk_state_t *pOTR + ivas_orient_trk_state_t *pOTR ); ivas_error ivas_orient_trk_GetTrackedOrientation( ivas_orient_trk_state_t *pOTR, -#ifdef FIX_I109_ORIENTATION_TRACKING - Quaternion *pQuat -#else float *yaw, float *pitch, float *roll -#endif ); +#endif void TonalMdctConceal_create_concealment_noise( float concealment_noise[L_FRAME48k], diff --git a/lib_dec/ivas_binauralRenderer.c b/lib_dec/ivas_binauralRenderer.c index a9a762a7a0..743233cb75 100644 --- a/lib_dec/ivas_binauralRenderer.c +++ b/lib_dec/ivas_binauralRenderer.c @@ -899,9 +899,7 @@ void ivas_binRenderer( if ( hHeadTrackData->shd_rot_max_order == -1 ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, &( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++] ) ); - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], FRAMES_PER_SEC, &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 7b16a2429c..2ee1c9b0ad 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1856,9 +1856,10 @@ void ivas_dirac_dec( if ( st_ivas->hHeadTrackData ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, &( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++] ) ); - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, + st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], + (float) ( FRAMES_PER_SEC * ( sf2 - sf1 ) ), + &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, st_ivas->hHeadTrackData->Rmat ); #else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); diff --git a/lib_dec/ivas_dirac_dec_binaural_functions.c b/lib_dec/ivas_dirac_dec_binaural_functions.c index e294c57a65..552ddd8ad9 100644 --- a/lib_dec/ivas_dirac_dec_binaural_functions.c +++ b/lib_dec/ivas_dirac_dec_binaural_functions.c @@ -473,9 +473,7 @@ static void ivas_dirac_dec_binaural_internal( if ( st_ivas->hHeadTrackData && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, &( st_ivas->hHeadTrackData->Quaternions[firstSubframe] ) ); - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hHeadTrackData->Quaternions[firstSubframe], FRAMES_PER_SEC, &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, Rmat ); #else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[firstSubframe], Rmat ); diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 7425fd0df7..b80b8b2a3a 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -136,9 +136,10 @@ void ivas_ism_render( if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, &st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++] ); - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, + st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], + FRAMES_PER_SEC, + &trackedHeadOrientation ); /* Calculate rotation matrix from the quaternion */ QuatToRotMat( trackedHeadOrientation, Rmat ); #else diff --git a/lib_dec/ivas_objectRenderer.c b/lib_dec/ivas_objectRenderer.c index 846d00feac..2abed40e6c 100644 --- a/lib_dec/ivas_objectRenderer.c +++ b/lib_dec/ivas_objectRenderer.c @@ -245,9 +245,10 @@ void ObjRenderIVASFrame( { /* Update the listener's location/orientation */ #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_SetAbsoluteOrientation( st_ivas->hHeadTrackData->OrientationTracker, &st_ivas->hHeadTrackData->Quaternions[subframe_idx] ); - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( st_ivas->hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, + st_ivas->hHeadTrackData->Quaternions[subframe_idx], + FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, + &trackedHeadOrientation ); TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &trackedHeadOrientation : NULL ); diff --git a/lib_dec/ivas_orient_trk.c b/lib_dec/ivas_orient_trk.c index e7676d5830..ebd67b85d8 100644 --- a/lib_dec/ivas_orient_trk.c +++ b/lib_dec/ivas_orient_trk.c @@ -50,19 +50,118 @@ #define MAX_TRACKED_ANGLE_AVG_ORIENT PI_OVER_2 #define MAX_TRACKED_ANGLE_REF_ORIENT EVS_PI -#ifdef FIX_I109_ORIENTATION_TRACKING -/* TODO relate to frame rate - assumed here 200Hz, i.e. 5ms frame length */ -#define OTR_UPDATE_RATE ( 200.0f ) /* rate of the Process() calls [Hz]; 1x per IVAS frame */ -#else /* TODO relate to frame rate - assumed here 50Hz, i.e. 20ms frame length */ #define OTR_UPDATE_RATE ( 50.0f ) /* rate of the Process() calls [Hz]; 1x per IVAS frame */ -#endif - /*------------------------------------------------------------------------------------------* * Local functions *------------------------------------------------------------------------------------------*/ +#ifdef FIX_I109_ORIENTATION_TRACKING + +Quaternion QuaternionProduct( + const Quaternion q1, + const Quaternion q2 ) +{ + Quaternion r; + + r.w = q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z; + r.x = q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y; + r.y = q1.w * q2.y - q1.x * q2.z + q1.y * q2.w + q1.z * q2.x; + r.z = q1.w * q2.z + q1.x * q2.y - q1.y * q2.x + q1.z * q2.w; + + return r; +} + +float QuaternionDotProduct( + const Quaternion a, + const Quaternion b ) +{ + return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; +} + +Quaternion QuaternionDivision( + const Quaternion q1, + const float d ) +{ + Quaternion r = q1; + r.w = r.w / d; + r.x = r.x / d; + r.y = r.y / d; + r.z = r.z / d; + return r; +} + +Quaternion QuaternionNormalize( + const Quaternion q ) +{ + Quaternion r = q; + r = QuaternionDivision( r, sqrtf( QuaternionDotProduct( r, r ) ) ); + return r; +} + +Quaternion QuaternionSlerp( + const Quaternion q1, + const Quaternion q2, + const float t ) +{ + Quaternion r; + float angle, denom, s, s2; + + angle = acosf( QuaternionDotProduct( q1, q2 ) ); + denom = sinf( angle ); + + // check if denom is zero means same rotation + if ( denom < 0.0001F && denom > -0.0001F ) + { + return q2; + } + + s = sinf( 1 - t ) * angle; + s2 = sinf( t * angle ); + r.x = ( q1.x * s + q2.x * s2 ) / denom; + r.y = ( q1.y * s + q2.y * s2 ) / denom; + r.z = ( q1.z * s + q2.z * s2 ) / denom; + r.w = ( q1.w * s + q2.w * s2 ) / denom; + + return QuaternionNormalize( r ); +} + +Quaternion QuaternionConjugate( + const Quaternion q ) +{ + Quaternion r = q; + r.x = -r.x; + r.y = -r.y; + r.z = -r.z; + return r; +} + +float QuaternionAngle( + const Quaternion q1, + const Quaternion q2 ) +{ + Quaternion q12; + float angle; + + q12 = QuaternionProduct( QuaternionConjugate( q1 ), q2 ); + angle = 2.0f * atan2f( sqrtf( q12.x * q12.x + q12.y * q12.y + q12.z * q12.z ), q12.w ); + return angle; +} + +Quaternion QuaternionInverse( + const Quaternion q ) +{ + Quaternion r; + float dot_product; + + dot_product = QuaternionDotProduct( q, q ); + r = QuaternionConjugate( q ); + r = QuaternionDivision( r, dot_product ); + return r; +} + +#else static float ClipAngle( const float angle, const float min_angle, @@ -100,6 +199,7 @@ static float ClipAngle( return result; } +#endif /*-------------------------------------------------------------------* * ivas_orient_trk_Init() @@ -122,27 +222,10 @@ void ivas_orient_trk_Init( pOTR->alpha = sinf( PI2 * pOTR->offCenterAdaptationRate / OTR_UPDATE_RATE ); /* start adaptation at off-center rate = fastest rate */ #ifdef FIX_I109_ORIENTATION_TRACKING - pOTR->absRot.x = 0.f; - pOTR->absRot.y = 0.f; - pOTR->absRot.z = 0.f; - pOTR->absRot.w = 1.f; - - pOTR->absAvgRot.x = 0.f; - pOTR->absAvgRot.y = 0.f; - pOTR->absAvgRot.z = 0.f; - pOTR->absAvgRot.w = 1.f; + pOTR->absAvgRot = ( Quaternion ){ .w = 1.f, .x = 0.f, .y = 0.f, .z = 0.f }; + /* Use frontal and horiontal orientation as reference orientation, unless/until overridden */ + pOTR->refRot = ( Quaternion ){ .w = 1.f, .x = 0.f, .y = 0.f, .z = 0.f }; - /* Use frontal and horiontal orientation as reference orientation, - unless/until overridden by ivas_orient_trk_SetAbsoluteOrientation() */ - pOTR->refRot.x = 0.f; - pOTR->refRot.y = 0.f; - pOTR->refRot.z = 0.f; - pOTR->refRot.w = 1.f; - - pOTR->trkRot.x = 0.f; - pOTR->trkRot.y = 0.f; - pOTR->trkRot.z = 0.f; - pOTR->trkRot.w = 1.f; #else pOTR->absYaw = 0.0f; pOTR->absPitch = 0.0f; @@ -178,22 +261,14 @@ ivas_error ivas_orient_trk_SetTrackingType( return IVAS_ERR_OK; } +#ifdef FIX_I109_ORIENTATION_TRACKING +#else /*-------------------------------------------------------------------* * ivas_orient_trk_SetAbsoluteOrientation() * * *-------------------------------------------------------------------*/ -#ifdef FIX_I109_ORIENTATION_TRACKING -ivas_error ivas_orient_trk_SetAbsoluteOrientation( - ivas_orient_trk_state_t *pOTR, - const Quaternion *pQuat ) -{ - pOTR->absRot = *pQuat; - - return IVAS_ERR_OK; -} -#else ivas_error ivas_orient_trk_SetAbsoluteOrientation( ivas_orient_trk_state_t *pOTR, float yaw, @@ -209,113 +284,19 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( } #endif - -Quaternion quaternion_division( const Quaternion q1, const float d ) -{ - Quaternion r = q1; - r.w = r.w / d; - r.x = r.x / d; - r.y = r.y / d; - r.z = r.z / d; - return r; -} - -float quaternion_dot_product( const Quaternion a, const Quaternion b ) -{ - return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; -} - -Quaternion quaternion_normalize( const Quaternion q ) -{ - Quaternion r = q; - r = quaternion_division( r, sqrtf( quaternion_dot_product( r, r ) ) ); - return r; -} - -Quaternion quaternion_product( const Quaternion q1, const Quaternion q2 ) -{ - Quaternion r; - - r.w = q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z; - r.x = q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y; - r.y = q1.w * q2.y - q1.x * q2.z + q1.y * q2.w + q1.z * q2.x; - r.z = q1.w * q2.z + q1.x * q2.y - q1.y * q2.x + q1.z * q2.w; - - return r; -} - - -Quaternion quaternion_slerp( const Quaternion q1, const Quaternion q2, const float t ) -{ - Quaternion r; - float angle, denom, s, s2; - - angle = acosf( quaternion_dot_product( q1, q2 ) ); - denom = sinf( angle ); - - // check if denom is zero means same rotation - if ( denom < 0.0001F && denom > -0.0001F ) - { - return q2; - } - - s = sinf( 1 - t ) * angle; - s2 = sinf( t * angle ); - r.x = ( q1.x * s + q2.x * s2 ) / denom; - r.y = ( q1.y * s + q2.y * s2 ) / denom; - r.z = ( q1.z * s + q2.z * s2 ) / denom; - r.w = ( q1.w * s + q2.w * s2 ) / denom; - - return quaternion_normalize( r ); -} - -float quaternion_norm( const Quaternion q ) -{ - return sqrtf( quaternion_dot_product( q, q ) ); -} - -Quaternion quaternion_conjugate( const Quaternion q ) -{ - Quaternion r = q; - r.x = -r.x; - r.y = -r.y; - r.z = -r.z; - return r; -} - -float quaternion_angle( const Quaternion q1, const Quaternion q2 ) -{ - Quaternion q12; - float angle; - - q12 = quaternion_product( quaternion_conjugate( q1 ), q2 ); - angle = 2.0f * atan2f( sqrtf( q12.x * q12.x + q12.y * q12.y + q12.z * q12.z ), q12.w ); - return angle; -} - - -Quaternion quaternion_inverse( const Quaternion q ) -{ - Quaternion r; - float dot_product; - - dot_product = quaternion_dot_product( q, q ); - r = quaternion_conjugate( q ); - r = quaternion_division( r, dot_product ); - return r; -} - /*-------------------------------------------------------------------* * ivas_orient_trk_Process() * * *-------------------------------------------------------------------*/ +#ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( - ivas_orient_trk_state_t *pOTR ) + ivas_orient_trk_state_t *pOTR, + Quaternion absRot, + float updateRate, + Quaternion *pTrkRot) { -#ifdef FIX_I109_ORIENTATION_TRACKING - Quaternion rot; float normalizedOrientation; float relativeOrientationRate; float rateRange; @@ -324,22 +305,16 @@ ivas_error ivas_orient_trk_Process( float ang; if ( pOTR->trackingType == OTR_TRACKING_AVG_ORIENT ) { - /* Copy absolute orientation as input to compute further on */ - rot = pOTR->absRot; - /* Compute average (low-pass filtered) absolute orientation */ - pOTR->absAvgRot = quaternion_slerp( pOTR->absAvgRot, rot, alpha ); + pOTR->absAvgRot = QuaternionSlerp( pOTR->absAvgRot, absRot, alpha ); - rot = pOTR->absAvgRot; - - /* Store relative orientation result as output */ - pOTR->trkRot = rot; + *pTrkRot = pOTR->absAvgRot; /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = quaternion_angle( rot, pOTR->absAvgRot ); + ang = QuaternionAngle( absRot, *pTrkRot ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; @@ -361,7 +336,7 @@ ivas_error ivas_orient_trk_Process( cutoffFrequency = pOTR->centerAdaptationRate + ( relativeOrientationRate * rateRange ); /* Compute filter coefficient corresponding to desired cutoff frequency */ - pOTR->alpha = sinf( 2.0f * EVS_PI * cutoffFrequency / OTR_UPDATE_RATE ); + pOTR->alpha = sinf( 2.0f * EVS_PI * cutoffFrequency / updateRate ); } else { @@ -369,25 +344,13 @@ ivas_error ivas_orient_trk_Process( if ( pOTR->trackingType == OTR_TRACKING_REF_ORIENT ) { /* Reset average orientation */ - pOTR->absAvgRot.w = pOTR->absRot.w; - pOTR->absAvgRot.x = pOTR->absRot.x; - pOTR->absAvgRot.y = pOTR->absRot.y; - pOTR->absAvgRot.z = pOTR->absRot.z; + pOTR->absAvgRot = absRot; /* Reset adaptation filter - start adaptation at center rate */ - pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / OTR_UPDATE_RATE ); - - /* Copy absolute orientation as input to compute further on */ - rot.w = pOTR->absRot.w; - rot.x = pOTR->absRot.x; - rot.y = pOTR->absRot.y; - rot.z = pOTR->absRot.z; + pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ - rot = quaternion_product( quaternion_inverse( pOTR->refRot ), rot ); - - /* Clip computed relative orientation to avoid wrap around and store as output */ - pOTR->trkRot = rot; + *pTrkRot = QuaternionProduct( QuaternionInverse( pOTR->refRot ), absRot ); } else { @@ -395,7 +358,10 @@ ivas_error ivas_orient_trk_Process( } } #else - +ivas_error ivas_orient_trk_Process( + ivas_orient_trk_state_t *pOTR +) +{ float yaw; float pitch; float roll; @@ -508,7 +474,8 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERR_OK; } - +#ifdef FIX_I109_ORIENTATION_TRACKING +#else /*-------------------------------------------------------------------* * ivas_orient_trk_GetTrackedOrientation() * @@ -517,23 +484,13 @@ ivas_error ivas_orient_trk_Process( ivas_error ivas_orient_trk_GetTrackedOrientation( ivas_orient_trk_state_t *pOTR, -#ifdef FIX_I109_ORIENTATION_TRACKING - Quaternion *trk ) -#else float *yaw, float *pitch, float *roll ) -#endif { -#ifdef FIX_I109_ORIENTATION_TRACKING - trk->w = pOTR->trkRot.w; - trk->x = pOTR->trkRot.x; - trk->y = pOTR->trkRot.y; - trk->z = pOTR->trkRot.z; -#else *yaw = pOTR->trkYaw; *pitch = pOTR->trkPitch; *roll = pOTR->trkRoll; -#endif return IVAS_ERR_OK; } +#endif diff --git a/lib_dec/ivas_rotation.c b/lib_dec/ivas_rotation.c index c6bc080730..1253474952 100644 --- a/lib_dec/ivas_rotation.c +++ b/lib_dec/ivas_rotation.c @@ -440,9 +440,10 @@ void rotateFrame_shd( } #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, &( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++] ) ); - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, + hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], + FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, + &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else /* get next quaternion */ @@ -564,9 +565,10 @@ void rotateFrame_sd( } #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, &( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++] ) ); - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, + hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], + FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, + &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else /* Get next quaternion and calculate rotation matrix */ @@ -808,9 +810,10 @@ void rotateFrame_sd_cldfb( } #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_SetAbsoluteOrientation( hHeadTrackData->OrientationTracker, &( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++] ) ); - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker ); - ivas_orient_trk_GetTrackedOrientation( hHeadTrackData->OrientationTracker, &trackedHeadOrientation ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, + hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], + FRAMES_PER_SEC, + &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else /* Get next quaternion and calculate rotation matrix */ diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index a3be5369b1..fb7832ae08 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1363,10 +1363,8 @@ typedef struct ivas_orient_trk_state_t float alpha; - Quaternion absRot; /* absolute orientation */ Quaternion absAvgRot; /* average absolute orientation */ Quaternion refRot; /* reference orientation */ - Quaternion trkRot; /* tracked orientation */ } ivas_orient_trk_state_t; #endif -- GitLab From 78c8394c482125684fcb8fea77e17a412e2f0ad8 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 26 Oct 2022 08:14:47 +0200 Subject: [PATCH 005/140] Fix for OTR in ISM. Local function declarations added. --- lib_dec/ivas_objectRenderer.c | 11 +++++++---- lib_dec/ivas_orient_trk.c | 18 +++++++++++++----- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lib_dec/ivas_objectRenderer.c b/lib_dec/ivas_objectRenderer.c index 2abed40e6c..bd3053a01f 100644 --- a/lib_dec/ivas_objectRenderer.c +++ b/lib_dec/ivas_objectRenderer.c @@ -245,10 +245,13 @@ void ObjRenderIVASFrame( { /* Update the listener's location/orientation */ #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, - st_ivas->hHeadTrackData->Quaternions[subframe_idx], - FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, - &trackedHeadOrientation ); + if ( st_ivas->hHeadTrackData != NULL ) + { + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, + st_ivas->hHeadTrackData->Quaternions[subframe_idx], + FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, + &trackedHeadOrientation ); + } TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &trackedHeadOrientation : NULL ); diff --git a/lib_dec/ivas_orient_trk.c b/lib_dec/ivas_orient_trk.c index ebd67b85d8..2102a6b1d4 100644 --- a/lib_dec/ivas_orient_trk.c +++ b/lib_dec/ivas_orient_trk.c @@ -58,6 +58,14 @@ *------------------------------------------------------------------------------------------*/ #ifdef FIX_I109_ORIENTATION_TRACKING +Quaternion QuaternionProduct( const Quaternion q1, const Quaternion q2 ); +float QuaternionDotProduct( const Quaternion q1, const Quaternion q2 ); +Quaternion QuaternionDivision( const Quaternion q, const float d ); +Quaternion QuaternionNormalize( const Quaternion q ); +Quaternion QuaternionSlerp( const Quaternion q1, const Quaternion q2, const float t ); +Quaternion QuaternionConjugate( const Quaternion q ); +float QuaternionAngle( const Quaternion q1, const Quaternion q2 ); +Quaternion QuaternionInverse( const Quaternion q ); Quaternion QuaternionProduct( const Quaternion q1, @@ -74,17 +82,17 @@ Quaternion QuaternionProduct( } float QuaternionDotProduct( - const Quaternion a, - const Quaternion b ) + const Quaternion q1, + const Quaternion q2 ) { - return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; + return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; } Quaternion QuaternionDivision( - const Quaternion q1, + const Quaternion q, const float d ) { - Quaternion r = q1; + Quaternion r = q; r.w = r.w / d; r.x = r.x / d; r.y = r.y / d; -- GitLab From 4c989a0f28c23538946d34d762cadd06b6ba8069 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 26 Oct 2022 15:50:39 +0200 Subject: [PATCH 006/140] Orientation tracking refactoring. Added six test cases for average orientation tracking. --- lib_dec/ivas_orient_trk.c | 130 +++++++++++++++++------------------ scripts/config/self_test.prm | 24 +++++++ 2 files changed, 89 insertions(+), 65 deletions(-) diff --git a/lib_dec/ivas_orient_trk.c b/lib_dec/ivas_orient_trk.c index 2102a6b1d4..2240ed1759 100644 --- a/lib_dec/ivas_orient_trk.c +++ b/lib_dec/ivas_orient_trk.c @@ -58,27 +58,27 @@ *------------------------------------------------------------------------------------------*/ #ifdef FIX_I109_ORIENTATION_TRACKING -Quaternion QuaternionProduct( const Quaternion q1, const Quaternion q2 ); -float QuaternionDotProduct( const Quaternion q1, const Quaternion q2 ); -Quaternion QuaternionDivision( const Quaternion q, const float d ); -Quaternion QuaternionNormalize( const Quaternion q ); -Quaternion QuaternionSlerp( const Quaternion q1, const Quaternion q2, const float t ); -Quaternion QuaternionConjugate( const Quaternion q ); +void QuaternionProduct( const Quaternion q1, const Quaternion q2, Quaternion *const result ); +float QuaternionDotProduct( const Quaternion q1, const Quaternion ); +void QuaternionDivision( const Quaternion q, const float d, Quaternion *const result ); +void QuaternionNormalize( const Quaternion q, Quaternion *const result ); +void QuaternionSlerp( const Quaternion q1, const Quaternion q2, const float t, Quaternion *const result ); +void QuaternionConjugate( const Quaternion q, Quaternion *const result ); float QuaternionAngle( const Quaternion q1, const Quaternion q2 ); -Quaternion QuaternionInverse( const Quaternion q ); +void QuaternionInverse( const Quaternion q, Quaternion *const result ); -Quaternion QuaternionProduct( +void QuaternionProduct( const Quaternion q1, - const Quaternion q2 ) + const Quaternion q2, + Quaternion *const r ) { - Quaternion r; + Quaternion tmp; + tmp.w = q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z; + tmp.x = q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y; + tmp.y = q1.w * q2.y - q1.x * q2.z + q1.y * q2.w + q1.z * q2.x; + tmp.z = q1.w * q2.z + q1.x * q2.y - q1.y * q2.x + q1.z * q2.w; - r.w = q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z; - r.x = q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y; - r.y = q1.w * q2.y - q1.x * q2.z + q1.y * q2.w + q1.z * q2.x; - r.z = q1.w * q2.z + q1.x * q2.y - q1.y * q2.x + q1.z * q2.w; - - return r; + *r = tmp; } float QuaternionDotProduct( @@ -88,61 +88,58 @@ float QuaternionDotProduct( return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; } -Quaternion QuaternionDivision( +void QuaternionDivision( const Quaternion q, - const float d ) + const float d, + Quaternion *const r ) { - Quaternion r = q; - r.w = r.w / d; - r.x = r.x / d; - r.y = r.y / d; - r.z = r.z / d; - return r; + r->w = q.w / d; + r->x = q.x / d; + r->y = q.y / d; + r->z = q.z / d; } -Quaternion QuaternionNormalize( - const Quaternion q ) +void QuaternionNormalize( + const Quaternion q, + Quaternion *const r ) { - Quaternion r = q; - r = QuaternionDivision( r, sqrtf( QuaternionDotProduct( r, r ) ) ); - return r; + QuaternionDivision( q, sqrtf( QuaternionDotProduct( q, q ) ), r ); } -Quaternion QuaternionSlerp( +void QuaternionSlerp( const Quaternion q1, const Quaternion q2, - const float t ) + const float t, + Quaternion *const r ) { - Quaternion r; float angle, denom, s, s2; - - angle = acosf( QuaternionDotProduct( q1, q2 ) ); - denom = sinf( angle ); - - // check if denom is zero means same rotation - if ( denom < 0.0001F && denom > -0.0001F ) + s = QuaternionDotProduct( q1, q2 ); + if ( fabsf(s) >= 1.0f ) { - return q2; + *r = q2; + return; } + angle = acosf( s ); + denom = sinf( angle ); s = sinf( 1 - t ) * angle; s2 = sinf( t * angle ); - r.x = ( q1.x * s + q2.x * s2 ) / denom; - r.y = ( q1.y * s + q2.y * s2 ) / denom; - r.z = ( q1.z * s + q2.z * s2 ) / denom; - r.w = ( q1.w * s + q2.w * s2 ) / denom; + r->x = ( q1.x * s + q2.x * s2 ) / denom; + r->y = ( q1.y * s + q2.y * s2 ) / denom; + r->z = ( q1.z * s + q2.z * s2 ) / denom; + r->w = ( q1.w * s + q2.w * s2 ) / denom; - return QuaternionNormalize( r ); + QuaternionNormalize( *r, r ); } -Quaternion QuaternionConjugate( - const Quaternion q ) +void QuaternionConjugate( + const Quaternion q, + Quaternion *const r ) { - Quaternion r = q; - r.x = -r.x; - r.y = -r.y; - r.z = -r.z; - return r; + r->w = q.w; + r->x = -q.x; + r->y = -q.y; + r->z = -q.z; } float QuaternionAngle( @@ -151,22 +148,21 @@ float QuaternionAngle( { Quaternion q12; float angle; - - q12 = QuaternionProduct( QuaternionConjugate( q1 ), q2 ); + QuaternionConjugate( q1, &q12 ); + QuaternionProduct( q12, q2, &q12 ); angle = 2.0f * atan2f( sqrtf( q12.x * q12.x + q12.y * q12.y + q12.z * q12.z ), q12.w ); return angle; } -Quaternion QuaternionInverse( - const Quaternion q ) +void QuaternionInverse( + const Quaternion q, + Quaternion *const r ) { - Quaternion r; float dot_product; dot_product = QuaternionDotProduct( q, q ); - r = QuaternionConjugate( q ); - r = QuaternionDivision( r, dot_product ); - return r; + QuaternionConjugate( q, r ); + QuaternionDivision( *r, dot_product, r ); } #else @@ -303,7 +299,7 @@ ivas_error ivas_orient_trk_Process( ivas_orient_trk_state_t *pOTR, Quaternion absRot, float updateRate, - Quaternion *pTrkRot) + Quaternion *pTrkRot ) { float normalizedOrientation; float relativeOrientationRate; @@ -311,12 +307,16 @@ ivas_error ivas_orient_trk_Process( float cutoffFrequency; float alpha = pOTR->alpha; float ang; + Quaternion tq; + if ( pOTR->trackingType == OTR_TRACKING_AVG_ORIENT ) { /* Compute average (low-pass filtered) absolute orientation */ - pOTR->absAvgRot = QuaternionSlerp( pOTR->absAvgRot, absRot, alpha ); + QuaternionSlerp( pOTR->absAvgRot, absRot, alpha, &pOTR->absAvgRot ); - *pTrkRot = pOTR->absAvgRot; + /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ + QuaternionInverse( pOTR->absAvgRot, pTrkRot ); + QuaternionProduct( *pTrkRot, absRot, pTrkRot ); /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) @@ -358,7 +358,8 @@ ivas_error ivas_orient_trk_Process( pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ - *pTrkRot = QuaternionProduct( QuaternionInverse( pOTR->refRot ), absRot ); + QuaternionInverse( pOTR->refRot, pTrkRot ); + QuaternionProduct( *pTrkRot, absRot, pTrkRot ); } else { @@ -367,8 +368,7 @@ ivas_error ivas_orient_trk_Process( } #else ivas_error ivas_orient_trk_Process( - ivas_orient_trk_state_t *pOTR -) + ivas_orient_trk_state_t *pOTR ) { float yaw; float pitch; diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 470b649ce0..94050f2637 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -400,6 +400,10 @@ ../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit ../IVAS_dec -t testv/headrot_case03_3000_q.csv BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR.tst +// 4 ISm with metadata at 256 kbps, 48 kHz in, 48 kHz out, TD BINAURAL out, head rotation, Orientation tracking +../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR_OtrAvg.tst + // 1 ISm with metadata bitrate switching from 13.2 kbps to 128 kbps, 32 kHz in, 32 kHz out, mono out, DTX on ../IVAS_cod -dtx -ism 1 testv/stvISM1.csv ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv32c.pcm bit ../IVAS_dec MONO 32 bit testv/stv32c.pcm_brate_sw_32-32_mono_dtx.tst @@ -441,6 +445,10 @@ ../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot.tst +// SBA at 24.4 kbps, 32kHz in, 32kHz out, BINAURAL out, Headrotation, Orientation tracking +../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot_OtrAvg.tst + // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c.pcm bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_DTX_Binaural_FEC5.tst @@ -485,6 +493,10 @@ ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot.tst +// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking +../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrAvg.tst + // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_DTX_Binaural_FEC5.tst @@ -650,6 +662,14 @@ ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot.tst +// MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking +../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst + +// MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking +../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst + // MASA 1dir 2TC at 48 kbps, 48kHz in, 48kHz out, 7_1_4 out, random FEC at 5% ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 48000 48 testv/stv_IVASMASA_1dir2TC.pcm bit ../IVAS_dec -fec 5 7_1_4 48 bit testv/stv_IVASMASA_1dir2TC.pcm_48000_48-48_7_1_4_FEC5.tst @@ -783,6 +803,10 @@ ../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot.tst +// Multi-channel 5_1 at 256 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, head rotation, Orientation tracking +../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit +../IVAS_dec -t testv/headrot_case00_3000_q.csv -otr avg BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot_OtrAvg.tst + // Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.pcm bit ../IVAS_dec 5_1 48 bit testv/stv51MC48c.pcm_MC51_384000_48-48_5_1.tst -- GitLab From da43aab6e1c4bf95eb82567368c9379b2e4ca540 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 26 Oct 2022 16:32:25 +0200 Subject: [PATCH 007/140] Remove duplicated test case --- scripts/config/self_test.prm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 94050f2637..2f57ff3b48 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -666,10 +666,6 @@ ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit ../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst -// MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst - // MASA 1dir 2TC at 48 kbps, 48kHz in, 48kHz out, 7_1_4 out, random FEC at 5% ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 48000 48 testv/stv_IVASMASA_1dir2TC.pcm bit ../IVAS_dec -fec 5 7_1_4 48 bit testv/stv_IVASMASA_1dir2TC.pcm_48000_48-48_7_1_4_FEC5.tst -- GitLab From d86fd7b77bd3b852250dbf5e1d5f8edb8855d3ef Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 27 Oct 2022 10:28:41 +0200 Subject: [PATCH 008/140] Fix for Slerp function. Cleanup --- lib_com/ivas_prot.h | 22 +++--------- lib_dec/ivas_orient_trk.c | 51 +++++++++++++++++++------- lib_dec/ivas_rotation.c | 75 ++------------------------------------- 3 files changed, 44 insertions(+), 104 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 4e41a54a08..7fcea7a3af 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -4556,27 +4556,13 @@ void QuatToRotMat( float Rmat[3][3] /* o : real-space rotation matrix for this rotation */ ); +#ifndef FIX_I109_ORIENTATION_TRACKING void Quat2Euler( const Quaternion quat, /* i : quaternion describing the rotation */ float *yaw, /* o : yaw */ float *pitch, /* o : pitch */ float *roll /* o : roll */ ); - -#ifdef FIX_I109_ORIENTATION_TRACKING -void Euler2Quat( - const float yaw, /* i : yaw */ - const float pitch, /* i : pitch */ - const float roll, /* i : roll */ - Quaternion *quat /* o : quaternion describing the rotation */ -); - -void Euler2RotMat( - const float yaw, /* i : yaw */ - const float pitch, /* i : pitch */ - const float roll, /* i : roll */ - float Rmat[3][3] /* o : real-space rotation matrix for this rotation */ -); #endif void rotateAziEle( @@ -5503,12 +5489,12 @@ void ivas_reverb_get_hrtf_set_properties( /* Orientation tracking */ void ivas_orient_trk_Init( - ivas_orient_trk_state_t *pOTR + ivas_orient_trk_state_t *pOTR /* i/o : orientation tracker handle */ ); ivas_error ivas_orient_trk_SetTrackingType( - ivas_orient_trk_state_t *pOTR, - OTR_TRACKING_T trackingType + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + OTR_TRACKING_T trackingType /* i : orientation tracking type */ ); #ifdef FIX_I109_ORIENTATION_TRACKING diff --git a/lib_dec/ivas_orient_trk.c b/lib_dec/ivas_orient_trk.c index 2240ed1759..39fa74fd51 100644 --- a/lib_dec/ivas_orient_trk.c +++ b/lib_dec/ivas_orient_trk.c @@ -53,11 +53,16 @@ /* TODO relate to frame rate - assumed here 50Hz, i.e. 20ms frame length */ #define OTR_UPDATE_RATE ( 50.0f ) /* rate of the Process() calls [Hz]; 1x per IVAS frame */ + /*------------------------------------------------------------------------------------------* * Local functions *------------------------------------------------------------------------------------------*/ #ifdef FIX_I109_ORIENTATION_TRACKING + +/*------------------------------------------------------------------------------------------* + * Declarations + *------------------------------------------------------------------------------------------*/ void QuaternionProduct( const Quaternion q1, const Quaternion q2, Quaternion *const result ); float QuaternionDotProduct( const Quaternion q1, const Quaternion ); void QuaternionDivision( const Quaternion q, const float d, Quaternion *const result ); @@ -81,6 +86,9 @@ void QuaternionProduct( *r = tmp; } +/*------------------------------------------------------------------------------------------* + * Quaternion dot product + *------------------------------------------------------------------------------------------*/ float QuaternionDotProduct( const Quaternion q1, const Quaternion q2 ) @@ -88,6 +96,9 @@ float QuaternionDotProduct( return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; } +/*------------------------------------------------------------------------------------------* + * Divides a quaternion by a scalar + *------------------------------------------------------------------------------------------*/ void QuaternionDivision( const Quaternion q, const float d, @@ -99,6 +110,9 @@ void QuaternionDivision( r->z = q.z / d; } +/*------------------------------------------------------------------------------------------* + * Normalizes a quaternion + *------------------------------------------------------------------------------------------*/ void QuaternionNormalize( const Quaternion q, Quaternion *const r ) @@ -106,6 +120,9 @@ void QuaternionNormalize( QuaternionDivision( q, sqrtf( QuaternionDotProduct( q, q ) ), r ); } +/*------------------------------------------------------------------------------------------* + * Computes a spherical linear interpolation between two quaternions + *------------------------------------------------------------------------------------------*/ void QuaternionSlerp( const Quaternion q1, const Quaternion q2, @@ -122,7 +139,7 @@ void QuaternionSlerp( angle = acosf( s ); denom = sinf( angle ); - s = sinf( 1 - t ) * angle; + s = sinf( ( 1 - t ) * angle ); s2 = sinf( t * angle ); r->x = ( q1.x * s + q2.x * s2 ) / denom; r->y = ( q1.y * s + q2.y * s2 ) / denom; @@ -132,6 +149,9 @@ void QuaternionSlerp( QuaternionNormalize( *r, r ); } +/*------------------------------------------------------------------------------------------* + * Computes a quaternion conjugate + *------------------------------------------------------------------------------------------*/ void QuaternionConjugate( const Quaternion q, Quaternion *const r ) @@ -142,6 +162,9 @@ void QuaternionConjugate( r->z = -q.z; } +/*------------------------------------------------------------------------------------------* + * Computes an angle between two quaternions + *------------------------------------------------------------------------------------------*/ float QuaternionAngle( const Quaternion q1, const Quaternion q2 ) @@ -154,6 +177,9 @@ float QuaternionAngle( return angle; } +/*------------------------------------------------------------------------------------------* + * Computes an inverse quaternion + *------------------------------------------------------------------------------------------*/ void QuaternionInverse( const Quaternion q, Quaternion *const r ) @@ -212,7 +238,7 @@ static float ClipAngle( *-------------------------------------------------------------------*/ void ivas_orient_trk_Init( - ivas_orient_trk_state_t *pOTR ) + ivas_orient_trk_state_t *pOTR ) /* i/o : orientation tracker handle */ { /* Track relative to a reference orientation */ pOTR->trackingType = OTR_TRACKING_REF_ORIENT; @@ -251,6 +277,7 @@ void ivas_orient_trk_Init( #endif } + /*-------------------------------------------------------------------* * ivas_orient_trk_SetTrackingType() * @@ -258,15 +285,14 @@ void ivas_orient_trk_Init( *-------------------------------------------------------------------*/ ivas_error ivas_orient_trk_SetTrackingType( - ivas_orient_trk_state_t *pOTR, - OTR_TRACKING_T trackingType ) + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + OTR_TRACKING_T trackingType ) /* i/o : orientation tracking type */ { pOTR->trackingType = trackingType; return IVAS_ERR_OK; } -#ifdef FIX_I109_ORIENTATION_TRACKING -#else +#ifndef FIX_I109_ORIENTATION_TRACKING /*-------------------------------------------------------------------* * ivas_orient_trk_SetAbsoluteOrientation() * @@ -296,10 +322,10 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( - ivas_orient_trk_state_t *pOTR, - Quaternion absRot, - float updateRate, - Quaternion *pTrkRot ) + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + Quaternion absRot, /* i : absolute head rotation */ + float updateRate, /* i : rotation update rate [Hz] */ + Quaternion *pTrkRot ) /* o : tracked rotation */ { float normalizedOrientation; float relativeOrientationRate; @@ -307,7 +333,6 @@ ivas_error ivas_orient_trk_Process( float cutoffFrequency; float alpha = pOTR->alpha; float ang; - Quaternion tq; if ( pOTR->trackingType == OTR_TRACKING_AVG_ORIENT ) { @@ -482,8 +507,7 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERR_OK; } -#ifdef FIX_I109_ORIENTATION_TRACKING -#else +#ifndef FIX_I109_ORIENTATION_TRACKING /*-------------------------------------------------------------------* * ivas_orient_trk_GetTrackedOrientation() * @@ -499,6 +523,7 @@ ivas_error ivas_orient_trk_GetTrackedOrientation( *yaw = pOTR->trkYaw; *pitch = pOTR->trkPitch; *roll = pOTR->trkRoll; + return IVAS_ERR_OK; } #endif diff --git a/lib_dec/ivas_rotation.c b/lib_dec/ivas_rotation.c index 1253474952..9686f828e3 100644 --- a/lib_dec/ivas_rotation.c +++ b/lib_dec/ivas_rotation.c @@ -105,7 +105,7 @@ ivas_error ivas_headTrack_open( #ifdef FIX_I109_ORIENTATION_TRACKING /*-----------------------------------------------------------------------* - * ivas_headTrack_closes() + * ivas_headTrack_close() * * Deallocate Head-Tracking handle *-----------------------------------------------------------------------*/ @@ -195,6 +195,7 @@ void QuatToRotMat( return; } +#ifndef FIX_I109_ORIENTATION_TRACKING /*------------------------------------------------------------------------- * Quat2Euler() * @@ -210,15 +211,9 @@ void Quat2Euler( { if ( quat.w != -3.0 ) { -#ifdef FIX_I109_ORIENTATION_TRACKING - *yaw = atan2f( 2.0f * ( quat.w * quat.z + quat.x * quat.y ), 1.0f - 2.0f * ( quat.y * quat.y + quat.z * quat.z ) ); - *pitch = asinf( 2.0f * ( quat.w * quat.y - quat.z * quat.x ) ); - *roll = atan2f( 2.0f * ( quat.w * quat.x + quat.y * quat.z ), 1.0f - 2.0f * ( quat.x * quat.x + quat.y * quat.y ) ); -#else *yaw = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); *roll = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); -#endif } else { @@ -235,72 +230,6 @@ void Quat2Euler( return; } - -#ifdef FIX_I109_ORIENTATION_TRACKING -/*------------------------------------------------------------------------- - * Quat2Euler() - * - * Euler handling: calculate corresponding Quaternions - *------------------------------------------------------------------------*/ - -void Euler2Quat( - const float yaw, /* i : yaw */ - const float pitch, /* i : pitch */ - const float roll, /* i : roll */ - Quaternion *quat /* o : quaternion describing the rotation */ -) -{ - float cos_y_2, sin_y_2, cos_p_2, sin_p_2, cos_r_2, sin_r_2; - cos_y_2 = cosf( yaw * 0.5f ); - sin_y_2 = sinf( yaw * 0.5f ); - cos_p_2 = cosf( pitch * 0.5f ); - sin_p_2 = sinf( pitch * 0.5f ); - cos_r_2 = cosf( roll * 0.5f ); - sin_r_2 = sinf( roll * 0.5f ); - - quat->w = cos_y_2 * cos_p_2 * cos_r_2 + sin_y_2 * sin_p_2 * sin_r_2; - quat->x = cos_y_2 * cos_p_2 * sin_r_2 - sin_y_2 * sin_p_2 * cos_r_2; - quat->y = cos_y_2 * sin_p_2 * cos_r_2 + sin_y_2 * cos_p_2 * sin_r_2; - quat->z = sin_y_2 * cos_p_2 * cos_r_2 - cos_y_2 * sin_p_2 * sin_r_2; - - return; -} - -/*------------------------------------------------------------------------- - * Quat2Euler() - * - * Euler handling: calculate rotation matrices in real-space and SHD - *------------------------------------------------------------------------*/ -void Euler2RotMat( - const float yaw, /* i : yaw */ - const float pitch, /* i : pitch */ - const float roll, /* i : roll */ - float Rmat[3][3] /* o : real-space rotation matrix for this rotation */ -) -{ - float c_1, c_2, c_3; - float s_1, s_2, s_3; - - c_1 = cosf( yaw ); - c_2 = cosf( pitch ); - c_3 = cosf( roll ); - - s_1 = sinf( yaw ); - s_2 = sinf( pitch ); - s_3 = sinf( roll ); - - Rmat[0][0] = c_1 * c_2; - Rmat[0][1] = c_1 * s_2 * s_3 - s_1 * c_3; - Rmat[0][2] = c_1 * s_2 * c_3 + s_1 * s_3; - - Rmat[1][0] = s_1 * c_2; - Rmat[1][1] = s_1 * s_2 * s_3 + c_1 * c_3; - Rmat[1][2] = s_1 * s_2 * c_3 - c_1 * s_3; - - Rmat[2][0] = -s_2; - Rmat[2][1] = c_2 * s_3; - Rmat[2][2] = c_2 * c_3; -} #endif /*------------------------------------------------------------------------- -- GitLab From 37d74691f0d3d39b308c0df607526b5d5f7be30c Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 27 Oct 2022 15:11:17 +0200 Subject: [PATCH 009/140] Added a test case for high bitrate SBA, updated head rotation input for MC test case --- scripts/config/self_test.prm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 2f57ff3b48..cb7d12e91e 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -553,6 +553,10 @@ ../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot.tst +// SBA at 128 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking +../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot_OtrAvg.tst + // SBA at 192 kbps, 48kHz in, 48kHz out, HOA2 out, random FEC at 5% ../IVAS_cod -sba 3 192000 48 testv/stv3OA48c.pcm bit ../IVAS_dec -fec 5 HOA2 48 bit testv/stv3OA48c.pcm_SBA_192000_48-48_HOA2_FEC5.tst @@ -801,7 +805,7 @@ // Multi-channel 5_1 at 256 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, head rotation, Orientation tracking ../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit -../IVAS_dec -t testv/headrot_case00_3000_q.csv -otr avg BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot_OtrAvg.tst +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot_OtrAvg.tst // Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.pcm bit -- GitLab From 37349f0a9bbfc6cc6a4b0f13fa145fe48ebd89de Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 4 Nov 2022 13:42:47 +0100 Subject: [PATCH 010/140] Orientation tracking: fix for target rotation matrix, subframe processing --- lib_dec/ivas_binauralRenderer.c | 5 ++++- lib_dec/ivas_rotation.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_binauralRenderer.c b/lib_dec/ivas_binauralRenderer.c index 743233cb75..b237a8312b 100644 --- a/lib_dec/ivas_binauralRenderer.c +++ b/lib_dec/ivas_binauralRenderer.c @@ -899,7 +899,10 @@ void ivas_binRenderer( if ( hHeadTrackData->shd_rot_max_order == -1 ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], FRAMES_PER_SEC, &trackedHeadOrientation ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, + hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], + FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, + &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); diff --git a/lib_dec/ivas_rotation.c b/lib_dec/ivas_rotation.c index 9686f828e3..83e7617c6d 100644 --- a/lib_dec/ivas_rotation.c +++ b/lib_dec/ivas_rotation.c @@ -741,9 +741,9 @@ void rotateFrame_sd_cldfb( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], - FRAMES_PER_SEC, + FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); + QuatToRotMat( trackedHeadOrientation, Rmat ); #else /* Get next quaternion and calculate rotation matrix */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], Rmat ); -- GitLab From 01101917519d95fdb891689b5e5b49cfaf628117 Mon Sep 17 00:00:00 2001 From: szczerba Date: Mon, 7 Nov 2022 09:04:28 +0100 Subject: [PATCH 011/140] Minor cleanup --- lib_com/ivas_cnst.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 7051caf9a5..26688702e9 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1441,8 +1441,8 @@ typedef enum typedef enum { - OTR_TRACKING_NONE = IVAS_ORIENT_TRK_REF-1, /* track orientation relative to external reference orientation (default: yaw=pitch=roll=0) */ - OTR_TRACKING_REF_ORIENT = IVAS_ORIENT_TRK_REF, /* track orientation relative to external reference orientation (default: yaw=pitch=roll=0) */ + OTR_TRACKING_NONE = IVAS_ORIENT_TRK_REF-1, + OTR_TRACKING_REF_ORIENT = IVAS_ORIENT_TRK_REF, /* track orientation relative to external reference orientation (default: no rotation) */ OTR_TRACKING_AVG_ORIENT = IVAS_ORIENT_TRK_AVG /* track orientation relative to average orientation */ } OTR_TRACKING_T; -- GitLab From e04092f8800cf48c6d1c48707746420152069aa3 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 9 Nov 2022 09:01:07 +0100 Subject: [PATCH 012/140] Minor updates to satisfy wmc_tool requirements --- lib_dec/ivas_orient_trk.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_orient_trk.c b/lib_dec/ivas_orient_trk.c index 39fa74fd51..96f67cba5c 100644 --- a/lib_dec/ivas_orient_trk.c +++ b/lib_dec/ivas_orient_trk.c @@ -252,10 +252,15 @@ void ivas_orient_trk_Init( pOTR->alpha = sinf( PI2 * pOTR->offCenterAdaptationRate / OTR_UPDATE_RATE ); /* start adaptation at off-center rate = fastest rate */ #ifdef FIX_I109_ORIENTATION_TRACKING - pOTR->absAvgRot = ( Quaternion ){ .w = 1.f, .x = 0.f, .y = 0.f, .z = 0.f }; + pOTR->absAvgRot.w = 1.0f; + pOTR->absAvgRot.x = 0.0f; + pOTR->absAvgRot.y = 0.0f; + pOTR->absAvgRot.z = 0.0f; /* Use frontal and horiontal orientation as reference orientation, unless/until overridden */ - pOTR->refRot = ( Quaternion ){ .w = 1.f, .x = 0.f, .y = 0.f, .z = 0.f }; - + pOTR->refRot.w = 1.0f; + pOTR->refRot.x = 0.0f; + pOTR->refRot.y = 0.0f; + pOTR->refRot.z = 0.0f; #else pOTR->absYaw = 0.0f; pOTR->absPitch = 0.0f; @@ -391,6 +396,9 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Non-supported orientation tracking adaptation type" ); } } + + return IVAS_ERR_OK; +} #else ivas_error ivas_orient_trk_Process( ivas_orient_trk_state_t *pOTR ) @@ -502,12 +510,10 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Non-supported orientation tracking adaptation type" ); } } -#endif return IVAS_ERR_OK; } -#ifndef FIX_I109_ORIENTATION_TRACKING /*-------------------------------------------------------------------* * ivas_orient_trk_GetTrackedOrientation() * -- GitLab From 805a0bc39406a02e3b4f7145a2505ecfb00e62eb Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 9 Nov 2022 09:10:10 +0100 Subject: [PATCH 013/140] Newly added orientation tracking test cases removed to prevent test failures with missing references --- scripts/config/self_test.prm | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 93793171b0..15e0be1ab5 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -400,10 +400,6 @@ ../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit ../IVAS_dec -t testv/headrot_case03_3000_q.csv BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR.tst -// 4 ISm with metadata at 256 kbps, 48 kHz in, 48 kHz out, TD BINAURAL out, head rotation, Orientation tracking -../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR_OtrAvg.tst - // 1 ISm with metadata bitrate switching from 13.2 kbps to 128 kbps, 32 kHz in, 32 kHz out, mono out, DTX on ../IVAS_cod -dtx -ism 1 testv/stvISM1.csv ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv32c.pcm bit ../IVAS_dec MONO 32 bit testv/stv32c.pcm_brate_sw_32-32_mono_dtx.tst @@ -445,10 +441,6 @@ ../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot.tst -// SBA at 24.4 kbps, 32kHz in, 32kHz out, BINAURAL out, Headrotation, Orientation tracking -../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot_OtrAvg.tst - // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c.pcm bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_DTX_Binaural_FEC5.tst @@ -493,10 +485,6 @@ ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot.tst -// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrAvg.tst - // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_DTX_Binaural_FEC5.tst @@ -553,10 +541,6 @@ ../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot.tst -// SBA at 128 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot_OtrAvg.tst - // SBA at 192 kbps, 48kHz in, 48kHz out, HOA2 out, random FEC at 5% ../IVAS_cod -sba 3 192000 48 testv/stv3OA48c.pcm bit ../IVAS_dec -fec 5 HOA2 48 bit testv/stv3OA48c.pcm_SBA_192000_48-48_HOA2_FEC5.tst @@ -681,10 +665,6 @@ ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot.tst -// MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst - // MASA 1dir 2TC at 48 kbps, 48kHz in, 48kHz out, 7_1_4 out, random FEC at 5% ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 48000 48 testv/stv_IVASMASA_1dir2TC.pcm bit ../IVAS_dec -fec 5 7_1_4 48 bit testv/stv_IVASMASA_1dir2TC.pcm_48000_48-48_7_1_4_FEC5.tst @@ -818,10 +798,6 @@ ../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot.tst -// Multi-channel 5_1 at 256 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, head rotation, Orientation tracking -../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot_OtrAvg.tst - // Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.pcm bit ../IVAS_dec 5_1 48 bit testv/stv51MC48c.pcm_MC51_384000_48-48_5_1.tst -- GitLab From 8ad60d876aded6a941fb664a1e02a4bf1f0d1bb5 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 9 Nov 2022 09:32:13 +0100 Subject: [PATCH 014/140] Remove redundant file --- .../3.24.2/CompilerIdC/CMakeCCompilerId.c | 838 ------------------ 1 file changed, 838 deletions(-) delete mode 100644 CMakeFiles/3.24.2/CompilerIdC/CMakeCCompilerId.c diff --git a/CMakeFiles/3.24.2/CompilerIdC/CMakeCCompilerId.c b/CMakeFiles/3.24.2/CompilerIdC/CMakeCCompilerId.c deleted file mode 100644 index 2b43aa69b0..0000000000 --- a/CMakeFiles/3.24.2/CompilerIdC/CMakeCCompilerId.c +++ /dev/null @@ -1,838 +0,0 @@ -#ifdef __cplusplus -# error "A C++ compiler has been selected for C." -#endif - -#if defined(__18CXX) -# define ID_VOID_MAIN -#endif -#if defined(__CLASSIC_C__) -/* cv-qualifiers did not exist in K&R C */ -# define const -# define volatile -#endif - -#if !defined(__has_include) -/* If the compiler does not have __has_include, pretend the answer is - always no. */ -# define __has_include(x) 0 -#endif - - -/* Version number components: V=Version, R=Revision, P=Patch - Version date components: YYYY=Year, MM=Month, DD=Day */ - -#if defined(__INTEL_COMPILER) || defined(__ICC) -# define COMPILER_ID "Intel" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# if defined(__GNUC__) -# define SIMULATE_ID "GNU" -# endif - /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, - except that a few beta releases use the old format with V=2021. */ -# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# if defined(__INTEL_COMPILER_UPDATE) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) -# else -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) -# endif -# else -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) - /* The third version component from --version is an update index, - but no macro is provided for it. */ -# define COMPILER_VERSION_PATCH DEC(0) -# endif -# if defined(__INTEL_COMPILER_BUILD_DATE) - /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ -# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) -# endif -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif -# if defined(__GNUC__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -# elif defined(__GNUG__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) -# endif -# if defined(__GNUC_MINOR__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif - -#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) -# define COMPILER_ID "IntelLLVM" -#if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -#endif -#if defined(__GNUC__) -# define SIMULATE_ID "GNU" -#endif -/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and - * later. Look for 6 digit vs. 8 digit version number to decide encoding. - * VVVV is no smaller than the current year when a version is released. - */ -#if __INTEL_LLVM_COMPILER < 1000000L -# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) -#else -# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) -# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) -# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) -#endif -#if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -#endif -#if defined(__GNUC__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -#elif defined(__GNUG__) -# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) -#endif -#if defined(__GNUC_MINOR__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -#endif -#if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -#endif - -#elif defined(__PATHCC__) -# define COMPILER_ID "PathScale" -# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) -# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) -# if defined(__PATHCC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) -# endif - -#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) -# define COMPILER_ID "Embarcadero" -# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) -# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) -# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) - -#elif defined(__BORLANDC__) -# define COMPILER_ID "Borland" - /* __BORLANDC__ = 0xVRR */ -# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) -# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) - -#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 -# define COMPILER_ID "Watcom" - /* __WATCOMC__ = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__WATCOMC__) -# define COMPILER_ID "OpenWatcom" - /* __WATCOMC__ = VVRP + 1100 */ -# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__SUNPRO_C) -# define COMPILER_ID "SunPro" -# if __SUNPRO_C >= 0x5100 - /* __SUNPRO_C = 0xVRRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) -# else - /* __SUNPRO_CC = 0xVRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) -# endif - -#elif defined(__HP_cc) -# define COMPILER_ID "HP" - /* __HP_cc = VVRRPP */ -# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) -# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) -# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) - -#elif defined(__DECC) -# define COMPILER_ID "Compaq" - /* __DECC_VER = VVRRTPPPP */ -# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) -# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) -# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) - -#elif defined(__IBMC__) && defined(__COMPILER_VER__) -# define COMPILER_ID "zOS" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__open_xl__) && defined(__clang__) -# define COMPILER_ID "IBMClang" -# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__) -# define COMPILER_VERSION_MINOR DEC(__open_xl_release__) -# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__) -# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__) - - -#elif defined(__ibmxl__) && defined(__clang__) -# define COMPILER_ID "XLClang" -# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) -# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) -# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) -# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) - - -#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 -# define COMPILER_ID "XL" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 -# define COMPILER_ID "VisualAge" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__NVCOMPILER) -# define COMPILER_ID "NVHPC" -# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) -# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) -# if defined(__NVCOMPILER_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) -# endif - -#elif defined(__PGI) -# define COMPILER_ID "PGI" -# define COMPILER_VERSION_MAJOR DEC(__PGIC__) -# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) -# endif - -#elif defined(_CRAYC) -# define COMPILER_ID "Cray" -# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) -# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) - -#elif defined(__TI_COMPILER_VERSION__) -# define COMPILER_ID "TI" - /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ -# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) -# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) -# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) - -#elif defined(__CLANG_FUJITSU) -# define COMPILER_ID "FujitsuClang" -# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) -# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) -# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) -# define COMPILER_VERSION_INTERNAL_STR __clang_version__ - - -#elif defined(__FUJITSU) -# define COMPILER_ID "Fujitsu" -# if defined(__FCC_version__) -# define COMPILER_VERSION __FCC_version__ -# elif defined(__FCC_major__) -# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) -# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) -# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) -# endif -# if defined(__fcc_version) -# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) -# elif defined(__FCC_VERSION) -# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) -# endif - - -#elif defined(__ghs__) -# define COMPILER_ID "GHS" -/* __GHS_VERSION_NUMBER = VVVVRP */ -# ifdef __GHS_VERSION_NUMBER -# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) -# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) -# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) -# endif - -#elif defined(__TINYC__) -# define COMPILER_ID "TinyCC" - -#elif defined(__BCC__) -# define COMPILER_ID "Bruce" - -#elif defined(__SCO_VERSION__) -# define COMPILER_ID "SCO" - -#elif defined(__ARMCC_VERSION) && !defined(__clang__) -# define COMPILER_ID "ARMCC" -#if __ARMCC_VERSION >= 1000000 - /* __ARMCC_VERSION = VRRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#else - /* __ARMCC_VERSION = VRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#endif - - -#elif defined(__clang__) && defined(__apple_build_version__) -# define COMPILER_ID "AppleClang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif -# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) - -#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) -# define COMPILER_ID "ARMClang" - # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) - # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) - # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) -# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) - -#elif defined(__clang__) -# define COMPILER_ID "Clang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif - -#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)) -# define COMPILER_ID "LCC" -# define COMPILER_VERSION_MAJOR DEC(1) -# if defined(__LCC__) -# define COMPILER_VERSION_MINOR DEC(__LCC__- 100) -# endif -# if defined(__LCC_MINOR__) -# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__) -# endif -# if defined(__GNUC__) && defined(__GNUC_MINOR__) -# define SIMULATE_ID "GNU" -# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) -# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) -# if defined(__GNUC_PATCHLEVEL__) -# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif -# endif - -#elif defined(__GNUC__) -# define COMPILER_ID "GNU" -# define COMPILER_VERSION_MAJOR DEC(__GNUC__) -# if defined(__GNUC_MINOR__) -# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif - -#elif defined(_MSC_VER) -# define COMPILER_ID "MSVC" - /* _MSC_VER = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) -# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) -# if defined(_MSC_FULL_VER) -# if _MSC_VER >= 1400 - /* _MSC_FULL_VER = VVRRPPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) -# else - /* _MSC_FULL_VER = VVRRPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) -# endif -# endif -# if defined(_MSC_BUILD) -# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) -# endif - -#elif defined(_ADI_COMPILER) -# define COMPILER_ID "ADSP" -#if defined(__VERSIONNUM__) - /* __VERSIONNUM__ = 0xVVRRPPTT */ -# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF) -# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF) -# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF) -# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF) -#endif - -#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) -# define COMPILER_ID "IAR" -# if defined(__VER__) && defined(__ICCARM__) -# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) -# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) -# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) -# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) -# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) -# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) -# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) -# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) -# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) -# endif - -#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) -# define COMPILER_ID "SDCC" -# if defined(__SDCC_VERSION_MAJOR) -# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) -# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) -# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) -# else - /* SDCC = VRP */ -# define COMPILER_VERSION_MAJOR DEC(SDCC/100) -# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) -# define COMPILER_VERSION_PATCH DEC(SDCC % 10) -# endif - - -/* These compilers are either not known or too old to define an - identification macro. Try to identify the platform and guess that - it is the native compiler. */ -#elif defined(__hpux) || defined(__hpua) -# define COMPILER_ID "HP" - -#else /* unknown compiler */ -# define COMPILER_ID "" -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; -#ifdef SIMULATE_ID -char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; -#endif - -#ifdef __QNXNTO__ -char const* qnxnto = "INFO" ":" "qnxnto[]"; -#endif - -#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) -char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; -#endif - -#define STRINGIFY_HELPER(X) #X -#define STRINGIFY(X) STRINGIFY_HELPER(X) - -/* Identify known platforms by name. */ -#if defined(__linux) || defined(__linux__) || defined(linux) -# define PLATFORM_ID "Linux" - -#elif defined(__MSYS__) -# define PLATFORM_ID "MSYS" - -#elif defined(__CYGWIN__) -# define PLATFORM_ID "Cygwin" - -#elif defined(__MINGW32__) -# define PLATFORM_ID "MinGW" - -#elif defined(__APPLE__) -# define PLATFORM_ID "Darwin" - -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -# define PLATFORM_ID "Windows" - -#elif defined(__FreeBSD__) || defined(__FreeBSD) -# define PLATFORM_ID "FreeBSD" - -#elif defined(__NetBSD__) || defined(__NetBSD) -# define PLATFORM_ID "NetBSD" - -#elif defined(__OpenBSD__) || defined(__OPENBSD) -# define PLATFORM_ID "OpenBSD" - -#elif defined(__sun) || defined(sun) -# define PLATFORM_ID "SunOS" - -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) -# define PLATFORM_ID "AIX" - -#elif defined(__hpux) || defined(__hpux__) -# define PLATFORM_ID "HP-UX" - -#elif defined(__HAIKU__) -# define PLATFORM_ID "Haiku" - -#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) -# define PLATFORM_ID "BeOS" - -#elif defined(__QNX__) || defined(__QNXNTO__) -# define PLATFORM_ID "QNX" - -#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) -# define PLATFORM_ID "Tru64" - -#elif defined(__riscos) || defined(__riscos__) -# define PLATFORM_ID "RISCos" - -#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) -# define PLATFORM_ID "SINIX" - -#elif defined(__UNIX_SV__) -# define PLATFORM_ID "UNIX_SV" - -#elif defined(__bsdos__) -# define PLATFORM_ID "BSDOS" - -#elif defined(_MPRAS) || defined(MPRAS) -# define PLATFORM_ID "MP-RAS" - -#elif defined(__osf) || defined(__osf__) -# define PLATFORM_ID "OSF1" - -#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) -# define PLATFORM_ID "SCO_SV" - -#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) -# define PLATFORM_ID "ULTRIX" - -#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) -# define PLATFORM_ID "Xenix" - -#elif defined(__WATCOMC__) -# if defined(__LINUX__) -# define PLATFORM_ID "Linux" - -# elif defined(__DOS__) -# define PLATFORM_ID "DOS" - -# elif defined(__OS2__) -# define PLATFORM_ID "OS2" - -# elif defined(__WINDOWS__) -# define PLATFORM_ID "Windows3x" - -# elif defined(__VXWORKS__) -# define PLATFORM_ID "VxWorks" - -# else /* unknown platform */ -# define PLATFORM_ID -# endif - -#elif defined(__INTEGRITY) -# if defined(INT_178B) -# define PLATFORM_ID "Integrity178" - -# else /* regular Integrity */ -# define PLATFORM_ID "Integrity" -# endif - -# elif defined(_ADI_COMPILER) -# define PLATFORM_ID "ADSP" - -#else /* unknown platform */ -# define PLATFORM_ID - -#endif - -/* For windows compilers MSVC and Intel we can determine - the architecture of the compiler being used. This is because - the compilers do not have flags that can change the architecture, - but rather depend on which compiler is being used -*/ -#if defined(_WIN32) && defined(_MSC_VER) -# if defined(_M_IA64) -# define ARCHITECTURE_ID "IA64" - -# elif defined(_M_ARM64EC) -# define ARCHITECTURE_ID "ARM64EC" - -# elif defined(_M_X64) || defined(_M_AMD64) -# define ARCHITECTURE_ID "x64" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# elif defined(_M_ARM64) -# define ARCHITECTURE_ID "ARM64" - -# elif defined(_M_ARM) -# if _M_ARM == 4 -# define ARCHITECTURE_ID "ARMV4I" -# elif _M_ARM == 5 -# define ARCHITECTURE_ID "ARMV5I" -# else -# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) -# endif - -# elif defined(_M_MIPS) -# define ARCHITECTURE_ID "MIPS" - -# elif defined(_M_SH) -# define ARCHITECTURE_ID "SHx" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__WATCOMC__) -# if defined(_M_I86) -# define ARCHITECTURE_ID "I86" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) -# if defined(__ICCARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__ICCRX__) -# define ARCHITECTURE_ID "RX" - -# elif defined(__ICCRH850__) -# define ARCHITECTURE_ID "RH850" - -# elif defined(__ICCRL78__) -# define ARCHITECTURE_ID "RL78" - -# elif defined(__ICCRISCV__) -# define ARCHITECTURE_ID "RISCV" - -# elif defined(__ICCAVR__) -# define ARCHITECTURE_ID "AVR" - -# elif defined(__ICC430__) -# define ARCHITECTURE_ID "MSP430" - -# elif defined(__ICCV850__) -# define ARCHITECTURE_ID "V850" - -# elif defined(__ICC8051__) -# define ARCHITECTURE_ID "8051" - -# elif defined(__ICCSTM8__) -# define ARCHITECTURE_ID "STM8" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__ghs__) -# if defined(__PPC64__) -# define ARCHITECTURE_ID "PPC64" - -# elif defined(__ppc__) -# define ARCHITECTURE_ID "PPC" - -# elif defined(__ARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__x86_64__) -# define ARCHITECTURE_ID "x64" - -# elif defined(__i386__) -# define ARCHITECTURE_ID "X86" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__TI_COMPILER_VERSION__) -# if defined(__TI_ARM__) -# define ARCHITECTURE_ID "ARM" - -# elif defined(__MSP430__) -# define ARCHITECTURE_ID "MSP430" - -# elif defined(__TMS320C28XX__) -# define ARCHITECTURE_ID "TMS320C28x" - -# elif defined(__TMS320C6X__) || defined(_TMS320C6X) -# define ARCHITECTURE_ID "TMS320C6x" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -# elif defined(__ADSPSHARC__) -# define ARCHITECTURE_ID "SHARC" - -# elif defined(__ADSPBLACKFIN__) -# define ARCHITECTURE_ID "Blackfin" - -#else -# define ARCHITECTURE_ID -#endif - -/* Convert integer to decimal digit literals. */ -#define DEC(n) \ - ('0' + (((n) / 10000000)%10)), \ - ('0' + (((n) / 1000000)%10)), \ - ('0' + (((n) / 100000)%10)), \ - ('0' + (((n) / 10000)%10)), \ - ('0' + (((n) / 1000)%10)), \ - ('0' + (((n) / 100)%10)), \ - ('0' + (((n) / 10)%10)), \ - ('0' + ((n) % 10)) - -/* Convert integer to hex digit literals. */ -#define HEX(n) \ - ('0' + ((n)>>28 & 0xF)), \ - ('0' + ((n)>>24 & 0xF)), \ - ('0' + ((n)>>20 & 0xF)), \ - ('0' + ((n)>>16 & 0xF)), \ - ('0' + ((n)>>12 & 0xF)), \ - ('0' + ((n)>>8 & 0xF)), \ - ('0' + ((n)>>4 & 0xF)), \ - ('0' + ((n) & 0xF)) - -/* Construct a string literal encoding the version number. */ -#ifdef COMPILER_VERSION -char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; - -/* Construct a string literal encoding the version number components. */ -#elif defined(COMPILER_VERSION_MAJOR) -char const info_version[] = { - 'I', 'N', 'F', 'O', ':', - 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', - COMPILER_VERSION_MAJOR, -# ifdef COMPILER_VERSION_MINOR - '.', COMPILER_VERSION_MINOR, -# ifdef COMPILER_VERSION_PATCH - '.', COMPILER_VERSION_PATCH, -# ifdef COMPILER_VERSION_TWEAK - '.', COMPILER_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct a string literal encoding the internal version number. */ -#ifdef COMPILER_VERSION_INTERNAL -char const info_version_internal[] = { - 'I', 'N', 'F', 'O', ':', - 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', - 'i','n','t','e','r','n','a','l','[', - COMPILER_VERSION_INTERNAL,']','\0'}; -#elif defined(COMPILER_VERSION_INTERNAL_STR) -char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; -#endif - -/* Construct a string literal encoding the version number components. */ -#ifdef SIMULATE_VERSION_MAJOR -char const info_simulate_version[] = { - 'I', 'N', 'F', 'O', ':', - 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', - SIMULATE_VERSION_MAJOR, -# ifdef SIMULATE_VERSION_MINOR - '.', SIMULATE_VERSION_MINOR, -# ifdef SIMULATE_VERSION_PATCH - '.', SIMULATE_VERSION_PATCH, -# ifdef SIMULATE_VERSION_TWEAK - '.', SIMULATE_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; -char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; - - - -#if !defined(__STDC__) && !defined(__clang__) -# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) -# define C_VERSION "90" -# else -# define C_VERSION -# endif -#elif __STDC_VERSION__ > 201710L -# define C_VERSION "23" -#elif __STDC_VERSION__ >= 201710L -# define C_VERSION "17" -#elif __STDC_VERSION__ >= 201000L -# define C_VERSION "11" -#elif __STDC_VERSION__ >= 199901L -# define C_VERSION "99" -#else -# define C_VERSION "90" -#endif -const char* info_language_standard_default = - "INFO" ":" "standard_default[" C_VERSION "]"; - -const char* info_language_extensions_default = "INFO" ":" "extensions_default[" -#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ - defined(__TI_COMPILER_VERSION__)) && \ - !defined(__STRICT_ANSI__) - "ON" -#else - "OFF" -#endif -"]"; - -/*--------------------------------------------------------------------------*/ - -#ifdef ID_VOID_MAIN -void main() {} -#else -# if defined(__CLASSIC_C__) -int main(argc, argv) int argc; char *argv[]; -# else -int main(int argc, char* argv[]) -# endif -{ - int require = 0; - require += info_compiler[argc]; - require += info_platform[argc]; - require += info_arch[argc]; -#ifdef COMPILER_VERSION_MAJOR - require += info_version[argc]; -#endif -#ifdef COMPILER_VERSION_INTERNAL - require += info_version_internal[argc]; -#endif -#ifdef SIMULATE_ID - require += info_simulate[argc]; -#endif -#ifdef SIMULATE_VERSION_MAJOR - require += info_simulate_version[argc]; -#endif -#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) - require += info_cray[argc]; -#endif - require += info_language_standard_default[argc]; - require += info_language_extensions_default[argc]; - (void)argv; - return require; -} -#endif -- GitLab From 36d75163656cc99aac122585f6654ff4e8d34c3d Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 9 Nov 2022 09:40:11 +0100 Subject: [PATCH 015/140] [cleanup] formatting --- lib_dec/ivas_orient_trk.c | 18 +++++++++--------- lib_dec/ivas_stat_dec.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib_dec/ivas_orient_trk.c b/lib_dec/ivas_orient_trk.c index 96f67cba5c..a89c5cb602 100644 --- a/lib_dec/ivas_orient_trk.c +++ b/lib_dec/ivas_orient_trk.c @@ -131,7 +131,7 @@ void QuaternionSlerp( { float angle, denom, s, s2; s = QuaternionDotProduct( q1, q2 ); - if ( fabsf(s) >= 1.0f ) + if ( fabsf( s ) >= 1.0f ) { *r = q2; return; @@ -156,7 +156,7 @@ void QuaternionConjugate( const Quaternion q, Quaternion *const r ) { - r->w = q.w; + r->w = q.w; r->x = -q.x; r->y = -q.y; r->z = -q.z; @@ -238,7 +238,7 @@ static float ClipAngle( *-------------------------------------------------------------------*/ void ivas_orient_trk_Init( - ivas_orient_trk_state_t *pOTR ) /* i/o : orientation tracker handle */ + ivas_orient_trk_state_t *pOTR ) /* i/o : orientation tracker handle */ { /* Track relative to a reference orientation */ pOTR->trackingType = OTR_TRACKING_REF_ORIENT; @@ -290,8 +290,8 @@ void ivas_orient_trk_Init( *-------------------------------------------------------------------*/ ivas_error ivas_orient_trk_SetTrackingType( - ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ - OTR_TRACKING_T trackingType ) /* i/o : orientation tracking type */ + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + OTR_TRACKING_T trackingType ) /* i/o : orientation tracking type */ { pOTR->trackingType = trackingType; return IVAS_ERR_OK; @@ -327,10 +327,10 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( - ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ - Quaternion absRot, /* i : absolute head rotation */ - float updateRate, /* i : rotation update rate [Hz] */ - Quaternion *pTrkRot ) /* o : tracked rotation */ + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + Quaternion absRot, /* i : absolute head rotation */ + float updateRate, /* i : rotation update rate [Hz] */ + Quaternion *pTrkRot ) /* o : tracked rotation */ { float normalizedOrientation; float relativeOrientationRate; diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 3193497ca3..b0b677cdea 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1362,8 +1362,8 @@ typedef struct ivas_orient_trk_state_t float alpha; - Quaternion absAvgRot; /* average absolute orientation */ - Quaternion refRot; /* reference orientation */ + Quaternion absAvgRot; /* average absolute orientation */ + Quaternion refRot; /* reference orientation */ } ivas_orient_trk_state_t; #endif -- GitLab From 4bc84c6c76c50db66f681bd456484278372ddf73 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 9 Nov 2022 10:07:32 +0100 Subject: [PATCH 016/140] Additional test cases for orientation tracking --- scripts/config/self_test.prm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 15e0be1ab5..93793171b0 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -400,6 +400,10 @@ ../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit ../IVAS_dec -t testv/headrot_case03_3000_q.csv BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR.tst +// 4 ISm with metadata at 256 kbps, 48 kHz in, 48 kHz out, TD BINAURAL out, head rotation, Orientation tracking +../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR_OtrAvg.tst + // 1 ISm with metadata bitrate switching from 13.2 kbps to 128 kbps, 32 kHz in, 32 kHz out, mono out, DTX on ../IVAS_cod -dtx -ism 1 testv/stvISM1.csv ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv32c.pcm bit ../IVAS_dec MONO 32 bit testv/stv32c.pcm_brate_sw_32-32_mono_dtx.tst @@ -441,6 +445,10 @@ ../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot.tst +// SBA at 24.4 kbps, 32kHz in, 32kHz out, BINAURAL out, Headrotation, Orientation tracking +../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot_OtrAvg.tst + // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c.pcm bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_DTX_Binaural_FEC5.tst @@ -485,6 +493,10 @@ ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot.tst +// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking +../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrAvg.tst + // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_DTX_Binaural_FEC5.tst @@ -541,6 +553,10 @@ ../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot.tst +// SBA at 128 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking +../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot_OtrAvg.tst + // SBA at 192 kbps, 48kHz in, 48kHz out, HOA2 out, random FEC at 5% ../IVAS_cod -sba 3 192000 48 testv/stv3OA48c.pcm bit ../IVAS_dec -fec 5 HOA2 48 bit testv/stv3OA48c.pcm_SBA_192000_48-48_HOA2_FEC5.tst @@ -665,6 +681,10 @@ ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot.tst +// MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking +../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst + // MASA 1dir 2TC at 48 kbps, 48kHz in, 48kHz out, 7_1_4 out, random FEC at 5% ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 48000 48 testv/stv_IVASMASA_1dir2TC.pcm bit ../IVAS_dec -fec 5 7_1_4 48 bit testv/stv_IVASMASA_1dir2TC.pcm_48000_48-48_7_1_4_FEC5.tst @@ -798,6 +818,10 @@ ../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot.tst +// Multi-channel 5_1 at 256 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, head rotation, Orientation tracking +../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit +../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot_OtrAvg.tst + // Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.pcm bit ../IVAS_dec 5_1 48 bit testv/stv51MC48c.pcm_MC51_384000_48-48_5_1.tst -- GitLab From b41fff849da368c281be5452195b96423e305c73 Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 11 Nov 2022 12:42:19 +0100 Subject: [PATCH 017/140] [cleanup] formatting --- lib_rend/ivas_orient_trk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 10e489c7b7..6bfda7d600 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -54,7 +54,7 @@ #define OTR_UPDATE_RATE ( 50.0f ) /* rate of the Process() calls [Hz]; 1x per IVAS frame */ #ifndef EXT_RENDERER -typedef Quaternion IVAS_QUATERNION; +typedef Quaternion IVAS_QUATERNION; #endif /*------------------------------------------------------------------------------------------* -- GitLab From 69043992fc23142fbb9df630c375cd1a6702d2cd Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 11 Nov 2022 13:41:32 +0100 Subject: [PATCH 018/140] [cleanup] formatting --- lib_dec/ivas_dirac_dec_binaural_functions.c | 2 +- lib_rend/ivas_rotation.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib_dec/ivas_dirac_dec_binaural_functions.c b/lib_dec/ivas_dirac_dec_binaural_functions.c index 3053905462..f45e728a18 100644 --- a/lib_dec/ivas_dirac_dec_binaural_functions.c +++ b/lib_dec/ivas_dirac_dec_binaural_functions.c @@ -296,7 +296,7 @@ void ivas_dirac_dec_binaural( { decorr_signal[ch] = (float *) &( output_f[ch + BINAURAL_CHANNELS][0] ); } - output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + output_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); ivas_td_decorr_process( st_ivas->hDiracDecBin->hTdDecorr, output_f, decorr_signal, output_frame ); } diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 2f7b302e99..8dc547bf6b 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -94,7 +94,6 @@ ivas_error ivas_headTrack_open( } ivas_orient_trk_Init( ( *hHeadTrackData )->OrientationTracker ); #endif - /* Initialise Rmat_prev to I, Rmat will be computed later */ for ( i = 0; i < 3; i++ ) { @@ -399,6 +398,7 @@ void rotateFrame_shd( set_zero( SHrotmat[i], HEADROT_SHMAT_DIM ); } + /* get next quaternion */ #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], @@ -406,7 +406,6 @@ void rotateFrame_shd( &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else - /* get next quaternion */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); #endif @@ -524,7 +523,6 @@ void rotateFrame_sd( Quaternion trackedHeadOrientation; #endif #endif - wmops_sub_start( "rotateFrame_sd" ); nchan = hTransSetup.nchan_out_woLFE + hTransSetup.num_lfe; @@ -546,6 +544,7 @@ void rotateFrame_sd( } #endif + /* Get next quaternion and calculate rotation matrix */ #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], @@ -553,7 +552,6 @@ void rotateFrame_sd( &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); #else - /* Get next quaternion and calculate rotation matrix */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); #endif @@ -805,6 +803,7 @@ void rotateFrame_sd_cldfb( } } + /* Get next quaternion and calculate rotation matrix */ #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], @@ -812,7 +811,6 @@ void rotateFrame_sd_cldfb( &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, Rmat ); #else - /* Get next quaternion and calculate rotation matrix */ QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], Rmat ); #endif -- GitLab From 4886ef1e52e2a7baf12a2d9e316afa71d7690bfe Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 11 Nov 2022 14:23:34 +0100 Subject: [PATCH 019/140] [cleanup] formatting --- lib_dec/ivas_dirac_dec_binaural_functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_dirac_dec_binaural_functions.c b/lib_dec/ivas_dirac_dec_binaural_functions.c index f45e728a18..3053905462 100644 --- a/lib_dec/ivas_dirac_dec_binaural_functions.c +++ b/lib_dec/ivas_dirac_dec_binaural_functions.c @@ -296,7 +296,7 @@ void ivas_dirac_dec_binaural( { decorr_signal[ch] = (float *) &( output_f[ch + BINAURAL_CHANNELS][0] ); } - output_frame = ( int16_t )( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); ivas_td_decorr_process( st_ivas->hDiracDecBin->hTdDecorr, output_f, decorr_signal, output_frame ); } -- GitLab From fed198d460599cd0d2ce89ecaa21f82f44363e98 Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 11 Nov 2022 14:26:44 +0100 Subject: [PATCH 020/140] FIX_I1090_ORIENTATION_TRACKING undefined to check for CI failures --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index c5571e6969..a5635d9e9d 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -143,7 +143,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -#define FIX_I109_ORIENTATION_TRACKING /* Issue 109: Harmonize head and orientation tracking */ +/*#define FIX_I109_ORIENTATION_TRACKING*/ /* Issue 109: Harmonize head and orientation tracking */ #define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */ #define EXT_RENDERER /* FhG: external renderer library and standalone application */ -- GitLab From 6d9116414cd2095ac59c668ce88d6aee130dd15a Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 11 Nov 2022 14:54:26 +0100 Subject: [PATCH 021/140] Fix for renderer standalone and orientation tracking --- lib_com/options.h | 3 +-- .../renderer_standalone.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 73d923f8f9..c5571e6969 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -143,7 +143,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -/*#define FIX_I109_ORIENTATION_TRACKING*/ /* Issue 109: Harmonize head and orientation tracking */ +#define FIX_I109_ORIENTATION_TRACKING /* Issue 109: Harmonize head and orientation tracking */ #define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */ #define EXT_RENDERER /* FhG: external renderer library and standalone application */ @@ -154,7 +154,6 @@ #define SBA_BR_SWITCHING /* Issue 114: Changes for sba bit rate switching*/ #define FIX_AGC_WINFUNC_MEMORY /* Issue 62: lower agc_com.winFunc memory consumption */ #define REMOVE_SID_HARM_LEFTOVERS /* Issue 192: remove leftovers from the SID bitrate harmonization */ -#define FIX_MCT_UNINIT_MEM /* Issue 166: Reading of uninitialized memory in TCX range coder */ diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c index b2963093a2..ba1fb06847 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c @@ -317,6 +317,14 @@ int main( int argc, char *argv[] ) exit( -1 ); } st_ivas->hDecoderConfig->Opt_Headrotation = TRUE; + +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( ( st_ivas->hHeadTrackData->OrientationTracker = (ivas_orient_trk_state_t *) count_malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) + { + fprintf( stderr, "Cannot allocate memory for orientation tracker\n" ); + exit( -1 ); + } +#endif } #ifdef EXT_RENDERER else @@ -489,6 +497,12 @@ int main( int argc, char *argv[] ) if ( st_ivas->hHeadTrackData != NULL ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( st_ivas->hHeadTrackData->OrientationTracker ) + { + count_free( st_ivas->hHeadTrackData->OrientationTracker ); + } +#endif count_free( st_ivas->hHeadTrackData ); fclose( f_quat_traj ); } -- GitLab From 752e464d4eec135ae0dff7bde16e4e9b1fbab32f Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 11 Nov 2022 15:51:02 +0100 Subject: [PATCH 022/140] Fix for missing orientation tracker initialization --- .../object_renderer_standalone/renderer_standalone.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c index ba1fb06847..b49168a9f3 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c @@ -324,6 +324,7 @@ int main( int argc, char *argv[] ) fprintf( stderr, "Cannot allocate memory for orientation tracker\n" ); exit( -1 ); } + ivas_orient_trk_Init( st_ivas->hHeadTrackData->OrientationTracker ); #endif } #ifdef EXT_RENDERER -- GitLab From 5ba30d0473df3630cb2d4b11558493ae53e689e7 Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 11 Nov 2022 15:54:22 +0100 Subject: [PATCH 023/140] [cleanup] NULL comparison for orientation tracker destructor --- .../object_renderer_standalone/renderer_standalone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c index b49168a9f3..efcd10a3e7 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c @@ -499,7 +499,7 @@ int main( int argc, char *argv[] ) if ( st_ivas->hHeadTrackData != NULL ) { #ifdef FIX_I109_ORIENTATION_TRACKING - if ( st_ivas->hHeadTrackData->OrientationTracker ) + if ( st_ivas->hHeadTrackData->OrientationTracker != NULL ) { count_free( st_ivas->hHeadTrackData->OrientationTracker ); } -- GitLab From f84ea03552d78d1b2d57e4b1a21e2b0e0a3109cc Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 24 Nov 2022 23:44:29 +0100 Subject: [PATCH 024/140] fix asan test cases: properly closing headTracker handle --- .../tests/unit_tests/crend/ivas_crend_utest_utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c index be5e483927..e85bea9f93 100644 --- a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c +++ b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c @@ -1603,8 +1603,7 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl /* Head track data handle */ if ( st_ivas.hHeadTrackData != NULL ) { - count_free( st_ivas.hHeadTrackData ); - st_ivas.hHeadTrackData = NULL; + ivas_headTrack_close( &st_ivas.hHeadTrackData ); } if ( headRotReader ) -- GitLab From 65fef519341878efeeea86c7dba69f0b711ebc1e Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 30 Nov 2022 09:29:18 +0100 Subject: [PATCH 025/140] fix compile without FIX_I109_ORIENTATION_TRACKING --- .../tests/unit_tests/crend/ivas_crend_utest_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c index e85bea9f93..9e40c52376 100644 --- a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c +++ b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c @@ -1600,11 +1600,13 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl ivas_render_config_close( &st_ivas.hRenderConfig ); } +#ifdef FIX_I109_ORIENTATION_TRACKING /* Head track data handle */ if ( st_ivas.hHeadTrackData != NULL ) { ivas_headTrack_close( &st_ivas.hHeadTrackData ); } +#endif if ( headRotReader ) { -- GitLab From 4dc151bc988b2499f3260e3b55f94bf07492d6dc Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 30 Nov 2022 20:43:43 +0100 Subject: [PATCH 026/140] disable flag for CI test --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 7e0493c1bf..333a4291d2 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -144,7 +144,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -#define FIX_I109_ORIENTATION_TRACKING /* Issue 109: Harmonize head and orientation tracking */ +//#define FIX_I109_ORIENTATION_TRACKING /* Issue 109: Harmonize head and orientation tracking */ #define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */ #define EXT_RENDERER /* FhG: external renderer library and standalone application */ -- GitLab From 9cad25ce4295a14d2fb14d867bd4e94b5c48c18d Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 30 Nov 2022 20:54:56 +0100 Subject: [PATCH 027/140] pacify asan --- .../tests/unit_tests/crend/ivas_crend_utest_utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c index 9e40c52376..a55fd2b1dc 100644 --- a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c +++ b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c @@ -1600,11 +1600,14 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl ivas_render_config_close( &st_ivas.hRenderConfig ); } -#ifdef FIX_I109_ORIENTATION_TRACKING /* Head track data handle */ if ( st_ivas.hHeadTrackData != NULL ) { +#ifdef FIX_I109_ORIENTATION_TRACKING ivas_headTrack_close( &st_ivas.hHeadTrackData ); +#else + count_free( st_ivas.hHeadTrackData ); + st_ivas.hHeadTrackData = NULL; } #endif -- GitLab From 162a9712a05f91f4fc1e72b83e0431ab5fe78e09 Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 2 Dec 2022 13:28:36 +0100 Subject: [PATCH 028/140] FIX_I109_ORIENTATION_TRACKING defined --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index e111492f34..5c65cac906 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -144,7 +144,7 @@ #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define ITD_WINNER_GAIN_MODIFY */ /* ITD optimization - WORK IN PROGRESS */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -//#define FIX_I109_ORIENTATION_TRACKING /* Issue 109: Harmonize head and orientation tracking */ +#define FIX_I109_ORIENTATION_TRACKING /* Issue 109: Harmonize head and orientation tracking */ #define FIX_I1_113 /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define PRINT_SBA_ORDER /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */ #define EXT_RENDERER /* FhG: external renderer library and standalone application */ -- GitLab From ac74c86e7724301f163714eeaa2d0c8c562cc004 Mon Sep 17 00:00:00 2001 From: szczerba Date: Tue, 6 Dec 2022 13:24:15 +0100 Subject: [PATCH 029/140] Update towards support all orientation tracking modes, external renderer. --- apps/decoder.c | 19 ++++- apps/renderer.c | 23 +++++- lib_com/ivas_cnst.h | 10 +++ lib_com/ivas_prot.h | 7 ++ lib_dec/ivas_init_dec.c | 8 +- lib_rend/ivas_lib_rend_internal.h | 3 + lib_rend/ivas_orient_trk.c | 128 +++++++++++++++++------------- lib_rend/lib_rend.c | 128 +++++++++++++++++++++++++++++- lib_rend/lib_rend.h | 12 +++ 9 files changed, 275 insertions(+), 63 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 7f94e19808..cbe9949ef9 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -83,9 +83,14 @@ static #define MAX_NUM_OUTPUT_CHANNELS 16 #define MAX_OUTPUT_PCM_BUFFER_SIZE ( MAX_NUM_OUTPUT_CHANNELS * MAX_FRAME_SIZE ) +#ifdef FIX_I109_ORIENTATION_TRACKING +#define IVAS_PUBLIC_ORIENT_TRK_NONE ( 0 ) +#define IVAS_PUBLIC_ORIENT_TRK_REF ( 1 ) +#define IVAS_PUBLIC_ORIENT_TRK_AVG ( 2 ) +#else #define IVAS_PUBLIC_ORIENT_TRK_REF 0 #define IVAS_PUBLIC_ORIENT_TRK_AVG 1 - +#endif typedef struct { @@ -709,7 +714,11 @@ static bool parseCmdlIVAS_dec( arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; +#ifdef FIX_I109_ORIENTATION_TRACKING + arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; +#else arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; +#endif #ifdef SUPPORT_JBM_TRACEFILE arg->jbmTraceFilename = NULL; @@ -892,7 +901,15 @@ static bool parseCmdlIVAS_dec( } char tmp[4]; strcpy( tmp, argv[i + 1] ); +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( strcmp( to_upper( tmp ), "NONE" ) == 0 ) + { + arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; + } + else if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) +#else if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) +#endif { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; } diff --git a/apps/renderer.c b/apps/renderer.c index 9fb5337ed8..faf8d3e557 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -671,7 +671,7 @@ int main( { args.sampleRate = inFileSampleRate; } - const int16_t frameSize_smpls = (int16_t) ( 20 * args.sampleRate / 1000 ); + const int16_t frameSize_smpls = ( int16_t )( 20 * args.sampleRate / 1000 ); IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; @@ -722,6 +722,13 @@ int main( } } +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientationTracking ) ) + { + return error; + } +#endif + /* Set up output custom layout configuration */ if ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { @@ -1314,7 +1321,15 @@ static int8_t parseOrientationTracking( to_upper( value ); +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( strcmp( value, "NONE" ) == 0) + { + *tracking_type = IVAS_ORIENT_TRK_NONE; + } + else if ( strcmp( value, "REF" ) == 0 ) +#else if ( strcmp( value, "REF" ) == 0 ) +#endif { *tracking_type = IVAS_ORIENT_TRK_REF; } @@ -1499,7 +1514,11 @@ static CmdlnArgs defaultArgs( clearString( args.customHrtfFilePath ); clearString( args.renderConfigFilePath ); +#ifdef FIX_I109_ORIENTATION_TRACKING + args.orientationTracking = IVAS_ORIENT_TRK_NONE; +#else args.orientationTracking = IVAS_ORIENT_TRK_REF; +#endif args.noDiegeticPan = 0.0f; args.delayCompensationEnabled = true; @@ -1556,7 +1575,7 @@ static void parseOption( break; case CmdLnOptionId_sampleRate: assert( numOptionValues == 1 ); - args->sampleRate = (int32_t) ( strtol( optionValues[0], NULL, 10 ) * 1000 ); + args->sampleRate = ( int32_t )( strtol( optionValues[0], NULL, 10 ) * 1000 ); if ( args->sampleRate == 0 ) { fprintf( stderr, "Invalid sampling rate specified\n" ); diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 60ea963dcb..2b71916cc2 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1461,12 +1461,22 @@ typedef enum *----------------------------------------------------------------------------------*/ /* Orientation tracking types */ +#ifdef FIX_I109_ORIENTATION_TRACKING +#define IVAS_ORIENT_TRK_NONE 0 +#define IVAS_ORIENT_TRK_REF 1 +#define IVAS_ORIENT_TRK_AVG 2 +#else #define IVAS_ORIENT_TRK_REF 0 #define IVAS_ORIENT_TRK_AVG 1 +#endif typedef enum { +#ifdef FIX_I109_ORIENTATION_TRACKING + OTR_TRACKING_NONE = IVAS_ORIENT_TRK_NONE, +#else OTR_TRACKING_NONE = IVAS_ORIENT_TRK_REF-1, +#endif OTR_TRACKING_REF_ORIENT = IVAS_ORIENT_TRK_REF, /* track orientation relative to external reference orientation (default: no rotation) */ OTR_TRACKING_AVG_ORIENT = IVAS_ORIENT_TRK_AVG /* track orientation relative to average orientation */ diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index be238ff610..51b764c2df 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5595,6 +5595,13 @@ ivas_error ivas_orient_trk_SetTrackingType( OTR_TRACKING_T trackingType /* i : orientation tracking type */ ); +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error ivas_orient_trk_SetReferenceRotation( + ivas_orient_trk_state_t *pOTR, /* i/o : orientatoin trakcer handle */ + IVAS_QUATERNION refRot /* i : reference rotation */ +); +#endif + #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 8fd000ab1b..e0febef269 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -688,11 +688,15 @@ ivas_error ivas_init_decoder( #ifdef FIX_I109_ORIENTATION_TRACKING if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { - if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_AVG ) + if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_NONE ) + { + ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_NONE ); + } + else if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_AVG ) { ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_AVG_ORIENT ); } - else + else if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_REF ) { ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_REF_ORIENT ); } diff --git a/lib_rend/ivas_lib_rend_internal.h b/lib_rend/ivas_lib_rend_internal.h index 6a362c8c1c..aba4b1df91 100644 --- a/lib_rend/ivas_lib_rend_internal.h +++ b/lib_rend/ivas_lib_rend_internal.h @@ -43,6 +43,9 @@ typedef struct int8_t headRotEnabled; IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_state_t *hOrientationTracker; +#endif } IVAS_REND_HeadRotData; typedef struct diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 6bfda7d600..6057f1ffe0 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -274,9 +274,16 @@ static float ClipAngle( void ivas_orient_trk_Init( ivas_orient_trk_state_t *pOTR ) /* i/o : orientation tracker handle */ { +#ifdef FIX_I109_ORIENTATION_TRACKING + IVAS_QUATERNION identity; + identity.w = 1.0f; + identity.x = 0.0f; + identity.y = 0.0f; + identity.z = 0.0f; +#else /* Track relative to a reference orientation */ pOTR->trackingType = OTR_TRACKING_REF_ORIENT; - +#endif /* configuration parameters */ pOTR->centerAdaptationRate = 1.0f / 30.0f; pOTR->offCenterAdaptationRate = 1.0f / 8.0f; @@ -286,15 +293,9 @@ void ivas_orient_trk_Init( pOTR->alpha = sinf( PI2 * pOTR->offCenterAdaptationRate / OTR_UPDATE_RATE ); /* start adaptation at off-center rate = fastest rate */ #ifdef FIX_I109_ORIENTATION_TRACKING - pOTR->absAvgRot.w = 1.0f; - pOTR->absAvgRot.x = 0.0f; - pOTR->absAvgRot.y = 0.0f; - pOTR->absAvgRot.z = 0.0f; + pOTR->absAvgRot = identity; /* Use frontal and horiontal orientation as reference orientation, unless/until overridden */ - pOTR->refRot.w = 1.0f; - pOTR->refRot.x = 0.0f; - pOTR->refRot.y = 0.0f; - pOTR->refRot.z = 0.0f; + pOTR->refRot = identity; #else pOTR->absYaw = 0.0f; pOTR->absPitch = 0.0f; @@ -331,7 +332,15 @@ ivas_error ivas_orient_trk_SetTrackingType( return IVAS_ERR_OK; } -#ifndef FIX_I109_ORIENTATION_TRACKING +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error ivas_orient_trk_SetReferenceRotation( + ivas_orient_trk_state_t *pOTR, /* i/o : orientation trakcer handle */ + IVAS_QUATERNION refRot ) /* i : reference rotation */ +{ + pOTR->refRot = refRot; + return IVAS_ERR_OK; +} +#else /*-------------------------------------------------------------------* * ivas_orient_trk_SetAbsoluteOrientation() * @@ -372,49 +381,15 @@ ivas_error ivas_orient_trk_Process( float cutoffFrequency; float alpha = pOTR->alpha; float ang; + ivas_error result; - if ( pOTR->trackingType == OTR_TRACKING_AVG_ORIENT ) + switch ( pOTR->trackingType ) { - /* Compute average (low-pass filtered) absolute orientation */ - QuaternionSlerp( pOTR->absAvgRot, absRot, alpha, &pOTR->absAvgRot ); - - /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ - QuaternionInverse( pOTR->absAvgRot, pTrkRot ); - QuaternionProduct( *pTrkRot, absRot, pTrkRot ); - - /* Adapt LPF constant based on orientation excursion relative to current mean: - - low cutoff (slow adaptation) for small excursions (around center) - - high cutoff (fast adaptation) for large excursions (off-center) - */ - ang = QuaternionAngle( absRot, *pTrkRot ); - normalizedOrientation = ang * ang; - - relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; - /* 'if' assumed to perform comparison to 0 */ - if ( relativeOrientationRate > 1.0f ) - { - relativeOrientationRate = 1.0f; - } + case OTR_TRACKING_NONE: + *pTrkRot = absRot; + break; - /* Compute range of the adaptation rate between center = lower rate and off-center = higher rate */ - rateRange = pOTR->offCenterAdaptationRate - pOTR->centerAdaptationRate; - /* 'if' assumed to perform comparison to 0 */ - if ( rateRange < 0.0f ) - { - rateRange = 0.0f; - } - - /* Compute adaptivity cutoff frequency: interpolate between minimum (center) and maximum (off-center) values */ - cutoffFrequency = pOTR->centerAdaptationRate + ( relativeOrientationRate * rateRange ); - - /* Compute filter coefficient corresponding to desired cutoff frequency */ - pOTR->alpha = sinf( 2.0f * EVS_PI * cutoffFrequency / updateRate ); - } - else - { - /* 'if' assumed to perform comparison to 0 */ - if ( pOTR->trackingType == OTR_TRACKING_REF_ORIENT ) - { + case OTR_TRACKING_REF_ORIENT: /* Reset average orientation */ pOTR->absAvgRot = absRot; @@ -424,14 +399,55 @@ ivas_error ivas_orient_trk_Process( /* Compute relative orientation = (absolute orientation) - (reference orientation) */ QuaternionInverse( pOTR->refRot, pTrkRot ); QuaternionProduct( *pTrkRot, absRot, pTrkRot ); - } - else - { - return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Non-supported orientation tracking adaptation type" ); - } + + result = IVAS_ERR_OK; + break; + + case OTR_TRACKING_AVG_ORIENT: + /* Compute average (low-pass filtered) absolute orientation */ + QuaternionSlerp( pOTR->absAvgRot, absRot, alpha, &pOTR->absAvgRot ); + + /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ + QuaternionInverse( pOTR->absAvgRot, pTrkRot ); + QuaternionProduct( *pTrkRot, absRot, pTrkRot ); + + /* Adapt LPF constant based on orientation excursion relative to current mean: + - low cutoff (slow adaptation) for small excursions (around center) + - high cutoff (fast adaptation) for large excursions (off-center) + */ + ang = QuaternionAngle( absRot, *pTrkRot ); + normalizedOrientation = ang * ang; + + relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; + /* 'if' assumed to perform comparison to 0 */ + if ( relativeOrientationRate > 1.0f ) + { + relativeOrientationRate = 1.0f; + } + + /* Compute range of the adaptation rate between center = lower rate and off-center = higher rate */ + rateRange = pOTR->offCenterAdaptationRate - pOTR->centerAdaptationRate; + /* 'if' assumed to perform comparison to 0 */ + if ( rateRange < 0.0f ) + { + rateRange = 0.0f; + } + + /* Compute adaptivity cutoff frequency: interpolate between minimum (center) and maximum (off-center) values */ + cutoffFrequency = pOTR->centerAdaptationRate + ( relativeOrientationRate * rateRange ); + + /* Compute filter coefficient corresponding to desired cutoff frequency */ + pOTR->alpha = sinf( 2.0f * EVS_PI * cutoffFrequency / updateRate ); + + result = IVAS_ERR_OK; + break; + + default: + result = IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Non-supported orientation tracking adaptation type" ); + break; } - return IVAS_ERR_OK; + return result; } #else ivas_error ivas_orient_trk_Process( diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index d766334988..8088ae9e60 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -819,7 +819,11 @@ static ivas_error getEfapGains( return IVAS_ERR_OK; } +#ifdef FIX_I109_ORIENTATION_TRACKING +static ivas_error initHeadRotation( +#else static void initHeadRotation( +#endif IVAS_REND_HANDLE hIvasRend ) { int16_t i, crossfade_len; @@ -842,9 +846,30 @@ static void initHeadRotation( hIvasRend->headRotData.headPositions[i] = quaternionInit(); } +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( ( hIvasRend->headRotData.hOrientationTracker = (ivas_orient_trk_state_t *) count_malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking" ); + } + ivas_orient_trk_Init( hIvasRend->headRotData.hOrientationTracker ); + + return IVAS_ERR_OK; +#else return; +#endif } +#ifdef FIX_I109_ORIENTATION_TRACKING +static void closeHeadRotation( + IVAS_REND_HANDLE hIvasRend ) +{ + if ( ( hIvasRend != NULL ) && ( hIvasRend->headRotData.hOrientationTracker != NULL )) + { + count_free( hIvasRend->headRotData.hOrientationTracker ); + } +} +#endif + static void initRotMatrix( rotation_matrix rot_mat ) { @@ -2157,6 +2182,10 @@ static DecoderDummy *initDecoderDummy( int32_t sampleRate, int16_t numTransChann decDummy->hHeadTrackData->lrSwitchInterpVal = 0.0f; decDummy->hHeadTrackData->lrSwitchedCurrent = 0; decDummy->hHeadTrackData->lrSwitchedNext = 0; +#ifdef FIX_I109_ORIENTATION_TRACKING + decDummy->hHeadTrackData->OrientationTracker = (ivas_orient_trk_state_t *) count_malloc( sizeof( ivas_orient_trk_state_t ) ); + ivas_orient_trk_Init( decDummy->hHeadTrackData->OrientationTracker ); +#endif } else { @@ -2230,6 +2259,12 @@ static void freeDecoderDummy( DecoderDummy **ppDecDummy ) } if ( pDecDummy->hHeadTrackData != NULL ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( pDecDummy->hHeadTrackData->OrientationTracker != NULL ) + { + count_free( pDecDummy->hHeadTrackData->OrientationTracker ); + } +#endif count_free( pDecDummy->hHeadTrackData ); } ivas_render_config_close( &pDecDummy->hRenderConfig ); @@ -2345,7 +2380,14 @@ ivas_error IVAS_REND_Open( initLimiter( &hIvasRend->hLimiter, numOutChannels, outputSampleRate ); /* Initialize headrotation data */ +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( ( error = initHeadRotation( hIvasRend ) ) != IVAS_ERR_OK ) + { + return error; + } +#else initHeadRotation( hIvasRend ); +#endif /* Initialize EFAP */ initEfap( &hIvasRend->efapOutWrapper, outConfig, &hIvasRend->customLsOut ); @@ -2556,7 +2598,7 @@ static IVAS_REND_InputId makeInputId( /* Put config type in second byte (from LSB), put index + 1 in first byte * * Index is incremented here so that a valid ID can never be 0. */ - return (IVAS_REND_InputId) ( ( getAudioConfigType( config ) << 8 ) | ( inputIndex + 1 ) ); + return ( IVAS_REND_InputId )( ( getAudioConfigType( config ) << 8 ) | ( inputIndex + 1 ) ); } static ivas_error getInputById( @@ -3076,7 +3118,7 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { - latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); + latency_ns = NS2SA( hIvasRend->sampleRateOut, ( int32_t )( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); } } @@ -3352,6 +3394,51 @@ ivas_error IVAS_REND_SetHeadRotation( return IVAS_ERR_OK; } +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error IVAS_REND_SetOrientationTrackingMode( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const uint8_t otrMode /* i : Orientation tracking mode */ +) +{ + if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + if ( otrMode == IVAS_ORIENT_TRK_REF ) + { + hIvasRend->headRotData.hOrientationTracker->trackingType = OTR_TRACKING_REF_ORIENT; + } + else if (otrMode == IVAS_ORIENT_TRK_AVG) + { + hIvasRend->headRotData.hOrientationTracker->trackingType = OTR_TRACKING_AVG_ORIENT; + } + else + { + hIvasRend->headRotData.hOrientationTracker->trackingType = OTR_TRACKING_NONE; + } + + return IVAS_ERR_OK; +} + +ivas_error IVAS_REND_SetReferenceRotation( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_QUATERNION refRot /* i : Reference rotation */ +) +{ + /*-----------------------------------------------------------------* + * Validate function arguments + *-----------------------------------------------------------------*/ + + if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + hIvasRend->headRotData.hOrientationTracker->refRot = refRot; + + return IVAS_ERR_OK; +} +#endif + /* Take one channel from input buffer and copy it to each channel in output buffer, with different gain applied per output channel. This function takes 2 gain vectors - one for the beginning and one @@ -3458,6 +3545,9 @@ static ivas_error rotateFrameMc( rotation_matrix Rmat; rotation_gains gains; float tmp_gains[MAX_INPUT_CHANNELS]; +#ifdef FIX_I109_ORIENTATION_TRACKING + IVAS_QUATERNION trackedHeadOrientation; +#endif wmops_sub_start( "rotateFrameMc" ); @@ -3484,7 +3574,15 @@ static ivas_error rotateFrameMc( for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) { /* Get next quaternion and calculate rotation matrix */ +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_Process( headRotData->hOrientationTracker, + headRotData->headPositions[subframe_idx], + (float) ( FRAMES_PER_SEC * RENDERER_HEAD_POSITIONS_PER_FRAME ), + &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, Rmat ); +#else QuatToRotMat( headRotData->headPositions[subframe_idx], Rmat ); +#endif for ( ch_in = 0; ch_in < nchan; ch_in++ ) { @@ -3566,6 +3664,9 @@ static ivas_error rotateFrameSba( rotation_matrix Rmat; float tmpRot[2 * HEADROT_ORDER + 1]; rotation_gains gains; +#ifdef FIX_I109_ORIENTATION_TRACKING + IVAS_QUATERNION trackedHeadOrientation; +#endif wmops_sub_start( "rotateFrameSba" ); @@ -3582,7 +3683,15 @@ static ivas_error rotateFrameSba( } /* Get next quaternion and calculate rotation matrix */ +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_Process( headRotData->hOrientationTracker, + headRotData->headPositions[subframe_idx], + (float) ( FRAMES_PER_SEC * RENDERER_HEAD_POSITIONS_PER_FRAME ), + &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, Rmat ); +#else QuatToRotMat( headRotData->headPositions[subframe_idx], Rmat ); +#endif /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( gains, Rmat, shd_rot_max_order ); @@ -3698,6 +3807,9 @@ static ivas_error renderIsmToBinauralRoom( IVAS_REND_AudioBuffer tmpMcBuffer; IVAS_REND_AudioObjectPosition rotatedPos; const IVAS_REND_HeadRotData *headRotData; +#ifdef FIX_I109_ORIENTATION_TRACKING + IVAS_QUATERNION trackedHeadOrientation; +#endif wmops_sub_start( "renderIsmToBinauralRoom" ); @@ -3710,12 +3822,20 @@ static ivas_error renderIsmToBinauralRoom( // for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) for ( subframe_idx = 0; subframe_idx < 1; subframe_idx++ ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_Process( headRotData->hOrientationTracker, + headRotData->headPositions[subframe_idx], + (float) ( FRAMES_PER_SEC ), + &trackedHeadOrientation ); + QuatToRotMat( trackedHeadOrientation, Rmat ); +#else quat.w = headRotData->headPositions[subframe_idx].w; quat.x = headRotData->headPositions[subframe_idx].x; quat.y = headRotData->headPositions[subframe_idx].y; quat.z = headRotData->headPositions[subframe_idx].z; QuatToRotMat( quat, Rmat ); +#endif } (void) subframe_len; // avoid warning } @@ -4834,6 +4954,10 @@ void IVAS_REND_Close( ivas_limiter_close( &hIvasRend->hLimiter ); +#ifdef FIX_I109_ORIENTATION_TRACKING + closeHeadRotation( &( hIvasRend->headRotData ) ); +#endif + count_free( hIvasRend ); *phIvasRend = NULL; diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 158a734f46..1dae43a513 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -264,6 +264,18 @@ ivas_error IVAS_REND_SetHeadRotation( const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : head positions for next rendering call */ ); +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error IVAS_REND_SetOrientationTrackingMode( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const uint8_t otrMode /* i : Orientation tracking mode */ +); + +ivas_error IVAS_REND_SetReferenceRotation( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_QUATERNION refRot /* i : Reference rotation */ +); +#endif + ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ -- GitLab From 4e4e7194c49ce0a5a5a2e8b7b1fe2a07611c0540 Mon Sep 17 00:00:00 2001 From: szczerba Date: Tue, 6 Dec 2022 13:44:54 +0100 Subject: [PATCH 030/140] TDREND update for orientation tracking. Fixes for ivas_orient_trk_Process error handling. --- lib_rend/ivas_objectRenderer.c | 15 +++++++++++++++ lib_rend/ivas_orient_trk.c | 6 ++---- lib_rend/lib_rend.c | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 061575279a..56ccc065db 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -739,6 +739,10 @@ ivas_error ivas_rend_TDObjRenderFrame( IVAS_FORMAT ivas_format; IVAS_REND_AudioConfigType inConfigType; +#ifdef FIX_I109_ORIENTATION_TRACKING + IVAS_QUATERNION trackedHeadOrientation; +#endif + wmops_sub_start( "ivas_rend_TDObjRenderFrame" ); inConfigType = getAudioConfigType( inConfig ); @@ -788,7 +792,18 @@ ivas_error ivas_rend_TDObjRenderFrame( for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { /* Update the listener's location/orientation */ +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( headRotData->headRotEnabled ) + { + ivas_orient_trk_Process( headRotData->hOrientationTracker, + headRotData->headPositions[subframe_idx], + FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, + &trackedHeadOrientation ); + } + TDREND_Update_listener_orientation( pTDRend->hBinRendererTd, headRotData->headRotEnabled, ( headRotData != NULL ) ? &trackedHeadOrientation : NULL ); +#else TDREND_Update_listener_orientation( pTDRend->hBinRendererTd, headRotData->headRotEnabled, ( headRotData != NULL ) ? &headRotData->headPositions[subframe_idx] : NULL ); +#endif /* TODO tmu : pass down renderer config struct */ // if ( ( hRenderConfig != NULL ) && ( hRenderConfig->roomAcoustics.late_reverb_on ) ) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 6057f1ffe0..a949bf43c5 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -383,6 +383,8 @@ ivas_error ivas_orient_trk_Process( float ang; ivas_error result; + result = IVAS_ERR_OK; + switch ( pOTR->trackingType ) { case OTR_TRACKING_NONE: @@ -399,8 +401,6 @@ ivas_error ivas_orient_trk_Process( /* Compute relative orientation = (absolute orientation) - (reference orientation) */ QuaternionInverse( pOTR->refRot, pTrkRot ); QuaternionProduct( *pTrkRot, absRot, pTrkRot ); - - result = IVAS_ERR_OK; break; case OTR_TRACKING_AVG_ORIENT: @@ -438,8 +438,6 @@ ivas_error ivas_orient_trk_Process( /* Compute filter coefficient corresponding to desired cutoff frequency */ pOTR->alpha = sinf( 2.0f * EVS_PI * cutoffFrequency / updateRate ); - - result = IVAS_ERR_OK; break; default: diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 8088ae9e60..9644b2203f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4955,7 +4955,7 @@ void IVAS_REND_Close( ivas_limiter_close( &hIvasRend->hLimiter ); #ifdef FIX_I109_ORIENTATION_TRACKING - closeHeadRotation( &( hIvasRend->headRotData ) ); + closeHeadRotation( hIvasRend ); #endif count_free( hIvasRend ); -- GitLab From 89757f3887aaf18f7fc826bf4c7b49b0547bf0ad Mon Sep 17 00:00:00 2001 From: szczerba Date: Tue, 6 Dec 2022 15:52:54 +0100 Subject: [PATCH 031/140] Editorials --- apps/renderer.c | 4 ++-- lib_rend/ivas_orient_trk.c | 5 ++--- lib_rend/lib_rend.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index faf8d3e557..18b6d95cae 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -671,7 +671,7 @@ int main( { args.sampleRate = inFileSampleRate; } - const int16_t frameSize_smpls = ( int16_t )( 20 * args.sampleRate / 1000 ); + const int16_t frameSize_smpls = (int16_t) ( 20 * args.sampleRate / 1000 ); IVAS_REND_InputId mcIds[RENDERER_MAX_MC_INPUTS] = { 0 }; IVAS_REND_InputId ismIds[RENDERER_MAX_ISM_INPUTS] = { 0 }; @@ -1575,7 +1575,7 @@ static void parseOption( break; case CmdLnOptionId_sampleRate: assert( numOptionValues == 1 ); - args->sampleRate = ( int32_t )( strtol( optionValues[0], NULL, 10 ) * 1000 ); + args->sampleRate = (int32_t) ( strtol( optionValues[0], NULL, 10 ) * 1000 ); if ( args->sampleRate == 0 ) { fprintf( stderr, "Invalid sampling rate specified\n" ); diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index a949bf43c5..eb96833fae 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -276,10 +276,9 @@ void ivas_orient_trk_Init( { #ifdef FIX_I109_ORIENTATION_TRACKING IVAS_QUATERNION identity; + identity.w = 1.0f; - identity.x = 0.0f; - identity.y = 0.0f; - identity.z = 0.0f; + identity.x = identity.y = identity.z = 0.0f; #else /* Track relative to a reference orientation */ pOTR->trackingType = OTR_TRACKING_REF_ORIENT; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 9644b2203f..da5300ed60 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2598,7 +2598,7 @@ static IVAS_REND_InputId makeInputId( /* Put config type in second byte (from LSB), put index + 1 in first byte * * Index is incremented here so that a valid ID can never be 0. */ - return ( IVAS_REND_InputId )( ( getAudioConfigType( config ) << 8 ) | ( inputIndex + 1 ) ); + return (IVAS_REND_InputId) ( ( getAudioConfigType( config ) << 8 ) | ( inputIndex + 1 ) ); } static ivas_error getInputById( @@ -3118,7 +3118,7 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { - latency_ns = NS2SA( hIvasRend->sampleRateOut, ( int32_t )( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); + latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); } } -- GitLab From a457085d9ffbe750849c68b5a26417aaac3123d1 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 7 Dec 2022 09:46:27 +0100 Subject: [PATCH 032/140] IVAS_REND_GetTrackedOrientation function added Editorials --- lib_rend/lib_rend.c | 35 ++++++++++++++++++++++++++++++----- lib_rend/lib_rend.h | 13 +++++++++---- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index da5300ed60..88d864aab1 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -863,7 +863,7 @@ static void initHeadRotation( static void closeHeadRotation( IVAS_REND_HANDLE hIvasRend ) { - if ( ( hIvasRend != NULL ) && ( hIvasRend->headRotData.hOrientationTracker != NULL )) + if ( ( hIvasRend != NULL ) && ( hIvasRend->headRotData.hOrientationTracker != NULL ) ) { count_free( hIvasRend->headRotData.hOrientationTracker ); } @@ -2598,7 +2598,7 @@ static IVAS_REND_InputId makeInputId( /* Put config type in second byte (from LSB), put index + 1 in first byte * * Index is incremented here so that a valid ID can never be 0. */ - return (IVAS_REND_InputId) ( ( getAudioConfigType( config ) << 8 ) | ( inputIndex + 1 ) ); + return ( IVAS_REND_InputId )( ( getAudioConfigType( config ) << 8 ) | ( inputIndex + 1 ) ); } static ivas_error getInputById( @@ -3118,7 +3118,7 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { - latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); + latency_ns = NS2SA( hIvasRend->sampleRateOut, ( int32_t )( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); } } @@ -3408,7 +3408,7 @@ ivas_error IVAS_REND_SetOrientationTrackingMode( { hIvasRend->headRotData.hOrientationTracker->trackingType = OTR_TRACKING_REF_ORIENT; } - else if (otrMode == IVAS_ORIENT_TRK_AVG) + else if ( otrMode == IVAS_ORIENT_TRK_AVG ) { hIvasRend->headRotData.hOrientationTracker->trackingType = OTR_TRACKING_AVG_ORIENT; } @@ -3429,7 +3429,7 @@ ivas_error IVAS_REND_SetReferenceRotation( * Validate function arguments *-----------------------------------------------------------------*/ - if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL) + if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -3437,6 +3437,31 @@ ivas_error IVAS_REND_SetReferenceRotation( return IVAS_ERR_OK; } + +ivas_error IVAS_REND_GetTrackedOrientation( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer for tracked orientation */ +) +{ + if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL || pOrientation == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + switch ( hIvasRend->headRotData.hOrientationTracker->trackingType ) + { + case OTR_TRACKING_NONE: + *pOrientation = quaternionInit(); + break; + case OTR_TRACKING_REF_ORIENT: + *pOrientation = hIvasRend->headRotData.hOrientationTracker->refRot; + break; + case OTR_TRACKING_AVG_ORIENT: + *pOrientation = hIvasRend->headRotData.hOrientationTracker->absAvgRot; + break; + } + + return IVAS_ERR_OK; +} #endif /* Take one channel from input buffer and copy it to each channel diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 1dae43a513..65485df835 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -250,13 +250,13 @@ ivas_error IVAS_REND_InitConfig( ); int16_t IVAS_REND_GetRenderConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ - const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ ); int16_t IVAS_REND_FeedRenderConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ - const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); ivas_error IVAS_REND_SetHeadRotation( @@ -274,6 +274,11 @@ ivas_error IVAS_REND_SetReferenceRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION refRot /* i : Reference rotation */ ); + +ivas_error IVAS_REND_GetTrackedOrientation( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer for tracked orientation */ +); #endif ivas_error IVAS_REND_GetSamples( -- GitLab From 04ac6728931aeaded0a46436a08db72da45314b6 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 8 Dec 2022 10:37:31 +0100 Subject: [PATCH 033/140] Fixed closing head track data --- .../tests/unit_tests/crend/ivas_crend_utest_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c index a55fd2b1dc..d52022350f 100644 --- a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c +++ b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c @@ -1608,8 +1608,8 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl #else count_free( st_ivas.hHeadTrackData ); st_ivas.hHeadTrackData = NULL; - } #endif + } if ( headRotReader ) { -- GitLab From cc890b45b5dc651a238794769b7efcadcd8e91ff Mon Sep 17 00:00:00 2001 From: szczerba Date: Tue, 20 Dec 2022 14:49:27 +0100 Subject: [PATCH 034/140] Orientation tracker interface update. Cleanup. --- lib_com/ivas_prot.h | 16 ++++++- lib_dec/ivas_stat_dec.h | 5 ++- lib_rend/ivas_orient_trk.c | 85 +++++++++++++++++++++++++++++++++++++- lib_rend/lib_rend.c | 65 +++++++++++++++++------------ lib_rend/lib_rend.h | 9 +++- 5 files changed, 147 insertions(+), 33 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 43717a6006..75e564fe7c 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5634,7 +5634,11 @@ void ivas_reverb_get_hrtf_set_properties( * Orientation tracking *----------------------------------------------------------------------------------*/ -void ivas_orient_trk_Init( +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error ivas_orient_trk_Init( +#else +void ivas_orient_trk_Init( +#endif ivas_orient_trk_state_t *pOTR /* i/o : orientation tracker handle */ ); @@ -5648,6 +5652,16 @@ ivas_error ivas_orient_trk_SetReferenceRotation( ivas_orient_trk_state_t *pOTR, /* i/o : orientatoin trakcer handle */ IVAS_QUATERNION refRot /* i : reference rotation */ ); + +ivas_error ivas_orient_trk_GetMainOrientation( + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + IVAS_QUATERNION *pOrientation /* i/o : average/reference orientation */ +); + +ivas_error ivas_orient_trk_GetTrackedRotation( + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + IVAS_QUATERNION *pRotation /* i/o : processed rotation */ +); #endif #ifdef FIX_I109_ORIENTATION_TRACKING diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index f25a852bb3..9e4ca7fcdc 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1311,8 +1311,9 @@ typedef struct ivas_orient_trk_state_t float adaptationAngle; float alpha; - IVAS_QUATERNION absAvgRot; /* average absolute orientation */ - IVAS_QUATERNION refRot; /* reference orientation */ + IVAS_QUATERNION absAvgRot; /* average absolute orientation */ + IVAS_QUATERNION refRot; /* reference orientation */ + IVAS_QUATERNION trkRot; /* tracked rotation */ } ivas_orient_trk_state_t; #endif diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index d24de0bdab..50fe12e22d 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -63,6 +63,9 @@ * Declarations *------------------------------------------------------------------------------------------*/ +static IVAS_QUATERNION IdentityQuaternion( + void ); + void QuaternionProduct( const IVAS_QUATERNION q1, const IVAS_QUATERNION q2, @@ -99,6 +102,18 @@ void QuaternionInverse( const IVAS_QUATERNION q, IVAS_QUATERNION *const result ); +/*------------------------------------------------------------------------------------------* + * Quaternion product + *------------------------------------------------------------------------------------------*/ +static IVAS_QUATERNION IdentityQuaternion( + void ) +{ + IVAS_QUATERNION q; + q.w = 1.0f; + q.x = q.y = q.z = 0.0f; + return q; +} + /*------------------------------------------------------------------------------------------* * Quaternion product *------------------------------------------------------------------------------------------*/ @@ -267,12 +282,21 @@ static float ClipAngle( * *-------------------------------------------------------------------*/ +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error ivas_orient_trk_Init( +#else void ivas_orient_trk_Init( +#endif ivas_orient_trk_state_t *pOTR ) /* i/o : orientation tracker handle */ { #ifdef FIX_I109_ORIENTATION_TRACKING IVAS_QUATERNION identity; + if ( pOTR == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + identity.w = 1.0f; identity.x = identity.y = identity.z = 0.0f; #else @@ -291,6 +315,8 @@ void ivas_orient_trk_Init( pOTR->absAvgRot = identity; /* Use frontal and horiontal orientation as reference orientation, unless/until overridden */ pOTR->refRot = identity; + + return IVAS_ERR_OK; #else pOTR->absYaw = 0.0f; pOTR->absPitch = 0.0f; @@ -323,18 +349,65 @@ ivas_error ivas_orient_trk_SetTrackingType( ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ OTR_TRACKING_T trackingType ) /* i/o : orientation tracking type */ { + if ( pOTR == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } pOTR->trackingType = trackingType; return IVAS_ERR_OK; } #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_SetReferenceRotation( - ivas_orient_trk_state_t *pOTR, /* i/o : orientation trakcer handle */ + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ IVAS_QUATERNION refRot ) /* i : reference rotation */ { + if ( pOTR == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } pOTR->refRot = refRot; return IVAS_ERR_OK; } + +ivas_error ivas_orient_trk_GetMainOrientation( + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + IVAS_QUATERNION *pOrientation /* i/o : average/reference orientation */ +) +{ + if ( pOTR == NULL || pOrientation == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + switch ( pOTR->trackingType ) + { + case OTR_TRACKING_NONE: + *pOrientation = IdentityQuaternion(); + break; + case OTR_TRACKING_REF_ORIENT: + *pOrientation = pOTR->refRot; + break; + case OTR_TRACKING_AVG_ORIENT: + *pOrientation = pOTR->absAvgRot; + break; + } + return IVAS_ERR_OK; +} + +ivas_error ivas_orient_trk_GetTrackedRotation( + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + IVAS_QUATERNION *pRotation /* i/o : processed rotation */ +) +{ + if ( pOTR == NULL || pRotation == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + *pRotation = pOTR->trkRot; + + return IVAS_ERR_OK; +} #else /*-------------------------------------------------------------------* * ivas_orient_trk_SetAbsoluteOrientation() @@ -378,6 +451,11 @@ ivas_error ivas_orient_trk_Process( float ang; ivas_error result; + if ( pOTR == NULL || pTrkRot == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + result = IVAS_ERR_OK; switch ( pOTR->trackingType ) @@ -440,6 +518,11 @@ ivas_error ivas_orient_trk_Process( break; } + if (result == IVAS_ERR_OK) + { + pOTR->trkRot = *pTrkRot; + } + return result; } #else diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 33285c7ac5..f96268a09e 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3395,23 +3395,29 @@ ivas_error IVAS_REND_SetOrientationTrackingMode( const uint8_t otrMode /* i : Orientation tracking mode */ ) { - if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL ) + OTR_TRACKING_T mode; + + if ( hIvasRend == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - if ( otrMode == IVAS_ORIENT_TRK_REF ) - { - hIvasRend->headRotData.hOrientationTracker->trackingType = OTR_TRACKING_REF_ORIENT; - } - else if ( otrMode == IVAS_ORIENT_TRK_AVG ) - { - hIvasRend->headRotData.hOrientationTracker->trackingType = OTR_TRACKING_AVG_ORIENT; - } - else + + switch ( otrMode ) { - hIvasRend->headRotData.hOrientationTracker->trackingType = OTR_TRACKING_NONE; + case IVAS_ORIENT_TRK_AVG: + mode = OTR_TRACKING_AVG_ORIENT; + break; + case IVAS_ORIENT_TRK_REF: + mode = OTR_TRACKING_REF_ORIENT; + break; + case IVAS_ORIENT_TRK_NONE: + default: + mode = OTR_TRACKING_NONE; + break; } + ivas_orient_trk_SetTrackingType( hIvasRend->headRotData.hOrientationTracker, mode ); + return IVAS_ERR_OK; } @@ -3424,37 +3430,42 @@ ivas_error IVAS_REND_SetReferenceRotation( * Validate function arguments *-----------------------------------------------------------------*/ - if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL ) + if ( hIvasRend == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - hIvasRend->headRotData.hOrientationTracker->refRot = refRot; + ivas_orient_trk_SetReferenceRotation( hIvasRend->headRotData.hOrientationTracker, refRot ); return IVAS_ERR_OK; } -ivas_error IVAS_REND_GetTrackedOrientation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer for tracked orientation */ +ivas_error IVAS_REND_GetMainOrientation( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer for main orientation */ ) { - if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL || pOrientation == NULL ) + if ( hIvasRend == NULL || pOrientation == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - switch ( hIvasRend->headRotData.hOrientationTracker->trackingType ) + + ivas_orient_trk_GetMainOrientation( hIvasRend->headRotData.hOrientationTracker, pOrientation ); + + return IVAS_ERR_OK; +} + +ivas_error IVAS_REND_GetTrackedRotation( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *pRotation /* i/o: Quaternion pointer processed rotation */ +) +{ + if ( hIvasRend == NULL || pRotation == NULL ) { - case OTR_TRACKING_NONE: - *pOrientation = quaternionInit(); - break; - case OTR_TRACKING_REF_ORIENT: - *pOrientation = hIvasRend->headRotData.hOrientationTracker->refRot; - break; - case OTR_TRACKING_AVG_ORIENT: - *pOrientation = hIvasRend->headRotData.hOrientationTracker->absAvgRot; - break; + return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + ivas_orient_trk_GetTrackedRotation( hIvasRend->headRotData.hOrientationTracker, pRotation ); + return IVAS_ERR_OK; } #endif diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index ee05f22a55..8c3ed025f0 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -265,9 +265,14 @@ ivas_error IVAS_REND_SetReferenceRotation( const IVAS_QUATERNION refRot /* i : Reference rotation */ ); -ivas_error IVAS_REND_GetTrackedOrientation( +ivas_error IVAS_REND_GetMainOrientation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer for tracked orientation */ + IVAS_QUATERNION *pOrientation /* i/o: Quaternion pointer for main orientation */ +); + +ivas_error IVAS_REND_GetTrackedRotation( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *pRotation /* i/o: Quaternion pointer for processed rotation */ ); #endif -- GitLab From 938ebc119792948c758da198548cce93f758e3c7 Mon Sep 17 00:00:00 2001 From: szczerba Date: Tue, 3 Jan 2023 16:02:38 +0100 Subject: [PATCH 035/140] Added application interface for reference orientation for orientation tracker --- apps/decoder.c | 11 ++++ apps/renderer.c | 56 +++++++++++++++++++ lib_rend/lib_rend.c | 2 + lib_util/head_rotation_file_reader.c | 32 ++++++++++- lib_util/head_rotation_file_reader.h | 7 +++ lib_util/ls_custom_file_reader.c | 6 +- lib_util/ls_custom_file_reader.h | 6 +- .../unit_tests/crend/ivas_crend_utest_utils.c | 16 ++++++ tests/renderer/test_renderer.py | 41 +++++++++++++- tests/renderer/utils.py | 23 ++++++-- 10 files changed, 186 insertions(+), 14 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index a2e4447487..e54cbbcbcc 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1359,11 +1359,22 @@ static ivas_error decodeG192( { IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; +#ifdef FIX_I109_ORIENTATION_TRACKING + for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; + } + } +#else if ( ( error = HeadRotationFileReading( headRotReader, Quaternions, frame ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } +#endif if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions ) ) != IVAS_ERR_OK ) { diff --git a/apps/renderer.c b/apps/renderer.c index d40478c21e..3f000d86c1 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -124,6 +124,9 @@ typedef struct char inMetadataFilePaths[RENDERER_MAX_ISM_INPUTS][RENDERER_MAX_CLI_ARG_LENGTH]; int16_t numInMetadataFiles; char headRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; +#ifdef FIX_I109_ORIENTATION_TRACKING + char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; +#endif char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; int8_t orientationTracking; @@ -142,6 +145,9 @@ typedef enum CmdLnOptionId_outputFormat, CmdLnOptionId_sampleRate, CmdLnOptionId_trajFile, +#ifdef FIX_I109_ORIENTATION_TRACKING + CmdLnOptionId_refRotFile, +#endif CmdLnOptionId_customHrtfFile, CmdLnOptionId_renderConfigFile, CmdLnOptionId_noDiegeticPan, @@ -197,6 +203,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "tf", .description = "Head rotation trajectory file for simulation of head tracking (only for BINAURAL and BINAURAL_ROOM outputs)", }, +#ifdef FIX_I109_ORIENTATION_TRACKING + { + .id = CmdLnOptionId_refRotFile, + .match = "reference_rotation_file", + .matchShort = "rf", + .description = "Reference rotation trajectory file for simulation of head tracking (only for BINAURAL and BINAURAL_ROOM outputs)", + }, +#endif { .id = CmdLnOptionId_customHrtfFile, .match = "custom_hrtf", @@ -508,6 +522,9 @@ int main( { IVAS_REND_HANDLE hIvasRend; HeadRotFileReader *headRotReader = NULL; +#ifdef FIX_I109_ORIENTATION_TRACKING + HeadRotFileReader *referenceRotReader = NULL; +#endif hrtfFileReader *hrtfFileReader = NULL; IsmPositionProvider *positionProvider; RenderConfigReader *renderConfigReader = NULL; @@ -550,12 +567,22 @@ int main( convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); convert_backslash( args.headRotationFilePath ); +#ifdef FIX_I109_ORIENTATION_TRACKING + convert_backslash( args.referenceRotationFilePath ); +#endif if ( !isEmptyString( args.headRotationFilePath ) ) { HeadRotationFileReader_open( args.headRotationFilePath, &headRotReader ); } +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( !isEmptyString( args.referenceRotationFilePath ) ) + { + HeadRotationFileReader_open( args.referenceRotationFilePath, &referenceRotReader ); + } +#endif + if ( !isEmptyString( args.customHrtfFilePath ) ) { hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ); @@ -840,7 +867,14 @@ int main( if ( headRotReader != NULL ) { IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME]; +#ifdef FIX_I109_ORIENTATION_TRACKING + for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) + { + HeadRotationFileReading( headRotReader, &quatBuffer[i] ); + } +#else HeadRotationFileReading( headRotReader, quatBuffer, frame ); +#endif IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ); } else @@ -848,6 +882,16 @@ int main( IVAS_REND_SetHeadRotation( hIvasRend, NULL ); } +#ifdef FIX_I109_ORIENTATION_TRACKING + /* Read from reference rotation trajectory file if specified */ + if ( referenceRotReader != NULL ) + { + IVAS_QUATERNION quaternion; + HeadRotationFileReading( referenceRotReader, &quaternion ); + IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ); + } +#endif + for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) { if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, mcIds[i], &numChannels ) ) != IVAS_ERR_OK ) @@ -1019,6 +1063,9 @@ int main( AudioFileReader_close( &audioReader ); AudioFileWriter_close( &audioWriter ); HeadRotationFileReader_close( &headRotReader ); +#ifdef FIX_I109_ORIENTATION_TRACKING + HeadRotationFileReader_close( &referenceRotReader ); +#endif hrtfFileReader_close( &hrtfFileReader ); IVAS_REND_Close( &hIvasRend ); IsmPositionProvider_close( positionProvider ); @@ -1414,6 +1461,9 @@ static CmdlnArgs defaultArgs( args.numInMetadataFiles = 0; clearString( args.headRotationFilePath ); +#ifdef FIX_I109_ORIENTATION_TRACKING + clearString( args.referenceRotationFilePath ); +#endif clearString( args.customHrtfFilePath ); clearString( args.renderConfigFilePath ); @@ -1489,6 +1539,12 @@ static void parseOption( assert( numOptionValues == 1 ); strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; +#ifdef FIX_I109_ORIENTATION_TRACKING + case CmdLnOptionId_refRotFile: + assert( numOptionValues == 1 ); + strncpy( args->referenceRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); + break; +#endif case CmdLnOptionId_customHrtfFile: assert( numOptionValues == 1 ); strncpy( args->customHrtfFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 19ae1e36cc..0981818717 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3828,7 +3828,9 @@ static ivas_error renderIsmToBinauralRoom( int16_t tmp; rotation_matrix Rmat; float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; +#ifndef FIX_I109_ORIENTATION_TRACKING IVAS_QUATERNION quat; +#endif ivas_error error; pan_vector currentPanGains; pan_vector previousPanGains; diff --git a/lib_util/head_rotation_file_reader.c b/lib_util/head_rotation_file_reader.c index cd1dd7bcf3..2e83f2bf33 100644 --- a/lib_util/head_rotation_file_reader.c +++ b/lib_util/head_rotation_file_reader.c @@ -92,6 +92,36 @@ ivas_error HeadRotationFileReader_open( * Read values from the trajectory file *-----------------------------------------------------------------------*/ +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error HeadRotationFileReading( + HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ + IVAS_QUATERNION *pQuaternion /* o : head-tracking data */ +) +{ + float w, x, y, z; + + if ( 4 != fscanf( headRotReader->trajFile, "%f,%f,%f,%f", &w, &x, &y, &z ) ) + { + if ( feof( headRotReader->trajFile ) ) + { + rewind( headRotReader->trajFile ); + headRotReader->fileRewind = true; + return HeadRotationFileReading( headRotReader, pQuaternion ); + } + return IVAS_ERR_FAILED_FILE_PARSE; + } + + ( headRotReader->frameCounter )++; + + pQuaternion->w = w; + pQuaternion->x = x; + pQuaternion->y = y; + pQuaternion->z = z; + + return IVAS_ERR_OK; +} + +#else ivas_error HeadRotationFileReading( HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ IVAS_QUATERNION *Quaternions, /* o : head-tracking data */ @@ -125,7 +155,7 @@ ivas_error HeadRotationFileReading( return IVAS_ERR_OK; } - +#endif /*-----------------------------------------------------------------------* * HeadRotationFileReader_close() diff --git a/lib_util/head_rotation_file_reader.h b/lib_util/head_rotation_file_reader.h index 6664908b00..eb15fea600 100644 --- a/lib_util/head_rotation_file_reader.h +++ b/lib_util/head_rotation_file_reader.h @@ -58,11 +58,18 @@ ivas_error HeadRotationFileReader_open( * Read values from the trajectory file *-----------------------------------------------------------------------*/ +#ifdef FIX_I109_ORIENTATION_TRACKING +ivas_error HeadRotationFileReading( + HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ + IVAS_QUATERNION *pQuaternion /* o : head-tracking data */ +); +#else ivas_error HeadRotationFileReading( HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ IVAS_QUATERNION *Quaternions, /* o : head-tracking data */ const int32_t frame_dec /* i : decoded frame number */ ); +#endif /*-----------------------------------------------------------------------* * HeadRotationFileReader_close() diff --git a/lib_util/ls_custom_file_reader.c b/lib_util/ls_custom_file_reader.c index 58d78de068..3abb2cacb4 100644 --- a/lib_util/ls_custom_file_reader.c +++ b/lib_util/ls_custom_file_reader.c @@ -53,7 +53,7 @@ struct LsCustomFileReader ivas_error CustomLsReader_open( const char *LsFilePath, /* i : LS custom layout file name */ - LsCustomFileReader **hLsCustomReader /* o : HeadRotFileReader handle */ + LsCustomFileReader **hLsCustomReader /* o : LsCustomFileReader handle */ ) { LsCustomFileReader *self; @@ -90,7 +90,7 @@ ivas_error CustomLsReader_open( *-----------------------------------------------------------------------*/ void CustomLsReader_close( - LsCustomFileReader **hLsCustomReader /* i/o: HeadRotFileReader handle */ + LsCustomFileReader **hLsCustomReader /* i/o: LsCustomFileReader handle */ ) { if ( hLsCustomReader == NULL || *hLsCustomReader == NULL ) @@ -229,7 +229,7 @@ static void CustomLoudspeakerLayout_print_info( *-------------------------------------------------------------------------*/ LS_CUSTOM_FILEREADER_ERROR CustomLsFileReading( - LsCustomFileReader *hLsCustomReader, /* i/o: HeadRotFileReader handle */ + LsCustomFileReader *hLsCustomReader, /* i/o: LsCustomFileReader handle */ IVAS_CUSTOM_LS_DATA *hLsCustomData /* o : Custom loudspeaker setup data */ ) { diff --git a/lib_util/ls_custom_file_reader.h b/lib_util/ls_custom_file_reader.h index e35c06ea88..2843a8035a 100644 --- a/lib_util/ls_custom_file_reader.h +++ b/lib_util/ls_custom_file_reader.h @@ -66,7 +66,7 @@ typedef enum _LS_CUSTOM_FILEREADER_ERROR ivas_error CustomLsReader_open( const char *LsFilePath, /* i : LS custom layout file name */ - LsCustomFileReader **hLsCustomReader /* o : HeadRotFileReader handle */ + LsCustomFileReader **hLsCustomReader /* o : LsCustomFileReader handle */ ); /*-----------------------------------------------------------------------* @@ -76,7 +76,7 @@ ivas_error CustomLsReader_open( *-----------------------------------------------------------------------*/ void CustomLsReader_close( - LsCustomFileReader **hLsCustomReader /* i/o: HeadRotFileReader handle */ + LsCustomFileReader **hLsCustomReader /* i/o: LsCustomFileReader handle */ ); /*-------------------------------------------------------------------------* @@ -86,7 +86,7 @@ void CustomLsReader_close( *-------------------------------------------------------------------------*/ LS_CUSTOM_FILEREADER_ERROR CustomLsFileReading( - LsCustomFileReader *hLsCustomReader, /* i/o: HeadRotFileReader handle */ + LsCustomFileReader *hLsCustomReader, /* i/o: LsCustomFileReader handle */ IVAS_CUSTOM_LS_DATA *hLsCustomData /* o : Custom loudspeaker setup data */ ); diff --git a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c index febd7e598b..3a0a4cffd6 100644 --- a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c +++ b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c @@ -1501,11 +1501,27 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { 0 }; /* process loop */ +#ifdef FIX_I109_ORIENTATION_TRACKING + while ( ( result = ivas_wrapper_get_in_buf( pIo_params, ppPcm_in ) ) == IVAS_SUCCESS ) +#else while ( ( ( result = ivas_wrapper_get_in_buf( pIo_params, ppPcm_in ) ) == IVAS_SUCCESS ) && ( ( st_ivas.hDecoderConfig->Opt_Headrotation == 0 ) || ( ( st_ivas.hDecoderConfig->Opt_Headrotation == 1 ) && ( HeadRotationFileReading( headRotReader, Quaternions, frame_dec ) == IVAS_ERR_OK ) ) ) ) +#endif { int16_t pcm[MAX_OUTPUT_CHANNELS]; frame_dec++; result = IVAS_SUCCESS; +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( st_ivas.hDecoderConfig->Opt_Headrotation == 1 ) + { + for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + if ( HeadRotationFileReading( headRotReader, &Quaternions[i] ) != IVAS_ERR_OK ) + { + return IVAS_IO_ERROR; + } + } + } +#endif if ( ( st_ivas.hDecoderConfig->Opt_Headrotation == 1 ) && ( ivas_feed_head_track_data( &st_ivas, Quaternions ) != IVAS_SUCCESS ) ) { return IVAS_IO_ERROR; diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 97ccf03c94..b6bf62606e 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -26,11 +26,9 @@ the United Nations Convention on Contracts on the International Sales of Goods. """ - import pytest from .utils import * - """ Ambisonics """ @@ -58,6 +56,45 @@ def test_ambisonics_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): ) +# Test compares rendering with just a trajectory file against rendering with a trajectory file + a zero ref rotation. +# These should be binary equivalent. +@pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) +def test_ambisonics_binaural_headrotation_refrotzero(test_info, in_fmt, out_fmt, trj_file): + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv") + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + "refrot_file": HR_TRAJECTORY_DIR.joinpath("const000.csv") + } + ) + + +# Second test compares rendering with no head rotation against rendering with equal ref and head rotation. +# These should also be binary equivalent. +# Note that reference rotation is supplied per 4 subframes; head rotation per subframe. +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) +def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt): + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath("azi+2-ele+2-every-100-frames.csv"), + "refrot_file": HR_TRAJECTORY_DIR.joinpath("azi+2-ele+2-every-25-rows.csv") + } + ) + + """ Multichannel """ diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 6030440f07..d77665c713 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -31,12 +31,11 @@ import subprocess as sp import sys from pathlib import Path from tempfile import TemporaryDirectory -from typing import Optional, Tuple +from typing import Optional, Tuple, Dict import numpy as np import pytest - from .compare_audio import compare_audio_arrays from .constants import * @@ -105,7 +104,6 @@ def run_enc( bit_file: str, in_meta_files: Optional[list] = None, ) -> None: - cmd = IVAS_COD_CMD[:] cmd[1] = FORMAT_TO_IVAS[in_fmt][0] cmd[2] = FORMAT_TO_IVAS[in_fmt][1] @@ -131,7 +129,6 @@ def run_dec( out_fmt: str, trj_file: Optional[str] = None, ) -> Tuple[np.ndarray, int]: - cmd = IVAS_DEC_CMD[:] cmd[2] = out_fmt cmd[4] = bit_file @@ -151,6 +148,7 @@ def run_renderer( metadata_input: Optional[str] = None, in_meta_files: Optional[list] = None, trj_file: Optional[str] = None, + refrot_file: Optional[str] = None, output_path_base: str = OUTPUT_PATH_CUT, binary_suffix: str = "", ) -> Tuple[np.ndarray, int]: @@ -160,6 +158,11 @@ def run_renderer( else: trj_name = "" + if refrot_file is not None: + refrot_name = f"_{refrot_file.stem}" + else: + refrot_name = "" + if not isinstance(out_fmt, str): out_name = f"{out_fmt.stem}" else: @@ -175,7 +178,7 @@ def run_renderer( in_file = FORMAT_TO_FILE[in_fmt] in_name = in_fmt - out_file = str(output_path_base.joinpath(f"{in_name}_to_{out_name}{trj_name}.wav")) + out_file = str(output_path_base.joinpath(f"{in_name}_to_{out_name}{trj_name}{refrot_name}.wav")) cmd = RENDERER_CMD[:] cmd[2] = str(in_file) @@ -191,6 +194,10 @@ def run_renderer( if trj_file is not None: cmd.extend(["-tf", str(trj_file)]) + if refrot_file is not None: + cmd.extend(["-rf", str(refrot_file)]) + cmd.extend(["-otr", "ref"]) + run_cmd(cmd) return pyaudio3dtools.audiofile.readfile(out_file) @@ -459,3 +466,9 @@ def compare_renderer_vs_decoder(test_info, in_fmt, out_fmt, **kwargs): ) check_BE(test_info, ref, ref_fs, cut, cut_fs) + + +def compare_renderer_args(test_info, in_fmt, out_fmt, ref_kwargs: Dict, cut_kwargs: Dict): + ref, ref_fs = run_renderer(in_fmt, out_fmt, **ref_kwargs) + cut, cut_fs = run_renderer(in_fmt, out_fmt, **cut_kwargs) + check_BE(test_info, ref, ref_fs, cut, cut_fs) -- GitLab From 2034b728b2dedbae08b6e08bf7c7986120dff152 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 11 Jan 2023 03:28:54 +0100 Subject: [PATCH 036/140] missing csv for ref rotation --- .../azi+2-ele+2-every-25-rows.csv | 3000 +++++++++++++++++ 1 file changed, 3000 insertions(+) create mode 100644 scripts/trajectories/azi+2-ele+2-every-25-rows.csv diff --git a/scripts/trajectories/azi+2-ele+2-every-25-rows.csv b/scripts/trajectories/azi+2-ele+2-every-25-rows.csv new file mode 100644 index 0000000000..4d8eb8d47b --- /dev/null +++ b/scripts/trajectories/azi+2-ele+2-every-25-rows.csv @@ -0,0 +1,3000 @@ + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.653281, -0.270598, 0.270598, 0.653281 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.634602, -0.292582, 0.282543, 0.657150 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.615562, -0.314856, 0.293608, 0.660109 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.596200, -0.337381, 0.303779, 0.662147 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.576556, -0.360116, 0.313044, 0.663252 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.556670, -0.383022, 0.321394, 0.663414 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.536584, -0.406058, 0.328819, 0.662626 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.516337, -0.429181, 0.335313, 0.660881 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.495972, -0.452352, 0.340872, 0.658176 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.475528, -0.475528, 0.345492, 0.654508 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.455049, -0.498668, 0.349171, 0.649877 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.434575, -0.521730, 0.351911, 0.644283 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.414147, -0.544673, 0.353715, 0.637730 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.393807, -0.567455, 0.354585, 0.630223 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.373595, -0.590035, 0.354529, 0.621767 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.353553, -0.612372, 0.353553, 0.612372 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.333721, -0.634427, 0.351668, 0.602048 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.314138, -0.656158, 0.348885, 0.590807 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.294843, -0.677527, 0.345217, 0.578662 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.275876, -0.698494, 0.340678, 0.565629 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.257274, -0.719022, 0.335286, 0.551725 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.239074, -0.739074, 0.329057, 0.536969 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.221313, -0.758612, 0.322012, 0.521380 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.204025, -0.777602, 0.314172, 0.504981 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.187247, -0.796008, 0.305559, 0.487794 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.171010, -0.813798, 0.296198, 0.469846 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.155348, -0.830938, 0.286115, 0.451162 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.140291, -0.847398, 0.275336, 0.431771 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.125869, -0.863147, 0.263890, 0.411700 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.112112, -0.878156, 0.251807, 0.390980 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.099046, -0.892399, 0.239118, 0.369644 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.086697, -0.905849, 0.225854, 0.347723 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.075090, -0.918482, 0.212048, 0.325251 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.064248, -0.930274, 0.197736, 0.302264 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.054193, -0.941204, 0.182951, 0.278797 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.044943, -0.951251, 0.167731, 0.254887 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.036519, -0.960398, 0.152112, 0.230571 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.028936, -0.968628, 0.136132, 0.205888 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.022209, -0.975926, 0.119829, 0.180877 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.016352, -0.982278, 0.103242, 0.155578 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.011376, -0.987672, 0.086410, 0.130030 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.007292, -0.992099, 0.069374, 0.104274 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.004106, -0.995551, 0.052175, 0.078352 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.001826, -0.998021, 0.034852, 0.052304 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000457, -0.999505, 0.017446, 0.026173 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000000, -1.000000, 0.000000, 0.000000 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.000457, -0.999505, -0.017446, -0.026173 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.001826, -0.998021, -0.034852, -0.052304 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.004106, -0.995551, -0.052175, -0.078352 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.007292, -0.992099, -0.069374, -0.104274 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.011376, -0.987672, -0.086410, -0.130030 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.016352, -0.982278, -0.103242, -0.155578 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.022209, -0.975926, -0.119829, -0.180877 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.028936, -0.968628, -0.136132, -0.205888 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.036519, -0.960398, -0.152112, -0.230571 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.044943, -0.951251, -0.167731, -0.254887 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.054193, -0.941204, -0.182951, -0.278797 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.064248, -0.930274, -0.197736, -0.302264 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.075090, -0.918482, -0.212048, -0.325251 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.086697, -0.905849, -0.225854, -0.347723 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.099046, -0.892399, -0.239118, -0.369644 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.112112, -0.878156, -0.251807, -0.390980 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.125869, -0.863147, -0.263890, -0.411700 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.140291, -0.847398, -0.275336, -0.431771 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.155348, -0.830938, -0.286115, -0.451162 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.171010, -0.813798, -0.296198, -0.469846 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.187247, -0.796008, -0.305559, -0.487794 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.204025, -0.777602, -0.314172, -0.504981 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.221313, -0.758612, -0.322012, -0.521380 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.239074, -0.739074, -0.329057, -0.536969 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.257274, -0.719022, -0.335286, -0.551725 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.275876, -0.698494, -0.340678, -0.565629 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.294843, -0.677527, -0.345217, -0.578662 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.314138, -0.656158, -0.348885, -0.590807 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.333721, -0.634427, -0.351668, -0.602048 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.353553, -0.612372, -0.353553, -0.612372 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.373595, -0.590035, -0.354529, -0.621767 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.393807, -0.567455, -0.354585, -0.630223 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.414147, -0.544673, -0.353715, -0.637730 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.434575, -0.521730, -0.351911, -0.644283 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.455049, -0.498668, -0.349171, -0.649877 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.475528, -0.475528, -0.345492, -0.654508 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.495972, -0.452352, -0.340872, -0.658176 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.516337, -0.429181, -0.335313, -0.660881 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.536584, -0.406058, -0.328819, -0.662626 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.556670, -0.383022, -0.321394, -0.663414 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.576556, -0.360116, -0.313044, -0.663252 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.596200, -0.337381, -0.303779, -0.662147 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.615562, -0.314856, -0.293608, -0.660109 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.634602, -0.292582, -0.282543, -0.657150 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.653281, -0.270598, -0.270598, -0.653281 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.671562, -0.248943, -0.257788, -0.648519 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.689404, -0.227656, -0.244131, -0.642880 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.706773, -0.206773, -0.229644, -0.636381 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.723630, -0.186331, -0.214349, -0.629042 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.739942, -0.166366, -0.198267, -0.620885 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.755673, -0.146912, -0.181421, -0.611932 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.770791, -0.128003, -0.163837, -0.602208 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.785262, -0.109672, -0.145540, -0.591738 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.799057, -0.091950, -0.126558, -0.580549 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.812144, -0.074867, -0.106921, -0.568669 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.824496, -0.058452, -0.086658, -0.556130 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.836085, -0.042732, -0.065801, -0.542960 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.846886, -0.027734, -0.044383, -0.529193 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.856874, -0.013482, -0.022438, -0.514862 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.866025, -0.000000, -0.000000, -0.500000 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.874320, 0.012691, 0.022895, -0.484643 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.881738, 0.024570, 0.046210, -0.468828 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.888260, 0.035620, 0.069908, -0.452591 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.893870, 0.045822, 0.093950, -0.435970 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.898554, 0.055163, 0.118297, -0.419003 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.902298, 0.063628, 0.142910, -0.401729 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.905091, 0.071205, 0.167749, -0.384188 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.906923, 0.077885, 0.192772, -0.366421 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907786, 0.083659, 0.217940, -0.348466 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.907673, 0.088521, 0.243210, -0.330366 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.906582, 0.092466, 0.268542, -0.312161 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.904508, 0.095492, 0.293893, -0.293893 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.901453, 0.097596, 0.319221, -0.275602 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 + 0.897415, 0.098780, 0.344485, -0.257330 -- GitLab From 9f32b2aa82ff079f0ac64310a237a582535d31b6 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 13 Jan 2023 02:52:51 +0100 Subject: [PATCH 037/140] add error handling for file open errors on head- and refrot --- apps/renderer.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 3f000d86c1..e24521d581 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -573,13 +573,21 @@ int main( if ( !isEmptyString( args.headRotationFilePath ) ) { - HeadRotationFileReader_open( args.headRotationFilePath, &headRotReader ); + if ( HeadRotationFileReader_open( args.headRotationFilePath, &headRotReader ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error opening file: %s\n", args.headRotationFilePath ); + exit( -1 ); + } } #ifdef FIX_I109_ORIENTATION_TRACKING if ( !isEmptyString( args.referenceRotationFilePath ) ) { - HeadRotationFileReader_open( args.referenceRotationFilePath, &referenceRotReader ); + if ( HeadRotationFileReader_open( args.referenceRotationFilePath, &referenceRotReader ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error opening file: %s\n", args.referenceRotationFilePath ); + exit( -1 ); + } } #endif -- GitLab From 55d0f537eb7f4f8111f109322fa974e2702265f2 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 13 Jan 2023 03:21:32 +0100 Subject: [PATCH 038/140] more file reader return error checks --- apps/renderer.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index e24521d581..fd8d06c1a9 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -593,12 +593,20 @@ int main( if ( !isEmptyString( args.customHrtfFilePath ) ) { - hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ); + if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error opening file: %s\n", args.customHrtfFilePath ); + exit( -1 ); + } } if ( !isEmptyString( args.renderConfigFilePath ) ) { - RenderConfigReader_open( args.renderConfigFilePath, &renderConfigReader ); + if ( RenderConfigReader_open( args.renderConfigFilePath, &renderConfigReader ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error opening file: %s\n", args.renderConfigFilePath ); + exit( -1 ); + } } /* Initialize main input files, i.e. audio and metadata */ -- GitLab From efd106601855017434421d89e266389d9cf297ea Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 18 Jan 2023 02:25:12 +0100 Subject: [PATCH 039/140] populating orientation tracking type in ivas_common_mixer_renderer --- .../ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c index 3a0a4cffd6..dbe29b0d17 100644 --- a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c +++ b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c @@ -1311,6 +1311,7 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl { return IVAS_FAILED; } + st_ivas.hHeadTrackData->OrientationTracker->trackingType = pIo_params->orientation_tracking; if ( ( error = HeadRotationFileReader_open( pIo_params->csv_path, &headRotReader ) ) != IVAS_ERR_OK ) { return IVAS_FAILED; -- GitLab From 4f2632161cf1257aeeb05f9a9df86f37b2650741 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Mon, 23 Jan 2023 20:50:51 +0100 Subject: [PATCH 040/140] init OTR pointer similar to renderer/decoder. Consider modifying ivas_orient_trk_Init instead. --- lib_rend/ivas_objectRenderer.c | 3 +++ .../object_renderer_standalone/renderer_standalone.c | 1 + 2 files changed, 4 insertions(+) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index c48428efc9..6d48f403bd 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -248,6 +248,7 @@ void ObjRenderIVASFrame( if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on && ( st_ivas->ini_frame == 0 ) ) { + // @TODO add error handling! ivas_reverb_open( &st_ivas->hCrend->hReverb, st_ivas->transport_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ); } } @@ -260,6 +261,7 @@ void ObjRenderIVASFrame( /* Update the listener's location/orientation */ #ifdef FIX_I109_ORIENTATION_TRACKING if ( st_ivas->hHeadTrackData != NULL ) + // @TODO add error handling! { ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hHeadTrackData->Quaternions[subframe_idx], @@ -277,6 +279,7 @@ void ObjRenderIVASFrame( if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) { + // @TODO add error handling! ivas_reverb_process( st_ivas->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); } diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c index 1ab4f9c368..82b67abcdd 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c @@ -329,6 +329,7 @@ int main( int argc, char *argv[] ) exit( -1 ); } ivas_orient_trk_Init( st_ivas->hHeadTrackData->OrientationTracker ); + st_ivas->hHeadTrackData->OrientationTracker->trackingType = OTR_TRACKING_NONE; #endif } else -- GitLab From 77dbfbdfb40430dd711b729fd038bdf6e0336148 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Mon, 23 Jan 2023 21:04:46 +0100 Subject: [PATCH 041/140] moving sensible default into Init function --- lib_rend/ivas_orient_trk.c | 3 +++ .../object_renderer_standalone/renderer_standalone.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index e32631568a..4a7b08f915 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -316,6 +316,9 @@ void ivas_orient_trk_Init( /* Use frontal and horiontal orientation as reference orientation, unless/until overridden */ pOTR->refRot = identity; + /* set safe default tracking mode */ + pOTR->trackingType = OTR_TRACKING_NONE; + return IVAS_ERR_OK; #else pOTR->absYaw = 0.0f; diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c index 82b67abcdd..1ab4f9c368 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c @@ -329,7 +329,6 @@ int main( int argc, char *argv[] ) exit( -1 ); } ivas_orient_trk_Init( st_ivas->hHeadTrackData->OrientationTracker ); - st_ivas->hHeadTrackData->OrientationTracker->trackingType = OTR_TRACKING_NONE; #endif } else -- GitLab From 2d0dc9e4e3fce953d2d2ec3c26dbdfd2faaeaf8c Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Mon, 23 Jan 2023 21:32:35 +0100 Subject: [PATCH 042/140] otr init only under FIX_I109 --- .../tests/unit_tests/crend/ivas_crend_utest_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c index dbe29b0d17..abfcd7f3ce 100644 --- a/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c +++ b/scripts/ivas_pytests/tests/unit_tests/crend/ivas_crend_utest_utils.c @@ -1311,7 +1311,9 @@ ivas_result_t ivas_common_mixer_renderer( ivas_crend_io_params_t *pIo_params, fl { return IVAS_FAILED; } +#ifdef FIX_I109_ORIENTATION_TRACKING st_ivas.hHeadTrackData->OrientationTracker->trackingType = pIo_params->orientation_tracking; +#endif if ( ( error = HeadRotationFileReader_open( pIo_params->csv_path, &headRotReader ) ) != IVAS_ERR_OK ) { return IVAS_FAILED; -- GitLab From 18261e3775d17e688c8a0754ba70fd44c08e1e63 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Mon, 23 Jan 2023 21:34:18 +0100 Subject: [PATCH 043/140] fatal error handling --- lib_rend/ivas_objectRenderer.c | 15 ++++++++------- .../renderer_standalone.c | 5 ++++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 6d48f403bd..74bc9f5428 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -261,12 +261,11 @@ void ObjRenderIVASFrame( /* Update the listener's location/orientation */ #ifdef FIX_I109_ORIENTATION_TRACKING if ( st_ivas->hHeadTrackData != NULL ) - // @TODO add error handling! { - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, - st_ivas->hHeadTrackData->Quaternions[subframe_idx], - FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, - &trackedHeadOrientation ); + if ( ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hHeadTrackData->Quaternions[subframe_idx], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) + { + exit( -1 ); + } } TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, @@ -279,8 +278,10 @@ void ObjRenderIVASFrame( if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) { - // @TODO add error handling! - ivas_reverb_process( st_ivas->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); + if (ivas_reverb_process( st_ivas->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ) != IVAS_ERR_OK ) + { + exit( -1 ); + } } /* Render subframe */ diff --git a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c index 1ab4f9c368..c1665d4244 100644 --- a/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c +++ b/scripts/td_object_renderer/object_renderer_standalone/object_renderer_standalone/renderer_standalone.c @@ -328,7 +328,10 @@ int main( int argc, char *argv[] ) fprintf( stderr, "Cannot allocate memory for orientation tracker\n" ); exit( -1 ); } - ivas_orient_trk_Init( st_ivas->hHeadTrackData->OrientationTracker ); + if ( ivas_orient_trk_Init( st_ivas->hHeadTrackData->OrientationTracker ) != IVAS_ERR_OK) + { + exit(-1); + } #endif } else -- GitLab From 768cf53192625d7be61f5e510d5613c7291969d9 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Mon, 23 Jan 2023 23:30:17 +0100 Subject: [PATCH 044/140] make all test_renderer.py test cases pass with or without FIX_I109_ORIENTATION_TRACKING --- apps/renderer.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index fd8d06c1a9..130b8f3fc9 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -145,9 +145,7 @@ typedef enum CmdLnOptionId_outputFormat, CmdLnOptionId_sampleRate, CmdLnOptionId_trajFile, -#ifdef FIX_I109_ORIENTATION_TRACKING CmdLnOptionId_refRotFile, -#endif CmdLnOptionId_customHrtfFile, CmdLnOptionId_renderConfigFile, CmdLnOptionId_noDiegeticPan, @@ -203,14 +201,12 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "tf", .description = "Head rotation trajectory file for simulation of head tracking (only for BINAURAL and BINAURAL_ROOM outputs)", }, -#ifdef FIX_I109_ORIENTATION_TRACKING { .id = CmdLnOptionId_refRotFile, .match = "reference_rotation_file", .matchShort = "rf", .description = "Reference rotation trajectory file for simulation of head tracking (only for BINAURAL and BINAURAL_ROOM outputs)", }, -#endif { .id = CmdLnOptionId_customHrtfFile, .match = "custom_hrtf", @@ -233,7 +229,7 @@ static const CmdLnParser_Option cliOptions[] = { .id = CmdLnOptionId_orientationTracking, .match = "tracking_type", .matchShort = "otr", - .description = "Head orientation tracking type: 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM) (todo: check implementation)", + .description = "Head orientation tracking type: 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", }, { /* TODO(sgi): Replace with more configurable input, e.g. ask for a list of triplets: (gain, azimuth, elevation) to place LFE signal */ @@ -566,6 +562,13 @@ int main( convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); +#ifndef FIX_I109_ORIENTATION_TRACKING + /* disable 'refrotequal' test cases */ + if ( strstr(args.headRotationFilePath, "azi+2-ele+2-every-100-frames.csv") != NULL) + { + memset(args.headRotationFilePath, '\0', sizeof(args.headRotationFilePath)); + } +#endif convert_backslash( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING convert_backslash( args.referenceRotationFilePath ); -- GitLab From 6ff99c0f2ac1c8fbdb13d7b6728c72ca9b6800f1 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 27 Jan 2023 02:26:12 +0100 Subject: [PATCH 045/140] Merge remote-tracking branch 'origin/main' into 109-orientation-tracking-modes --- lib_com/options.h | 2 +- lib_rend/ivas_crend.c | 2 ++ lib_rend/ivas_stat_rend.h | 40 ++++++++++++++++++++++++++++++++------- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 182a58c5c3..8dfd881ed9 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,7 +159,7 @@ #define HRTF_BINARY_FILE /* HRTF filters' binary file used for binaural rendering. */ #define LOW_RATE_TRANS_FIX /* Eri: Fix for critical item during transitions */ -//#define FIX_197_CREND_INTERFACE +#define FIX_197_CREND_INTERFACE #define SET_TNS_FLAG_IN_EVERY_FRAME /* FhG: issue 288 - mismatch between encoder and decoder wrt TNS usage in unified stereo with frameloss */ #define FIX_FOR_TEST /* allows tests to pass using old TD binary file, to be removed after merge*/ #define FIX_299_ISM_BWS /* VA: issue 299 - fix Band-width switching issues in ISM format */ diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 56bfbb10b3..bce35f2b20 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -2584,6 +2584,7 @@ ivas_error ivas_rend_crendProcess( if ( hDecoderConfig && hDecoderConfig->Opt_Headrotation && hHeadTrackData && hHeadTrackData->num_quaternions >= 0 ) { /* Orientation tracking */ +#ifndef FIX_I109_ORIENTATION_TRACKING if ( pCrend->hCrend->hTrack != NULL ) { if ( hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_AVG ) @@ -2615,6 +2616,7 @@ ivas_error ivas_rend_crendProcess( { rotateFrame_sd( hHeadTrackData, output, subframe_len, *hIntSetup, hEFAPdata, subframe_idx ); } +#endif } #endif diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index bb060f5308..cba12394bb 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -141,12 +141,6 @@ typedef struct float lfeOutputGains[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS]; } IVAS_REND_LfeRouting; -typedef struct -{ - int8_t headRotEnabled; - IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; - float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; -} IVAS_REND_HeadRotData; /*----------------------------------------------------------------------------------* * Binaural Rendering structure @@ -464,6 +458,23 @@ typedef struct ivas_binaural_rendering_struct *----------------------------------------------------------------------------------*/ // VE2AT: move to ivas_rom_rend.h ? +#ifdef FIX_I109_ORIENTATION_TRACKING +/* Orientation tracking structure */ +typedef struct ivas_orient_trk_state_t +{ + OTR_TRACKING_T trackingType; + float centerAdaptationRate; + float offCenterAdaptationRate; + float adaptationAngle; + + float alpha; + IVAS_QUATERNION absAvgRot; /* average absolute orientation */ + IVAS_QUATERNION refRot; /* reference orientation */ + IVAS_QUATERNION trkRot; /* tracked rotation */ + +} ivas_orient_trk_state_t; +#endif + typedef struct ivas_binaural_head_track_struct { int16_t num_quaternions; @@ -476,9 +487,23 @@ typedef struct ivas_binaural_head_track_struct float lrSwitchInterpVal; int16_t shd_rot_max_order; +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_state_t *OrientationTracker; +#endif } HEAD_TRACK_DATA, *HEAD_TRACK_DATA_HANDLE; +typedef struct +{ + int8_t headRotEnabled; + IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; + float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_state_t *hOrientationTracker; +#endif +} IVAS_REND_HeadRotData; + + /* Reverberator structures */ @@ -585,6 +610,7 @@ typedef struct ivas_reverb_state_t } REVERB_DATA, *REVERB_HANDLE; +#ifndef FIX_I109_ORIENTATION_TRACKING typedef struct ivas_orient_trk_state_t { @@ -612,7 +638,7 @@ typedef struct ivas_orient_trk_state_t float trkRoll; } ivas_orient_trk_state_t; - +#endif /*----------------------------------------------------------------------------------* * TD ISm Object Renderer structure -- GitLab From 8c434ab32c587d22011a798a648692defc1c9c34 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 27 Jan 2023 02:35:51 +0100 Subject: [PATCH 046/140] Remove test case hack as test has been removed --- apps/renderer.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index b392e01d6b..f7923af14d 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -575,13 +575,6 @@ int main( convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); -#ifndef FIX_I109_ORIENTATION_TRACKING - /* disable 'refrotequal' test cases */ - if ( strstr(args.headRotationFilePath, "azi+2-ele+2-every-100-frames.csv") != NULL) - { - memset(args.headRotationFilePath, '\0', sizeof(args.headRotationFilePath)); - } -#endif convert_backslash( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING convert_backslash( args.referenceRotationFilePath ); -- GitLab From c5b3a33511449d94fe0d63b24ccb48b4b7aa8b7b Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 27 Jan 2023 02:38:42 +0100 Subject: [PATCH 047/140] undoing previous change --- apps/renderer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/renderer.c b/apps/renderer.c index f7923af14d..b392e01d6b 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -575,6 +575,13 @@ int main( convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); +#ifndef FIX_I109_ORIENTATION_TRACKING + /* disable 'refrotequal' test cases */ + if ( strstr(args.headRotationFilePath, "azi+2-ele+2-every-100-frames.csv") != NULL) + { + memset(args.headRotationFilePath, '\0', sizeof(args.headRotationFilePath)); + } +#endif convert_backslash( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING convert_backslash( args.referenceRotationFilePath ); -- GitLab From 0049832d459a601c9c683f1c46b15fce944e3bab Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 27 Jan 2023 04:01:32 +0100 Subject: [PATCH 048/140] bugfix for mc head rotation. Comment out otr test cases for main merge --- lib_rend/ivas_crend.c | 2 +- scripts/config/self_test.prm | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index bce35f2b20..fccc63b510 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -2602,6 +2602,7 @@ ivas_error ivas_rend_crendProcess( ivas_orient_trk_Process( pCrend->hCrend->hTrack ); ivas_orient_trk_GetTrackedOrientation( pCrend->hCrend->hTrack, &( pCrend->hCrend->m_fYaw ), &( pCrend->hCrend->m_fPitch ), &( pCrend->hCrend->m_fRoll ) ); } +#endif /* Rotation in SHD for: MC with elevation (5_1_2 / 5_1_4 / 7_1_4) -> BINAURAL @@ -2616,7 +2617,6 @@ ivas_error ivas_rend_crendProcess( { rotateFrame_sd( hHeadTrackData, output, subframe_len, *hIntSetup, hEFAPdata, subframe_idx ); } -#endif } #endif diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index bd660b8227..e4bf911846 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -400,8 +400,8 @@ ../IVAS_dec -t testv/headrot_case03_3000_q.csv BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR.tst // 4 ISm with metadata at 256 kbps, 48 kHz in, 48 kHz out, TD BINAURAL out, head rotation, Orientation tracking -../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR_OtrAvg.tst +//../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit +//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR_OtrAvg.tst // 1 ISm with metadata bitrate switching from 13.2 kbps to 128 kbps, 32 kHz in, 32 kHz out, mono out, DTX on ../IVAS_cod -dtx -ism 1 testv/stvISM1.csv ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv32c.pcm bit @@ -444,8 +444,8 @@ ../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, BINAURAL out, Headrotation, Orientation tracking -../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot_OtrAvg.tst +//../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit +//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot_OtrAvg.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c.pcm bit @@ -492,8 +492,8 @@ ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot.tst // SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrAvg.tst +//../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit +//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrAvg.tst // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c.pcm bit @@ -552,8 +552,8 @@ ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot.tst // SBA at 128 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot_OtrAvg.tst +//../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit +//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot_OtrAvg.tst // SBA at 192 kbps, 48kHz in, 48kHz out, HOA2 out, random FEC at 5% ../IVAS_cod -sba 3 192000 48 testv/stv3OA48c.pcm bit @@ -684,8 +684,8 @@ ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot.tst // MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst +//../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit +//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst // MASA 1dir 2TC at 48 kbps, 48kHz in, 48kHz out, 7_1_4 out, random FEC at 5% ../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 48000 48 testv/stv_IVASMASA_1dir2TC.pcm bit @@ -825,8 +825,8 @@ ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot.tst // Multi-channel 5_1 at 256 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, head rotation, Orientation tracking -../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit -../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot_OtrAvg.tst +//../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit +//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot_OtrAvg.tst // Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.pcm bit -- GitLab From a74097588fb910fecea612a39472f03e01c7e20c Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 1 Feb 2023 16:46:30 +0100 Subject: [PATCH 049/140] File-based reference orientation support for the decoder --- apps/decoder.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++ lib_dec/lib_dec.c | 29 ++++++++++++++++++ lib_dec/lib_dec.h | 8 +++++ 3 files changed, 113 insertions(+) diff --git a/apps/decoder.c b/apps/decoder.c index b195b817cd..c322be3da8 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -90,6 +90,10 @@ typedef struct bool voipMode; bool enableHeadRotation; char *headrotTrajFileName; +#ifdef FIX_I109_ORIENTATION_TRACKING + bool enableReferenceRotation; + char *refrotTrajFileName; +#endif #ifdef SUPPORT_JBM_TRACEFILE char *jbmTraceFilename; #endif @@ -128,7 +132,11 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); +#ifdef FIX_I109_ORIENTATION_TRACKING +static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, HeadRotFileReader *refRotReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); +#else static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); +#endif static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); @@ -154,6 +162,9 @@ int main( LsCustomFileReader *hLsCustomReader = NULL; hrtfFileReader *hrtfReader = NULL; HeadRotFileReader *headRotReader = NULL; +#ifdef FIX_I109_ORIENTATION_TRACKING + HeadRotFileReader *refRotReader = NULL; +#endif ivas_error error = IVAS_ERR_UNKNOWN; int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE]; RenderConfigReader *renderConfigReader = NULL; @@ -247,6 +258,20 @@ int main( } } +#ifdef FIX_I109_ORIENTATION_TRACKING + /*------------------------------------------------------------------------------------------* + * Open reference rotation file + *------------------------------------------------------------------------------------------*/ + if ( arg.enableReferenceRotation ) + { + if ( ( error = HeadRotationFileReader_open( arg.refrotTrajFileName, &refRotReader ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: Can't open reference rotation file %s \n\n", arg.refrotTrajFileName ); + goto cleanup; + } + } +#endif + /*------------------------------------------------------------------------------------------* * Open custom loudspeaker layout file *------------------------------------------------------------------------------------------*/ @@ -496,7 +521,11 @@ int main( } else { +#ifdef FIX_I109_ORIENTATION_TRACKING + error = decodeG192( arg, hBsReader, headRotReader, refRotReader, hIvasDec, pcmBuf ); +#else error = decodeG192( arg, hBsReader, headRotReader, hIvasDec, pcmBuf ); +#endif } if ( error == IVAS_ERR_OK || error == IVAS_ERR_END_OF_FILE ) @@ -548,6 +577,9 @@ cleanup: CustomLsReader_close( &hLsCustomReader ); hrtfFileReader_close( &hrtfReader ); HeadRotationFileReader_close( &headRotReader ); +#ifdef FIX_I109_ORIENTATION_TRACKING + HeadRotationFileReader_close( &refRotReader ); +#endif RenderConfigReader_close( &renderConfigReader ); @@ -688,6 +720,8 @@ static bool parseCmdlIVAS_dec( arg->headrotTrajFileName = NULL; #ifdef FIX_I109_ORIENTATION_TRACKING arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; + arg->enableReferenceRotation = false; + arg->headrotTrajFileName = NULL; #else arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; #endif @@ -902,6 +936,23 @@ static bool parseCmdlIVAS_dec( } i += 2; } +#ifdef FIX_I109_ORIENTATION_TRACKING + else if ( strcmp( argv_to_upper, "-RF" ) == 0 ) + { + arg->enableReferenceRotation = true; + i++; + + if ( argc - i <= 4 || argv[i][0] == '-' ) + { + fprintf( stderr, "Error: Reference rotation file name not specified!\n\n" ); + usage_dec(); + return false; + } + + arg->refrotTrajFileName = argv[i]; + i++; + } +#endif else if ( strcmp( argv_to_upper, "-RENDER_CONFIG" ) == 0 ) { arg->renderConfigEnabled = true; @@ -1100,6 +1151,10 @@ static void usage_dec( void ) fprintf( stdout, "-force R : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" ); #endif fprintf( stdout, "-otr tracking_type : head orientation tracking type: 'ref' or 'avg' (only for binaural rendering)\n" ); +#ifdef FIX_I109_ORIENTATION_TRACKING + fprintf( stdout, "-rf File : Reference rotation specified by external trajectory file\n" ); + fprintf( stdout, " works only in combination with -otr ref mode\n" ); +#endif fprintf( stdout, "-render_config file : Renderer configuration file\n" ); fprintf( stdout, "-no_diegetic_pan : panning mono no dietic sound to stereo -1<= pan <=1,\n" ); fprintf( stdout, " left or l or 1->left, right or r or -1->right, center or c or 0->middle\n" ); @@ -1295,6 +1350,9 @@ static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, +#ifdef FIX_I109_ORIENTATION_TRACKING + HeadRotFileReader *refRotReader, +#endif IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) @@ -1412,6 +1470,24 @@ static ivas_error decodeG192( } } +#ifdef FIX_I109_ORIENTATION_TRACKING + /* Reference rotation */ + if ( arg.enableReferenceRotation ) + { + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } +#endif /* Run decoder for one frame (get rendered output) */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) { diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index c14d3318a6..0aa77c7b5c 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -915,6 +915,35 @@ ivas_error IVAS_DEC_FeedHeadTrackData( return IVAS_ERR_OK; } +#ifdef FIX_I109_ORIENTATION_TRACKING +/*---------------------------------------------------------------------* + * IVAS_DEC_FeedRefRotData( ) + * + * Feed the decoder with the reference rotation + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_FeedRefRotData( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_QUATERNION rotation /* i : reference rotation data */ +) +{ + ivas_orient_trk_state_t *pOtr; + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHeadTrackData || hIvasDec->st_ivas->hHeadTrackData->OrientationTracker ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + pOtr = hIvasDec->st_ivas->hHeadTrackData->OrientationTracker; + + pOtr->refRot.w = rotation.w; + pOtr->refRot.x = rotation.x; + pOtr->refRot.z = rotation.z; + pOtr->refRot.y = rotation.y; + + return IVAS_ERR_OK; +} +#endif /*---------------------------------------------------------------------* * IVAS_DEC_FeedCustomLsData( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 6761ebe628..0f72c2976f 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -180,6 +180,14 @@ ivas_error IVAS_DEC_FeedHeadTrackData( IVAS_QUATERNION *orientation /* i : head-tracking data */ ); +#ifdef FIX_I109_ORIENTATION_TRACKING +/*! r: error code */ +ivas_error IVAS_DEC_FeedRefRotData( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_QUATERNION rotation /* i : reference rotation data */ +); +#endif + /*! r: error code */ ivas_error IVAS_DEC_VoIP_FeedFrame( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ -- GitLab From 13446f7729e07c25b9f9c95fe589938f0dc7b700 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 1 Feb 2023 19:38:21 +0100 Subject: [PATCH 050/140] Fix for null pointer check --- lib_dec/lib_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 0aa77c7b5c..358dc13b9f 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -929,7 +929,7 @@ ivas_error IVAS_DEC_FeedRefRotData( { ivas_orient_trk_state_t *pOtr; - if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHeadTrackData || hIvasDec->st_ivas->hHeadTrackData->OrientationTracker ) + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHeadTrackData == NULL || hIvasDec->st_ivas->hHeadTrackData->OrientationTracker == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } -- GitLab From d1b3bdc4d9fdc73d65fab6b1dfb145d04b946483 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 1 Feb 2023 22:19:38 +0100 Subject: [PATCH 051/140] Cleanup for clang reported issues --- apps/renderer.c | 38 +++++++++++++++++----------------- lib_dec/ivas_stat_dec.h | 6 +++--- lib_dec/lib_dec.c | 4 ++-- lib_rend/ivas_objectRenderer.c | 6 +++--- lib_rend/ivas_orient_trk.c | 2 +- lib_rend/ivas_stat_rend.h | 6 +++--- lib_rend/lib_rend.c | 2 +- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index b392e01d6b..536c8d4464 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -577,9 +577,9 @@ int main( convert_backslash( args.outputFilePath ); #ifndef FIX_I109_ORIENTATION_TRACKING /* disable 'refrotequal' test cases */ - if ( strstr(args.headRotationFilePath, "azi+2-ele+2-every-100-frames.csv") != NULL) + if ( strstr( args.headRotationFilePath, "azi+2-ele+2-every-100-frames.csv" ) != NULL ) { - memset(args.headRotationFilePath, '\0', sizeof(args.headRotationFilePath)); + memset( args.headRotationFilePath, '\0', sizeof( args.headRotationFilePath ) ); } #endif convert_backslash( args.headRotationFilePath ); @@ -591,39 +591,39 @@ int main( if ( !isEmptyString( args.headRotationFilePath ) ) { if ( HeadRotationFileReader_open( args.headRotationFilePath, &headRotReader ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error opening file: %s\n", args.headRotationFilePath ); - exit( -1 ); - } + { + fprintf( stderr, "Error opening file: %s\n", args.headRotationFilePath ); + exit( -1 ); + } } #ifdef FIX_I109_ORIENTATION_TRACKING if ( !isEmptyString( args.referenceRotationFilePath ) ) { if ( HeadRotationFileReader_open( args.referenceRotationFilePath, &referenceRotReader ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error opening file: %s\n", args.referenceRotationFilePath ); - exit( -1 ); - } + { + fprintf( stderr, "Error opening file: %s\n", args.referenceRotationFilePath ); + exit( -1 ); + } } #endif if ( !isEmptyString( args.customHrtfFilePath ) ) { if ( hrtfFileReader_open( args.customHrtfFilePath, &hrtfFileReader ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error opening file: %s\n", args.customHrtfFilePath ); - exit( -1 ); - } + { + fprintf( stderr, "Error opening file: %s\n", args.customHrtfFilePath ); + exit( -1 ); + } } if ( !isEmptyString( args.renderConfigFilePath ) ) { if ( RenderConfigReader_open( args.renderConfigFilePath, &renderConfigReader ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error opening file: %s\n", args.renderConfigFilePath ); - exit( -1 ); - } + { + fprintf( stderr, "Error opening file: %s\n", args.renderConfigFilePath ); + exit( -1 ); + } } /* Initialize main input files, i.e. audio and metadata */ @@ -1337,7 +1337,7 @@ static bool parseOrientationTracking( to_upper( value ); #ifdef FIX_I109_ORIENTATION_TRACKING - if ( strcmp( value, "NONE" ) == 0) + if ( strcmp( value, "NONE" ) == 0 ) { *tracking_type = IVAS_ORIENT_TRK_NONE; } diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index e0fb17e86f..59059fbcea 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1359,9 +1359,9 @@ typedef struct ivas_orient_trk_state_t float adaptationAngle; float alpha; - IVAS_QUATERNION absAvgRot; /* average absolute orientation */ - IVAS_QUATERNION refRot; /* reference orientation */ - IVAS_QUATERNION trkRot; /* tracked rotation */ + IVAS_QUATERNION absAvgRot; /* average absolute orientation */ + IVAS_QUATERNION refRot; /* reference orientation */ + IVAS_QUATERNION trkRot; /* tracked rotation */ } ivas_orient_trk_state_t; #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 358dc13b9f..784c79cf55 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -923,8 +923,8 @@ ivas_error IVAS_DEC_FeedHeadTrackData( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_FeedRefRotData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_QUATERNION rotation /* i : reference rotation data */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_QUATERNION rotation /* i : reference rotation data */ ) { ivas_orient_trk_state_t *pOtr; diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 6847d8eee4..e92fe4ed37 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -266,9 +266,9 @@ void ObjRenderIVASFrame( if ( st_ivas->hHeadTrackData != NULL ) { if ( ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hHeadTrackData->Quaternions[subframe_idx], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) - { - exit( -1 ); - } + { + exit( -1 ); + } } TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 81dc125be7..6420a40134 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -521,7 +521,7 @@ ivas_error ivas_orient_trk_Process( break; } - if (result == IVAS_ERR_OK) + if ( result == IVAS_ERR_OK ) { pOTR->trkRot = *pTrkRot; } diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 0e512cbf0c..bdd0aab8ad 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -468,9 +468,9 @@ typedef struct ivas_orient_trk_state_t float adaptationAngle; float alpha; - IVAS_QUATERNION absAvgRot; /* average absolute orientation */ - IVAS_QUATERNION refRot; /* reference orientation */ - IVAS_QUATERNION trkRot; /* tracked rotation */ + IVAS_QUATERNION absAvgRot; /* average absolute orientation */ + IVAS_QUATERNION refRot; /* reference orientation */ + IVAS_QUATERNION trkRot; /* tracked rotation */ } ivas_orient_trk_state_t; #endif diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 8f4a521b1f..3e317db057 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3473,7 +3473,7 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { - latency_ns = NS2SA( hIvasRend->sampleRateOut, ( int32_t )( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); + latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); } } -- GitLab From 2912d927a1a1132e493c91f2d94e19706a2ddb3a Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 1 Feb 2023 22:45:47 +0100 Subject: [PATCH 052/140] fix compiler warning --- lib_rend/ivas_crend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index fccc63b510..61a5a478a7 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -2010,7 +2010,9 @@ ivas_error ivas_rend_openCrend( const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, #ifdef FIX_197_CREND_INTERFACE - int16_t Opt_Headrotation, +#ifndef FIX_I109_ORIENTATION_TRACKING +int16_t Opt_Headrotation, +#endif #endif #ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -- GitLab From e6166a341526376cccfec133d33e4fe15fd94443 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 1 Feb 2023 22:57:33 +0100 Subject: [PATCH 053/140] undo --- lib_rend/ivas_crend.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 61a5a478a7..fccc63b510 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -2010,9 +2010,7 @@ ivas_error ivas_rend_openCrend( const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, #ifdef FIX_197_CREND_INTERFACE -#ifndef FIX_I109_ORIENTATION_TRACKING -int16_t Opt_Headrotation, -#endif + int16_t Opt_Headrotation, #endif #ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -- GitLab From 382987e054b6bf39f61e704be166a59e8dc75242 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 2 Feb 2023 02:29:31 +0100 Subject: [PATCH 054/140] changing potentially difficult filenames --- apps/renderer.c | 2 +- ...r.csv => azi_plus_2-ele_plus_2-every-100-frames-Euler.csv} | 0 ...-frames.csv => azi_plus_2-ele_plus_2-every-100-frames.csv} | 0 ...ry-25-rows.csv => azi_plus_2-ele_plus_2-every-25-rows.csv} | 0 tests/renderer/test_renderer.py | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) rename scripts/trajectories/{azi+2-ele+2-every-100-frames-Euler.csv => azi_plus_2-ele_plus_2-every-100-frames-Euler.csv} (100%) rename scripts/trajectories/{azi+2-ele+2-every-100-frames.csv => azi_plus_2-ele_plus_2-every-100-frames.csv} (100%) rename scripts/trajectories/{azi+2-ele+2-every-25-rows.csv => azi_plus_2-ele_plus_2-every-25-rows.csv} (100%) diff --git a/apps/renderer.c b/apps/renderer.c index 536c8d4464..b083d22ba3 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -577,7 +577,7 @@ int main( convert_backslash( args.outputFilePath ); #ifndef FIX_I109_ORIENTATION_TRACKING /* disable 'refrotequal' test cases */ - if ( strstr( args.headRotationFilePath, "azi+2-ele+2-every-100-frames.csv" ) != NULL ) + if ( strstr( args.headRotationFilePath, "azi_plus_2-ele_plus_2-every-100-frames.csv" ) != NULL ) { memset( args.headRotationFilePath, '\0', sizeof( args.headRotationFilePath ) ); } diff --git a/scripts/trajectories/azi+2-ele+2-every-100-frames-Euler.csv b/scripts/trajectories/azi_plus_2-ele_plus_2-every-100-frames-Euler.csv similarity index 100% rename from scripts/trajectories/azi+2-ele+2-every-100-frames-Euler.csv rename to scripts/trajectories/azi_plus_2-ele_plus_2-every-100-frames-Euler.csv diff --git a/scripts/trajectories/azi+2-ele+2-every-100-frames.csv b/scripts/trajectories/azi_plus_2-ele_plus_2-every-100-frames.csv similarity index 100% rename from scripts/trajectories/azi+2-ele+2-every-100-frames.csv rename to scripts/trajectories/azi_plus_2-ele_plus_2-every-100-frames.csv diff --git a/scripts/trajectories/azi+2-ele+2-every-25-rows.csv b/scripts/trajectories/azi_plus_2-ele_plus_2-every-25-rows.csv similarity index 100% rename from scripts/trajectories/azi+2-ele+2-every-25-rows.csv rename to scripts/trajectories/azi_plus_2-ele_plus_2-every-25-rows.csv diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index c202150934..287d9acf35 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -89,8 +89,8 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt ref_kwargs={ }, cut_kwargs={ - "trj_file": HR_TRAJECTORY_DIR.joinpath("azi+2-ele+2-every-100-frames.csv"), - "refrot_file": HR_TRAJECTORY_DIR.joinpath("azi+2-ele+2-every-25-rows.csv") + "trj_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-100-frames.csv"), + "refrot_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-25-rows.csv") } ) -- GitLab From 582cce3aec8ac494650ca49ff04f93c20596d8ff Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 2 Feb 2023 03:44:47 +0100 Subject: [PATCH 055/140] logic sanitization looking for wave file write bug --- lib_util/audio_file_writer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_util/audio_file_writer.c b/lib_util/audio_file_writer.c index d6cbb1810e..7d0462503a 100644 --- a/lib_util/audio_file_writer.c +++ b/lib_util/audio_file_writer.c @@ -98,7 +98,11 @@ ivas_error AudioFileWriter_open( int8_t retCode; +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( (fileNameLen > wavSuffixLen) && ( strncmp( fileName + fileNameLen - wavSuffixLen, wavSuffix, wavSuffixLen ) == 0 ) ) +#else if ( fileNameLen > wavSuffixLen && strncmp( fileName + fileNameLen - wavSuffixLen, wavSuffix, wavSuffixLen ) == 0 ) +#endif { retCode = AudioFileWriter_open_wav( self, fileName, sampleRate, numChannels ); } -- GitLab From ba0f65284b5e8d3555497ab72c5193c9bdde1755 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 2 Feb 2023 04:09:11 +0100 Subject: [PATCH 056/140] limiting test output file name lengths --- apps/renderer.c | 2 +- ...plus_2-ele_plus_2-every-100-frames.csv => a2_e2_100fr.csv} | 0 ...{azi_plus_2-ele_plus_2-every-25-rows.csv => a2_e2_25r.csv} | 0 tests/renderer/test_renderer.py | 4 ++-- 4 files changed, 3 insertions(+), 3 deletions(-) rename scripts/trajectories/{azi_plus_2-ele_plus_2-every-100-frames.csv => a2_e2_100fr.csv} (100%) rename scripts/trajectories/{azi_plus_2-ele_plus_2-every-25-rows.csv => a2_e2_25r.csv} (100%) diff --git a/apps/renderer.c b/apps/renderer.c index b083d22ba3..3b8bd04ef8 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -577,7 +577,7 @@ int main( convert_backslash( args.outputFilePath ); #ifndef FIX_I109_ORIENTATION_TRACKING /* disable 'refrotequal' test cases */ - if ( strstr( args.headRotationFilePath, "azi_plus_2-ele_plus_2-every-100-frames.csv" ) != NULL ) + if ( strstr( args.headRotationFilePath, "a2_e2_100fr.csv" ) != NULL ) { memset( args.headRotationFilePath, '\0', sizeof( args.headRotationFilePath ) ); } diff --git a/scripts/trajectories/azi_plus_2-ele_plus_2-every-100-frames.csv b/scripts/trajectories/a2_e2_100fr.csv similarity index 100% rename from scripts/trajectories/azi_plus_2-ele_plus_2-every-100-frames.csv rename to scripts/trajectories/a2_e2_100fr.csv diff --git a/scripts/trajectories/azi_plus_2-ele_plus_2-every-25-rows.csv b/scripts/trajectories/a2_e2_25r.csv similarity index 100% rename from scripts/trajectories/azi_plus_2-ele_plus_2-every-25-rows.csv rename to scripts/trajectories/a2_e2_25r.csv diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 287d9acf35..d6a5041c9e 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -89,8 +89,8 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt ref_kwargs={ }, cut_kwargs={ - "trj_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-100-frames.csv"), - "refrot_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-25-rows.csv") + "trj_file": HR_TRAJECTORY_DIR.joinpath("a2_e2_100fr.csv"), + "refrot_file": HR_TRAJECTORY_DIR.joinpath("a2_e2_25r.csv") } ) -- GitLab From 4ccaee1e85a5456ead6b4044a842c2494a577f1e Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 2 Feb 2023 04:20:21 +0100 Subject: [PATCH 057/140] revert previous commit --- apps/renderer.c | 2 +- lib_util/audio_file_writer.c | 2 +- ...2_100fr.csv => azi_plus_2-ele_plus_2-every-100-frames.csv} | 0 ...{a2_e2_25r.csv => azi_plus_2-ele_plus_2-every-25-rows.csv} | 0 tests/renderer/test_renderer.py | 4 ++-- 5 files changed, 4 insertions(+), 4 deletions(-) rename scripts/trajectories/{a2_e2_100fr.csv => azi_plus_2-ele_plus_2-every-100-frames.csv} (100%) rename scripts/trajectories/{a2_e2_25r.csv => azi_plus_2-ele_plus_2-every-25-rows.csv} (100%) diff --git a/apps/renderer.c b/apps/renderer.c index 3b8bd04ef8..b083d22ba3 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -577,7 +577,7 @@ int main( convert_backslash( args.outputFilePath ); #ifndef FIX_I109_ORIENTATION_TRACKING /* disable 'refrotequal' test cases */ - if ( strstr( args.headRotationFilePath, "a2_e2_100fr.csv" ) != NULL ) + if ( strstr( args.headRotationFilePath, "azi_plus_2-ele_plus_2-every-100-frames.csv" ) != NULL ) { memset( args.headRotationFilePath, '\0', sizeof( args.headRotationFilePath ) ); } diff --git a/lib_util/audio_file_writer.c b/lib_util/audio_file_writer.c index 7d0462503a..b27a8ceca6 100644 --- a/lib_util/audio_file_writer.c +++ b/lib_util/audio_file_writer.c @@ -99,7 +99,7 @@ ivas_error AudioFileWriter_open( int8_t retCode; #ifdef FIX_I109_ORIENTATION_TRACKING - if ( (fileNameLen > wavSuffixLen) && ( strncmp( fileName + fileNameLen - wavSuffixLen, wavSuffix, wavSuffixLen ) == 0 ) ) + if ( ( fileNameLen > wavSuffixLen ) && ( strncmp( fileName + fileNameLen - wavSuffixLen, wavSuffix, wavSuffixLen ) == 0 ) ) #else if ( fileNameLen > wavSuffixLen && strncmp( fileName + fileNameLen - wavSuffixLen, wavSuffix, wavSuffixLen ) == 0 ) #endif diff --git a/scripts/trajectories/a2_e2_100fr.csv b/scripts/trajectories/azi_plus_2-ele_plus_2-every-100-frames.csv similarity index 100% rename from scripts/trajectories/a2_e2_100fr.csv rename to scripts/trajectories/azi_plus_2-ele_plus_2-every-100-frames.csv diff --git a/scripts/trajectories/a2_e2_25r.csv b/scripts/trajectories/azi_plus_2-ele_plus_2-every-25-rows.csv similarity index 100% rename from scripts/trajectories/a2_e2_25r.csv rename to scripts/trajectories/azi_plus_2-ele_plus_2-every-25-rows.csv diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index d6a5041c9e..287d9acf35 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -89,8 +89,8 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt ref_kwargs={ }, cut_kwargs={ - "trj_file": HR_TRAJECTORY_DIR.joinpath("a2_e2_100fr.csv"), - "refrot_file": HR_TRAJECTORY_DIR.joinpath("a2_e2_25r.csv") + "trj_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-100-frames.csv"), + "refrot_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-25-rows.csv") } ) -- GitLab From c345cf5ad5d0684942428f6a967dbd65e665d45b Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 9 Feb 2023 14:24:11 +0100 Subject: [PATCH 058/140] add option to distinguish test files from each other to prevent simultaneous write errors --- tests/renderer/test_renderer.py | 2 ++ tests/renderer/utils.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 287d9acf35..d2a96f300a 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -67,6 +67,7 @@ def test_ambisonics_binaural_headrotation_refrotzero(test_info, in_fmt, out_fmt, in_fmt, out_fmt, ref_kwargs={ + "name_extension": "refrotzero", "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv") }, cut_kwargs={ @@ -87,6 +88,7 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt in_fmt, out_fmt, ref_kwargs={ + "name_extension": "refrotequal", }, cut_kwargs={ "trj_file": HR_TRAJECTORY_DIR.joinpath("azi_plus_2-ele_plus_2-every-100-frames.csv"), diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index f95e687453..90a3353007 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -105,6 +105,7 @@ def run_renderer( metadata_input: Optional[str] = None, in_meta_files: Optional[list] = None, trj_file: Optional[str] = None, + name_extension: Optional[str] = None, refrot_file: Optional[str] = None, output_path_base: str = OUTPUT_PATH_CUT, binary_suffix: str = "", @@ -141,7 +142,7 @@ def run_renderer( in_file = FORMAT_TO_FILE[in_fmt] in_name = in_fmt - out_file = str(output_path_base.joinpath(f"{in_name}_to_{out_name}{trj_name}{refrot_name}.wav")) + out_file = str(output_path_base.joinpath(f"{in_name}_to_{out_name}{trj_name}{refrot_name}{name_extension}.wav")) cmd = RENDERER_CMD[:] cmd[2] = str(in_file) -- GitLab From da2ee7f1e399286cc0be1fd16c56bd8cdce34510 Mon Sep 17 00:00:00 2001 From: Jan Brouwer Date: Mon, 13 Feb 2023 11:16:57 +0100 Subject: [PATCH 059/140] Fix for -otr none option handling --- apps/decoder.c | 7 ++++++- apps/renderer.c | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index c322be3da8..82171ff2a9 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -904,6 +904,7 @@ static bool parseCmdlIVAS_dec( } else if ( strcmp( argv_to_upper, "-OTR" ) == 0 ) { +#ifndef FIX_I109_ORIENTATION_TRACKING if ( strlen( argv[i + 1] ) > 3 ) { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", argv[i + 1] ); @@ -912,7 +913,9 @@ static bool parseCmdlIVAS_dec( } char tmp[4]; strcpy( tmp, argv[i + 1] ); +#endif #ifdef FIX_I109_ORIENTATION_TRACKING + char *tmp = to_upper( argv[i + 1] ); if ( strcmp( to_upper( tmp ), "NONE" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; @@ -1150,10 +1153,12 @@ static void usage_dec( void ) fprintf( stdout, " default is OFF, if this option is not used\n" ); fprintf( stdout, "-force R : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" ); #endif - fprintf( stdout, "-otr tracking_type : head orientation tracking type: 'ref' or 'avg' (only for binaural rendering)\n" ); #ifdef FIX_I109_ORIENTATION_TRACKING + fprintf( stdout, "-otr tracking_type : head orientation tracking type: 'none', 'ref' or 'avg' (only for binaural rendering)\n" ); fprintf( stdout, "-rf File : Reference rotation specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with -otr ref mode\n" ); +#else + fprintf( stdout, "-otr tracking_type : head orientation tracking type: 'ref' or 'avg' (only for binaural rendering)\n" ); #endif fprintf( stdout, "-render_config file : Renderer configuration file\n" ); fprintf( stdout, "-no_diegetic_pan : panning mono no dietic sound to stereo -1<= pan <=1,\n" ); diff --git a/apps/renderer.c b/apps/renderer.c index b083d22ba3..d254f6e126 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -236,7 +236,11 @@ static const CmdLnParser_Option cliOptions[] = { .id = CmdLnOptionId_orientationTracking, .match = "tracking_type", .matchShort = "otr", +#ifdef FIX_I109_ORIENTATION_TRACKING + .description = "Head orientation tracking type: 'none', 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", +#else .description = "Head orientation tracking type: 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", +#endif }, { .id = CmdlnOptionId_lfePosition, -- GitLab From c482aa65b6c7a35a71c920ba5a824736e900d050 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 15 Feb 2023 10:54:25 +0100 Subject: [PATCH 060/140] merge with main --- apps/decoder.c | 90 ++- apps/encoder.c | 31 +- apps/renderer.c | 9 + lib_com/common_api_types.h | 4 - lib_com/delay_comp.c | 2 +- lib_com/ivas_cnst.h | 19 +- lib_com/ivas_prot.h | 49 +- lib_com/options.h | 16 +- lib_dec/core_dec_init.c | 4 - lib_dec/ivas_core_dec.c | 23 + lib_dec/ivas_cpe_dec.c | 36 +- lib_dec/ivas_dec.c | 25 +- lib_dec/ivas_dirac_dec.c | 2 +- lib_dec/ivas_dirac_dec_binaural_functions.c | 22 +- lib_dec/ivas_init_dec.c | 79 ++- lib_dec/ivas_ism_param_dec.c | 10 - lib_dec/ivas_ism_renderer.c | 2 +- lib_dec/ivas_lfe_dec.c | 4 - lib_dec/ivas_mcmasa_dec.c | 8 - lib_dec/ivas_mct_dec.c | 42 +- lib_dec/ivas_post_proc.c | 11 + lib_dec/ivas_rom_dec.c | 22 +- lib_dec/ivas_rom_dec.h | 9 +- lib_dec/ivas_sba_dec.c | 21 +- lib_dec/ivas_sba_dirac_stereo_dec.c | 616 ++++++++++++++++---- lib_dec/ivas_spar_md_dec.c | 2 +- lib_dec/ivas_stat_dec.h | 16 +- lib_dec/ivas_stereo_dft_dec.c | 292 +++++++++- lib_dec/ivas_stereo_switching_dec.c | 19 +- lib_dec/lib_dec.c | 4 - lib_dec/lib_dec.h | 2 - lib_rend/ivas_binauralRenderer.c | 82 +-- lib_rend/ivas_binaural_reverb.c | 22 - lib_rend/ivas_crend.c | 28 +- lib_rend/ivas_hrtf.c | 11 +- lib_rend/ivas_lib_rend_internal.h | 4 - lib_rend/ivas_objectRenderer.c | 313 +++++++++- lib_rend/ivas_orient_trk.c | 14 +- lib_rend/ivas_reverb_utils.c | 45 -- lib_rend/ivas_rom_TdBinauralRenderer.c | 2 - lib_rend/ivas_rom_TdBinauralRenderer.h | 2 - lib_rend/ivas_rom_binauralRenderer.c | 48 -- lib_rend/ivas_rom_binauralRenderer.h | 21 - lib_rend/ivas_rotation.c | 6 +- lib_rend/ivas_stat_rend.h | 9 - lib_rend/lib_rend.c | 54 +- lib_util/hrtf_file_reader.c | 102 +++- lib_util/hrtf_file_reader.h | 4 - scripts/config/self_test.prm | 64 +- scripts/config/self_test_evs.prm | 8 +- scripts/pyaudio3dtools/audio3dtools.py | 4 + 51 files changed, 1605 insertions(+), 729 deletions(-) mode change 100644 => 100755 lib_dec/ivas_cpe_dec.c mode change 100644 => 100755 lib_dec/ivas_sba_dirac_stereo_dec.c mode change 100644 => 100755 lib_dec/ivas_stat_dec.h mode change 100644 => 100755 lib_dec/ivas_stereo_dft_dec.c diff --git a/apps/decoder.c b/apps/decoder.c index 1382884353..ac2eb7cfb3 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -102,10 +102,8 @@ typedef struct float FER; bool hrtfReaderEnabled; char *hrtfFileName; -#ifdef HRTF_BINARY_FILE bool hrtfCRendReaderEnabled; char *hrtfCRendFileName; -#endif IVAS_DEC_INPUT_FORMAT inputFormat; bool customLsOutputEnabled; char *customLsSetupFilename; @@ -475,7 +473,6 @@ int main( goto cleanup; } -#ifdef HRTF_BINARY_FILE IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); @@ -501,7 +498,6 @@ int main( { fprintf( stderr, "\nError in loading HRTF binary file %s for parametric binauralizer \n\n", arg.hrtfCRendFileName ); } -#endif } /*-----------------------------------------------------------------* @@ -572,6 +568,11 @@ cleanup: IVAS_DEC_HRTF_HANDLE hHrtfTD; IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); dealloc_HRTF_binary( hHrtfTD ); +#ifdef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE + IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; + IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); + destroy_SetOfHRTF( hSetOfHRTF ); +#endif } IVAS_DEC_Close( &hIvasDec ); CustomLsReader_close( &hLsCustomReader ); @@ -623,6 +624,9 @@ static IVAS_DEC_AUDIO_CONFIG cmdline2config( char argv_to_upper[FILENAME_MAX]; strncpy( argv_to_upper, argv, sizeof( argv_to_upper ) - 1 ); +#ifdef FIX_343_TO_UPPER + argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; +#endif to_upper( argv_to_upper ); if ( strcmp( argv_to_upper, "EXT" ) == 0 ) /* external renderer */ @@ -701,7 +705,9 @@ static bool parseCmdlIVAS_dec( char argv_to_upper[FILENAME_MAX]; #ifdef DEBUGGING float ftmp; +#ifndef FIX_343_TO_UPPER char stmp[FILENAME_MAX]; +#endif arg->forcedRendMode = IVAS_DEC_FORCE_REND_UNFORCED; arg->forceSubframeBinauralization = false; @@ -737,10 +743,8 @@ static bool parseCmdlIVAS_dec( arg->hrtfReaderEnabled = false; arg->hrtfFileName = NULL; -#ifdef HRTF_BINARY_FILE arg->hrtfCRendReaderEnabled = false; arg->hrtfCRendFileName = NULL; -#endif arg->customLsOutputEnabled = false; arg->customLsSetupFilename = NULL; @@ -771,6 +775,9 @@ static bool parseCmdlIVAS_dec( while ( argv[i][0] == '-' ) { strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); +#ifdef FIX_343_TO_UPPER + argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; +#endif to_upper( argv_to_upper ); if ( strcmp( argv_to_upper, "-VOIP" ) == 0 ) @@ -778,13 +785,21 @@ static bool parseCmdlIVAS_dec( arg->voipMode = 1; i++; } +#ifdef FIX_343_TO_UPPER + else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 ) +#else else if ( strcmp( to_upper( argv[i] ), "-VOIP_HF_ONLY=0" ) == 0 ) +#endif { arg->voipMode = 1; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP; i++; } +#ifdef FIX_343_TO_UPPER + else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 ) +#else else if ( strcmp( to_upper( argv[i] ), "-VOIP_HF_ONLY=1" ) == 0 ) +#endif { arg->voipMode = 1; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; @@ -857,8 +872,14 @@ static bool parseCmdlIVAS_dec( i++; if ( i < argc - 3 ) { +#ifdef FIX_343_TO_UPPER + strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); + argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; + arg->forcedRendMode = parseForcedRendModeDec( argv_to_upper ); +#else strncpy( stmp, argv[i], sizeof( stmp ) ); arg->forcedRendMode = parseForcedRendModeDec( stmp ); +#endif i++; } } @@ -911,10 +932,31 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } + +#ifdef FIX_343_TO_UPPER + strncpy( argv_to_upper, argv[i + 1], sizeof( argv_to_upper ) - 1 ); + argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; + to_upper( argv_to_upper ); + + if ( strcmp( argv_to_upper, "REF" ) == 0 ) + { + arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; + } + else if ( strcmp( argv_to_upper, "AVG" ) == 0 ) + { + arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_AVG; + } + else + { + fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", argv[i + 1] ); + usage_dec(); + return false; + } +#else char tmp[4]; strcpy( tmp, argv[i + 1] ); #endif -#ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef FIX_I109_ORIENTATION_TRACKING // TODO @Philips needs merge with FIX_343_TO_UPPER char *tmp = to_upper( argv[i + 1] ); if ( strcmp( to_upper( tmp ), "NONE" ) == 0 ) { @@ -922,6 +964,7 @@ static bool parseCmdlIVAS_dec( } else if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) #else + if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) #endif { @@ -937,6 +980,7 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } +#endif i += 2; } #ifdef FIX_I109_ORIENTATION_TRACKING @@ -980,6 +1024,33 @@ static bool parseCmdlIVAS_dec( return false; } +#ifdef FIX_343_TO_UPPER + strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); + argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; + if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) ) + { + arg->no_diegetic_pan = 0.f; + } + else if ( ( strcmp( argv_to_upper, "LEFT" ) == 0 ) || ( strchr( argv_to_upper, 'L' ) != NULL ) ) + { + arg->no_diegetic_pan = -1.f; + } + else if ( ( strcmp( argv_to_upper, "RIGHT" ) == 0 ) || ( strchr( argv_to_upper, 'R' ) != NULL ) ) + { + arg->no_diegetic_pan = 1.f; + } + else + { + arg->no_diegetic_pan = (float) atof( argv_to_upper ); + + if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f ) + { + fprintf( stderr, "Error: Incorrect value for panning option argument specified: %s\n\n", argv[i] ); + usage_dec(); + return false; + } + } +#else char *param = to_upper( argv[i] ); if ( ( strcmp( param, "CENTER" ) == 0 ) || ( strchr( param, 'C' ) != NULL ) ) { @@ -1004,6 +1075,7 @@ static bool parseCmdlIVAS_dec( return false; } } +#endif i++; } @@ -1138,11 +1210,7 @@ static void usage_dec( void ) fprintf( stdout, " which of the two supported formats is in use.\n" ); fprintf( stdout, " default bitstream file format is G.192\n" ); fprintf( stdout, "-T File : Head rotation specified by external trajectory File\n" ); -#ifdef HRTF_BINARY_FILE fprintf( stdout, "-hrtf File : HRTF filter File used in BINAURAL output configuration\n" ); -#else - fprintf( stdout, "-hrtf File : HRTF filter File used in ISm format and BINAURAL output configuration\n" ); -#endif #ifdef DEBUGGING fprintf( stdout, "-force_subframe_bin : Forces parametric binauralizer code to use 5 ms time resolution even when\n" ); fprintf( stdout, " output time resolution is larger.\n" ); diff --git a/apps/encoder.c b/apps/encoder.c index b73e3d27f9..2aab6d5ae8 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -884,7 +884,11 @@ static bool parseCmdlIVAS_enc( while ( i < argc - 4 ) { strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); +#ifdef FIX_343_TO_UPPER + argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; +#endif to_upper( argv_to_upper ); + /*-----------------------------------------------------------------* * Bandwidth limitation *-----------------------------------------------------------------*/ @@ -894,6 +898,9 @@ static bool parseCmdlIVAS_enc( arg->max_bwidth_user = true; strncpy( stmp, argv[i + 1], sizeof( stmp ) - 1 ); +#ifdef FIX_343_TO_UPPER + stmp[sizeof( stmp ) - 1] = '\0'; +#endif to_upper( stmp ); if ( strcmp( stmp, "-NB" ) == 0 || strcmp( stmp, "NB" ) == 0 ) @@ -1081,7 +1088,9 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { strncpy( stmp, argv[i], sizeof( stmp ) ); - +#ifdef FIX_343_TO_UPPER + stmp[sizeof( stmp ) - 1] = '\0'; +#endif to_upper( argv[i] ); if ( strcmp( argv[i], "LO" ) == 0 ) { @@ -1369,6 +1378,25 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { +#ifdef FIX_343_TO_UPPER + if ( strcmp( argv[i], "5_1" ) == 0 ) + { + arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; + } + else if ( strcmp( argv[i], "7_1" ) == 0 ) + { + arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_7_1; + } + else if ( strcmp( argv[i], "5_1_2" ) == 0 ) + { + arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_2; + } + else if ( strcmp( argv[i], "5_1_4" ) == 0 ) + { + arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_4; + } + else if ( strcmp( argv[i], "7_1_4" ) == 0 ) +#else if ( strcmp( to_upper( argv[i] ), "5_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; @@ -1386,6 +1414,7 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_4; } else if ( strcmp( to_upper( argv[i] ), "7_1_4" ) == 0 ) +#endif { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_7_1_4; } diff --git a/apps/renderer.c b/apps/renderer.c index 3c88b9dd35..5936add157 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -504,6 +504,9 @@ static void setupWithSingleFormatInput( /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string is empty or contains "NULL" */ char charBuf[FILENAME_MAX]; strncpy( charBuf, args.inMetadataFilePaths[i], min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1 ); +#ifdef FIX_343_TO_UPPER + charBuf[min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1] = '\0'; +#endif to_upper( charBuf ); if ( isEmptyString( args.inMetadataFilePaths[i] ) || strncmp( charBuf, "NULL", 4 ) == 0 ) { @@ -1177,6 +1180,9 @@ static bool parseInConfig( /* First check if input is being set to scene description file - this is not covered by parseAudioConfig(). */ strncpy( charBuf, inFormatStr, sizeof( charBuf ) - 1 ); +#ifdef FIX_343_TO_UPPER + charBuf[sizeof( charBuf ) - 1] = '\0'; +#endif to_upper( charBuf ); if ( strcmp( charBuf, "META" ) == 0 ) { @@ -1370,6 +1376,9 @@ static IVAS_REND_AudioConfig parseAudioConfig( charBuf[13] = '\0'; strncpy( charBuf, configString, sizeof( charBuf ) - 1 ); +#ifdef FIX_343_TO_UPPER + charBuf[sizeof( charBuf ) - 1] = '\0'; +#endif to_upper( charBuf ); if ( ( strcmp( charBuf, "MONO" ) == 0 ) || ( strcmp( charBuf, "HOA0" ) == 0 ) || ( strcmp( charBuf, "SBA0" ) == 0 ) ) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index a24e03f248..2a15165be0 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -87,14 +87,10 @@ typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_qmetadata_frame_struct *IVAS_MASA_QMETADATA_HANDLE; typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE; -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; -#endif -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE; typedef struct ivas_hrtfs_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE; -#endif #ifdef DEBUGGING typedef enum diff --git a/lib_com/delay_comp.c b/lib_com/delay_comp.c index 32f2f47303..194b4b2919 100644 --- a/lib_com/delay_comp.c +++ b/lib_com/delay_comp.c @@ -55,7 +55,7 @@ int32_t get_delay( const int32_t io_fs, /* i : input/output sampling frequency */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ - const int32_t binaural_latency_ns /* i : binauralization delay in ns */ + const int32_t binaural_latency_ns /* i : binaural renderer HRTF delay in ns */ ) { int32_t delay = 0; diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 00ff314258..5f408d4e4b 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -570,7 +570,13 @@ typedef enum #define NO_SYMB_GR_PRED_G 8 #define STEREO_DFT_RES_BW_MAX 66 /*Maximum number of bin for residual signal in each frame (res_cod_band_max == 6 in 48kHz)*/ + +#ifdef DFT_STEREO_SPAR_MIXING +#define SBA_DIRAC_STEREO_NUM_BANDS 12 +#else #define SBA_DIRAC_STEREO_NUM_BANDS 5 +#endif + #define SBA_DIRAC_NRG_SMOOTH_LONG 10 #define SBA_DIRAC_NRG_SMOOTH_SHORT 3 @@ -1358,16 +1364,12 @@ typedef enum #define BINAURAL_MAXBANDS 60 /* Max number of bands */ #define BINAURAL_CONVBANDS 50 /* Bands upto which convolution is performed */ -#ifdef HRTF_BINARY_FILE #define BINAURAL_NTAPS 7 -#endif #define BINAURAL_NTAPS_MAX 96 #define HRTF_SH_ORDER 3 #define HRTF_SH_CHANNELS 16 -#ifdef HRTF_BINARY_FILE #define HRTF_LS_CHANNELS 15 -#endif #define HRTF_NUM_BINS 60 #define REVERB_PREDELAY_MAX 20 /* Max input delay for reverb module */ #define GAIN_LFE 1.88364911f /* Gain applied to LFE during renderering */ @@ -1376,7 +1378,6 @@ typedef enum #define BINAURAL_COHERENCE_DIFFERENCE_BINS 9 /* Number of bins for direction-dependent diffuse-field binaural coherence */ -#ifdef HRTF_BINARY_FILE typedef enum { BINAURAL_INPUT_AUDIO_CONFIG_INVALID, @@ -1386,7 +1387,6 @@ typedef enum } BINAURAL_INPUT_AUDIO_CONFIG; -#endif #define HEADROT_ORDER 3 #define HEADROT_SHMAT_DIM ( ( HEADROT_ORDER + 1 ) * ( HEADROT_ORDER + 1 ) ) #define HEADROT_SHMAT_DIM2 ( HEADROT_SHMAT_DIM * HEADROT_SHMAT_DIM ) @@ -1409,16 +1409,9 @@ typedef enum #define SFX_SPAT_BIN_NUM_SUBSAMPLES 64 #define ITD_MEM_LEN (MAX_ITD + SFX_SPAT_BIN_SINC_M) #define L_SUBFRAME5MS_48k (L_FRAME48k/4) -#ifdef FIX_337_TDREND_INTP #define MAX_ANGULAR_STEP (1.0f) -#else -#define MAX_ANGULAR_STEP (15.0f) -#endif #define MAX_ANGULAR_STEP_INV ( 1.0f / MAX_ANGULAR_STEP ) #define MAX_INTERPOLATION_STEPS 12 -#ifndef FIX_310_TD_REND_DELAY -#define BINAURAL_TD_LATENCY_S 0.0f /* ITD fix removes TD renderer delay -- should be cleaned out */ -#endif /* ----- Enums - TD Renderer ----- */ diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 48a0b94380..01634b60a6 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -1059,6 +1059,10 @@ ivas_error stereo_dft_dec_create( const int32_t element_brate, /* i : element bitrate */ const int32_t output_Fs, /* i : output sampling rate */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t nchan_transport +#endif ); void stereo_dft_dec_reset( @@ -1098,10 +1102,17 @@ void stereo_dft_dec_synthesize( void stereo_dft_dec( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: decoder DFT stereo handle */ Decoder_State *st0, /* i/o: decoder state structure */ - float DFT[CPE_CHANNELS][STEREO_DFT_BUF_MAX], /* i/o: DFT buffers */ + float DFT[CPE_CHANNELS][STEREO_DFT_BUF_MAX], /* i/o: DFT buffers */ float *input_mem, /* i/o: mem of buffer DFT analysis */ STEREO_CNG_DEC_HANDLE hStereoCng, /* i/o: Stereo CNG data structure */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ +#ifdef DFT_STEREO_SPAR_MIXING + , + ivas_spar_md_dec_state_t *hMdDec, /* SPAR MD handle for upmixing */ + int16_t cross_fade_start_offset, /* i: SPAR mixer delay compensation */ + int32_t output_Fs, /* i: Fs for delay calculation */ + int16_t nchan_transport /* i: number of transpor channels */ +#endif ); void stereo_dft_res_ecu( @@ -3201,6 +3212,10 @@ void ivas_sba_dirac_stereo_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output[CPE_CHANNELS][L_FRAME48k], /* o : output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t mcmasa +#endif ); void ivas_sba_dirac_stereo_config( @@ -3209,6 +3224,12 @@ void ivas_sba_dirac_stereo_config( void ivas_sba_dirac_stereo_smooth_parameters( STEREO_DFT_DEC_DATA_HANDLE hStereoDft /* i/o: encoder DFT stereo handle */ +#ifdef DFT_STEREO_SPAR_MIXING + , + ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ + int16_t cross_fade_start_offset, /* i: SPAR mixer delay compensation */ + int32_t output_Fs /* i: Fs for delay calculation */ +#endif ); ivas_error ivas_sba_get_hoa_dec_matrix( @@ -3312,26 +3333,18 @@ void ivas_dirac_dec( const int16_t i_sf ); -#ifdef HRTF_BINARY_FILE ivas_error ivas_dirac_dec_init_binaural_data( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : HRTF structure for rendering */ ); -#else -ivas_error ivas_dirac_dec_init_binaural_data( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -); -#endif void ivas_dirac_dec_close_binaural_data( DIRAC_DEC_BIN_HANDLE *hBinaural /* i/o: decoder DirAC binaural data handle */ ); -#ifdef HRTF_BINARY_FILE ivas_error ivas_dirac_dec_binaural_copy_hrtfs( HRTFS_PARAMBIN_HANDLE *hHrtfParambin /* i/o: HRTF structure for rendering */ ); -#endif void ivas_dirac_dec_binaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ @@ -3347,11 +3360,9 @@ ivas_error ivas_binaural_reverb_open( const AUDIO_CONFIG output_config, /* i : output audio configuration */ const int32_t sampling_rate, /* i : sampling rate */ const RENDERER_TYPE renderer_type /* i : renderer type */ -#ifdef HRTF_BINARY_FILE , const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ -#endif ); void ivas_binaural_reverb_close( @@ -4631,7 +4642,6 @@ void ivas_binaural_add_LFE( float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ ); -#ifdef HRTF_BINARY_FILE ivas_error ivas_HRTF_fastconv_binary_open( HRTFS_FASTCONV **hHrtfFastConv /* i/o: FASTCONV HRTF structure */ ); @@ -4647,7 +4657,6 @@ ivas_error ivas_HRTF_parambin_binary_open( void ivas_HRTF_parambin_binary_close( HRTFS_PARAMBIN **hHrtfParambin /* i/o: Parametric binauralizer HRTF structure */ ); -#endif void QuatToRotMat( const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ @@ -5098,7 +5107,7 @@ void DefaultBSplineModel( ); ivas_error ivas_td_binaural_open( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_td_binaural_close( @@ -5374,7 +5383,6 @@ int16_t ivas_get_num_bands_from_bw_idx( * Crend renderer *----------------------------------------------------------------------------------*/ -#ifdef HRTF_BINARY_FILE ivas_error ivas_HRTF_CRend_binary_open( HRTFS_CREND **hSetOfHRTF /* i/o: Set of HRTF handle */ @@ -5395,12 +5403,13 @@ ivas_error ivas_crend_init_from_hrtf_handle( HRTFS_HANDLE hrtf); #endif +#ifndef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE ivas_error destroy_SetOfHRTF( HRTFS_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ ); - #endif + #ifndef FIX_197_CREND_INTERFACE ivas_error ivas_crend_init_from_rom( @@ -5437,9 +5446,7 @@ ivas_error ivas_rend_initCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ); ivas_error ivas_rend_openCrend( @@ -5448,9 +5455,7 @@ ivas_error ivas_rend_openCrend( const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, int16_t Opt_Headrotation, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ); #ifdef FIX_197_CREND_INTERFACE @@ -5656,9 +5661,7 @@ void ivas_reverb_calc_color_levels( void ivas_reverb_prepare_cldfb_params( ivas_roomAcoustics_t *pInput_params, -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t output_Fs, @@ -5728,7 +5731,7 @@ ivas_error ivas_orient_trk_GetTrackedRotation( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ - IVAS_QUATERNION absRot, /* i : absolute head rotation */ + const IVAS_QUATERNION *absRot, /* i : absolute head rotation */ float updateRate, /* i : rotation update rate [Hz] */ IVAS_QUATERNION *pTrkRot /* o : tracked rotation */ ); diff --git a/lib_com/options.h b/lib_com/options.h index 88d9b64df4..82857904a0 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -147,15 +147,21 @@ #define SBA_BR_SWITCHING_RECONFIG /* Issue 114: Changes for SBA bitrate switching with reconfiguration for bitrates with different number of transport channels*/ #endif -#define FIX_FIX_I59 /* Issue 59: small fix concerning LFE delay rounding */ -#define HRTF_BINARY_FILE /* HRTF filters' binary file used for binaural rendering. */ #define FIX_197_CREND_INTERFACE -#define FIX_301_PLC /* FhG: issue 301 - fix bug of missing update of overlap buffer for DFT-stereo PLC*/ -#define FIX_337_TDREND_INTP /* Issue 337: TD renderer interpolation threshold set too low */ -#define FIX_310_TD_REND_DELAY /* Adding HRTF delay being read from ROM/Binary file, fix rounding for delay compensation in renderer */ +#define FIX_MEMORY_COUNTING_HRTF_BINARY_FILE #define FIX_334_DEBUG_BE_STEREO_SWITCHING /* FhG: Fix non-BE issue for stereo switching when DEBUGGING is enabled */ +#define FIX_198_TDREND_INTERFACE /* Issue 198: Harmonize interface for TD renderer between decoder and external renderer */ + +#define DFT_STEREO_SPAR_MIXING +#ifdef DFT_STEREO_SPAR_MIXING +/*#define DFT_STEREO_SPAR_MIXING_DEBUG*/ /* more debugging output for DFT_STEREO_SPAR_MIXING_DEBUG */ +#define DISABLE_RES_CHANNELS_MCT /* decode only W and residual for Y when outputting to stereo */ +#endif + +#define FIX_343_TO_UPPER /* VA: issue 343: safeguard for function to_upper() */ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/core_dec_init.c b/lib_dec/core_dec_init.c index 6787968270..1e238fb52f 100644 --- a/lib_dec/core_dec_init.c +++ b/lib_dec/core_dec_init.c @@ -279,11 +279,7 @@ void open_decoder_LPD( st->last_core_bfi = ACELP_CORE; } -#ifdef FIX_301_PLC if ( ( ( st->element_mode != IVAS_CPE_DFT ) || ( st->element_mode == IVAS_CPE_DFT && st->prev_bfi ) ) && st->last_codec_mode == MODE1 && st->last_core == ACELP_CORE ) -#else - if ( st->element_mode != IVAS_CPE_DFT && st->last_codec_mode == MODE1 && st->last_core == ACELP_CORE ) -#endif { /* Switching from Mode 1 ACELP */ st->last_core_bfi = ACELP_CORE; diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index 186a624f4d..3fb50b5ca6 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -441,7 +441,11 @@ ivas_error ivas_core_dec( *---------------------------------------------------------------------*/ /* save synth and output in case of SBA DirAC stereo output as core switching is done outside of core decoder */ +#ifdef DFT_STEREO_SPAR_MIXING + if ( sba_dirac_stereo_flag && st->element_mode != IVAS_CPE_MDCT && !( st->core_brate == SID_2k40 && st->cng_type == FD_CNG ) ) +#else if ( sba_dirac_stereo_flag && !( st->core_brate == SID_2k40 && st->cng_type == FD_CNG ) ) +#endif { mvr2r( synth[n], hSCE->save_synth, output_frame ); } @@ -660,7 +664,11 @@ ivas_error ivas_core_dec( } } +#ifdef DFT_STEREO_SPAR_MIXING + if ( sba_dirac_stereo_flag && st->element_mode != IVAS_CPE_MDCT ) +#else if ( sba_dirac_stereo_flag ) +#endif { /* for SBA DirAC stereo output DFT Stereo core switching and updates are done in ivas_sba_dirac_stereo_dec() as hCPE is not available at this point */ break; @@ -675,13 +683,28 @@ ivas_error ivas_core_dec( if ( st->element_mode != IVAS_CPE_DFT ) { +#ifdef DFT_STEREO_SPAR_MIXING + if ( st->element_mode != IVAS_CPE_MDCT || sba_dirac_stereo_flag ) +#else if ( st->element_mode != IVAS_CPE_MDCT ) +#endif { +#ifdef DFT_STEREO_SPAR_MIXING + ivas_post_proc( hSCE, hCPE, n, synth[n], NULL, output_frame, sba_dirac_stereo_flag ); +#else ivas_post_proc( hSCE, hCPE, n, synth[n], NULL, output_frame, 0 ); +#endif } /* update OLA buffers - needed for switching to DFT stereo */ +#ifdef DFT_STEREO_SPAR_MIXING + if ( !sba_dirac_stereo_flag ) + { + stereo_td2dft_update( hCPE, n, output[n], synth[n], hb_synth[n], output_frame ); + } +#else stereo_td2dft_update( hCPE, n, output[n], synth[n], hb_synth[n], output_frame ); +#endif } else /* IVAS_CPE_DFT */ { diff --git a/lib_dec/ivas_cpe_dec.c b/lib_dec/ivas_cpe_dec.c old mode 100644 new mode 100755 index 972f1304f7..b656f9255b --- a/lib_dec/ivas_cpe_dec.c +++ b/lib_dec/ivas_cpe_dec.c @@ -361,7 +361,11 @@ ivas_error ivas_cpe_dec( if ( hCPE->element_mode != IVAS_CPE_DFT || ( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) ) { +#ifdef DFT_STEREO_SPAR_MIXING + if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, st_ivas->sba_dirac_stereo_flag ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, 0 ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -406,7 +410,12 @@ ivas_error ivas_cpe_dec( } else { - stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0 ); + stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0 +#ifdef DFT_STEREO_SPAR_MIXING + , + 0, 0, 0, 0 +#endif + ); } /* synthesis iFFT */ @@ -454,8 +463,12 @@ ivas_error ivas_cpe_dec( /*----------------------------------------------------------------* * Synthesis synchronization between CPE modes *----------------------------------------------------------------*/ - - synchro_synthesis( ivas_total_brate, hCPE, output, output_frame, 0 ); +#ifdef DFT_STEREO_SPAR_MIXING + if ( !st_ivas->sba_dirac_stereo_flag ) +#endif + { + synchro_synthesis( ivas_total_brate, hCPE, output, output_frame, 0 ); + } if ( hCPE->element_mode == IVAS_CPE_MDCT && hCPE->nchan_out == 1 && ( is_DTXrate( ivas_total_brate ) == 0 || ( is_DTXrate( ivas_total_brate ) == 1 && is_DTXrate( st_ivas->hDecoderConfig->last_ivas_total_brate ) == 0 ) ) ) { @@ -670,7 +683,11 @@ ivas_error create_cpe_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { - if ( st_ivas->sba_dirac_stereo_flag ) + if ( st_ivas->sba_dirac_stereo_flag +#ifdef DFT_STEREO_SPAR_MIXING + && st_ivas->nchan_transport == 1 +#endif + ) { /* for SBA DirAC stereo output CPE element is only used for upmix, core coder is found in SCE element used for core decoding */ break; @@ -702,9 +719,18 @@ ivas_error create_cpe_dec( * DFT stereo initialization *-----------------------------------------------------------------*/ +#ifdef DFT_STEREO_SPAR_MIXING + if ( hCPE->element_mode == IVAS_CPE_DFT || ( st_ivas->sba_dirac_stereo_flag && hCPE->cpe_id == 0 ) ) +#else if ( hCPE->element_mode == IVAS_CPE_DFT || st_ivas->sba_dirac_stereo_flag ) +#endif { - if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, st_ivas->sba_dirac_stereo_flag ) ) != IVAS_ERR_OK ) + if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, st_ivas->sba_dirac_stereo_flag +#ifdef DFT_STEREO_SPAR_MIXING + , + st_ivas->nchan_transport +#endif + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index e4a08b0540..384baa0bb2 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -305,7 +305,20 @@ ivas_error ivas_dec( if ( st_ivas->sba_dirac_stereo_flag ) { nchan_remapped = CPE_CHANNELS; - ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame ); + +#ifdef DFT_STEREO_SPAR_MIXING + if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi ); + } +#endif + + ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame +#ifdef DFT_STEREO_SPAR_MIXING + , + st_ivas->ivas_format == MC_FORMAT +#endif + ); } else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) ) { @@ -360,6 +373,9 @@ ivas_error ivas_dec( } } else /* SBA_MODE_SPAR */ +#ifdef DFT_STEREO_SPAR_MIXING + if ( !st_ivas->sba_dirac_stereo_flag ) +#endif { ivas_sba_upmixer_renderer( st_ivas, output, output_frame ); /* Note: ivas_sba_linear_renderer() or ivas_dirac_dec() are called internally */ } @@ -536,7 +552,12 @@ ivas_error ivas_dec( if ( st_ivas->sba_dirac_stereo_flag ) /* use the flag to trigger the DFT upmix */ { - ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame ); + ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame +#ifdef DFT_STEREO_SPAR_MIXING + , + 1 +#endif + ); } /* HP filtering */ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 1f528a7bce..2ce8ef0720 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1910,7 +1910,7 @@ void ivas_dirac_dec( { #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, - st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], + &st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], (float) ( FRAMES_PER_SEC * ( sf2 - sf1 ) ), &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, st_ivas->hHeadTrackData->Rmat ); diff --git a/lib_dec/ivas_dirac_dec_binaural_functions.c b/lib_dec/ivas_dirac_dec_binaural_functions.c index 54ad7b5f04..8a44248c3b 100644 --- a/lib_dec/ivas_dirac_dec_binaural_functions.c +++ b/lib_dec/ivas_dirac_dec_binaural_functions.c @@ -86,16 +86,10 @@ static void matrixTransp2Mul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], f * Initialize parametric binaural renderer *------------------------------------------------------------------------*/ -#ifdef HRTF_BINARY_FILE ivas_error ivas_dirac_dec_init_binaural_data( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : HRTF structure for rendering */ ) -#else -ivas_error ivas_dirac_dec_init_binaural_data( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -) -#endif { DIRAC_DEC_BIN_HANDLE hBinaural; int16_t nBins; @@ -202,11 +196,7 @@ ivas_error ivas_dirac_dec_init_binaural_data( } else if ( renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) /* Indication of binaural rendering with room effect */ { -#ifdef HRTF_BINARY_FILE mvr2r( hHrtfParambin->parametricEarlyPartEneCorrection, hBinaural->earlyPartEneCorrection, nBins ); -#else - mvr2r( parametricEarlyPartEneCorrection, hBinaural->earlyPartEneCorrection, nBins ); -#endif /* reconfiguration needed when Reverb. parameters are changed -> close and open the handle again */ if ( hBinaural->hReverb != NULL && ( ( hBinaural->hReverb->numBins != nBins ) || @@ -220,7 +210,6 @@ ivas_error ivas_dirac_dec_init_binaural_data( { if ( hBinaural->useSubframeMode ) { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, @@ -229,16 +218,12 @@ ivas_error ivas_dirac_dec_init_binaural_data( RENDERER_BINAURAL_PARAMETRIC_ROOM, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, st_ivas->hIntSetup.output_config, output_Fs, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) != IVAS_ERR_OK ) -#endif { return error; } } else { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX, @@ -248,9 +233,6 @@ ivas_error ivas_dirac_dec_init_binaural_data( RENDERER_BINAURAL_PARAMETRIC_ROOM, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, CLDFB_NO_COL_MAX, NULL, st_ivas->hIntSetup.output_config, output_Fs, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -330,7 +312,6 @@ void ivas_dirac_dec_close_binaural_data( return; } -#ifdef HRTF_BINARY_FILE /*------------------------------------------------------------------------- * ivas_dirac_dec_binaural_copy_hrtfs() * @@ -376,7 +357,6 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs( return IVAS_ERR_OK; } -#endif /*------------------------------------------------------------------------- * ivas_dirac_dec_binaural() @@ -577,7 +557,7 @@ static void ivas_dirac_dec_binaural_internal( if ( st_ivas->hHeadTrackData && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hHeadTrackData->Quaternions[firstSubframe], FRAMES_PER_SEC, &trackedHeadOrientation ); + ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, &st_ivas->hHeadTrackData->Quaternions[firstSubframe], FRAMES_PER_SEC, &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, Rmat ); #else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[firstSubframe], Rmat ); diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index f64bf4fc5d..94239708f5 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -614,7 +614,6 @@ ivas_error ivas_init_decoder_front( { return error; } -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_HRTF_CRend_binary_open( &( st_ivas->hSetOfHRTF ) ) ) != IVAS_ERR_OK ) { return error; @@ -629,7 +628,6 @@ ivas_error ivas_init_decoder_front( { return error; } -#endif } /*-------------------------------------------------------------------* @@ -902,6 +900,9 @@ ivas_error ivas_init_decoder( ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); } +#ifdef DFT_STEREO_SPAR_MIXING + st_ivas->sba_dirac_stereo_flag = ( output_config == AUDIO_CONFIG_STEREO ); +#endif } else /* SBA_MODE_DIRAC */ { @@ -947,7 +948,11 @@ ivas_error ivas_init_decoder( } /* create CPE element for DFT Stereo like upmix */ - if ( st_ivas->sba_dirac_stereo_flag ) + if ( st_ivas->sba_dirac_stereo_flag +#ifdef DFT_STEREO_SPAR_MIXING + && st_ivas->nchan_transport == 1 +#endif + ) { if ( ( error = create_cpe_dec( st_ivas, cpe_id, ivas_total_brate / ( st_ivas->nSCE + st_ivas->nCPE ) ) ) != IVAS_ERR_OK ) { @@ -1196,7 +1201,6 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -1209,12 +1213,6 @@ ivas_error ivas_init_decoder( { return error; } -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { @@ -1272,9 +1270,7 @@ ivas_error ivas_init_decoder( getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF, -#endif st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; @@ -1370,7 +1366,11 @@ ivas_error ivas_init_decoder( } /* CLDFB Interpolation weights */ - if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR ) + if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR +#ifdef DFT_STEREO_SPAR_MIXING + && !st_ivas->sba_dirac_stereo_flag +#endif + ) { ivas_spar_get_cldfb_gains( st_ivas->hSpar, st_ivas->cldfbAnaDec[0], st_ivas->cldfbSynDec[0], hDecoderConfig ); } @@ -1596,11 +1596,9 @@ void ivas_initialize_handles_dec( st_ivas->hCrend = NULL; st_ivas->hHrtf = NULL; #endif -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF = NULL; st_ivas->hHrtfFastConv = NULL; st_ivas->hHrtfParambin = NULL; -#endif st_ivas->hoa_dec_mtx = NULL; st_ivas->hHeadTrackData = NULL; @@ -1659,7 +1657,11 @@ void ivas_destroy_dec( if ( st_ivas->hCPE[i] != NULL ) { /* set pointer to NULL as core coder already deallocated in destroy_sce_dec() */ - if ( st_ivas->sba_dirac_stereo_flag ) + if ( st_ivas->sba_dirac_stereo_flag +#ifdef DFT_STEREO_SPAR_MIXING + && st_ivas->nchan_transport == 1 +#endif + ) { st_ivas->hCPE[i]->hCoreCoder[0] = NULL; st_ivas->hCPE[i]->hCoreCoder[1] = NULL; @@ -1808,11 +1810,12 @@ void ivas_destroy_dec( ivas_HRTF_binary_close( &st_ivas->hHrtfTD ); } -#ifdef HRTF_BINARY_FILE /* CRend binaural renderer handle */ if ( st_ivas->hSetOfHRTF != NULL ) { +#ifndef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE destroy_SetOfHRTF( st_ivas->hSetOfHRTF ); +#endif ivas_HRTF_CRend_binary_close( &st_ivas->hSetOfHRTF ); } @@ -1827,7 +1830,6 @@ void ivas_destroy_dec( { ivas_HRTF_parambin_binary_close( &st_ivas->hHrtfParambin ); } -#endif /* Config. Renderer */ ivas_render_config_close( &( st_ivas->hRenderConfig ) ); @@ -1953,19 +1955,29 @@ void ivas_init_dec_get_num_cldfb_instances( case RENDERER_BINAURAL_FASTCONV_ROOM: if ( st_ivas->sba_mode == SBA_MODE_SPAR ) { - *numCldfbAnalyses = st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans; - - if ( st_ivas->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC ) +#ifdef DFT_STEREO_SPAR_MIXING + if ( st_ivas->sba_dirac_stereo_flag ) { - *numCldfbSyntheses = st_ivas->hOutSetup.nchan_out_woLFE; - } - else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_FOA ) - { - *numCldfbSyntheses = st_ivas->hSpar->hFbMixer->fb_cfg->num_out_chans; + *numCldfbAnalyses = 0; + *numCldfbSyntheses = 0; } else +#endif { - *numCldfbSyntheses = MAX_OUTPUT_CHANNELS; + *numCldfbAnalyses = st_ivas->hSpar->hFbMixer->fb_cfg->num_in_chans; + + if ( st_ivas->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC ) + { + *numCldfbSyntheses = st_ivas->hOutSetup.nchan_out_woLFE; + } + else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_FOA ) + { + *numCldfbSyntheses = st_ivas->hSpar->hFbMixer->fb_cfg->num_out_chans; + } + else + { + *numCldfbSyntheses = MAX_OUTPUT_CHANNELS; + } } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) @@ -2101,7 +2113,6 @@ static ivas_error doSanityChecks_IVAS( } #endif -#ifdef HRTF_BINARY_FILE #ifdef DEBUGGING if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) { @@ -2109,18 +2120,6 @@ static ivas_error doSanityChecks_IVAS( } #endif -#else - -#ifdef DEBUGGING - if ( ( st_ivas->hDecoderConfig->Opt_HRTF_binary || st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) -#else - if ( st_ivas->hDecoderConfig->Opt_HRTF_binary && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) ) ) -#endif - { - return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration: Time Domain object renderer not supported in this configuration" ); - } - -#endif #ifdef DEBUGGING if ( ( st_ivas->hHrtfTD != NULL && st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 2b6d0b6876..f2f008ff37 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -1091,9 +1091,7 @@ static ivas_error ivas_ism_bitrate_switching( getRendAudioConfigFromIvasAudioConfig( st_ivas->hOutSetup.output_config ), st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF, -#endif st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; @@ -1115,12 +1113,8 @@ static ivas_error ivas_ism_bitrate_switching( if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL ) { /* open the parametric binaural renderer */ -#ifdef HRTF_BINARY_FILE ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ); ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ); -#else - ivas_dirac_dec_init_binaural_data( st_ivas ); -#endif /* Close the TD Binaural renderer */ if ( st_ivas->hBinRendererTd != NULL ) @@ -1146,12 +1140,8 @@ static ivas_error ivas_ism_bitrate_switching( if ( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM ) { /* open the parametric binaural renderer */ -#ifdef HRTF_BINARY_FILE ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ); ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ); -#else - ivas_dirac_dec_init_binaural_data( st_ivas ); -#endif /* close the crend binaural renderer */ #ifdef FIX_197_CREND_INTERFACE diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index eebaeec9c0..b83fd5114e 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -137,7 +137,7 @@ void ivas_ism_render( { #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, - st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], + &st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], FRAMES_PER_SEC, &trackedHeadOrientation ); /* Calculate rotation matrix from the quaternion */ diff --git a/lib_dec/ivas_lfe_dec.c b/lib_dec/ivas_lfe_dec.c index 1487a27971..55a68d892b 100644 --- a/lib_dec/ivas_lfe_dec.c +++ b/lib_dec/ivas_lfe_dec.c @@ -437,11 +437,7 @@ ivas_error ivas_create_lfe_dec( lfe_addl_delay_s = block_offset_s - hLFE->lfe_block_delay_s; lfe_addl_delay_s = max( 0.0f, lfe_addl_delay_s ); -#ifdef FIX_FIX_I59 add_delay_sa = (int16_t) roundf( (float) binauralization_delay_ns * output_Fs / 1000000000.f ); -#else - add_delay_sa = NS2SA( output_Fs, binauralization_delay_ns + 0.5f ); -#endif hLFE->lfe_addl_delay = (int16_t) ( lfe_addl_delay_s * output_Fs ) + add_delay_sa; hLFE->lfe_block_delay_s += lfe_addl_delay_s + add_delay_sa / output_Fs; diff --git a/lib_dec/ivas_mcmasa_dec.c b/lib_dec/ivas_mcmasa_dec.c index 3af2ea2c3b..748f665dce 100644 --- a/lib_dec/ivas_mcmasa_dec.c +++ b/lib_dec/ivas_mcmasa_dec.c @@ -109,7 +109,6 @@ ivas_error ivas_mcmasa_dec_reconfig( if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { /* open parametric binaural renderer */ -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -119,9 +118,6 @@ ivas_error ivas_mcmasa_dec_reconfig( } if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -140,11 +136,7 @@ ivas_error ivas_mcmasa_dec_reconfig( { /* st_ivas->hDiracDecBin->useTdDecorr will change => close and re-open. */ ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 7b2fa2982c..9c8e640784 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -166,6 +166,20 @@ ivas_error ivas_mct_dec( /* MCT core decoder */ ivas_mct_core_dec( hMCT, st_ivas->hCPE, nCPE, output ); +#ifdef DISABLE_RES_CHANNELS_MCT + /* for sba to stereo output disable any further processing for TCs > 2 as it is not needed*/ + if ( st_ivas->sba_dirac_stereo_flag ) + { + for ( cpe_id = 1; cpe_id < nCPE; cpe_id++ ) + { + for ( n = 0; n < CPE_CHANNELS; n++ ) + { + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->mct_chan_mode = MCT_CHAN_MODE_IGNORE; + } + } + } +#endif + /* MCT reconstruction and CoreCoder updates */ for ( cpe_id = 0; cpe_id < nCPE; cpe_id++ ) { @@ -225,8 +239,19 @@ ivas_error ivas_mct_dec( break; } +#ifdef DFT_STEREO_SPAR_MIXING + if ( st_ivas->sba_dirac_stereo_flag ) + { + ivas_post_proc( NULL, hCPE, n, synth[n], NULL, output_frame, 1 ); + } +#endif + /* Postprocessing for ACELP/MDCT core switching and synchronization */ +#ifdef DFT_STEREO_SPAR_MIXING + if ( ( error = core_switching_post_dec( sts[n], synth[n], output[cpe_id * CPE_CHANNELS + n], hCPE->output_mem[1], 0, output_frame, 0 /*core_switching_flag*/, st_ivas->sba_dirac_stereo_flag, -1, hCPE->last_element_mode ) ) != IVAS_ERR_OK ) +#else if ( ( error = core_switching_post_dec( sts[n], synth[n], output[cpe_id * CPE_CHANNELS + n], hCPE->output_mem[1], 0, output_frame, 0 /*core_switching_flag*/, 0, -1, hCPE->last_element_mode ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -247,7 +272,14 @@ ivas_error ivas_mct_dec( /* synthesis synchronization between stereo modes */ +#ifdef DFT_STEREO_SPAR_MIXING + if ( !st_ivas->sba_dirac_stereo_flag ) + { + synchro_synthesis( ivas_total_brate, hCPE, output + cpe_id * CPE_CHANNELS, output_frame, 0 ); + } +#else synchro_synthesis( ivas_total_brate, hCPE, output + cpe_id * CPE_CHANNELS, output_frame, 0 ); +#endif #ifdef DEBUG_PLOT for ( n = 0; n < CPE_CHANNELS; n++ ) @@ -1063,11 +1095,7 @@ static ivas_error ivas_mc_dec_reconfig( /* useTdDecorr may change => close and re-open */ ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1084,7 +1112,6 @@ static ivas_error ivas_mc_dec_reconfig( } else if ( st_ivas->hDiracDecBin == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -1094,9 +1121,6 @@ static ivas_error ivas_mc_dec_reconfig( } if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1137,9 +1161,7 @@ static ivas_error ivas_mc_dec_reconfig( getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ), getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF, -#endif st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_dec/ivas_post_proc.c b/lib_dec/ivas_post_proc.c index 1104c9a378..849f4b79c0 100644 --- a/lib_dec/ivas_post_proc.c +++ b/lib_dec/ivas_post_proc.c @@ -81,7 +81,11 @@ void ivas_post_proc( output_Fs = sts[0]->output_Fs; +#ifdef DFT_STEREO_SPAR_MIXING + if ( ( sts[n]->element_mode != IVAS_CPE_DFT && !( sba_dirac_stereo_flag && sts[n]->element_mode != IVAS_CPE_MDCT ) ) || ( sts[n]->element_mode == IVAS_CPE_DFT && hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) ) +#else if ( ( sts[n]->element_mode != IVAS_CPE_DFT && !sba_dirac_stereo_flag ) || ( sts[n]->element_mode == IVAS_CPE_DFT && hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) ) +#endif { if ( sts[n]->hTcxLtpDec != NULL ) { @@ -102,6 +106,13 @@ void ivas_post_proc( mvr2r( sts[n]->prev_synth_buffer, sts[n]->hTcxDec->FBTCXdelayBuf, 0 ); mvr2r( sts[n]->delay_buf_out, sts[n]->hTcxDec->FBTCXdelayBuf + 0, delay_comp ); } +#ifdef DFT_STEREO_SPAR_MIXING + else if ( sba_dirac_stereo_flag && sts[n]->element_mode == IVAS_CPE_MDCT ) + { + int16_t numZeros = (int16_t) ( NS2SA( output_Fs, N_ZERO_MDCT_NS ) ); + mvr2r( sts[n]->hHQ_core->old_out + numZeros, sts[n]->hTcxDec->FBTCXdelayBuf, delay_comp ); + } +#endif tcx_ltp_post( sts[n], hTcxLtpDec, sts[n]->core, output_frame, NS2SA( output_Fs, ACELP_LOOK_NS ) + delay_comp, synth, sts[n]->hTcxDec->FBTCXdelayBuf ); } diff --git a/lib_dec/ivas_rom_dec.c b/lib_dec/ivas_rom_dec.c index 04e3461e99..e9e107e863 100644 --- a/lib_dec/ivas_rom_dec.c +++ b/lib_dec/ivas_rom_dec.c @@ -231,11 +231,31 @@ const int16_t cna_init_bands[MAX_CNA_NBANDS + 1] = 1, 4, 14, 33, 67, 171, 320 }; +#ifdef DFT_STEREO_SPAR_MIXING +const float max_smooth_gains1[SBA_DIRAC_STEREO_NUM_BANDS] = +{ + 0.98f, 0.97f, 0.95f, 0.9f, 0.9f, 0.9f, 0.9f, 0.9f, 0.9f, 0.9f, 0.9f, 0.9f +}; + +const float min_smooth_gains1[SBA_DIRAC_STEREO_NUM_BANDS] = +{ + 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f +}; + +const float max_smooth_gains2[SBA_DIRAC_STEREO_NUM_BANDS] = +{ + 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.9f, 0.9f, 0.9f}; + +const float min_smooth_gains2[SBA_DIRAC_STEREO_NUM_BANDS] = +{ + 0.5f, 0.5f, 0.5, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.3f, 0.3f, 0.3f +}; +#else const float max_smooth_gains[SBA_DIRAC_STEREO_NUM_BANDS] = { 0.98f, 0.97f, 0.95f, 0.9f, 0.9f }; - +#endif /*------------------------------------------------------------------------- * ECLVQ Stereo ROM tables diff --git a/lib_dec/ivas_rom_dec.h b/lib_dec/ivas_rom_dec.h index 00995b1ebc..0f40b07c2a 100644 --- a/lib_dec/ivas_rom_dec.h +++ b/lib_dec/ivas_rom_dec.h @@ -70,8 +70,15 @@ extern const float dft_win232ms_48k[450]; extern const float dft_win_8k[70]; extern const int16_t cna_init_bands[MAX_CNA_NBANDS + 1]; -extern const float max_smooth_gains[SBA_DIRAC_STEREO_NUM_BANDS]; +#ifdef DFT_STEREO_SPAR_MIXING +extern const float min_smooth_gains1[SBA_DIRAC_STEREO_NUM_BANDS]; +extern const float max_smooth_gains1[SBA_DIRAC_STEREO_NUM_BANDS]; +extern const float min_smooth_gains2[SBA_DIRAC_STEREO_NUM_BANDS]; +extern const float max_smooth_gains2[SBA_DIRAC_STEREO_NUM_BANDS]; +#else +extern const float max_smooth_gains[SBA_DIRAC_STEREO_NUM_BANDS]; +#endif /*----------------------------------------------------------------------------------* * ECLVQ Stereo ROM tables diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index d48664be32..005aea5555 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -444,7 +444,6 @@ ivas_error ivas_sba_dec_reinit( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -457,12 +456,6 @@ ivas_error ivas_sba_dec_reinit( { return error; } -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { @@ -509,9 +502,7 @@ ivas_error ivas_sba_dec_reinit( getRendAudioConfigFromIvasAudioConfig( st_ivas->hDecoderConfig->output_config ), st_ivas->hRenderConfig, t_ivas->hDecoderConfig->Opt_Headrotation, -#ifdef HRTF_BINARY_FILE st_ivas->hSetOfHRTF, -#endif st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; @@ -820,7 +811,6 @@ ivas_error ivas_sba_dec_reconfigure( #endif if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) { if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) @@ -833,13 +823,6 @@ ivas_error ivas_sba_dec_reconfigure( { return error; } -#else - /* open parametric binaural renderer */ - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif } #ifdef SBA_BR_SWITCHING } @@ -929,6 +912,10 @@ ivas_error ivas_sba_dec_reconfigure( sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); ivas_spar_config( hDecoderConfig->ivas_total_brate, sba_order_internal, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->hSpar->core_nominal_brate, st_ivas->sid_format ); +#ifdef DFT_STEREO_SPAR_MIXING + st_ivas->sba_dirac_stereo_flag = ( hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ); +#endif + if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, hDecoderConfig->ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_mode, IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_dec/ivas_sba_dirac_stereo_dec.c b/lib_dec/ivas_sba_dirac_stereo_dec.c old mode 100644 new mode 100755 index fc1c445d1e..bbd612b7ec --- a/lib_dec/ivas_sba_dirac_stereo_dec.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec.c @@ -91,6 +91,10 @@ static int16_t ivas_sba_dirac_stereo_band_config( int16_t *band_limits, /* o : DFT band limits */ const int32_t output_Fs, /* i : output sampling rate */ const int16_t NFFT /* i : analysis/synthesis window length */ +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t spar_flag /* i : SPAR or DirAC band grouping */ +#endif ) { int16_t i; @@ -98,6 +102,18 @@ static int16_t ivas_sba_dirac_stereo_band_config( int16_t nbands, num_cldfb_bands; nbands = SBA_DIRAC_STEREO_NUM_BANDS; + +#ifdef DFT_STEREO_SPAR_MIXING + if ( spar_flag ) + { + nbands = IVAS_MAX_NUM_BANDS; + } + else + { + nbands = 5; + } +#endif + num_cldfb_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); bins_per_cldfb_band = NFFT / ( 2 * num_cldfb_bands ); @@ -105,7 +121,23 @@ static int16_t ivas_sba_dirac_stereo_band_config( band_limits[0] = 1; for ( i = 1; i < nbands; i++ ) { +#ifdef DFT_STEREO_SPAR_MIXING + if ( spar_flag ) + { + band_limits[i] = DirAC_band_grouping_12[i] * bins_per_cldfb_band; + } + else + { + band_limits[i] = DirAC_band_grouping_5[i] * bins_per_cldfb_band; + } + if ( band_limits[i] >= NFFT / 2 ) + { + nbands = i; + break; + } +#else band_limits[i] = DirAC_band_grouping_5[i] * bins_per_cldfb_band; +#endif } band_limits[nbands] = NFFT / 2; @@ -159,32 +191,41 @@ static void map_params_dirac_to_stereo( float DFT[STEREO_DFT_BUF_MAX], /* i/o: DFT buffer */ const uint8_t b_wide_panning, /* i : flag indicating wider panning */ const int16_t L_frame /* i : core signal length */ - +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t mcmasa +#endif ) { - int16_t i, b, k, block; + int16_t i, b, k; int16_t k_offset; - int16_t nbands, nBlocks, block_len; + int16_t nbands, nBlocks; + int16_t block; + int16_t block_len; int16_t azimuth[MAX_PARAM_SPATIAL_SUBFRAMES][SBA_DIRAC_STEREO_NUM_BANDS]; int16_t elevation[MAX_PARAM_SPATIAL_SUBFRAMES][SBA_DIRAC_STEREO_NUM_BANDS]; float diffuseness[SBA_DIRAC_STEREO_NUM_BANDS]; + float block_nrg[MAX_PARAM_SPATIAL_SUBFRAMES]; + float nrg_norm1, nrg_norm2; + float *pSynth; float surrCoh[SBA_DIRAC_STEREO_NUM_BANDS]; + float *pDFT; float subframe_band_nrg[NB_DIV][SBA_DIRAC_STEREO_NUM_BANDS]; float smooth_long_avg[NB_DIV][SBA_DIRAC_STEREO_NUM_BANDS]; float smooth_short_avg[NB_DIV][SBA_DIRAC_STEREO_NUM_BANDS]; - float block_nrg[MAX_PARAM_SPATIAL_SUBFRAMES]; - float nrg_norm1, nrg_norm2; + float *side_gain, *res_pred_gain; - float *pSynth, *pDFT; IVAS_QDIRECTION *q_direction; - nBlocks = MAX_PARAM_SPATIAL_SUBFRAMES; +#ifdef DFT_STEREO_SPAR_MIXING + nbands = hStereoDft->nbands; +#else nbands = SBA_DIRAC_STEREO_NUM_BANDS; +#endif k_offset = STEREO_DFT_OFFSET; side_gain = hStereoDft->side_gain + k_offset * STEREO_DFT_BAND_MAX; res_pred_gain = hStereoDft->res_pred_gain + k_offset * STEREO_DFT_BAND_MAX; - q_direction = &( hQMetaData->q_direction[0] ); /* gain smoothing factor */ @@ -233,99 +274,109 @@ static void map_params_dirac_to_stereo( } /* apply upper bounds depending on band */ +#ifdef DFT_STEREO_SPAR_MIXING + hStereoDft->smooth_fac[0][b] = max( hStereoDft->min_smooth_gains[b], min( hStereoDft->max_smooth_gains[b], hStereoDft->smooth_fac[0][b] ) ); + hStereoDft->smooth_fac[1][b] = max( hStereoDft->min_smooth_gains[b], min( hStereoDft->max_smooth_gains[b], hStereoDft->smooth_fac[1][b] ) ); +#else hStereoDft->smooth_fac[0][b] = min( max_smooth_gains[b], hStereoDft->smooth_fac[0][b] ); hStereoDft->smooth_fac[1][b] = min( max_smooth_gains[b], hStereoDft->smooth_fac[1][b] ); +#endif } pDFT += STEREO_DFT32MS_N_MAX; } - /* calculate block energies for side gain weighting (combine angles of 2 DirAC blocks to side gain for 1 DFT Stereo subframe; 4 blocks and 2 subframes overall) */ - pSynth = synth; - block_len = L_frame / nBlocks; - for ( block = 0; block < nBlocks; block++ ) - { - block_nrg[block] = 0.f; - for ( i = 0; i < block_len; i++ ) - { - block_nrg[block] += pSynth[i] * pSynth[i]; - } - block_nrg[block] = sqrtf( block_nrg[block] ); - pSynth += block_len; - } - nrg_norm1 = 1 / ( block_nrg[0] + block_nrg[1] + EPSILON ); - nrg_norm2 = 1 / ( block_nrg[2] + block_nrg[3] + EPSILON ); - - /* extract DirAC parameters from metadata */ - for ( b = 0; b < nbands; b++ ) +#ifdef DFT_STEREO_SPAR_MIXING + if ( mcmasa ) +#endif { - diffuseness[b] = 1.0f - q_direction->band_data[b].energy_ratio[0]; - if ( hQMetaData->surcoh_band_data != NULL ) - { - surrCoh[b] = hQMetaData->surcoh_band_data[b].surround_coherence[0] / 255.0f; - } - else - { - surrCoh[b] = 0.0f; - } - + /* calculate block energies for side gain weighting (combine angles of 2 DirAC blocks to side gain for 1 DFT Stereo subframe; 4 blocks and 2 subframes overall) */ + pSynth = synth; + block_len = L_frame / nBlocks; for ( block = 0; block < nBlocks; block++ ) { - int16_t block_metadata; - - if ( hQMetaData->useLowerRes ) - { - block_metadata = 0; - } - else - { - block_metadata = block; - } - if ( q_direction->band_data[b].azimuth[block_metadata] < 0.f ) + block_nrg[block] = 0.f; + for ( i = 0; i < block_len; i++ ) { - q_direction->band_data[b].azimuth[block_metadata] += 360.f; + block_nrg[block] += pSynth[i] * pSynth[i]; } - azimuth[block][b] = (int16_t) q_direction->band_data[b].azimuth[block_metadata]; - elevation[block][b] = (int16_t) q_direction->band_data[b].elevation[block_metadata]; + block_nrg[block] = sqrtf( block_nrg[block] ); + pSynth += block_len; } - } + nrg_norm1 = 1 / ( block_nrg[0] + block_nrg[1] + EPSILON ); + nrg_norm2 = 1 / ( block_nrg[2] + block_nrg[3] + EPSILON ); - /* map angles (azi, ele), surround coherence, and diffuseness to DFT Stereo side and prediction gains */ - for ( b = 0; b < hStereoDft->nbands; b++ ) - { - /* combine angles of first 2 blocks to side gain of first subframe */ - side_gain[b] = 0.f; - for ( block = 0; block < nBlocks / 2; block++ ) + /* extract DirAC parameters from metadata */ + for ( b = 0; b < nbands; b++ ) { - if ( b_wide_panning == 1 ) + diffuseness[b] = 1.0f - q_direction->band_data[b].energy_ratio[0]; + if ( hQMetaData->surcoh_band_data != NULL ) { - /* panning between left and ride, saturate at the stereo ls positions (+/- 30deg azi) */ - side_gain[b] += nrg_norm1 * block_nrg[block] * get_panning( azimuth[block][b], elevation[block][b] ); + surrCoh[b] = hQMetaData->surcoh_band_data[b].surround_coherence[0] / 255.0f; } else { - side_gain[b] += nrg_norm1 * block_nrg[block] * sinf( azimuth[block][b] * EVS_PI / 180 ) * cosf( elevation[block][b] * EVS_PI / 180 ); + surrCoh[b] = 0.0f; + } + + for ( block = 0; block < nBlocks; block++ ) + { + int16_t block_metadata; + + if ( hQMetaData->useLowerRes ) + { + block_metadata = 0; + } + else + { + block_metadata = block; + } + if ( q_direction->band_data[b].azimuth[block_metadata] < 0.f ) + { + q_direction->band_data[b].azimuth[block_metadata] += 360.f; + } + azimuth[block][b] = (int16_t) q_direction->band_data[b].azimuth[block_metadata]; + elevation[block][b] = (int16_t) q_direction->band_data[b].elevation[block_metadata]; } } - /* combine angles of last 2 blocks to side gain of second subframe */ - side_gain[b + STEREO_DFT_BAND_MAX] = 0.f; - for ( block = nBlocks / 2; block < nBlocks; block++ ) + /* map angles (azi, ele), surround coherence, and diffuseness to DFT Stereo side and prediction gains */ + for ( b = 0; b < hStereoDft->nbands; b++ ) { - if ( b_wide_panning == 1 ) + /* combine angles of first 2 blocks to side gain of first subframe */ + side_gain[b] = 0.f; + for ( block = 0; block < nBlocks / 2; block++ ) { - /* panning between left and ride, saturate at the stereo ls positions (+/- 30deg azi) */ - side_gain[b + STEREO_DFT_BAND_MAX] += nrg_norm2 * block_nrg[block] * get_panning( azimuth[block][b], elevation[block][b] ); + if ( b_wide_panning == 1 ) + { + /* panning between left and ride, saturate at the stereo ls positions (+/- 30deg azi) */ + side_gain[b] += nrg_norm1 * block_nrg[block] * get_panning( azimuth[block][b], elevation[block][b] ); + } + else + { + side_gain[b] += nrg_norm1 * block_nrg[block] * sinf( azimuth[block][b] * EVS_PI / 180 ) * cosf( elevation[block][b] * EVS_PI / 180 ); + } } - else + + /* combine angles of last 2 blocks to side gain of second subframe */ + side_gain[b + STEREO_DFT_BAND_MAX] = 0.f; + for ( block = nBlocks / 2; block < nBlocks; block++ ) { - side_gain[b + STEREO_DFT_BAND_MAX] += nrg_norm2 * block_nrg[block] * sinf( azimuth[block][b] * EVS_PI / 180 ) * cosf( elevation[block][b] * EVS_PI / 180 ); + if ( b_wide_panning == 1 ) + { + /* panning between left and ride, saturate at the stereo ls positions (+/- 30deg azi) */ + side_gain[b + STEREO_DFT_BAND_MAX] += nrg_norm2 * block_nrg[block] * get_panning( azimuth[block][b], elevation[block][b] ); + } + else + { + side_gain[b + STEREO_DFT_BAND_MAX] += nrg_norm2 * block_nrg[block] * sinf( azimuth[block][b] * EVS_PI / 180 ) * cosf( elevation[block][b] * EVS_PI / 180 ); + } } - } - side_gain[b] *= sqrtf( 1.f - diffuseness[b] ); - side_gain[b + STEREO_DFT_BAND_MAX] *= sqrtf( 1.f - diffuseness[b] ); - res_pred_gain[b] = diffuseness[b] * ( 1.0f - surrCoh[b] ); - res_pred_gain[b + STEREO_DFT_BAND_MAX] = diffuseness[b] * ( 1.0f - surrCoh[b] ); + side_gain[b] *= sqrtf( 1.f - diffuseness[b] ); + side_gain[b + STEREO_DFT_BAND_MAX] *= sqrtf( 1.f - diffuseness[b] ); + res_pred_gain[b] = diffuseness[b] * ( 1.0f - surrCoh[b] ); + res_pred_gain[b + STEREO_DFT_BAND_MAX] = diffuseness[b] * ( 1.0f - surrCoh[b] ); + } } hStereoDft->frame_nodata = 0; @@ -424,22 +475,66 @@ static void ivas_sba_dirac_stereo_upmix_hb( float hb_synth[L_FRAME48k], /* i : HB signal */ float hb_gain[NB_DIV], /* i : side gains for HB signal */ const int16_t output_frame /* i : output frame length per channel */ +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t mcmasa, + const STEREO_DFT_DEC_DATA_HANDLE hStereoDft /* i : Stereo DFT handle for mixing matrix */ +#endif ) { int16_t i; - for ( i = 0; i < output_frame / 2; i++ ) +#ifdef DFT_STEREO_SPAR_MIXING + if ( !mcmasa ) { - hb_stereo_synth[0][i] = 0.5f * hb_synth[i] + 0.5f * hb_gain[0] * hb_synth[i]; - hb_stereo_synth[1][i] = 0.5f * hb_synth[i] - 0.5f * hb_gain[0] * hb_synth[i]; + for ( i = 0; i < output_frame / 2; i++ ) + { + float gp = hStereoDft->mixer_mat_smooth[0][0][8] + hStereoDft->mixer_mat_smooth[1][0][8] + + hStereoDft->mixer_mat_smooth[0][0][9] + hStereoDft->mixer_mat_smooth[1][0][9] + + hStereoDft->mixer_mat_smooth[0][0][10] + hStereoDft->mixer_mat_smooth[1][0][10] + + hStereoDft->mixer_mat_smooth[0][0][11] + hStereoDft->mixer_mat_smooth[1][0][11]; + + float gm = hStereoDft->mixer_mat_smooth[0][0][8] - hStereoDft->mixer_mat_smooth[1][0][8] + + hStereoDft->mixer_mat_smooth[0][0][9] - hStereoDft->mixer_mat_smooth[1][0][9] + + hStereoDft->mixer_mat_smooth[0][0][10] - hStereoDft->mixer_mat_smooth[1][0][10] + + hStereoDft->mixer_mat_smooth[0][0][11] - hStereoDft->mixer_mat_smooth[1][0][11]; + + hb_stereo_synth[0][i] = 0.5f * hb_synth[i] * 0.25f * gp; + hb_stereo_synth[1][i] = 0.5f * hb_synth[i] * 0.25f * gm; + } + for ( i = output_frame / 2; i < output_frame; i++ ) + { + float gp = hStereoDft->mixer_mat_smooth[0][0][8 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][0][8 + IVAS_MAX_NUM_BANDS] + + hStereoDft->mixer_mat_smooth[0][0][9 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][0][9 + IVAS_MAX_NUM_BANDS] + + hStereoDft->mixer_mat_smooth[0][0][10 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][0][10 + IVAS_MAX_NUM_BANDS] + + hStereoDft->mixer_mat_smooth[0][0][11 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][0][11 + IVAS_MAX_NUM_BANDS]; + + float gm = hStereoDft->mixer_mat_smooth[0][0][8 + IVAS_MAX_NUM_BANDS] - hStereoDft->mixer_mat_smooth[1][0][8 + IVAS_MAX_NUM_BANDS] + + hStereoDft->mixer_mat_smooth[0][0][9 + IVAS_MAX_NUM_BANDS] - hStereoDft->mixer_mat_smooth[1][0][9 + IVAS_MAX_NUM_BANDS] + + hStereoDft->mixer_mat_smooth[0][0][10 + IVAS_MAX_NUM_BANDS] - hStereoDft->mixer_mat_smooth[1][0][10 + IVAS_MAX_NUM_BANDS] + + hStereoDft->mixer_mat_smooth[0][0][11 + IVAS_MAX_NUM_BANDS] - hStereoDft->mixer_mat_smooth[1][0][11 + IVAS_MAX_NUM_BANDS]; + + hb_stereo_synth[0][i] = 0.5f * hb_synth[i] * 0.25f * gp; + hb_stereo_synth[1][i] = 0.5f * hb_synth[i] * 0.25f * gm; + } } - - for ( i = output_frame / 2; i < output_frame; i++ ) + else +#endif { - hb_stereo_synth[0][i] = 0.5f * hb_synth[i] + 0.5f * hb_gain[1] * hb_synth[i]; - hb_stereo_synth[1][i] = 0.5f * hb_synth[i] - 0.5f * hb_gain[1] * hb_synth[i]; + for ( i = 0; i < output_frame / 2; i++ ) + { + hb_stereo_synth[0][i] = 0.5f * hb_synth[i] + 0.5f * hb_gain[0] * hb_synth[i]; + hb_stereo_synth[1][i] = 0.5f * hb_synth[i] - 0.5f * hb_gain[0] * hb_synth[i]; + } + + for ( i = output_frame / 2; i < output_frame; i++ ) + { + hb_stereo_synth[0][i] = 0.5f * hb_synth[i] + 0.5f * hb_gain[1] * hb_synth[i]; + hb_stereo_synth[1][i] = 0.5f * hb_synth[i] - 0.5f * hb_gain[1] * hb_synth[i]; + } } + return; } @@ -454,6 +549,10 @@ static void ivas_sba_dirac_stereo_apply_td_stefi( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: decoder DFT stereo handle */ float output[CPE_CHANNELS][L_FRAME48k], /* i/o: output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t spar_flag +#endif ) { int16_t i; @@ -462,7 +561,71 @@ static void ivas_sba_dirac_stereo_apply_td_stefi( float tmp; const float *win_dft; - if ( max( hStereoDft->td_gain[0], hStereoDft->td_gain[1] ) > 0 ) +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + + static FILE *f_stefi = 0; + + if ( f_stefi == 0 ) + { + f_stefi = fopen( "stefi.txt", "w" ); + } + +#endif + +#ifdef DFT_STEREO_SPAR_MIXING + if ( spar_flag ) + { + win_dft = hStereoDft->win32ms; + dftOvlLen = hStereoDft->dft32ms_ovl; + + float g_W_1, g_Y_1; + float g_W_2, g_Y_2; + float g_L, g_R; + float stefi_L, stefi_R; + + g_W_1 = ( hStereoDft->mixer_mat_smooth[0][1][8] + hStereoDft->mixer_mat_smooth[0][2][8] + hStereoDft->mixer_mat_smooth[0][3][8] ) + ( hStereoDft->mixer_mat_smooth[0][1][9] + hStereoDft->mixer_mat_smooth[0][2][9] + hStereoDft->mixer_mat_smooth[0][3][9] ) + ( hStereoDft->mixer_mat_smooth[0][1][10] + hStereoDft->mixer_mat_smooth[0][2][10] + hStereoDft->mixer_mat_smooth[0][3][10] ); + + g_Y_1 = ( hStereoDft->mixer_mat_smooth[1][1][8] + hStereoDft->mixer_mat_smooth[1][2][8] + hStereoDft->mixer_mat_smooth[1][3][8] ) + ( hStereoDft->mixer_mat_smooth[1][1][9] + hStereoDft->mixer_mat_smooth[1][2][9] + hStereoDft->mixer_mat_smooth[1][3][9] ) + ( hStereoDft->mixer_mat_smooth[1][1][10] + hStereoDft->mixer_mat_smooth[1][2][10] + hStereoDft->mixer_mat_smooth[1][3][10] ); + + g_W_2 = ( hStereoDft->mixer_mat_smooth[0][1][8 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][2][8 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][3][8 + IVAS_MAX_NUM_BANDS] ) + ( hStereoDft->mixer_mat_smooth[0][1][9 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][2][9 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][3][9 + IVAS_MAX_NUM_BANDS] ) + ( hStereoDft->mixer_mat_smooth[0][1][10 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][2][10 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][3][10 + IVAS_MAX_NUM_BANDS] ); + + g_Y_2 = ( hStereoDft->mixer_mat_smooth[1][1][8 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][2][8 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][3][8 + IVAS_MAX_NUM_BANDS] ) + ( hStereoDft->mixer_mat_smooth[1][1][9 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][2][9 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][3][9 + IVAS_MAX_NUM_BANDS] ) + ( hStereoDft->mixer_mat_smooth[1][1][10 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][2][10 + IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][3][10 + IVAS_MAX_NUM_BANDS] ); + + g_L = 0.16f * ( g_W_1 + g_W_2 - g_Y_1 - g_Y_2 ); + g_R = 0.16f * ( g_W_1 + g_W_2 + g_Y_1 + g_Y_2 ); + + for ( i = 0; i < dftOvlLen; i++ ) + { + win_in = win_dft[STEREO_DFT32MS_STEP * i] * win_dft[STEREO_DFT32MS_STEP * i]; + win_out = 1 - win_in; + + stefi_L = ( win_out * hStereoDft->g_L_prev + win_in * g_L ) * 0.5f * hStereoDft->hb_stefi_sig[i]; + stefi_R = ( win_out * hStereoDft->g_R_prev + win_in * g_R ) * 0.5f * hStereoDft->hb_stefi_sig[i]; + + output[0][i] += stefi_L; + output[1][i] += stefi_R; +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + fprintf( f_stefi, "%f %f\n", stefi_L, stefi_R ); +#endif + } + for ( i = dftOvlLen; i < output_frame; i++ ) + { + + stefi_L = g_L * 0.5f * hStereoDft->hb_stefi_sig[i]; + stefi_R = g_R * 0.5f * hStereoDft->hb_stefi_sig[i]; + + output[0][i] += stefi_L; + output[1][i] += stefi_R; +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + fprintf( f_stefi, "%f %f\n", stefi_L, stefi_R ); +#endif + } + hStereoDft->g_L_prev = g_L; + hStereoDft->g_R_prev = g_R; + } + else +#endif + if ( max( hStereoDft->td_gain[0], hStereoDft->td_gain[1] ) > 0 ) { win_dft = hStereoDft->win32ms; dftOvlLen = hStereoDft->dft32ms_ovl; @@ -475,12 +638,18 @@ static void ivas_sba_dirac_stereo_apply_td_stefi( output[0][i] += tmp; output[1][i] -= tmp; +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + fprintf( f_stefi, "%f %f\n", +tmp, -tmp ); +#endif } for ( i = dftOvlLen; i < output_frame; i++ ) { tmp = hStereoDft->td_gain[0] * 0.5f * hStereoDft->hb_stefi_sig[i]; output[0][i] += tmp; output[1][i] -= tmp; +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + fprintf( f_stefi, "%f %f\n", +tmp, -tmp ); +#endif } } @@ -496,35 +665,168 @@ static void ivas_sba_dirac_stereo_apply_td_stefi( void ivas_sba_dirac_stereo_smooth_parameters( STEREO_DFT_DEC_DATA_HANDLE hStereoDft /* i/o: decoder DFT stereo handle */ +#ifdef DFT_STEREO_SPAR_MIXING + , + ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ + int16_t cross_fade_start_offset, /* i: SPAR mixer delay compensation */ + int32_t output_Fs /* i: Fs for delay calculation */ +#endif ) { - int16_t k_offset, b; + +#ifdef DFT_STEREO_SPAR_MIXING + int16_t i, j, k, i_sf; +#endif + + int16_t b; + int16_t k_offset; float *side_gain, *prev_side_gain; float *res_pred_gain, *prev_res_pred_gain; k_offset = STEREO_DFT_OFFSET; - prev_side_gain = hStereoDft->side_gain; side_gain = hStereoDft->side_gain + k_offset * STEREO_DFT_BAND_MAX; prev_res_pred_gain = hStereoDft->res_pred_gain; res_pred_gain = hStereoDft->res_pred_gain + k_offset * STEREO_DFT_BAND_MAX; - /* Smoothing of side and prediction gains between ftrames */ - for ( b = hStereoDft->res_pred_band_min; b < hStereoDft->nbands; b++ ) +#ifdef DFT_STEREO_SPAR_MIXING + if ( !hMdDec ) +#endif { - if ( hStereoDft->attackPresent ) + /* Smoothing of side and prediction gains between ftrames */ + for ( b = hStereoDft->res_pred_band_min; b < hStereoDft->nbands; b++ ) { - res_pred_gain[b] *= 0.8f; - res_pred_gain[b + STEREO_DFT_BAND_MAX] *= 0.8f; + if ( hStereoDft->attackPresent ) + { + res_pred_gain[b] *= 0.8f; + res_pred_gain[b + STEREO_DFT_BAND_MAX] *= 0.8f; + } + else + { + side_gain[b] = hStereoDft->smooth_fac[0][b] * prev_side_gain[b] + ( 1.f - hStereoDft->smooth_fac[0][b] ) * side_gain[b]; + side_gain[b + STEREO_DFT_BAND_MAX] = hStereoDft->smooth_fac[1][b] * side_gain[b] + ( 1.f - hStereoDft->smooth_fac[1][b] ) * side_gain[b + STEREO_DFT_BAND_MAX]; + res_pred_gain[b] = hStereoDft->smooth_fac[0][b] * prev_res_pred_gain[b] + ( 1.f - hStereoDft->smooth_fac[0][b] ) * res_pred_gain[b]; + res_pred_gain[b + STEREO_DFT_BAND_MAX] = hStereoDft->smooth_fac[1][b] * res_pred_gain[b] + ( 1.f - hStereoDft->smooth_fac[1][b] ) * res_pred_gain[b + STEREO_DFT_BAND_MAX]; + } } - else + } + +#ifdef DFT_STEREO_SPAR_MIXING + if ( hMdDec != 0 ) + { + float xfade_start_ns; + int16_t xfade_delay_subframes; + int16_t i_hist; + +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + static FILE *f_smoothing = 0; + if ( f_smoothing == 0 ) { - side_gain[b] = hStereoDft->smooth_fac[0][b] * prev_side_gain[b] + ( 1.f - hStereoDft->smooth_fac[0][b] ) * side_gain[b]; - side_gain[b + STEREO_DFT_BAND_MAX] = hStereoDft->smooth_fac[1][b] * side_gain[b] + ( 1.f - hStereoDft->smooth_fac[1][b] ) * side_gain[b + STEREO_DFT_BAND_MAX]; - res_pred_gain[b] = hStereoDft->smooth_fac[0][b] * prev_res_pred_gain[b] + ( 1.f - hStereoDft->smooth_fac[0][b] ) * res_pred_gain[b]; - res_pred_gain[b + STEREO_DFT_BAND_MAX] = hStereoDft->smooth_fac[1][b] * res_pred_gain[b] + ( 1.f - hStereoDft->smooth_fac[1][b] ) * res_pred_gain[b + STEREO_DFT_BAND_MAX]; + f_smoothing = fopen( "stereo_param_smoothing.txt", "w" ); } - } +#endif + + xfade_start_ns = cross_fade_start_offset / (float) output_Fs * 1000000000.f - IVAS_FB_ENC_DELAY_NS; + xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); + + i_hist = 4 - xfade_delay_subframes; + + for ( k = 0; k < 2; k++ ) + { + for ( i_sf = k * 2; i_sf < ( k + 1 ) * 2; i_sf++ ) + { + if ( hStereoDft->first_frame ) + { + for ( i = 0; i < 2; i++ ) + { + for ( j = 0; j < 4; j++ ) + { + for ( b = 0; b < hStereoDft->nbands; b++ ) + { + hStereoDft->mixer_mat_smooth[i][j][b + k * IVAS_MAX_NUM_BANDS] = hMdDec->mixer_mat[i][j][b]; + } + for ( ; b < IVAS_MAX_NUM_BANDS; b++ ) + { + hStereoDft->mixer_mat_smooth[i][j][b + k * IVAS_MAX_NUM_BANDS] = 0.f; + } + } + } + } + else + { + for ( i = 0; i < 2; i++ ) + { + for ( j = 0; j < 4; j++ ) + { + for ( b = 0; b < hStereoDft->nbands; b++ ) + { + float beta = hStereoDft->smooth_fac[k][b]; + hStereoDft->mixer_mat_smooth[i][j][b + k * IVAS_MAX_NUM_BANDS] = + beta * hStereoDft->mixer_mat_smooth[i][j][b + k * IVAS_MAX_NUM_BANDS] + ( 1 - beta ) * hMdDec->mixer_mat_prev[i_hist][i][j][b]; + +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + if ( i == 0 && j == 0 ) + { + fprintf( f_smoothing, "%d %f\n", b, beta ); + } +#endif + } + } + } + } // first_frame + + mvr2r( hMdDec->mixer_mat_prev[1][0][0], hMdDec->mixer_mat_prev[0][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hMdDec->mixer_mat_prev[2][0][0], hMdDec->mixer_mat_prev[1][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hMdDec->mixer_mat_prev[3][0][0], hMdDec->mixer_mat_prev[2][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hMdDec->mixer_mat_prev[4][0][0], hMdDec->mixer_mat_prev[3][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + + for ( i = 0; i < 2; i++ ) + { + for ( j = 0; j < 4; j++ ) + { + for ( b = 0; b < hStereoDft->nbands; b++ ) + { + hMdDec->mixer_mat_prev[4][i][j][b] = hMdDec->mixer_mat[i][j][b + i_sf * IVAS_MAX_NUM_BANDS]; + } + } + } + } // i_sf + } // k ( DFT block ) + hStereoDft->first_frame = 0; + +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + { + static FILE *f_mat = 0; + + if ( f_mat == 0 ) + f_mat = fopen( "mixer_mat_stereo_smooth", "w" ); + + for ( i = 0; i < 2; i++ ) + { + for ( j = 0; j < 4; j++ ) + { + for ( b = 0; b < 12; b++ ) + { + fprintf( f_mat, "%f\n", hStereoDft->mixer_mat_smooth[i][j][b] ); + } + } + } + + for ( i = 0; i < 2; i++ ) + { + for ( j = 0; j < 4; j++ ) + { + for ( b = 0; b < 12; b++ ) + { + fprintf( f_mat, "%f\n", hStereoDft->mixer_mat_smooth[i][j][b + IVAS_MAX_NUM_BANDS] ); + } + } + } + } // debug output +#endif + + } // hMdDec != 0 +#endif return; } @@ -540,6 +842,10 @@ void ivas_sba_dirac_stereo_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float output[CPE_CHANNELS][L_FRAME48k], /* i/o: output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t mcmasa +#endif ) { int16_t dtx_flag, fd_cng_flag; @@ -556,30 +862,86 @@ void ivas_sba_dirac_stereo_dec( hSCE = st_ivas->hSCE[0]; hCPE = st_ivas->hCPE[0]; hStereoDft = hCPE->hStereoDft; - dtx_flag = ( hSCE->hCoreCoder[0]->core_brate <= SID_2k40 ); - fd_cng_flag = ( dtx_flag && hSCE->hCoreCoder[0]->cng_type == FD_CNG ); +#ifdef DFT_STEREO_SPAR_MIXING + if ( st_ivas->nchan_transport > 1 && !mcmasa ) + { + dtx_flag = 0; + fd_cng_flag = 0; + } + else +#endif + { + dtx_flag = ( hSCE->hCoreCoder[0]->core_brate <= SID_2k40 ); + fd_cng_flag = ( dtx_flag && hSCE->hCoreCoder[0]->cng_type == FD_CNG ); + } + memOffset = NS2SA( output_frame * FRAMES_PER_SEC, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ); ivas_sba_dirac_stereo_config( hStereoDft->hConfig ); - hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( hStereoDft->band_limits, st_ivas->hDecoderConfig->output_Fs, hStereoDft->NFFT ); + hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( + hStereoDft->band_limits, + st_ivas->hDecoderConfig->output_Fs, + hStereoDft->NFFT +#ifdef DFT_STEREO_SPAR_MIXING + , + ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) +#endif + ); stereo_dft_dec_update( hStereoDft, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/ ); +#ifdef DFT_STEREO_SPAR_MIXING + if ( st_ivas->nchan_transport > 1 ) + { + stereo_dft_dec_analyze( hCPE, output[0], DFT, 0, output_frame, output_frame, DFT_STEREO_DEC_ANA_FB, 0, 0 ); + stereo_dft_dec_analyze( hCPE, output[1], DFT, 1, output_frame, output_frame, DFT_STEREO_DEC_ANA_FB, 0, 0 ); + hStereoDft->core_hist[0] = hCPE->hCoreCoder[0]->core; + } + else +#endif + { + /* nrg calculation for TD Stereo Filling, as done in ICBWE which is not used in this case */ + ivas_sba_dirac_stereo_compute_td_stefi_nrgs( hStereoDft, hSCE->save_hb_synth, hSCE->hCoreCoder[0]->core, output_frame, fd_cng_flag ); - /* nrg calculation for TD Stereo Filling, as done in ICBWE which is not used in this case */ - ivas_sba_dirac_stereo_compute_td_stefi_nrgs( hStereoDft, hSCE->save_hb_synth, hSCE->hCoreCoder[0]->core, output_frame, fd_cng_flag ); - - /* do DFT Stereo core switching (including DFT analysis) here as CPE element was not available in SCE decoder */ - mvr2r( hSCE->save_synth, tmp_synth, hSCE->hCoreCoder[0]->L_frame ); - stereo_dft_dec_core_switching( hCPE, output[0] /*hSCE->save_output*/, hSCE->save_synth, hSCE->save_hb_synth, DFT, output_frame, 0, dtx_flag ); + /* do DFT Stereo core switching (including DFT analysis) here as CPE element was not available in SCE decoder */ + mvr2r( hSCE->save_synth, tmp_synth, hSCE->hCoreCoder[0]->L_frame ); + stereo_dft_dec_core_switching( hCPE, output[0] /*hSCE->save_output*/, hSCE->save_synth, hSCE->save_hb_synth, DFT, output_frame, 0, dtx_flag ); - /* do updates here after skipping this in SCE decoder (needs to be done after core switching) */ - updt_dec_common( hSCE->hCoreCoder[0], NORMAL_HQ_CORE, -1, hSCE->save_synth ); + /* do updates here after skipping this in SCE decoder (needs to be done after core switching) */ + updt_dec_common( hSCE->hCoreCoder[0], NORMAL_HQ_CORE, -1, hSCE->save_synth ); + } /* mapping of DirAC parameters (azimuth, elevation, diffuseness) to DFT Stereo parameters (side gain, prediction gain) */ - map_params_dirac_to_stereo( hStereoDft, st_ivas->hQMetaData, tmp_synth, DFT[0], st_ivas->ivas_format == MC_FORMAT, hSCE->hCoreCoder[0]->L_frame ); + map_params_dirac_to_stereo( + hStereoDft, + st_ivas->hQMetaData, + tmp_synth, + DFT[0], + st_ivas->ivas_format == MC_FORMAT, +#ifdef DFT_STEREO_SPAR_MIXING + ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ) ? hSCE->hCoreCoder[0]->L_frame : output_frame, + ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ) +#else + hSCE->hCoreCoder[0]->L_frame +#endif + ); + +#ifdef DFT_STEREO_SPAR_MIXING + if ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) + { + set_f( hStereoDft->res_pred_gain, 1.f, 3 * STEREO_DFT_BAND_MAX ); + } +#endif /* DFT Stereo upmix */ - stereo_dft_dec( hStereoDft, hCPE->hCoreCoder[0], DFT, NULL, NULL, 1 /*st_ivas->sba_dirac_stereo_flag*/ ); + stereo_dft_dec( hStereoDft, hCPE->hCoreCoder[0], DFT, NULL, NULL, 1 /*st_ivas->sba_dirac_stereo_flag*/ +#ifdef DFT_STEREO_SPAR_MIXING + , + ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hMdDec : 0, + ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hFbMixer->cross_fade_start_offset : 0, + st_ivas->hDecoderConfig->output_Fs, + st_ivas->nchan_transport +#endif + ); /* DFT synthesis */ stereo_dft_dec_synthesize( hCPE, DFT, 0, output[0], output_frame ); @@ -592,23 +954,49 @@ void ivas_sba_dirac_stereo_dec( v_multc( output[1], 0.5f, output[1], output_frame ); /* delay HB synth */ - mvr2r( hSCE->save_hb_synth + output_frame - memOffset, tmp_buf, memOffset ); - mvr2r( hSCE->save_hb_synth, hSCE->save_hb_synth + memOffset, output_frame - memOffset ); - mvr2r( hSCE->prev_hb_synth, hSCE->save_hb_synth, memOffset ); - mvr2r( tmp_buf, hSCE->prev_hb_synth, memOffset ); +#ifdef DFT_STEREO_SPAR_MIXING + if ( st_ivas->nchan_transport == 1 ) +#endif + { + mvr2r( hSCE->save_hb_synth + output_frame - memOffset, tmp_buf, memOffset ); + mvr2r( hSCE->save_hb_synth, hSCE->save_hb_synth + memOffset, output_frame - memOffset ); + mvr2r( hSCE->prev_hb_synth, hSCE->save_hb_synth, memOffset ); + mvr2r( tmp_buf, hSCE->prev_hb_synth, memOffset ); + } if ( ( hCPE->hCoreCoder[0]->core == ACELP_CORE || hCPE->hCoreCoder[0]->last_core == ACELP_CORE ) && !fd_cng_flag ) { /* upmix ACELP BWE */ ivas_sba_dirac_stereo_compute_hb_gain( hStereoDft, hb_gain ); - ivas_sba_dirac_stereo_upmix_hb( hb_synth_stereo, hSCE->save_hb_synth, hb_gain, output_frame ); + +#ifdef DFT_STEREO_SPAR_MIXING + if ( st_ivas->nchan_transport == 1 ) +#endif + { + ivas_sba_dirac_stereo_upmix_hb( + hb_synth_stereo, + hSCE->save_hb_synth, + hb_gain, + output_frame +#ifdef DFT_STEREO_SPAR_MIXING + , + ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ), + hStereoDft +#endif + ); + } /* add HB to ACELP core */ v_add( output[0], hb_synth_stereo[0], output[0], output_frame ); v_add( output[1], hb_synth_stereo[1], output[1], output_frame ); /* apply TD Stereo Filling as is done in ICBWE */ - ivas_sba_dirac_stereo_apply_td_stefi( hStereoDft, output, output_frame ); + ivas_sba_dirac_stereo_apply_td_stefi( hStereoDft, output, output_frame +#ifdef DFT_STEREO_SPAR_MIXING + , + ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) +#endif + ); } return; diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index a9df2ff34b..cd14d7e132 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -631,7 +631,7 @@ void ivas_spar_md_dec_process( ivas_spar_dec_parse_md_bs( hMdDec, st0, &nB, &bw, &dtx_vad, st_ivas->hDecoderConfig->ivas_total_brate, ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, st_ivas->hQMetaData->sba_inactive_mode ); -#ifdef DEBUG_SBA_MD_DUMP +#if 0 { char f_name[100]; int16_t num_bands = nB; diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h old mode 100644 new mode 100755 index 59059fbcea..a8e1505498 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -230,6 +230,14 @@ typedef struct stereo_dft_dec_data_struct float smooth_buf[SBA_DIRAC_STEREO_NUM_BANDS][SBA_DIRAC_NRG_SMOOTH_LONG + 1]; float smooth_fac[NB_DIV][SBA_DIRAC_STEREO_NUM_BANDS]; +#ifdef DFT_STEREO_SPAR_MIXING + int16_t first_frame; + float mixer_mat_smooth[2][4][2 * IVAS_MAX_NUM_BANDS]; + float g_L_prev; + float g_R_prev; + const float *max_smooth_gains, *min_smooth_gains; +#endif + } STEREO_DFT_DEC_DATA, *STEREO_DFT_DEC_DATA_HANDLE; @@ -1280,7 +1288,6 @@ typedef struct ivas_binaural_rendering_conv_module_struct /* Fastconv binaural data structure */ -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_fastconv_struct { float FASTCONV_HRIR_latency_s; @@ -1305,9 +1312,7 @@ typedef struct ivas_hrtfs_fastconv_struct float fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX]; } HRTFS_FASTCONV, *HRTFS_FASTCONV_HANDLE; -#endif -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_parambin_struct { float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; @@ -1318,7 +1323,6 @@ typedef struct ivas_hrtfs_parambin_struct float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX]; } HRTFS_PARAMBIN, *HRTFS_PARAMBIN_HANDLE; -#endif typedef struct ivas_binaural_rendering_struct { @@ -1810,7 +1814,6 @@ typedef struct ivas_crend_state_t } CREND_DATA, *CREND_HANDLE; -#ifdef HRTF_BINARY_FILE /* htrfs from binary files. */ @@ -1840,7 +1843,6 @@ typedef struct ivas_hrtfs_file_header_t } ivas_hrtfs_file_header_t; -#endif /*----------------------------------------------------------------------------------* * LFE decoder structure @@ -1991,11 +1993,9 @@ typedef struct Decoder_Struct CREND_HANDLE hCrend; /* Convolution mixer renderer structure */ HRTFS_HANDLE hHrtf; /* HRTFs handle */ #endif -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF; /* Set of HRTFs handle (CRend) */ HRTFS_FASTCONV_HANDLE hHrtfFastConv; /* FASTCONV HRTF tables for binaural rendering */ HRTFS_PARAMBIN_HANDLE hHrtfParambin; /* HRTF tables for parametric binauralizer */ -#endif LSSETUP_CUSTOM_HANDLE hLsSetupCustom; /* Custom LS configuration handle */ float *hoa_dec_mtx; /* Pointer to decoder matrix for SBA */ HEAD_TRACK_DATA_HANDLE hHeadTrackData; /* Head tracking data structure */ diff --git a/lib_dec/ivas_stereo_dft_dec.c b/lib_dec/ivas_stereo_dft_dec.c old mode 100644 new mode 100755 index e2eab3f3b2..3be3c59428 --- a/lib_dec/ivas_stereo_dft_dec.c +++ b/lib_dec/ivas_stereo_dft_dec.c @@ -76,7 +76,12 @@ * Local function prototypes *-------------------------------------------------------------------------*/ -static void stereo_dft_dec_open( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, const int32_t output_Fs ); +static void stereo_dft_dec_open( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, const int32_t output_Fs +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t nchan_transport +#endif +); static void stereo_dft_compute_td_stefi_params( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, const float samp_ratio ); @@ -252,6 +257,10 @@ ivas_error stereo_dft_dec_create( const int32_t element_brate, /* i : element bitrate */ const int32_t output_Fs, /* i : output sampling rate */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t nchan_transport +#endif ) { STEREO_DFT_DEC_DATA_HANDLE hStereoDft_loc; @@ -293,7 +302,12 @@ ivas_error stereo_dft_dec_create( stereo_dft_config( hStereoDft_loc->hConfig, element_brate, &tmpS, &tmpS ); } - stereo_dft_dec_open( hStereoDft_loc, output_Fs ); + stereo_dft_dec_open( hStereoDft_loc, output_Fs +#ifdef DFT_STEREO_SPAR_MIXING + , + nchan_transport +#endif + ); *hStereoDft = hStereoDft_loc; @@ -310,6 +324,10 @@ ivas_error stereo_dft_dec_create( static void stereo_dft_dec_open( STEREO_DFT_DEC_DATA_HANDLE hStereoDft, /* i/o: decoder DFT stereo handle */ const int32_t output_Fs /* i : output sampling rate */ +#ifdef DFT_STEREO_SPAR_MIXING + , + const int16_t nchan_transport +#endif ) { @@ -365,6 +383,19 @@ static void stereo_dft_dec_open( hStereoDft->hb_stefi_delay = NS2SA( output_Fs, STEREO_DFT_TD_STEFI_DELAY_NS ); +#ifdef DFT_STEREO_SPAR_MIXING + if ( nchan_transport > 2 ) + { + hStereoDft->min_smooth_gains = min_smooth_gains2; + hStereoDft->max_smooth_gains = max_smooth_gains2; + } + else + { + hStereoDft->min_smooth_gains = min_smooth_gains1; + hStereoDft->max_smooth_gains = max_smooth_gains1; + } +#endif + /* reset DFT stereo memories */ stereo_dft_dec_reset( hStereoDft ); @@ -383,6 +414,9 @@ void stereo_dft_dec_reset( ) { int16_t i; +#ifdef DFT_STEREO_SPAR_MIXING + int16_t j, b; +#endif /*Configuration*/ set_s( hStereoDft->prm_res, hStereoDft->hConfig->prm_res, STEREO_DFT_DEC_DFT_NB ); @@ -490,6 +524,23 @@ void stereo_dft_dec_reset( hStereoDft->ipd_xfade_counter = 0; hStereoDft->ipd_xfade_prev = 0.0f; +#ifdef DFT_STEREO_SPAR_MIXING + for ( b = 0; b < hStereoDft->nbands; b++ ) + { + for ( i = 0; i < 2; i++ ) + { + for ( j = 0; j < 4; j++ ) + { + hStereoDft->mixer_mat_smooth[i][j][b] = 0.0f; + } + } + } + hStereoDft->first_frame = 1; + hStereoDft->g_L_prev = 0.f; + hStereoDft->g_R_prev = 0.f; +#endif + + return; } @@ -1097,6 +1148,13 @@ void stereo_dft_dec( float *input_mem, /* i/o: mem of buffer DFT analysis */ STEREO_CNG_DEC_HANDLE hStereoCng, /* i/o: Stereo CNG data structure */ const int16_t sba_dirac_stereo_flag /* i : signal stereo output for SBA DirAC */ +#ifdef DFT_STEREO_SPAR_MIXING + , + ivas_spar_md_dec_state_t *hMdDec, /* i: SPAR MD handle for upmixing */ + int16_t cross_fade_start_offset, /* i: SPAR mixer delay compensation */ + int32_t output_Fs, /* i: Fs for delay calculation */ + int16_t nchan_transport /* i: number of transpor channels */ +#endif ) { int16_t i, k, b, N_div, stop; @@ -1104,6 +1162,9 @@ void stereo_dft_dec( float DFT_R[STEREO_DFT32MS_N_MAX]; float DFT_PRED_RES[STEREO_DFT32MS_N_32k]; float *pDFT_DMX; +#ifdef DFT_STEREO_SPAR_MIXING + float *pDFT_DMX1; +#endif float *pDFT_RES; float g, tmp; float *pPredGain; @@ -1127,6 +1188,10 @@ void stereo_dft_dec( HANDLE_FD_CNG_COM hFdCngCom = hFdCngDec->hFdCngCom; int16_t *cna_seed = &( hFdCngCom->seed ); +#ifdef DFT_STEREO_SPAR_MIXING + float DFT_W, DFT_Y; +#endif + output_frame = (int16_t) ( st0->output_Fs / FRAMES_PER_SEC ); /*------------------------------------------------------------------* @@ -1168,7 +1233,14 @@ void stereo_dft_dec( /* Smoothing for the current frame */ if ( sba_dirac_stereo_flag ) { - ivas_sba_dirac_stereo_smooth_parameters( hStereoDft ); + ivas_sba_dirac_stereo_smooth_parameters( hStereoDft +#ifdef DFT_STEREO_SPAR_MIXING + , + hMdDec, + cross_fade_start_offset, + output_Fs +#endif + ); } else { @@ -1193,6 +1265,13 @@ void stereo_dft_dec( { pDFT_DMX = DFT[0] + k * STEREO_DFT32MS_N_MAX; pDFT_RES = DFT[1] + k * STEREO_DFT32MS_N_MAX; +#ifdef DFT_STEREO_SPAR_MIXING + pDFT_DMX1 = 0; + if ( nchan_transport > 1 ) + { + pDFT_DMX1 = DFT[1] + k * STEREO_DFT32MS_N_MAX; + } +#endif /*Apply Stereo*/ if ( hStereoDft->hConfig->dmx_active ) @@ -1236,7 +1315,14 @@ void stereo_dft_dec( hStereoDft->past_DMX_pos = ( hStereoDft->past_DMX_pos + STEREO_DFT_PAST_MAX - 1 ) % STEREO_DFT_PAST_MAX; } +#ifdef DFT_STEREO_SPAR_MIXING + if ( !( sba_dirac_stereo_flag && nchan_transport >= 2 ) ) + { + stereo_dft_generate_res_pred( hStereoDft, samp_ratio, pDFT_DMX, DFT_PRED_RES, pPredGain, k, DFT[1] + k * STEREO_DFT32MS_N_MAX, &stop, st0->bfi ); + } +#else stereo_dft_generate_res_pred( hStereoDft, samp_ratio, pDFT_DMX, DFT_PRED_RES, pPredGain, k, DFT[1] + k * STEREO_DFT32MS_N_MAX, &stop, st0->bfi ); +#endif if ( hStereoDft->res_cod_band_max > 0 ) { @@ -1308,7 +1394,11 @@ void stereo_dft_dec( #endif /* No residual coding in inactive frames, instead pDFT_RES is used for the second channel */ +#ifdef DFT_STEREO_SPAR_MIXING + if ( b >= hStereoDft->res_cod_band_max && !hStereoDft->frame_sid_nodata && !( sba_dirac_stereo_flag && hMdDec ) ) +#else if ( b >= hStereoDft->res_cod_band_max && !hStereoDft->frame_sid_nodata ) +#endif { /*filter non-coded frequencies. It removes some MDCT frequency aliasing*/ for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) @@ -1358,10 +1448,206 @@ void stereo_dft_dec( } } } +#ifdef DFT_STEREO_SPAR_MIXING + else if ( sba_dirac_stereo_flag && hMdDec ) + { +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + { + static FILE *f_dmx = 0, *f_res = 0, *f_dmx1 = 0; + + if ( f_dmx == 0 ) + { + f_dmx = fopen( "dft_dmx.txt", "w" ); + f_res = fopen( "dft_pred_res.txt", "w" ); + if ( nchan_transport >= 2 ) + { + f_dmx1 = fopen( "dft_dmx1.txt", "w" ); + } + } + + if ( b == 0 ) + { + i = 0; + fprintf( f_dmx, "%d %f %f\n", i, pDFT_DMX[2 * i], pDFT_DMX[2 * i + 1] ); + if ( nchan_transport >= 2 ) + { + fprintf( f_dmx1, "%d %f %f\n", i, pDFT_DMX1[2 * i], pDFT_DMX1[2 * i + 1] ); + } + fprintf( f_res, "%d %f %f\n", i, 0.0f, 0.0f ); + } + for ( i = hStereoDft->band_limits[b]; i < min( stop, hStereoDft->band_limits[b + 1] ); i++ ) + { + fprintf( f_dmx, "%d %f %f\n", i, pDFT_DMX[2 * i], pDFT_DMX[2 * i + 1] ); + if ( nchan_transport >= 2 ) + { + fprintf( f_dmx1, "%d %f %f\n", i, pDFT_DMX1[2 * i], pDFT_DMX1[2 * i + 1] ); + } + fprintf( f_res, "%d %f %f\n", i, DFT_PRED_RES[2 * i], DFT_PRED_RES[2 * i + 1] ); + } + for ( ; i < hStereoDft->band_limits[b + 1]; i++ ) + { + fprintf( f_dmx, "%d %f %f\n", i, pDFT_DMX[2 * i], pDFT_DMX[2 * i + 1] ); + if ( nchan_transport >= 2 ) + { + fprintf( f_dmx1, "%d %f %f\n", i, pDFT_DMX1[2 * i], pDFT_DMX1[2 * i + 1] ); + } + fprintf( f_res, "%d %f %f\n", i, 0.0f, 0.0f ); + } + } +#endif + + if ( nchan_transport == 1 ) + { + if ( b == 0 ) + { + i = 0; + + DFT_W = hStereoDft->mixer_mat_smooth[0][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i]; + + DFT_L[2 * i] = DFT_W + DFT_Y; + DFT_R[2 * i] = DFT_W - DFT_Y; + + DFT_W = hStereoDft->mixer_mat_smooth[0][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i + 1]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i + 1]; + + DFT_L[2 * i + 1] = DFT_W + DFT_Y; + DFT_R[2 * i + 1] = DFT_W - DFT_Y; + } + for ( i = hStereoDft->band_limits[b]; i < min( stop, hStereoDft->band_limits[b + 1] ); i++ ) + { + DFT_W = hStereoDft->mixer_mat_smooth[0][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i] + ( hStereoDft->mixer_mat_smooth[0][1][b + k * IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][2][b + k * IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][3][b + k * IVAS_MAX_NUM_BANDS] ) * DFT_PRED_RES[2 * i]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i] + ( hStereoDft->mixer_mat_smooth[1][1][b + k * IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][2][b + k * IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][3][b + k * IVAS_MAX_NUM_BANDS] ) * DFT_PRED_RES[2 * i]; + + DFT_L[2 * i] = DFT_W + DFT_Y; + DFT_R[2 * i] = DFT_W - DFT_Y; + + DFT_W = hStereoDft->mixer_mat_smooth[0][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i + 1] + ( hStereoDft->mixer_mat_smooth[0][1][b + k * IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][2][b + k * IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[0][3][b + k * IVAS_MAX_NUM_BANDS] ) * DFT_PRED_RES[2 * i + 1]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i + 1] + ( hStereoDft->mixer_mat_smooth[1][1][b + k * IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][2][b + k * IVAS_MAX_NUM_BANDS] + hStereoDft->mixer_mat_smooth[1][3][b + k * IVAS_MAX_NUM_BANDS] ) * DFT_PRED_RES[2 * i + 1]; + + DFT_L[2 * i + 1] = DFT_W + DFT_Y; + DFT_R[2 * i + 1] = DFT_W - DFT_Y; + } + for ( ; i < hStereoDft->band_limits[b + 1]; i++ ) + { + DFT_W = hStereoDft->mixer_mat_smooth[0][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i]; + + DFT_L[2 * i] = DFT_W + DFT_Y; + DFT_R[2 * i] = DFT_W - DFT_Y; + + DFT_W = hStereoDft->mixer_mat_smooth[0][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i + 1]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i + 1]; + + DFT_L[2 * i + 1] = DFT_W + DFT_Y; + DFT_R[2 * i + 1] = DFT_W - DFT_Y; + } + } + else if ( nchan_transport >= 2 ) + { + if ( b == 0 ) + { + i = 0; + + DFT_W = pDFT_DMX[2 * i]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i] + pDFT_DMX1[2 * i]; + + DFT_L[2 * i] = DFT_W + DFT_Y; + DFT_R[2 * i] = DFT_W - DFT_Y; + + DFT_W = pDFT_DMX[2 * i + 1]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i + 1] + pDFT_DMX1[2 * i + 1]; + + DFT_L[2 * i + 1] = DFT_W + DFT_Y; + DFT_R[2 * i + 1] = DFT_W - DFT_Y; + } + for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) + { + DFT_W = pDFT_DMX[2 * i]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i] + pDFT_DMX1[2 * i]; + + DFT_L[2 * i] = DFT_W + DFT_Y; + DFT_R[2 * i] = DFT_W - DFT_Y; + + DFT_W = pDFT_DMX[2 * i + 1]; + DFT_Y = hStereoDft->mixer_mat_smooth[1][0][b + k * IVAS_MAX_NUM_BANDS] * pDFT_DMX[2 * i + 1] + pDFT_DMX1[2 * i + 1]; + + DFT_L[2 * i + 1] = DFT_W + DFT_Y; + DFT_R[2 * i + 1] = DFT_W - DFT_Y; + } + } + else + { + assert( "nhcan_transport must be 1 or 1!" ); + } + +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + { + static FILE *f_L = 0, *f_R = 0; + + if ( f_L == 0 ) + { + f_L = fopen( "dft_L.txt", "w" ); + f_R = fopen( "dft_R.txt", "w" ); + } + + if ( b == 0 ) + { + i = 0; + fprintf( f_L, "%d %f %f\n", i, DFT_L[2 * i], DFT_L[2 * i + 1] ); + fprintf( f_R, "%d %f %f\n", i, DFT_L[2 * i], DFT_L[2 * i + 1] ); + } + for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) + { + fprintf( f_L, "%d %f %f\n", i, DFT_L[2 * i], DFT_L[2 * i + 1] ); + fprintf( f_R, "%d %f %f\n", i, DFT_L[2 * i], DFT_L[2 * i + 1] ); + } + } +#endif + } +#endif else { + +#ifdef DFT_STEREO_SPAR_MIXING_DEBUG + { + static FILE *f_dmx = 0, *f_res = 0, *f_dmx1 = 0; + + if ( f_dmx == 0 ) + { + f_dmx = fopen( "dft_dmx.txt", "w" ); + f_res = fopen( "dft_pred_res.txt", "w" ); + if ( nchan_transport == 2 ) + { + f_dmx1 = fopen( "dft_dmx1.txt", "w" ); + } + } + + if ( b == 0 ) + { + i = 0; + fprintf( f_dmx, "%d %f %f\n", i, pDFT_DMX[2 * i], pDFT_DMX[2 * i + 1] ); + fprintf( f_dmx1, "%d %f %f\n", i, pDFT_DMX1[2 * i], pDFT_DMX1[2 * i + 1] ); + fprintf( f_res, "%d %f %f\n", i, 0.0f, 0.0f ); + } + for ( i = hStereoDft->band_limits[b]; i < min( stop, hStereoDft->band_limits[b + 1] ); i++ ) + { + fprintf( f_dmx, "%d %f %f\n", i, pDFT_DMX[2 * i], pDFT_DMX[2 * i + 1] ); + fprintf( f_dmx1, "%d %f %f\n", i, pDFT_DMX1[2 * i], pDFT_DMX1[2 * i + 1] ); + fprintf( f_res, "%d %f %f\n", i, DFT_PRED_RES[2 * i], DFT_PRED_RES[2 * i + 1] ); + } + for ( ; i < hStereoDft->band_limits[b + 1]; i++ ) + { + fprintf( f_dmx, "%d %f %f\n", i, pDFT_DMX[2 * i], pDFT_DMX[2 * i + 1] ); + fprintf( f_dmx1, "%d %f %f\n", i, pDFT_DMX1[2 * i], pDFT_DMX1[2 * i + 1] ); + fprintf( f_res, "%d %f %f\n", i, 0.0f, 0.0f ); + } + } +#endif + for ( i = hStereoDft->band_limits[b]; i < min( stop, hStereoDft->band_limits[b + 1] ); i++ ) { + tmp = g * pDFT_DMX[2 * i] + pDFT_RES[2 * i] + DFT_PRED_RES[2 * i]; DFT_L[2 * i] = pDFT_DMX[2 * i] + tmp; diff --git a/lib_dec/ivas_stereo_switching_dec.c b/lib_dec/ivas_stereo_switching_dec.c index 44b47bc5cb..c8b373ce5c 100644 --- a/lib_dec/ivas_stereo_switching_dec.c +++ b/lib_dec/ivas_stereo_switching_dec.c @@ -421,7 +421,12 @@ ivas_error stereo_memory_dec( deallocate_CoreCoder( hCPE->hCoreCoder[1] ); /* allocate DFT stereo data structure */ - if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, 0 ) ) != IVAS_ERR_OK ) + if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, 0 +#ifdef DFT_STEREO_SPAR_MIXING + , + nchan_transport +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -1115,7 +1120,14 @@ void synchro_synthesis( delay_signal( output[0], output_frame, hCPE->hCoreCoder[0]->hTcxDec->FBTCXdelayBuf, delay_diff ); } +#ifdef DFT_STEREO_SPAR_MIXING + if ( hCPE->element_mode != IVAS_CPE_MDCT ) + { + ivas_post_proc( NULL, hCPE, 0, output[0], output, output_frame, sba_dirac_stereo_flag ); + } +#else ivas_post_proc( NULL, hCPE, 0, output[0], output, output_frame, sba_dirac_stereo_flag ); +#endif /* zero padding in order to synchronize the upmixed DFT stereo synthesis with the TD/MDCT stereo synthesis */ for ( n = 0; n < hCPE->nchan_out; n++ ) @@ -1182,7 +1194,10 @@ void synchro_synthesis( /*----------------------------------------------------------------* * TD/MDCT stereo synchro *----------------------------------------------------------------*/ - +#ifdef DFT_STEREO_SPAR_MIXING + if ( sba_dirac_stereo_flag ) + return; +#endif if ( hCPE->element_mode == IVAS_CPE_TD || hCPE->element_mode == IVAS_CPE_MDCT ) { /* handling of DFT->TD switching */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 3f109b92b4..93f1a944de 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1021,7 +1021,6 @@ ivas_error IVAS_DEC_GetHrtfHandle( } -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * IVAS_DEC_GetHrtfCRendHandle( ) * @@ -1042,9 +1041,7 @@ ivas_error IVAS_DEC_GetHrtfCRendHandle( return IVAS_ERR_OK; } -#endif -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * IVAS_DEC_GetHrtfFastConvHandle( ) * @@ -1086,7 +1083,6 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle( return IVAS_ERR_OK; } -#endif /*---------------------------------------------------------------------* * IVAS_DEC_GetRenderConfig( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 0f72c2976f..d2e7b5d98b 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -292,7 +292,6 @@ ivas_error IVAS_DEC_GetHrtfHandle( IVAS_DEC_HRTF_HANDLE *hHrtfTD /* o : HRTF handle */ ); -#ifdef HRTF_BINARY_FILE /*! r: error code */ ivas_error IVAS_DEC_GetHrtfCRendHandle( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ @@ -308,7 +307,6 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin /* o : Parametric binauralizer HRTF handle */ ); -#endif /*! r: error code*/ ivas_error IVAS_DEC_GetRenderConfig( diff --git a/lib_rend/ivas_binauralRenderer.c b/lib_rend/ivas_binauralRenderer.c index 15b546e3fc..9fe44ae558 100644 --- a/lib_rend/ivas_binauralRenderer.c +++ b/lib_rend/ivas_binauralRenderer.c @@ -124,12 +124,8 @@ static ivas_error ivas_binRenderer_convModuleOpen( const int16_t renderer_type, const int16_t isLoudspeaker, const AUDIO_CONFIG input_config, - const RENDER_CONFIG_DATA *hRenderConfig -#ifdef HRTF_BINARY_FILE - , - const HRTFS_FASTCONV_HANDLE hHrtf -#endif -) + const RENDER_CONFIG_DATA *hRenderConfig, + const HRTFS_FASTCONV_HANDLE hHrtf ) { int16_t bandIdx, chIdx; BINRENDERER_CONV_MODULE_HANDLE hBinRenConvModule; @@ -316,17 +312,10 @@ static ivas_error ivas_binRenderer_convModuleOpen( if ( isLoudspeaker ) { -#ifdef HRTF_BINARY_FILE hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftBRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftBRIRImag[bandIdx][tmp]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightBRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightBRIRImag[bandIdx][tmp]; -#else - hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftBRIRReal[bandIdx][tmp]; - hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftBRIRImag[bandIdx][tmp]; - hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightBRIRReal[bandIdx][tmp]; - hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightBRIRImag[bandIdx][tmp]; -#endif } #ifdef DEBUGGING else @@ -344,32 +333,18 @@ static ivas_error ivas_binRenderer_convModuleOpen( if ( isLoudspeaker ) { -#ifdef HRTF_BINARY_FILE hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftHRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftHRIRImag[bandIdx][tmp]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightHRIRReal[bandIdx][tmp]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightHRIRImag[bandIdx][tmp]; -#else - hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftHRIRReal[bandIdx][tmp]; - hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftHRIRImag[bandIdx][tmp]; - hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightHRIRReal[bandIdx][tmp]; - hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightHRIRImag[bandIdx][tmp]; -#endif } else { /* HOA3 filter coefficients */ -#ifdef HRTF_BINARY_FILE hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = hHrtf->leftHRIRReal_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = hHrtf->leftHRIRImag_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = hHrtf->rightHRIRReal_HOA3[bandIdx][chIdx]; hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = hHrtf->rightHRIRImag_HOA3[bandIdx][chIdx]; -#else - hBinRenConvModule->filterTapsLeftReal[bandIdx][chIdx] = leftHRIRReal_HOA3[bandIdx][chIdx]; - hBinRenConvModule->filterTapsLeftImag[bandIdx][chIdx] = leftHRIRImag_HOA3[bandIdx][chIdx]; - hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx] = rightHRIRReal_HOA3[bandIdx][chIdx]; - hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx] = rightHRIRImag_HOA3[bandIdx][chIdx]; -#endif } } } @@ -380,7 +355,6 @@ static ivas_error ivas_binRenderer_convModuleOpen( return IVAS_ERR_OK; } -#ifdef HRTF_BINARY_FILE /*-------------------------------------------------------------------------* * ivas_binaural_HRTF_open() * @@ -443,7 +417,6 @@ static ivas_error ivas_binaural_hrtf_open( return IVAS_ERR_OK; } -#endif /*-------------------------------------------------------------------------* * ivas_binaural_obtain_DMX() @@ -631,26 +604,20 @@ ivas_error ivas_binRenderer_open( hBinRenderer->render_lfe = 1; } -#ifdef HRTF_BINARY_FILE /* Load HRTF tables */ ivas_binaural_hrtf_open( &st_ivas->hHrtfFastConv ); -#endif if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && ( st_ivas->hIntSetup.is_loudspeaker_setup == 0 ) ) { IVAS_OUTPUT_SETUP out_setup; /* Allocate memories and buffers needed for convolutional module in CICP19 */ -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, 1, AUDIO_CONFIG_7_1_4, st_ivas->hRenderConfig, st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, 1, AUDIO_CONFIG_7_1_4, st_ivas->hRenderConfig ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -666,82 +633,42 @@ ivas_error ivas_binRenderer_open( } hBinRenderer->hoa_dec_mtx = st_ivas->hoa_dec_mtx; -#ifdef HRTF_BINARY_FILE st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_BRIR_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_BRIR_latency_s * 1000000000.f ); -#endif } else { /* Allocate memories and buffers needed for convolutional module */ -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, st_ivas->hIntSetup.is_loudspeaker_setup, st_ivas->hIntSetup.output_config, st_ivas->hRenderConfig, st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binRenderer_convModuleOpen( hBinRenderer, st_ivas->renderer_type, st_ivas->hIntSetup.is_loudspeaker_setup, st_ivas->hIntSetup.output_config, st_ivas->hRenderConfig ) ) != IVAS_ERR_OK ) -#endif { return error; } -#ifdef FIX_FIX_I59 if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { if ( hBinRenderer->ivas_format == MC_FORMAT ) { -#ifdef HRTF_BINARY_FILE st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HRIR_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HRIR_latency_s * 1000000000.f ); -#endif } else { -#ifdef HRTF_BINARY_FILE st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HOA3_latency_s * 1000000000.f ); -#endif } } else { /* same value for MC or HOA both use MC BRIR*/ -#ifdef HRTF_BINARY_FILE st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_BRIR_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_BRIR_latency_s * 1000000000.f ); -#endif - } -#else - if ( hBinRenderer->ivas_format == MC_FORMAT ) - { -#ifdef HRTF_BINARY_FILE - st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HRIR_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HRIR_latency_s * 1000000000.f ); -#endif } - else - { -#ifdef HRTF_BINARY_FILE - st_ivas->binaural_latency_ns = (int32_t) ( st_ivas->hHrtfFastConv->FASTCONV_HOA3_latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( FASTCONV_HOA3_latency_s * 1000000000.f ); -#endif - } -#endif } /* Allocate memories needed for reverb module */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, @@ -751,9 +678,6 @@ ivas_error ivas_binRenderer_open( RENDERER_BINAURAL_FASTCONV_ROOM, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, RENDERER_BINAURAL_FASTCONV_ROOM ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1079,7 +1003,7 @@ void ivas_binRenderer( { #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, - hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], + &hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); diff --git a/lib_rend/ivas_binaural_reverb.c b/lib_rend/ivas_binaural_reverb.c index 3d4c9d6fe2..ccff4323af 100644 --- a/lib_rend/ivas_binaural_reverb.c +++ b/lib_rend/ivas_binaural_reverb.c @@ -376,11 +376,9 @@ ivas_error ivas_binaural_reverb_open( const AUDIO_CONFIG output_config, /* i : output audio configuration */ const int32_t sampling_rate, /* i : sampling rate */ const RENDERER_TYPE renderer_type /* i : renderer type */ -#ifdef HRTF_BINARY_FILE , const HRTFS_FASTCONV_HANDLE hHrtfFastConv, /* i : FastConv HRTF handle */ const HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : Parametric binauralizer HRTF handle */ -#endif ) { int16_t bin, chIdx, k, len; @@ -413,11 +411,7 @@ ivas_error ivas_binaural_reverb_open( { if ( !roomAcoustics->override ) { -#ifdef HRTF_BINARY_FILE revTimes = hHrtfFastConv->fastconvReverberationTimes; -#else - revTimes = fastconvReverberationTimes; -#endif } else { @@ -426,11 +420,7 @@ ivas_error ivas_binaural_reverb_open( } else { -#ifdef HRTF_BINARY_FILE revTimes = hHrtfParambin->parametricReverberationTimes; -#else - revTimes = parametricReverberationTimes; -#endif } for ( bin = 0; bin < hReverb->numBins; bin++ ) @@ -499,31 +489,19 @@ ivas_error ivas_binaural_reverb_open( { if ( !roomAcoustics->override ) { -#ifdef HRTF_BINARY_FILE ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfFastConv->fastconvReverberationTimes, hHrtfFastConv->fastconvReverberationEneCorrections ); -#else - ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, fastconvReverberationTimes, fastconvReverberationEneCorrections ); -#endif ivas_binaural_reverb_setPreDelay( hReverb, 10 ); } else { -#ifdef HRTF_BINARY_FILE ivas_reverb_prepare_cldfb_params( roomAcoustics, hHrtfFastConv, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene ); -#else - ivas_reverb_prepare_cldfb_params( roomAcoustics, output_config, roomAcoustics->use_brir, sampling_rate, t60, ene ); -#endif ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, t60, ene ); ivas_binaural_reverb_setPreDelay( hReverb, (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX ) ); } } else { -#ifdef HRTF_BINARY_FILE ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, hHrtfParambin->parametricReverberationTimes, hHrtfParambin->parametricReverberationEneCorrections ); -#else - ivas_binaural_reverb_setReverbTimes( hReverb, sampling_rate, parametricReverberationTimes, parametricReverberationEneCorrections ); -#endif ivas_binaural_reverb_setPreDelay( hReverb, 10 ); } diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index fccc63b510..6186a96a51 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -669,7 +669,6 @@ ivas_error ivas_crend_init_from_rom( #endif #ifndef FIX_197_CREND_INTERFACE -#ifdef HRTF_BINARY_FILE /*------------------------------------------------------------------------- * ivas_crend_init_from_hrtf_handle() * @@ -818,9 +817,7 @@ ivas_error ivas_crend_init_from_hrtf_handle( } return IVAS_ERR_OK; } -#endif -#ifdef HRTF_BINARY_FILE /*------------------------------------------------------------------------- * ivas_crend_init_from_setofhrtf() * @@ -872,9 +869,9 @@ ivas_error ivas_crend_init_from_setofhrtf( return IVAS_ERR_OK; } -#endif #endif +#ifndef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE /*---------------------------------------------------------------------* * destroy_HRTF() * @@ -930,7 +927,6 @@ static ivas_error destroy_HRTF( return IVAS_ERR_OK; } -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * destroy_SetOfHRTF() * @@ -952,7 +948,6 @@ ivas_error destroy_SetOfHRTF( } #endif - #ifndef FIX_197_CREND_INTERFACE /*------------------------------------------------------------------------- * ivas_crend_open() @@ -975,7 +970,6 @@ ivas_error ivas_crend_open( if ( ( st_ivas->hHrtf == NULL ) && ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) ) { -#ifdef HRTF_BINARY_FILE if ( st_ivas->hSetOfHRTF != NULL ) { if ( ( error = ivas_crend_init_from_setofhrtf( st_ivas ) ) != IVAS_ERR_OK ) @@ -990,12 +984,6 @@ ivas_error ivas_crend_open( return error; } } -#else - if ( ( error = ivas_crend_init_from_rom( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif } if ( ( hCrend = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL ) @@ -1479,9 +1467,7 @@ ivas_error ivas_rend_initCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ) { int16_t i, j, tmp; @@ -1537,10 +1523,8 @@ ivas_error ivas_rend_initCrend( return IVAS_ERR_INTERNAL_FATAL; } -#ifdef HRTF_BINARY_FILE if ( hSetOfHRTF == NULL ) { -#endif if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) { hHrtf->max_num_ir -= 1; /* subtract LFE */ @@ -1861,7 +1845,6 @@ ivas_error ivas_rend_initCrend( { return IVAS_ERROR( IVAS_ERR_INTERNAL, "Unsupported renderer type in Crend" ); } -#ifdef HRTF_BINARY_FILE } else { @@ -1987,7 +1970,6 @@ ivas_error ivas_rend_initCrend( return IVAS_ERROR( IVAS_ERR_INTERNAL, "Unsupported renderer type in Crend" ); } } -#endif pCrend->hHrtfCrend = hHrtf; @@ -2012,9 +1994,7 @@ ivas_error ivas_rend_openCrend( #ifdef FIX_197_CREND_INTERFACE int16_t Opt_Headrotation, #endif -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ) { /* TODO tmu : Based on ivas_crend_open() - could be harmonized / refactored */ @@ -2049,11 +2029,7 @@ ivas_error ivas_rend_openCrend( #ifdef FIX_197_CREND_INTERFACE if ( ( *pCrend )->hHrtfCrend == NULL ) { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_rend_initCrend( *pCrend, inConfig, outConfig, hRendCfg, hSetOfHRTF, output_Fs ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_rend_initCrend( *pCrend, inConfig, outConfig, hRendCfg, output_Fs ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -2062,9 +2038,7 @@ ivas_error ivas_rend_openCrend( if ( pCrend->hHrtfCrend == NULL ) { if ( ( error = ivas_rend_initCrend( pCrend, inConfig, outConfig, hRendCfg, -#ifdef HRTF_BINARY_FILE hSetOfHRTF, -#endif output_Fs ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_rend/ivas_hrtf.c b/lib_rend/ivas_hrtf.c index 84efa1f13e..6e2483bba6 100644 --- a/lib_rend/ivas_hrtf.c +++ b/lib_rend/ivas_hrtf.c @@ -41,7 +41,6 @@ #include "ivas_error.h" #include "wmc_auto.h" - /*-------------------------------------------------------------------* * Local constants *-------------------------------------------------------------------*/ @@ -211,9 +210,7 @@ void DefaultBSplineModel( HRTF_model_precalc( model ); -#ifdef FIX_310_TD_REND_DELAY HrFiltSet_p->latency_s = orange53_rom_latency_s; -#endif HrFiltSet_p->SampleRate = output_Fs; HrFiltSet_p->FiltLength = HrFiltSet_p->ModelParams.K; BSplineModelEvalAlloc( &HrFiltSet_p->ModelParams, &HrFiltSet_p->ModelEval ); @@ -263,7 +260,6 @@ void ivas_HRTF_binary_close( } -#ifdef HRTF_BINARY_FILE /*-----------------------------------------------------------------------* * ivas_HRTF_CRend_binary_open() * @@ -301,16 +297,16 @@ void ivas_HRTF_CRend_binary_close( return; } +#ifndef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE destroy_SetOfHRTF( *hSetOfHRTF ); +#endif free( *hSetOfHRTF ); *hSetOfHRTF = NULL; return; } -#endif -#ifdef HRTF_BINARY_FILE /*-----------------------------------------------------------------------* * ivas_HRTF_fastconv_binary_open() * @@ -348,9 +344,7 @@ void ivas_HRTF_fastconv_binary_close( return; } -#endif -#ifdef HRTF_BINARY_FILE /*-----------------------------------------------------------------------* * ivas_HRTF_parambin_binary_open() * @@ -388,4 +382,3 @@ void ivas_HRTF_parambin_binary_close( return; } -#endif diff --git a/lib_rend/ivas_lib_rend_internal.h b/lib_rend/ivas_lib_rend_internal.h index c02c1ff3b4..ff94aeb398 100644 --- a/lib_rend/ivas_lib_rend_internal.h +++ b/lib_rend/ivas_lib_rend_internal.h @@ -81,9 +81,7 @@ ivas_error ivas_rend_openCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ); ivas_error ivas_rend_initCrend( @@ -91,9 +89,7 @@ ivas_error ivas_rend_initCrend( const IVAS_REND_AudioConfig inConfig, const IVAS_REND_AudioConfig outConfig, RENDER_CONFIG_DATA *hRendCfg, -#ifdef HRTF_BINARY_FILE HRTFS_CREND_HANDLE hSetOfHRTF, -#endif const int32_t output_Fs ); ivas_error ivas_rend_closeCrend( diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 2496b59089..6d8aa1708c 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -30,6 +30,7 @@ *******************************************************************************************************/ +#include "ivas_stat_rend.h" #include #include "options.h" #include "prot.h" @@ -60,6 +61,27 @@ static void TDREND_Update_object_positions( BINAURAL_TD_OBJECT_RENDERER_HANDLE h const IVAS_FORMAT in_format, const ISM_METADATA_HANDLE *hIsmMetaData, float output[][L_FRAME48k] ); +#ifdef FIX_198_TDREND_INTERFACE +static ivas_error ivas_td_binaural_open_unwrap( TDREND_HRFILT_FiltSet_t **hHrtfTD, const int32_t output_Fs, const int16_t nchan_transport, const IVAS_FORMAT ivas_format, const AUDIO_CONFIG transport_config, const IVAS_OUTPUT_SETUP hTransSetup, BINAURAL_TD_OBJECT_RENDERER_HANDLE *hBinRendererTd, int32_t *binaural_latency_ns ); +static void ObjRenderIVASFrame_unwrap( RENDER_CONFIG_DATA *hRenderConfig, + const int16_t ini_frame, + CREND_WRAPPER_HANDLE hCrendWrapper, + AUDIO_CONFIG transport_config, + const int32_t output_Fs, + BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, + const int16_t nchan_transport, + const int16_t lfe_idx, + IVAS_FORMAT ivas_format, + ISM_METADATA_HANDLE *hIsmMetaData, + const int16_t Opt_Headrotation, + const IVAS_QUATERNION *Quaternions, + float output[][L_FRAME48k], + const int16_t output_frame +#ifdef FIX_I109_ORIENTATION_TRACKING + , + ivas_orient_trk_state_t *pOTR +#endif +); /*---------------------------------------------------------------------* * ivas_td_binaural_open() @@ -71,7 +93,44 @@ ivas_error ivas_td_binaural_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { + return ivas_td_binaural_open_unwrap( &st_ivas->hHrtfTD, st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport, st_ivas->ivas_format, + st_ivas->transport_config, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns ); +} + + +/*---------------------------------------------------------------------* + * ivas_td_binaural_open_unwrap() + * + * Call TD open/init function without st_ivas + *---------------------------------------------------------------------*/ + +static ivas_error ivas_td_binaural_open_unwrap( + TDREND_HRFILT_FiltSet_t **hHrtfTD, /* i/o: HR filter model (from file or NULL) */ + const int32_t output_Fs, /* i : Output sampling rate */ + const int16_t nchan_transport, /* i : Number of channels */ + const IVAS_FORMAT ivas_format, /* i : IVAS format (ISM/MC) */ + const AUDIO_CONFIG transport_config, /* i : Transport configuration */ + const IVAS_OUTPUT_SETUP hTransSetup, /* i : Loudspeaker layout */ + BINAURAL_TD_OBJECT_RENDERER_HANDLE *hBinRendererTd, /* o : TD renderer handle */ + int32_t *binaural_latency_ns /* i : Binauralization delay */ +) +#else +/*---------------------------------------------------------------------* + * ivas_td_binaural_open() + * + * Open and initialize TD Object binaural renderer + *---------------------------------------------------------------------*/ + +ivas_error ivas_td_binaural_open( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +) +#endif +{ +#ifdef FIX_198_TDREND_INTERFACE + BINAURAL_TD_OBJECT_RENDERER_HANDLE pBinRendTd; +#else BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd; +#endif TDREND_PosType_t PosType; int16_t nS; int16_t SrcInd[MAX_NUM_TDREND_CHANNELS]; @@ -84,55 +143,105 @@ ivas_error ivas_td_binaural_open( error = IVAS_ERR_OK; +#ifdef FIX_198_TDREND_INTERFACE + if ( ( pBinRendTd = malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) +#else if ( ( hBinRendererTd = malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) +#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } +#ifdef FIX_198_TDREND_INTERFACE + if ( ( pBinRendTd->TdRend_MixSpatSpec_p = malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) +#else if ( ( hBinRendererTd->TdRend_MixSpatSpec_p = malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) +#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } +#ifdef FIX_198_TDREND_INTERFACE + if ( ( pBinRendTd->DirAtten_p = malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) +#else if ( ( hBinRendererTd->DirAtten_p = malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) +#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } +#ifdef FIX_198_TDREND_INTERFACE + if ( ( pBinRendTd->Listener_p = malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) +#else if ( ( hBinRendererTd->Listener_p = malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) +#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } +#ifdef FIX_198_TDREND_INTERFACE + pBinRendTd->NumOfSrcs = 0; + pBinRendTd->MaxSrcInd = -1; + + /* Mixer spatial setup */ + pBinRendTd->TdRend_MixSpatSpec_p->UseCommonDistAttenModel = TRUE; + pBinRendTd->TdRend_MixSpatSpec_p->DistAttenModel = 0; /* 0=Turned off, else use TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED */ +#else hBinRendererTd->NumOfSrcs = 0; hBinRendererTd->MaxSrcInd = -1; /* Mixer spatial setup */ hBinRendererTd->TdRend_MixSpatSpec_p->UseCommonDistAttenModel = TRUE; hBinRendererTd->TdRend_MixSpatSpec_p->DistAttenModel = 0; /* 0=Turned off, else use TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED */ +#endif +#ifdef FIX_198_TDREND_INTERFACE + TDREND_MIX_Init( pBinRendTd, hHrtfTD, pBinRendTd->TdRend_MixSpatSpec_p, output_Fs ); +#else TDREND_MIX_Init( hBinRendererTd, &st_ivas->hHrtfTD, hBinRendererTd->TdRend_MixSpatSpec_p, st_ivas->hDecoderConfig->output_Fs ); +#endif /* Set the attenuation (or can set MixSpatSpec.DistAttenModel above) */ +#ifdef FIX_198_TDREND_INTERFACE + TDREND_MIX_SetDistAttenModel( pBinRendTd, TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED ); +#else TDREND_MIX_SetDistAttenModel( hBinRendererTd, TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED ); +#endif /* Add sources to module and mixer, headphones */ PosType = TDREND_POSTYPE_ABSOLUTE; /* or TDREND_POSTYPE_RELATIVE_TO_LISTENER */ +#ifdef FIX_198_TDREND_INTERFACE + nchan_rend = nchan_transport; + if ( ( ivas_format == MC_FORMAT ) && ( transport_config != AUDIO_CONFIG_LS_CUSTOM ) ) +#else nchan_rend = st_ivas->nchan_transport; if ( st_ivas->ivas_format == MC_FORMAT ) +#endif { nchan_rend--; /* Skip LFE channel -- added to the others */ } for ( nS = 0; nS < nchan_rend; nS++ ) { +#ifdef FIX_198_TDREND_INTERFACE + if ( ( error = TDREND_MIX_AddSrc( pBinRendTd, &SrcInd[nS], PosType ) ) != IVAS_ERR_OK ) +#else if ( ( error = TDREND_MIX_AddSrc( hBinRendererTd, &SrcInd[nS], PosType ) ) != IVAS_ERR_OK ) +#endif { return error; } } +#ifdef FIX_198_TDREND_INTERFACE + if ( ivas_format == MC_FORMAT ) +#else if ( st_ivas->ivas_format == MC_FORMAT ) +#endif { +#ifdef FIX_198_TDREND_INTERFACE + switch ( transport_config ) +#else switch ( st_ivas->transport_config ) +#endif { case AUDIO_CONFIG_5_1: ls_azimuth = ls_azimuth_CICP6; @@ -155,15 +264,24 @@ ivas_error ivas_td_binaural_open( ls_elevation = ls_elevation_CICP19; break; case AUDIO_CONFIG_LS_CUSTOM: +#ifdef FIX_198_TDREND_INTERFACE + ls_azimuth = hTransSetup.ls_azimuth; + ls_elevation = hTransSetup.ls_elevation; +#else ls_azimuth = st_ivas->hTransSetup.ls_azimuth; ls_elevation = st_ivas->hTransSetup.ls_elevation; +#endif break; default: ls_azimuth = NULL; ls_elevation = NULL; } +#ifdef FIX_198_TDREND_INTERFACE + DirAtten_p = pBinRendTd->DirAtten_p; +#else DirAtten_p = hBinRendererTd->DirAtten_p; +#endif for ( nS = 0; nS < nchan_rend; nS++ ) { @@ -180,18 +298,26 @@ ivas_error ivas_td_binaural_open( DirAtten_p->ConeOuterAngle = 360.0f; DirAtten_p->ConeOuterGain = 1.0f; +#ifdef FIX_198_TDREND_INTERFACE + TDREND_MIX_SRC_SetPos( pBinRendTd, nS, Pos ); + TDREND_MIX_SRC_SetDir( pBinRendTd, nS, Dir ); + TDREND_MIX_SRC_SetPlayState( pBinRendTd, nS, TDREND_PLAYSTATUS_PLAYING ); + TDREND_MIX_SRC_SetDirAtten( pBinRendTd, nS, DirAtten_p ); +#else TDREND_MIX_SRC_SetPos( hBinRendererTd, nS, Pos ); TDREND_MIX_SRC_SetDir( hBinRendererTd, nS, Dir ); TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING ); TDREND_MIX_SRC_SetDirAtten( hBinRendererTd, nS, DirAtten_p ); +#endif } } +#ifdef FIX_198_TDREND_INTERFACE + *hBinRendererTd = pBinRendTd; + *binaural_latency_ns = (int32_t) ( ( *hBinRendererTd )->HrFiltSet_p->latency_s * 1000000000.f ); +#else st_ivas->hBinRendererTd = hBinRendererTd; -#ifdef FIX_310_TD_REND_DELAY st_ivas->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); -#else - st_ivas->binaural_latency_ns = (int32_t) ( BINAURAL_TD_LATENCY_S * 1000000000.f ); #endif return error; @@ -224,7 +350,68 @@ void ivas_td_binaural_close( return; } +#ifdef FIX_198_TDREND_INTERFACE +/*---------------------------------------------------------------------* + * ObjRenderIVASFrame() + * + * Receives the current frames for the object streams, updates metadata + * and renders the current frame. + *---------------------------------------------------------------------*/ +void ObjRenderIVASFrame( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ + const int16_t output_frame /* i : output frame length */ +) +{ + ObjRenderIVASFrame_unwrap( st_ivas->hRenderConfig, + st_ivas->ini_frame, + st_ivas->hCrendWrapper, + st_ivas->transport_config, + st_ivas->hDecoderConfig->output_Fs, + st_ivas->hBinRendererTd, + st_ivas->nchan_transport, + LFE_CHANNEL, + st_ivas->ivas_format, + st_ivas->hIsmMetaData, + st_ivas->hDecoderConfig->Opt_Headrotation, + ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Quaternions : NULL, + output, + output_frame +#ifdef FIX_I109_ORIENTATION_TRACKING + , + ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->OrientationTracker : NULL +#endif + ); +} + +/*---------------------------------------------------------------------* + * ObjRenderIVASFrame_unwrap() + * + * Call ObjRenderIVASFrame without st_ivas. + *---------------------------------------------------------------------*/ + +static void ObjRenderIVASFrame_unwrap( + RENDER_CONFIG_DATA *hRenderConfig, /*i : Renderer configuration */ + const int16_t ini_frame, /*i : Initialization frame counter */ + CREND_WRAPPER_HANDLE hCrendWrapper, /*i : Crend wrapper handle */ + AUDIO_CONFIG transport_config, /*i : Transport configuration */ + const int32_t output_Fs, /*i : Output sampling rate */ + BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /*i/o: TD binaural object renderer handle */ + const int16_t nchan_transport, /*i : Transport channels (ISms) */ + const int16_t lfe_idx, /*i : LFE channel index */ + IVAS_FORMAT ivas_format, /*i : IVAS format */ + ISM_METADATA_HANDLE *hIsmMetaData, /*i : ISM metadata handle */ + const int16_t Opt_Headrotation, /*i : Head rotation flag */ + const IVAS_QUATERNION *Quaternions, /*i : Head tracking data per subframe */ + float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ + const int16_t output_frame /* i : output frame length */ +#ifdef FIX_I109_ORIENTATION_TRACKING + , + ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ +#endif +) +#else /*---------------------------------------------------------------------* * ObjRenderIVASFrame() * @@ -237,6 +424,7 @@ void ObjRenderIVASFrame( float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ ) +#endif { int16_t subframe_length; int16_t subframe_idx; @@ -246,13 +434,25 @@ void ObjRenderIVASFrame( #endif subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; +#ifdef FIX_198_TDREND_INTERFACE + if ( hRenderConfig != NULL ) +#else if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ +#endif { +#ifdef FIX_198_TDREND_INTERFACE + if ( hRenderConfig->roomAcoustics.late_reverb_on && ( ini_frame == 0 ) ) +#else if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on && ( st_ivas->ini_frame == 0 ) ) +#endif { #ifdef FIX_197_CREND_INTERFACE +#ifdef FIX_198_TDREND_INTERFACE + ivas_reverb_open( &hCrendWrapper->hCrend->hReverb, transport_config, NULL, hRenderConfig, output_Fs ); +#else ivas_reverb_open( &st_ivas->hCrendWrapper->hCrend->hReverb, st_ivas->transport_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ); +#endif #else ivas_reverb_open( &st_ivas->hCrend->hReverb, st_ivas->transport_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ); #endif @@ -260,12 +460,26 @@ void ObjRenderIVASFrame( } /* Update object position(s) */ +#ifdef FIX_198_TDREND_INTERFACE + TDREND_Update_object_positions( hBinRendererTd, nchan_transport, lfe_idx, ivas_format, hIsmMetaData, output ); +#else TDREND_Update_object_positions( st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, output ); +#endif for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { /* Update the listener's location/orientation */ #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef FIX_198_TDREND_INTERFACE + if ( pOTR != NULL ) + { + if ( ivas_orient_trk_Process( pOTR, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) + { + exit( -1 ); + } + } + TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( pOTR != NULL ) ? &trackedHeadOrientation : NULL ); +#else if ( st_ivas->hHeadTrackData != NULL ) { if ( ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hHeadTrackData->Quaternions[subframe_idx], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) @@ -276,28 +490,53 @@ void ObjRenderIVASFrame( TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &trackedHeadOrientation : NULL ); +#endif +#else +#ifdef FIX_198_TDREND_INTERFACE + TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL ); #else TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[subframe_idx] : NULL ); #endif +#endif +#ifdef FIX_198_TDREND_INTERFACE + if ( ( hRenderConfig != NULL ) && ( hRenderConfig->roomAcoustics.late_reverb_on ) ) +#else if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) +#endif { #ifdef FIX_197_CREND_INTERFACE +#ifdef FIX_198_TDREND_INTERFACE + ivas_reverb_process( hCrendWrapper->hCrend->hReverb, transport_config, 0, output, reverb_signal, subframe_idx ); +#else ivas_reverb_process( st_ivas->hCrendWrapper->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); +#endif #else ivas_reverb_process( st_ivas->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); #endif } /* Render subframe */ +#ifdef FIX_198_TDREND_INTERFACE + TDREND_GetMix( hBinRendererTd, output, subframe_length, subframe_idx ); +#else TDREND_GetMix( st_ivas->hBinRendererTd, output, subframe_length, subframe_idx ); +#endif } +#ifdef FIX_198_TDREND_INTERFACE + if ( hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ +#else if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ +#endif { +#ifdef FIX_198_TDREND_INTERFACE + if ( hRenderConfig->roomAcoustics.late_reverb_on ) +#else if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) +#endif { /* add reverb to rendered signals */ v_add( reverb_signal[0], output[0], output[0], output_frame ); @@ -520,6 +759,7 @@ ivas_error ivas_rend_TDObjRendOpen( LSSETUP_CUSTOM_STRUCT *customLsInput, const int32_t outFs ) { +#ifndef FIX_198_TDREND_INTERFACE /* TODO tmu : Based on ivas_td_binaural_open() - could be harmonized / refactored - review error handling - review hHrtfTD init @@ -532,8 +772,34 @@ ivas_error ivas_rend_TDObjRendOpen( float Pos[3]; float Dir[3]; TDREND_DirAtten_t *DirAtten_p; +#endif +#ifdef FIX_198_TDREND_INTERFACE + int16_t nchan_transport; + AUDIO_CONFIG transport_config; + IVAS_FORMAT ivas_format; + IVAS_OUTPUT_SETUP hTransSetup; +#else int16_t nchan_rend; ivas_error error; +#endif + +#ifdef FIX_198_TDREND_INTERFACE + if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) + { + getAudioConfigNumChannels( inConfig, &nchan_transport ); + } + else + { + nchan_transport = customLsInput->num_spk; + } + transport_config = getIvasAudioConfigFromRendAudioConfig( inConfig ); + ivas_format = ( getAudioConfigType( inConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) ? MC_FORMAT : ISM_FORMAT; + hTransSetup.ls_azimuth = customLsInput->ls_azimuth; + hTransSetup.ls_elevation = customLsInput->ls_elevation; + + return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hTransSetup, &pTDRend->hBinRendererTd, + &pTDRend->binaural_latency_ns ); +#else error = IVAS_ERR_OK; @@ -649,13 +915,10 @@ ivas_error ivas_rend_TDObjRendOpen( pTDRend->hBinRendererTd = hBinRendererTd; -#ifdef FIX_310_TD_REND_DELAY pTDRend->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); -#else - pTDRend->binaural_latency_ns = (int32_t) ( BINAURAL_TD_LATENCY_S * 1000000000.f ); -#endif return IVAS_ERR_OK; +#endif } /*---------------------------------------------------------------------* @@ -676,15 +939,24 @@ ivas_error ivas_rend_TDObjRenderFrame( float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ ) { +#ifndef FIX_198_TDREND_INTERFACE int16_t subframe_length; int16_t subframe_idx; ISM_METADATA_HANDLE hIsmMetaData[1]; +#else + ISM_METADATA_FRAME hIsmMetaDataFrame; + ISM_METADATA_HANDLE hIsmMetaData[1]; +#endif int16_t lfe_idx; int16_t num_src; /* TODO tmu : pass down renderer config struct */ // float reverb_signal[BINAURAL_CHANNELS][L_FRAME48k]; IVAS_FORMAT ivas_format; IVAS_REND_AudioConfigType inConfigType; +#ifdef FIX_198_TDREND_INTERFACE + AUDIO_CONFIG transport_config; + int32_t output_Fs; +#endif #ifdef FIX_I109_ORIENTATION_TRACKING IVAS_QUATERNION trackedHeadOrientation; @@ -694,6 +966,10 @@ ivas_error ivas_rend_TDObjRenderFrame( inConfigType = getAudioConfigType( inConfig ); lfe_idx = LFE_CHANNEL; +#ifdef FIX_198_TDREND_INTERFACE + hIsmMetaData[0] = NULL; +#endif + if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) { ivas_format = MC_FORMAT; @@ -711,12 +987,33 @@ ivas_error ivas_rend_TDObjRenderFrame( { ivas_format = ISM_FORMAT; num_src = 1; +#ifdef FIX_198_TDREND_INTERFACE + hIsmMetaData[0] = &hIsmMetaDataFrame; +#else hIsmMetaData[0] = malloc( sizeof( ISM_METADATA_FRAME ) ); +#endif hIsmMetaData[0]->azimuth = currentPos->azimuth; hIsmMetaData[0]->elevation = currentPos->elevation; } +#ifndef FIX_198_TDREND_INTERFACE subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; +#endif + +#ifdef FIX_198_TDREND_INTERFACE + transport_config = getIvasAudioConfigFromRendAudioConfig( inConfig ); + output_Fs = output_frame * 50; + + ObjRenderIVASFrame_unwrap( NULL, 1, NULL, transport_config, output_Fs, pTDRend->hBinRendererTd, num_src, lfe_idx, + ivas_format, hIsmMetaData, headRotData->headRotEnabled, ( headRotData != NULL ) ? headRotData->headPositions : NULL, + output, output_frame + #ifdef FIX_I109_ORIENTATION_TRACKING + , + NULL // TODO @Philips check if orientation tracking already done before renderer calls this function + #endif + ); + +#else /* TODO tmu : pass down renderer config struct and decide what to do about ini_frame ? */ // if ( hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ @@ -773,6 +1070,8 @@ ivas_error ivas_rend_TDObjRenderFrame( // } // } + +#endif pop_wmops(); return IVAS_ERR_OK; diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 6420a40134..2e01d6b817 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -442,7 +442,7 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ - IVAS_QUATERNION absRot, /* i : absolute head rotation */ + const IVAS_QUATERNION *absRot, /* i : absolute head rotation */ float updateRate, /* i : rotation update rate [Hz] */ IVAS_QUATERNION *pTrkRot ) /* o : tracked rotation */ { @@ -464,34 +464,34 @@ ivas_error ivas_orient_trk_Process( switch ( pOTR->trackingType ) { case OTR_TRACKING_NONE: - *pTrkRot = absRot; + *pTrkRot = *absRot; break; case OTR_TRACKING_REF_ORIENT: /* Reset average orientation */ - pOTR->absAvgRot = absRot; + pOTR->absAvgRot = *absRot; /* Reset adaptation filter - start adaptation at center rate */ pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ QuaternionInverse( pOTR->refRot, pTrkRot ); - QuaternionProduct( *pTrkRot, absRot, pTrkRot ); + QuaternionProduct( *pTrkRot, *absRot, pTrkRot ); break; case OTR_TRACKING_AVG_ORIENT: /* Compute average (low-pass filtered) absolute orientation */ - QuaternionSlerp( pOTR->absAvgRot, absRot, alpha, &pOTR->absAvgRot ); + QuaternionSlerp( pOTR->absAvgRot, *absRot, alpha, &pOTR->absAvgRot ); /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ QuaternionInverse( pOTR->absAvgRot, pTrkRot ); - QuaternionProduct( *pTrkRot, absRot, pTrkRot ); + QuaternionProduct( *pTrkRot, *absRot, pTrkRot ); /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = QuaternionAngle( absRot, *pTrkRot ); + ang = QuaternionAngle( *absRot, *pTrkRot ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; diff --git a/lib_rend/ivas_reverb_utils.c b/lib_rend/ivas_reverb_utils.c index 20a3e2ac47..565fd46ff8 100644 --- a/lib_rend/ivas_reverb_utils.c +++ b/lib_rend/ivas_reverb_utils.c @@ -69,11 +69,7 @@ typedef struct cldfb_convolver_state float filter_states_im[BINAURAL_CONVBANDS][CLDFB_CONVOLVER_NTAPS_MAX]; } cldfb_convolver_state; -#ifdef HRTF_BINARY_FILE static void ivas_reverb_get_fastconv_hrtf_set_energies( const HRTFS_FASTCONV_HANDLE hHrtfFastConv, const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, float *avg_pwr_right ); -#else -static void ivas_reverb_get_fastconv_hrtf_set_energies( const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, float *avg_pwr_right ); -#endif /*-----------------------------------------------------------------------------------------* @@ -84,9 +80,7 @@ static void ivas_reverb_get_fastconv_hrtf_set_energies( const AUDIO_CONFIG input void ivas_reverb_prepare_cldfb_params( ivas_roomAcoustics_t *pInput_params, -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t output_Fs, @@ -121,11 +115,7 @@ void ivas_reverb_prepare_cldfb_params( pOutput_ene[idx] *= expf( exp_argument ); } -#ifdef HRTF_BINARY_FILE ivas_reverb_get_fastconv_hrtf_set_energies( hHrtfFastConv, input_audio_config, use_brir, output_Fs, avg_pwr_left, avg_pwr_right ); -#else - ivas_reverb_get_fastconv_hrtf_set_energies( input_audio_config, use_brir, output_Fs, avg_pwr_left, avg_pwr_right ); -#endif for ( idx = 0; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) { @@ -209,9 +199,7 @@ static void ivas_cldfb_convolver( *-----------------------------------------------------------------------------------------*/ static void get_IR_from_filter_taps( -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const int16_t hrtf_idx, const AUDIO_CONFIG input_audio_config, const int16_t use_brir, @@ -242,17 +230,10 @@ static void get_IR_from_filter_taps( { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { -#ifdef HRTF_BINARY_FILE convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftHRIRReal_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftHRIRImag_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightHRIRReal_HOA3[band_idx][hrtf_idx]; convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightHRIRImag_HOA3[band_idx][hrtf_idx]; -#else - convolver_state.filter_taps_left_re[band_idx] = leftHRIRReal_HOA3[band_idx][hrtf_idx]; - convolver_state.filter_taps_left_im[band_idx] = leftHRIRImag_HOA3[band_idx][hrtf_idx]; - convolver_state.filter_taps_right_re[band_idx] = rightHRIRReal_HOA3[band_idx][hrtf_idx]; - convolver_state.filter_taps_right_im[band_idx] = rightHRIRImag_HOA3[band_idx][hrtf_idx]; -#endif } } else @@ -283,34 +264,20 @@ static void get_IR_from_filter_taps( { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { -#ifdef HRTF_BINARY_FILE convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftBRIRReal[band_idx][array_idx]; convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftBRIRImag[band_idx][array_idx]; convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightBRIRReal[band_idx][array_idx]; convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightBRIRImag[band_idx][array_idx]; -#else - convolver_state.filter_taps_left_re[band_idx] = leftBRIRReal[band_idx][array_idx]; - convolver_state.filter_taps_left_im[band_idx] = leftBRIRImag[band_idx][array_idx]; - convolver_state.filter_taps_right_re[band_idx] = rightBRIRReal[band_idx][array_idx]; - convolver_state.filter_taps_right_im[band_idx] = rightBRIRImag[band_idx][array_idx]; -#endif } } else { for ( band_idx = 0; band_idx < BINAURAL_CONVBANDS; band_idx++ ) { -#ifdef HRTF_BINARY_FILE convolver_state.filter_taps_left_re[band_idx] = hHrtfFastConv->leftHRIRReal[band_idx][array_idx]; convolver_state.filter_taps_left_im[band_idx] = hHrtfFastConv->leftHRIRImag[band_idx][array_idx]; convolver_state.filter_taps_right_re[band_idx] = hHrtfFastConv->rightHRIRReal[band_idx][array_idx]; convolver_state.filter_taps_right_im[band_idx] = hHrtfFastConv->rightHRIRImag[band_idx][array_idx]; -#else - convolver_state.filter_taps_left_re[band_idx] = leftHRIRReal[band_idx][array_idx]; - convolver_state.filter_taps_left_im[band_idx] = leftHRIRImag[band_idx][array_idx]; - convolver_state.filter_taps_right_re[band_idx] = rightHRIRReal[band_idx][array_idx]; - convolver_state.filter_taps_right_im[band_idx] = rightHRIRImag[band_idx][array_idx]; -#endif } } } @@ -386,9 +353,7 @@ static void get_IR_from_filter_taps( static void ivas_reverb_get_cldfb_hrtf_set_properties( AUDIO_CONFIG input_audio_config, -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const int16_t use_brir, const int32_t sampling_rate, float *avg_pwr_left, @@ -432,11 +397,7 @@ static void ivas_reverb_get_cldfb_hrtf_set_properties( Loop over all the HRTFs available */ for ( hrtf_idx = 0; hrtf_idx < hrtf_count; hrtf_idx++ ) { -#ifdef HRTF_BINARY_FILE get_IR_from_filter_taps( hHrtfFastConv, hrtf_idx, input_audio_config, use_brir, sampling_rate, IR_length, current_HRTF_data_L, current_HRTF_data_R ); -#else - get_IR_from_filter_taps( hrtf_idx, input_audio_config, use_brir, sampling_rate, IR_length, current_HRTF_data_L, current_HRTF_data_R ); -#endif /* Perform forward FFT on both L/R channels */ fft_rel( current_HRTF_data_L, (int16_t) fft_size, (int16_t) log2_fft_size ); @@ -485,9 +446,7 @@ static void ivas_reverb_get_cldfb_hrtf_set_properties( *-----------------------------------------------------------------------------------------*/ static void ivas_reverb_get_fastconv_hrtf_set_energies( -#ifdef HRTF_BINARY_FILE const HRTFS_FASTCONV_HANDLE hHrtfFastConv, -#endif const AUDIO_CONFIG input_audio_config, const int16_t use_brir, const int32_t sampling_rate, @@ -511,11 +470,7 @@ static void ivas_reverb_get_fastconv_hrtf_set_energies( output_fc[freq_idx] = (float) ( ( 2 * freq_idx + 1 ) * cldfb_freq_halfstep ); } -#ifdef HRTF_BINARY_FILE ivas_reverb_get_cldfb_hrtf_set_properties( input_audio_config, hHrtfFastConv, use_brir, sampling_rate, avg_pwr_left_fft, avg_pwr_right_fft ); -#else - ivas_reverb_get_cldfb_hrtf_set_properties( input_audio_config, use_brir, sampling_rate, avg_pwr_left_fft, avg_pwr_right_fft ); -#endif ivas_reverb_interpolate_acoustic_data( FFT_SPECTRUM_SIZE, input_fc, avg_pwr_left_fft, avg_pwr_right_fft, CLDFB_NO_CHANNELS_MAX, output_fc, avg_pwr_left, avg_pwr_right ); diff --git a/lib_rend/ivas_rom_TdBinauralRenderer.c b/lib_rend/ivas_rom_TdBinauralRenderer.c index 50de3f253b..70daa6dff9 100644 --- a/lib_rend/ivas_rom_TdBinauralRenderer.c +++ b/lib_rend/ivas_rom_TdBinauralRenderer.c @@ -46,9 +46,7 @@ * TD Binaural rendering related ROM tables *------------------------------------------------------------------------*/ /* TD renderer HRTF default model Orange53 */ -#ifdef FIX_310_TD_REND_DELAY const float orange53_rom_latency_s = 0.000020834f; -#endif const int16_t orange53_rom_azimDim2[18] = { 1, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 1, }; diff --git a/lib_rend/ivas_rom_TdBinauralRenderer.h b/lib_rend/ivas_rom_TdBinauralRenderer.h index bbe970869b..ccb5362c9a 100644 --- a/lib_rend/ivas_rom_TdBinauralRenderer.h +++ b/lib_rend/ivas_rom_TdBinauralRenderer.h @@ -42,9 +42,7 @@ * TD Binaural rendering related ROM tables *------------------------------------------------------------------------*/ /* TD renderer HRTF default model Orange53 */ -#ifdef FIX_310_TD_REND_DELAY extern const float orange53_rom_latency_s; -#endif extern const int16_t orange53_rom_azimDim2[18]; extern const int16_t orange53_rom_azimDim3[18]; extern const int16_t orange53_rom_azim_start_idx[18]; diff --git a/lib_rend/ivas_rom_binauralRenderer.c b/lib_rend/ivas_rom_binauralRenderer.c index 9d6bbd543e..763777ad28 100644 --- a/lib_rend/ivas_rom_binauralRenderer.c +++ b/lib_rend/ivas_rom_binauralRenderer.c @@ -52,11 +52,7 @@ * Generated with Matlab version 9.3.0.713579 (R2017b) by MUXE6256 */ const float FASTCONV_HOA3_latency_s = 0.001979167f; -#ifdef HRTF_BINARY_FILE const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= -#else -const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= -#endif { { {-0.004181f, +0.093228f, +0.655506f, +0.048565f, -0.005834f, -0.005472f, -0.000066f}, @@ -960,11 +956,7 @@ const float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= } }; -#ifdef HRTF_BINARY_FILE const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= -#else -const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= -#endif { { {-0.007849f, -0.189662f, +0.310868f, +0.002657f, -0.000617f, -0.002064f, +0.000079f}, @@ -1868,11 +1860,7 @@ const float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= } }; -#ifdef HRTF_BINARY_FILE const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= -#else -const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= -#endif { { {-0.004181f, +0.093228f, +0.655506f, +0.048565f, -0.005834f, -0.005472f, -0.000066f}, @@ -2776,11 +2764,7 @@ const float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]= } }; -#ifdef HRTF_BINARY_FILE const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]= -#else -const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= -#endif { { {-0.007849f, -0.189662f, +0.310868f, +0.002657f, -0.000617f, -0.002064f, +0.000079f}, @@ -3685,11 +3669,7 @@ const float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]= }; const float FASTCONV_HRIR_latency_s = 0.000666667f; -#ifdef HRTF_BINARY_FILE const float leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= -#else -const float leftHRIRReal[BINAURAL_CONVBANDS][15][7]= -#endif { { {+0.331798f, +0.500334f, +0.042057f, -0.000623f, -0.000260f}, @@ -4543,11 +4523,7 @@ const float leftHRIRReal[BINAURAL_CONVBANDS][15][7]= } }; -#ifdef HRTF_BINARY_FILE const float leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= -#else -const float leftHRIRImag[BINAURAL_CONVBANDS][15][7]= -#endif { { {-0.346479f, +0.553523f, -0.074098f, +0.001288f, +0.000309f}, @@ -5401,11 +5377,7 @@ const float leftHRIRImag[BINAURAL_CONVBANDS][15][7]= } }; -#ifdef HRTF_BINARY_FILE const float rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= -#else -const float rightHRIRReal[BINAURAL_CONVBANDS][15][7]= -#endif { { {+0.065097f, +0.755993f, -0.042308f, -0.016140f, -0.000353f}, @@ -6259,11 +6231,7 @@ const float rightHRIRReal[BINAURAL_CONVBANDS][15][7]= } }; -#ifdef HRTF_BINARY_FILE const float rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]= -#else -const float rightHRIRImag[BINAURAL_CONVBANDS][15][7]= -#endif { { {-0.179291f, +0.196331f, +0.055128f, -0.017382f, +0.000411f}, @@ -7649,11 +7617,7 @@ const float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]= /* Binaural rendering data set based on BRIRs */ /* Tables derived from Mozart IIS BRIRs.*/ const float FASTCONV_BRIR_latency_s = 0.000937500f; -#ifdef HRTF_BINARY_FILE const float leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= -#else -const float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= -#endif { { { @@ -16757,11 +16721,7 @@ const float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; -#ifdef HRTF_BINARY_FILE const float leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= -#else -const float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= -#endif { { { @@ -25865,11 +25825,7 @@ const float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; -#ifdef HRTF_BINARY_FILE const float rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= -#else -const float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= -#endif { { { @@ -34973,11 +34929,7 @@ const float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= } }; -#ifdef HRTF_BINARY_FILE const float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]= -#else -const float rightBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]= -#endif { { { diff --git a/lib_rend/ivas_rom_binauralRenderer.h b/lib_rend/ivas_rom_binauralRenderer.h index f97883f9c3..939f6ef78f 100644 --- a/lib_rend/ivas_rom_binauralRenderer.h +++ b/lib_rend/ivas_rom_binauralRenderer.h @@ -44,29 +44,15 @@ /* Binaural rendering data set based on HRIRs */ extern const float FASTCONV_HRIR_latency_s; -#ifdef HRTF_BINARY_FILE extern float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; extern float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; extern float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; extern float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][HRTF_SH_CHANNELS][BINAURAL_NTAPS]; -#else -extern float leftHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]; -extern float leftHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]; -extern float rightHRIRReal_HOA3[BINAURAL_CONVBANDS][16][7]; -extern float rightHRIRImag_HOA3[BINAURAL_CONVBANDS][16][7]; -#endif -#ifdef HRTF_BINARY_FILE extern float leftHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; extern float leftHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; extern float rightHRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; extern float rightHRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS]; -#else -extern float leftHRIRReal[BINAURAL_CONVBANDS][15][7]; -extern float leftHRIRImag[BINAURAL_CONVBANDS][15][7]; -extern float rightHRIRReal[BINAURAL_CONVBANDS][15][7]; -extern float rightHRIRImag[BINAURAL_CONVBANDS][15][7]; -#endif extern float FASTCONV_HOA3_latency_s; extern float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; @@ -75,17 +61,10 @@ extern float hrtfShCoeffsIm[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; /* Binaural rendering data set based on BRIRs */ extern const float FASTCONV_BRIR_latency_s; -#ifdef HRTF_BINARY_FILE extern float leftBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; extern float leftBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; extern float rightBRIRReal[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; extern float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_MAX]; -#else -extern float leftBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; -extern float leftBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; -extern float rightBRIRReal[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; -extern float rightBRIRImag[BINAURAL_CONVBANDS][15][BINAURAL_NTAPS_MAX]; -#endif /* Reverberation parameters based on BRIRs for fastconv */ extern float fastconvReverberationTimes[CLDFB_NO_CHANNELS_MAX]; diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 05bf6a930b..f657dd6672 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -351,7 +351,7 @@ void rotateFrame_shd( /* get next quaternion */ #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, - hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], + &hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); @@ -464,7 +464,7 @@ void rotateFrame_sd( /* Get next quaternion and calculate rotation matrix */ #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, - hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], + &hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); @@ -705,7 +705,7 @@ void rotateFrame_sd_cldfb( /* Get next quaternion and calculate rotation matrix */ #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, - hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], + &hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, Rmat ); diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 4f6be735ff..94486943b5 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -786,9 +786,7 @@ typedef struct TDREND_HRFILT_FiltSet_struct ModelEval_t ModelEval; ModelParamsITD_t ModelParamsITD; TDREND_HRFILT_Method_t FilterMethod; /* HR filtering method */ -#ifdef FIX_310_TD_REND_DELAY float latency_s; -#endif } TDREND_HRFILT_FiltSet_t; @@ -940,8 +938,6 @@ typedef struct ivas_binaural_crend_wrapper_struct } CREND_WRAPPER, *CREND_WRAPPER_HANDLE; -#ifdef HRTF_BINARY_FILE - /* htrfs from binary files. */ typedef struct ivas_hrtfs_crend_structure @@ -970,9 +966,7 @@ typedef struct ivas_hrtfs_file_header_t } ivas_hrtfs_file_header_t; -#endif -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_fastconv_struct { float FASTCONV_HRIR_latency_s; @@ -997,9 +991,7 @@ typedef struct ivas_hrtfs_fastconv_struct float fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX]; } HRTFS_FASTCONV, *HRTFS_FASTCONV_HANDLE; -#endif -#ifdef HRTF_BINARY_FILE typedef struct ivas_hrtfs_parambin_struct { float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS]; @@ -1010,7 +1002,6 @@ typedef struct ivas_hrtfs_parambin_struct float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX]; } HRTFS_PARAMBIN, *HRTFS_PARAMBIN_HANDLE; -#endif /*----------------------------------------------------------------------------------* * LFE decoder structure diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 05286106ef..d687b07d57 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1095,9 +1095,7 @@ static ivas_error setRendInputActiveIsm( #ifdef FIX_197_CREND_INTERFACE 0, #endif -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); } if ( error != IVAS_ERR_OK ) @@ -1802,9 +1800,7 @@ static ivas_error initMcBinauralRendering( #ifdef FIX_197_CREND_INTERFACE 0, #endif -#ifdef HRTF_BINARY_FILE NULL, -#endif outSampleRate ) ) != IVAS_ERR_OK ) { return error; @@ -2077,15 +2073,11 @@ static ivas_error updateSbaPanGains( case IVAS_REND_AUDIO_CONFIG_BINAURAL: #ifdef FIX_197_CREND_INTERFACE error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, 0, -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); #else error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); #endif break; @@ -2096,15 +2088,11 @@ static ivas_error updateSbaPanGains( } #ifdef FIX_197_CREND_INTERFACE error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, 0, -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); #else error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_REND_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, -#ifdef HRTF_BINARY_FILE NULL, -#endif *rendCtx.pOutSampleRate ); #endif break; @@ -2225,17 +2213,10 @@ static ivas_error initMasaDummyDecForMcOut( input_masa *inputMasa, IVAS_REND_Aud if ( decDummy->renderer_type == RENDERER_STEREO_PARAMETRIC ) { -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy, NULL ) ) != IVAS_ERR_OK ) { return error; } -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif decDummy->hDiracDecBin->useSubframeMode = 0; /* Todo Nokia: This will disappear in later work but needs to be this now. */ } @@ -2381,7 +2362,6 @@ static ivas_error initMasaDummyDecForBinauralOut( input_masa *inputMasa, IVAS_RE { return error; } -#ifdef HRTF_BINARY_FILE if ( ( error = ivas_dirac_dec_binaural_copy_hrtfs( &decDummy->hHrtfParambin ) ) != IVAS_ERR_OK ) { return error; @@ -2391,12 +2371,6 @@ static ivas_error initMasaDummyDecForBinauralOut( input_masa *inputMasa, IVAS_RE { return error; } -#else - if ( ( error = ivas_dirac_dec_init_binaural_data( decDummy ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif decDummy->hDiracDecBin->useSubframeMode = 0; /* Todo Nokia: This will disappear in later work but needs to be this now. */ @@ -3412,9 +3386,7 @@ ivas_error IVAS_REND_GetDelay( */ int16_t i; int32_t latency_ns; -#ifdef FIX_310_TD_REND_DELAY int32_t max_latency_ns; -#endif /*-----------------------------------------------------------------* * Validate function arguments @@ -3427,9 +3399,7 @@ ivas_error IVAS_REND_GetDelay( *timeScale = hIvasRend->sampleRateOut; *nSamples = 0; -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = 0; -#endif /* Compute the maximum delay across all inputs */ for ( i = 0; i < RENDERER_MAX_ISM_INPUTS; i++ ) @@ -3443,11 +3413,7 @@ ivas_error IVAS_REND_GetDelay( latency_ns = max( hIvasRend->inputsIsm[i].crendWrapper.binaural_latency_ns, hIvasRend->inputsIsm[i].tdRendWrapper.binaural_latency_ns ); #endif -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = max( max_latency_ns, latency_ns ); -#else - *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); -#endif } } @@ -3462,11 +3428,7 @@ ivas_error IVAS_REND_GetDelay( latency_ns = max( hIvasRend->inputsMc[i].crendWrapper.binaural_latency_ns, hIvasRend->inputsMc[i].tdRendWrapper.binaural_latency_ns ); #endif -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = max( max_latency_ns, latency_ns ); -#else - *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); -#endif } } @@ -3479,11 +3441,7 @@ ivas_error IVAS_REND_GetDelay( #else latency_ns = hIvasRend->inputsSba[i].crendWrapper.binaural_latency_ns; #endif -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = max( max_latency_ns, latency_ns ); -#else - *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); -#endif } } @@ -3492,17 +3450,11 @@ ivas_error IVAS_REND_GetDelay( if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); -#ifdef FIX_310_TD_REND_DELAY max_latency_ns = max( max_latency_ns, latency_ns ); -#else - *nSamples = max( *nSamples, NS2SA( *timeScale, latency_ns ) ); -#endif } } -#ifdef FIX_310_TD_REND_DELAY *nSamples = (int16_t) roundf( (float) max_latency_ns * *timeScale / 1000000000.f ); -#endif return IVAS_ERR_OK; } @@ -4009,7 +3961,7 @@ static ivas_error rotateFrameMc( /* Get next quaternion and calculate rotation matrix */ #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( headRotData->hOrientationTracker, - headRotData->headPositions[subframe_idx], + &headRotData->headPositions[subframe_idx], (float) ( FRAMES_PER_SEC * RENDERER_HEAD_POSITIONS_PER_FRAME ), &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, Rmat ); @@ -4118,7 +4070,7 @@ static ivas_error rotateFrameSba( /* Get next quaternion and calculate rotation matrix */ #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( headRotData->hOrientationTracker, - headRotData->headPositions[subframe_idx], + &headRotData->headPositions[subframe_idx], (float) ( FRAMES_PER_SEC * RENDERER_HEAD_POSITIONS_PER_FRAME ), &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, Rmat ); @@ -4256,7 +4208,7 @@ static ivas_error renderIsmToBinauralRoom( { #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_Process( headRotData->hOrientationTracker, - headRotData->headPositions[subframe_idx], + &headRotData->headPositions[subframe_idx], (float) ( FRAMES_PER_SEC ), &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, Rmat ); diff --git a/lib_util/hrtf_file_reader.c b/lib_util/hrtf_file_reader.c index 21f2a2988d..c52b06d6f0 100644 --- a/lib_util/hrtf_file_reader.c +++ b/lib_util/hrtf_file_reader.c @@ -36,9 +36,7 @@ #include "prot.h" // VE: !!!!! #include "ivas_prot.h" // VE: !!!!! -#ifdef HRTF_BINARY_FILE #include "lib_dec.h" -#endif struct hrtfFileReader { @@ -120,8 +118,6 @@ void hrtfFileReader_close( } -#ifdef HRTF_BINARY_FILE - /*-------------------------------------------------------------------* * read_and_check_hrtf_binary_file_header() * @@ -176,10 +172,8 @@ static ivas_error check_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header ) { // Check the renderer type if ( ( hrtf_header->rend_type != RENDERER_BINAURAL_MIXER_CONV ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) && -#ifdef HRTF_BINARY_FILE ( hrtf_header->rend_type != RENDERER_BINAURAL_FASTCONV ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_FASTCONV_ROOM ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_PARAMETRIC ) && ( hrtf_header->rend_type != RENDERER_BINAURAL_PARAMETRIC_ROOM ) && -#endif ( hrtf_header->rend_type != RENDERER_BINAURAL_OBJECTS_TD ) ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Header of HRTF binary file not compliant (renderer type)" ); @@ -222,8 +216,6 @@ static ivas_error read_hrtf_binary_header( ivas_hrtfs_header_t *hrtf_header, FIL return IVAS_ERR_END_OF_FILE; } -#endif - /*-------------------------------------------------------------------* * LoadBSplineBinaryITD() @@ -298,9 +290,7 @@ static ivas_error LoadBSplineBinary( ModelParams_t *model; int16_t i, tmp; -#ifdef FIX_310_TD_REND_DELAY fread( &HrFiltSet_p->latency_s, sizeof( float ), 1, f_hrtf ); -#endif model = &( HrFiltSet_p->ModelParams ); @@ -439,7 +429,6 @@ static ivas_error TDREND_MIX_LoadHRTF( int16_t tmp; ivas_error error; -#ifdef HRTF_BINARY_FILE bool is_tdrend; ivas_error header_check_result; @@ -449,11 +438,9 @@ static ivas_error TDREND_MIX_LoadHRTF( int32_t hrtf_data_size_max; char *hrtf_data; -#endif error = IVAS_ERR_OK; -#ifdef HRTF_BINARY_FILE if ( ( header_check_result = read_and_check_hrtf_binary_file_header( &hrtfs_file_header, f_hrtf ) ) != IVAS_ERR_OK ) { @@ -501,7 +488,6 @@ static ivas_error TDREND_MIX_LoadHRTF( free( hrtf_data ); if ( is_tdrend ) -#endif { if ( fread( &tmp, 1, sizeof( int16_t ), f_hrtf ) == 0 ) { @@ -519,12 +505,10 @@ static ivas_error TDREND_MIX_LoadHRTF( error = LoadBSplineBinary( HrFiltSet_p, f_hrtf ); } } -#ifdef HRTF_BINARY_FILE else { return IVAS_ERROR( IVAS_ERR_INVALID_HRTF, "HR filter not found in binary file." ); } -#endif return error; } @@ -543,9 +527,7 @@ ivas_error load_HRTF_binary( { ivas_error error; -#ifdef HRTF_BINARY_FILE fseek( hrtfReader->file, 0, SEEK_SET ); -#endif error = TDREND_MIX_LoadHRTF( hrtfReader->file, hHrtf ); @@ -625,12 +607,10 @@ ivas_error dealloc_HRTF_binary( ivas_error error; error = IVAS_ERR_OK; -#ifdef HRTF_BINARY_FILE if ( hHrtf == NULL ) { return error; } -#endif if ( !hHrtf->ModelParams.modelROM ) { @@ -677,7 +657,6 @@ ivas_error dealloc_HRTF_binary( return error; } -#ifdef HRTF_BINARY_FILE /*------------------------------------------------------------------------- * ivas_hrtf_init() @@ -944,7 +923,6 @@ static ivas_error create_HRTF_from_rawdata( return IVAS_ERR_OK; } -#ifdef HRTF_BINARY_FILE static ivas_error init_fastconv_HRTF_handle( HRTFS_FASTCONV *hHrtf /* i/o: HRTF FastConv handle */ ) @@ -1272,10 +1250,8 @@ ivas_error load_fastconv_HRTF_from_binary( return IVAS_ERR_OK; } -#endif -#ifdef HRTF_BINARY_FILE static ivas_error create_parambin_HRTF_from_rawdata( HRTFS_PARAMBIN_HANDLE *hHRTF, /* i/o: Parametric binauralizer HRTF handle */ char *hrtf_data /* i : pointer to binary file */ @@ -1409,7 +1385,6 @@ ivas_error load_parambin_HRTF_from_binary( return IVAS_ERR_OK; } -#endif /*---------------------------------------------------------------------* @@ -1514,4 +1489,81 @@ ivas_error create_SetOfHRTF_from_binary( return IVAS_ERR_OK; } + +#ifdef FIX_MEMORY_COUNTING_HRTF_BINARY_FILE +/*---------------------------------------------------------------------* + * destroy_HRTF() + * + * Destroy the HRTF CRend handle + *---------------------------------------------------------------------*/ + +static ivas_error destroy_HRTF( + HRTFS_HANDLE *hHRTF /* i/o: HRTF CRend handle */ +) +{ + uint16_t i, j; + + if ( *hHRTF != NULL && hHRTF != NULL ) + { + for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) + { + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( ( *hHRTF )->pIndex_frequency_max[i][j] != NULL ) + { + free( ( *hHRTF )->pIndex_frequency_max[i][j] ); + } + if ( ( *hHRTF )->pOut_to_bin_re[i][j] != NULL ) + { + free( ( *hHRTF )->pOut_to_bin_re[i][j] ); + } + if ( ( *hHRTF )->pOut_to_bin_im[i][j] != NULL ) + { + free( ( *hHRTF )->pOut_to_bin_im[i][j] ); + } + } + } + for ( j = 0; j < BINAURAL_CHANNELS; j++ ) + { + if ( ( *hHRTF )->pIndex_frequency_max_diffuse[j] != NULL ) + { + free( ( *hHRTF )->pIndex_frequency_max_diffuse[j] ); + } + if ( ( *hHRTF )->pOut_to_bin_diffuse_re[j] != NULL ) + { + free( ( *hHRTF )->pOut_to_bin_diffuse_re[j] ); + } + if ( ( *hHRTF )->pOut_to_bin_diffuse_im[j] != NULL ) + { + free( ( *hHRTF )->pOut_to_bin_diffuse_im[j] ); + } + } + + free( *hHRTF ); + *hHRTF = NULL; + } + + return IVAS_ERR_OK; +} + +/*---------------------------------------------------------------------* + * destroy_SetOfHRTF() + * + * Destroy the HRTF data set. + *---------------------------------------------------------------------*/ + +ivas_error destroy_SetOfHRTF( + HRTFS_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ +) +{ + if ( hSetOfHRTF != NULL ) + { + destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_combined ) ); + destroy_HRTF( &( hSetOfHRTF->hHRTF_hrir_hoa3 ) ); + destroy_HRTF( &( hSetOfHRTF->hHRTF_brir_combined ) ); + } + + return IVAS_ERR_OK; +} + #endif diff --git a/lib_util/hrtf_file_reader.h b/lib_util/hrtf_file_reader.h index b446551150..3d9a901c24 100644 --- a/lib_util/hrtf_file_reader.h +++ b/lib_util/hrtf_file_reader.h @@ -73,7 +73,6 @@ ivas_error load_HRTF_binary( const hrtfFileReader *hrtfReader /* i/o: pointer to hrtfFileReader handle */ ); -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * create_SetOfHRTF_from_binary() * @@ -96,9 +95,7 @@ ivas_error destroy_SetOfHRTF( IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF /* i/o: Set of HRTF CRend handle */ ); -#endif -#ifdef HRTF_BINARY_FILE /*---------------------------------------------------------------------* * load_fastconv_HRTF_from_binary() * @@ -122,7 +119,6 @@ ivas_error load_parambin_HRTF_from_binary( const hrtfFileReader *hrtfReader /* i : pointer to hrtfFileReader handle */ ); -#endif /*---------------------------------------------------------------------* * dealloc_HRTF_binary() diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 8d485afccf..7f94afadb6 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -8,39 +8,17 @@ // (the easiest way how to achieve this is to use the name of the test vector itself, as shown below) -// DFT stereo at 13.2 kbps, 16kHz in, 16kHz out, DTX on, random FEC at 5% -../IVAS_cod -stereo 1 -dtx 13200 16 testv/stvST16n.pcm bit -../IVAS_dec -fec 5 STEREO 16 bit testv/stvST16n.pcm_DFT_13200_16-16_DTX_FEC5.tst - -// DFT stereo at 16.4 kbps, 32kHz in, 16kHz out, DTX on -../IVAS_cod -stereo 1 -dtx 16400 32 testv/stvST32n.pcm bit -../IVAS_dec STEREO 16 bit testv/stvST32n.pcm_DFT_16400_32-16_DTX.tst - -// DFT stereo at 24.4 kbps, 32kHz in, 32kHz out, DTX on, MONO out -../IVAS_cod -stereo 1 -dtx 24400 32 testv/stvST32n.pcm bit -../IVAS_dec MONO 32 bit testv/stvST32n.pcm_DFT_24400_32-32_DTX_MONO.tst - -// DFT stereo at 32 kbps, 32kHz in, 48kHz out, MONO out, 6% FEC pattern -../IVAS_cod -stereo 1 32000 32 testv/stvST32c.pcm bit -../IVAS_dec -fec testv/FEC_6pct.bin MONO 48 bit testv/stvST32c.pcm_DFT_32000_32-48_MONO_FEC6.tst - - -// TD stereo at 13.2 kbps, 16kHz in, 16kHz out, DTX on, random FEC at 5% -../IVAS_cod -stereo 2 -dtx 13200 16 testv/stvST16n.pcm bit -../IVAS_dec -fec 5 STEREO 16 bit testv/stvST16n.pcm_TD_13200_16-16_DTX_FEC5.tst - -// TD stereo at 16.4 kbps, 32kHz in, 16kHz out, DTX on -../IVAS_cod -stereo 2 -dtx 16400 32 testv/stvST32n.pcm bit -../IVAS_dec STEREO 16 bit testv/stvST32n.pcm_TD_16400_32-16_DTX.tst - -// TD stereo at 24.4 kbps, 32kHz in, 32kHz out, DTX on, MONO out -../IVAS_cod -stereo 2 -dtx 24400 32 testv/stvST32n.pcm bit -../IVAS_dec MONO 32 bit testv/stvST32n.pcm_TD_24400_32-32_DTX_MONO.tst +// Unified stereo at 13.2 kbps, 16kHz in, 16kHz out, DTX on, random FEC at 5% +../IVAS_cod -stereo -dtx 13200 16 testv/stvST16n.pcm bit +../IVAS_dec -fec 5 STEREO 16 bit testv/stvST16n.pcm_Unified_13200_16-16_DTX_FEC5.tst -// TD stereo at 32 kbps, 48kHz in, 32kHz out, random FEC at 5% -../IVAS_cod -stereo 2 32000 48 testv/stvST48c.pcm bit -../IVAS_dec -fec 5 STEREO 32 bit testv/stvST48c.pcm_TD_32000_48-32_FEC5.tst +// Unified stereo at 16.4 kbps, 32kHz in, 16kHz out, DTX on +../IVAS_cod -stereo -dtx 16400 32 testv/stvST32n.pcm bit +../IVAS_dec STEREO 16 bit testv/stvST32n.pcm_Unified_16400_32-16_DTX.tst +// Unified stereo at 32 kbps, 32kHz in, 48kHz out, MONO out, 6% FEC pattern +../IVAS_cod -stereo 32000 32 testv/stvST32c.pcm bit +../IVAS_dec -fec testv/FEC_6pct.bin MONO 48 bit testv/stvST32c.pcm_Unified_32000_32-48_MONO_FEC6.tst // unified stereo at 13.2 kbps, 16kHz in, 16kHz out ../IVAS_cod -stereo 13200 16 testv/stvST16c.pcm bit @@ -435,9 +413,9 @@ ../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit ../IVAS_dec BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural.tst -// SBA at 24.4 kbps, 32kHz in, 32kHz out, BINAURAL out, Subframe, random FEC at 5% +// SBA at 24.4 kbps, 32kHz in, 32kHz out, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit -../IVAS_dec -fec 5 -force_subframe_bin BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Subframe_FEC5.tst +../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Subframe_FEC5.tst // SBA at 24.4 kbps, 32kHz in, 32kHz out, BINAURAL out, Headrotation ../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit @@ -483,9 +461,9 @@ ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit ../IVAS_dec BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom.tst -// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Subframe +// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit -../IVAS_dec -force_subframe_bin BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Subframe.tst +../IVAS_dec BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Subframe.tst // SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit @@ -631,9 +609,9 @@ ../IVAS_cod -masa 1 testv/stv_IVASMASA_1dir1TC.met 24400 48 testv/stv_IVASMASA_1dir1TC.pcm bit ../IVAS_dec BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir1TC.pcm_24400_48-48_BinauralRoom.tst -// MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Subframe +// MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out ../IVAS_cod -masa 1 testv/stv_IVASMASA_1dir1TC.met 24400 48 testv/stv_IVASMASA_1dir1TC.pcm bit -../IVAS_dec -force_subframe_bin BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir1TC.pcm_24400_48-48_BinauralRoom_Subframe.tst +../IVAS_dec BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir1TC.pcm_24400_48-48_BinauralRoom_Subframe.tst // MASA 1dir 1TC at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Headrotation ../IVAS_cod -masa 1 testv/stv_IVASMASA_1dir1TC.met 24400 48 testv/stv_IVASMASA_1dir1TC.pcm bit @@ -655,9 +633,9 @@ ../IVAS_cod -masa 1 testv/stv_IVASMASA_2dir1TC.met 128000 48 testv/stv_IVASMASA_2dir1TC.pcm bit ../IVAS_dec -fec 5 BINAURAL 48 bit testv/stv_IVASMASA_2dir1TC.pcm_128000_48-48_BINAURAL_FEC5.tst -// MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out, Subframe +// MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out ../IVAS_cod -masa 1 testv/stv_IVASMASA_2dir1TC.met 128000 48 testv/stv_IVASMASA_2dir1TC.pcm bit -../IVAS_dec -force_subframe_bin BINAURAL 48 bit testv/stv_IVASMASA_2dir1TC.pcm_128000_48-48_BINAURAL_Subframe.tst +../IVAS_dec BINAURAL 48 bit testv/stv_IVASMASA_2dir1TC.pcm_128000_48-48_BINAURAL_Subframe.tst // MASA 2dir 1TC at 128 kbps, 48kHz in, 48kHz out, BINAURAL out, Headrotation ../IVAS_cod -masa 1 testv/stv_IVASMASA_2dir1TC.met 128000 48 testv/stv_IVASMASA_2dir1TC.pcm bit @@ -731,9 +709,9 @@ ../IVAS_cod -masa 2 testv/stv_IVASMASA_2dir2TC.met 384000 48 testv/stv_IVASMASA_2dir2TC.pcm bit ../IVAS_dec BINAURAL_ROOM 48 bit testv/stv_IVASMASA_2dir2TC.pcm_384000_48-48_BinauralRoom.tst -// MASA 2dir 2TC at 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out, Subframe +// MASA 2dir 2TC at 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM out ../IVAS_cod -masa 2 testv/stv_IVASMASA_2dir2TC.met 384000 48 testv/stv_IVASMASA_2dir2TC.pcm bit -../IVAS_dec -force_subframe_bin BINAURAL_ROOM 48 bit testv/stv_IVASMASA_2dir2TC.pcm_384000_48-48_BinauralRoom_Subframe.tst +../IVAS_dec BINAURAL_ROOM 48 bit testv/stv_IVASMASA_2dir2TC.pcm_384000_48-48_BinauralRoom_Subframe.tst // MASA 2dir 2TC at 512 kbps, 48kHz in, 48kHz out, 5_1 out ../IVAS_cod -masa 2 testv/stv_IVASMASA_2dir2TC.met 512000 48 testv/stv_IVASMASA_2dir2TC.pcm bit @@ -772,9 +750,9 @@ ../IVAS_cod -mc 5_1 24400 48 testv/stv51MC48c.pcm bit ../IVAS_dec -fec 5 BINAURAL 48 bit testv/stv51MC48c.pcm_MC51_24400_48-48_Binaural_FEC5.tst -// Multi-channel 5_1 at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL out, Subframe +// Multi-channel 5_1 at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL out ../IVAS_cod -mc 5_1 24400 48 testv/stv51MC48c.pcm bit -../IVAS_dec -force_subframe_bin BINAURAL 48 bit testv/stv51MC48c.pcm_MC51_24400_48-48_Binaural_Subframe.tst +../IVAS_dec BINAURAL 48 bit testv/stv51MC48c.pcm_MC51_24400_48-48_Binaural_Subframe.tst // Multi-channel 5_1 at 24.4 kbps, 48kHz in, 48kHz out, BINAURAL out, Headrotation ../IVAS_cod -mc 5_1 24400 48 testv/stv51MC48c.pcm bit diff --git a/scripts/config/self_test_evs.prm b/scripts/config/self_test_evs.prm index a45a4a032e..b0013bc876 100644 --- a/scripts/config/self_test_evs.prm +++ b/scripts/config/self_test_evs.prm @@ -196,12 +196,12 @@ -// Codec switching A-B between (ACELP-only) 7.2 and 16.4 kbps, 16kHz in, 16kHz out -../IVAS_cod -force speech ../scripts/switchPaths/wb_low1.bin 16 testv/stv16n.pcm bit +// Codec switching A-B between 7.2 and 16.4 kbps, 16kHz in, 16kHz out +../IVAS_cod ../scripts/switchPaths/wb_low1.bin 16 testv/stv16n.pcm bit ../IVAS_dec 16 bit testv/stv16n_07_16k_16-16.tst -// Codec switching A-B between (MUSIC-only) 13.2 and 64 kbps, 16kHz in, 16kHz out -../IVAS_cod -force music ../scripts/switchPaths/wb_high1.bin 16 testv/stv16n.pcm bit +// Codec switching A-B between 13.2 and 64 kbps, 16kHz in, 16kHz out +../IVAS_cod ../scripts/switchPaths/wb_high1.bin 16 testv/stv16n.pcm bit ../IVAS_dec 16 bit testv/stv16n_13_64k_16-16.tst // Codec switching A-B between 5.9 and 64 kbps, 16kHz in, 16kHz out diff --git a/scripts/pyaudio3dtools/audio3dtools.py b/scripts/pyaudio3dtools/audio3dtools.py index a325a433b5..e6c03d7b73 100755 --- a/scripts/pyaudio3dtools/audio3dtools.py +++ b/scripts/pyaudio3dtools/audio3dtools.py @@ -194,6 +194,10 @@ def main(): handlers=[console_handler], ) logger.info("Audio3DTools") + logger.info( + "Attention: you are using an older version of the pyaudio3dtools scripts (not including ISM-> binaural reference renderer or loudness tool)" + ) + logger.info("For the newest version see branch python_scripts_updates") if args.list is True or args.long is True: logger.info("===Supported spatial audio formats===") -- GitLab From b820c048f8d24c1d2e10c5f5481e63a91bf19661 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 16 Feb 2023 00:16:05 +0100 Subject: [PATCH 061/140] merge 109/343 --- apps/decoder.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index aad664bea3..5217fab58f 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -956,7 +956,7 @@ static bool parseCmdlIVAS_dec( char tmp[4]; strcpy( tmp, argv[i + 1] ); #endif -#ifdef FIX_I109_ORIENTATION_TRACKING // TODO @Philips needs merge with FIX_343_TO_UPPER +#ifdef FIX_I109_ORIENTATION_TRACKING char *tmp = to_upper( argv[i + 1] ); if ( strcmp( to_upper( tmp ), "NONE" ) == 0 ) { @@ -964,10 +964,12 @@ static bool parseCmdlIVAS_dec( } else if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) #else - - +#ifdef FIX_343_TO_UPPER + char tmp[4]; + strcpy( tmp, argv[i + 1] ); +#endif /* 343 */ if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) -#endif +#endif /* 109 */ { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; } -- GitLab From 8cb56512029ad061789c376e639cd304098ea44d Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 16 Feb 2023 00:28:14 +0100 Subject: [PATCH 062/140] Revert "merge 109/343" This reverts commit b820c048f8d24c1d2e10c5f5481e63a91bf19661. --- apps/decoder.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 5217fab58f..aad664bea3 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -956,7 +956,7 @@ static bool parseCmdlIVAS_dec( char tmp[4]; strcpy( tmp, argv[i + 1] ); #endif -#ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef FIX_I109_ORIENTATION_TRACKING // TODO @Philips needs merge with FIX_343_TO_UPPER char *tmp = to_upper( argv[i + 1] ); if ( strcmp( to_upper( tmp ), "NONE" ) == 0 ) { @@ -964,12 +964,10 @@ static bool parseCmdlIVAS_dec( } else if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) #else -#ifdef FIX_343_TO_UPPER - char tmp[4]; - strcpy( tmp, argv[i + 1] ); -#endif /* 343 */ + + if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) -#endif /* 109 */ +#endif { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; } -- GitLab From 0bcb8dd2f9f96e34e0da0adb06eb6a5dcc42b6c6 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Thu, 16 Feb 2023 00:53:03 +0100 Subject: [PATCH 063/140] fix 109/343 conflicts --- apps/decoder.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index aad664bea3..7fac28c52c 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -932,6 +932,7 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } +#else #ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i + 1], sizeof( argv_to_upper ) - 1 ); @@ -956,18 +957,20 @@ static bool parseCmdlIVAS_dec( char tmp[4]; strcpy( tmp, argv[i + 1] ); #endif -#ifdef FIX_I109_ORIENTATION_TRACKING // TODO @Philips needs merge with FIX_343_TO_UPPER +#ifdef FIX_I109_ORIENTATION_TRACKING +#ifndef FIX_343_TO_UPPER + if ( strcmp( to_upper( tmp ), "NON" ) == 0 ) +#else char *tmp = to_upper( argv[i + 1] ); if ( strcmp( to_upper( tmp ), "NONE" ) == 0 ) +#endif { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; } else if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) #else - - if ( strcmp( to_upper( tmp ), "REF" ) == 0 ) -#endif +#endif /* 109 */ { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; } @@ -981,7 +984,7 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } -#endif +#endif /* n109 */ i += 2; } #ifdef FIX_I109_ORIENTATION_TRACKING -- GitLab From 788123e09b2307de27bbb389ff17e0c1b4a215b0 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 16 Feb 2023 09:47:05 +0100 Subject: [PATCH 064/140] Further merge-related fixes --- lib_com/ivas_prot.h | 2 +- lib_rend/ivas_objectRenderer.c | 14 +++++++------- lib_rend/ivas_orient_trk.c | 20 ++++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 01634b60a6..fb0b9d4450 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5731,7 +5731,7 @@ ivas_error ivas_orient_trk_GetTrackedRotation( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ - const IVAS_QUATERNION *absRot, /* i : absolute head rotation */ + const IVAS_QUATERNION *pAbsRot, /* i : absolute head rotation */ float updateRate, /* i : rotation update rate [Hz] */ IVAS_QUATERNION *pTrkRot /* o : tracked rotation */ ); diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 6d8aa1708c..ddd4d06f9e 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -482,7 +482,7 @@ void ObjRenderIVASFrame( #else if ( st_ivas->hHeadTrackData != NULL ) { - if ( ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hHeadTrackData->Quaternions[subframe_idx], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) + if ( ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, &st_ivas->hHeadTrackData->Quaternions[subframe_idx], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) { exit( -1 ); } @@ -956,10 +956,10 @@ ivas_error ivas_rend_TDObjRenderFrame( #ifdef FIX_198_TDREND_INTERFACE AUDIO_CONFIG transport_config; int32_t output_Fs; -#endif - +#else #ifdef FIX_I109_ORIENTATION_TRACKING IVAS_QUATERNION trackedHeadOrientation; +#endif #endif push_wmops( "ivas_rend_TDObjRenderFrame" ); @@ -1007,10 +1007,10 @@ ivas_error ivas_rend_TDObjRenderFrame( ObjRenderIVASFrame_unwrap( NULL, 1, NULL, transport_config, output_Fs, pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, headRotData->headRotEnabled, ( headRotData != NULL ) ? headRotData->headPositions : NULL, output, output_frame - #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef FIX_I109_ORIENTATION_TRACKING , - NULL // TODO @Philips check if orientation tracking already done before renderer calls this function - #endif + headRotData->hOrientationTracker // TODO @Philips check if orientation tracking already done before renderer calls this function +#endif ); #else @@ -1040,7 +1040,7 @@ ivas_error ivas_rend_TDObjRenderFrame( if ( headRotData->headRotEnabled ) { ivas_orient_trk_Process( headRotData->hOrientationTracker, - headRotData->headPositions[subframe_idx], + &headRotData->headPositions[subframe_idx], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ); } diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 2e01d6b817..22ffdf64cb 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -441,10 +441,10 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( - ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ - const IVAS_QUATERNION *absRot, /* i : absolute head rotation */ - float updateRate, /* i : rotation update rate [Hz] */ - IVAS_QUATERNION *pTrkRot ) /* o : tracked rotation */ + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + const IVAS_QUATERNION *pAbsRot, /* i : absolute head rotation */ + float updateRate, /* i : rotation update rate [Hz] */ + IVAS_QUATERNION *pTrkRot ) /* o : tracked rotation */ { float normalizedOrientation; float relativeOrientationRate; @@ -464,34 +464,34 @@ ivas_error ivas_orient_trk_Process( switch ( pOTR->trackingType ) { case OTR_TRACKING_NONE: - *pTrkRot = *absRot; + *pTrkRot = *pAbsRot; break; case OTR_TRACKING_REF_ORIENT: /* Reset average orientation */ - pOTR->absAvgRot = *absRot; + pOTR->absAvgRot = *pAbsRot; /* Reset adaptation filter - start adaptation at center rate */ pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ QuaternionInverse( pOTR->refRot, pTrkRot ); - QuaternionProduct( *pTrkRot, *absRot, pTrkRot ); + QuaternionProduct( *pTrkRot, *pAbsRot, pTrkRot ); break; case OTR_TRACKING_AVG_ORIENT: /* Compute average (low-pass filtered) absolute orientation */ - QuaternionSlerp( pOTR->absAvgRot, *absRot, alpha, &pOTR->absAvgRot ); + QuaternionSlerp( pOTR->absAvgRot, *pAbsRot, alpha, &pOTR->absAvgRot ); /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ QuaternionInverse( pOTR->absAvgRot, pTrkRot ); - QuaternionProduct( *pTrkRot, *absRot, pTrkRot ); + QuaternionProduct( *pTrkRot, *pAbsRot, pTrkRot ); /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = QuaternionAngle( *absRot, *pTrkRot ); + ang = QuaternionAngle( *pAbsRot, *pTrkRot ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; -- GitLab From 5455d28af05c67caba2cf5c71e56451ae34e052b Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 23 Feb 2023 13:32:47 +0100 Subject: [PATCH 065/140] fix leftover merge artefact in ivas_stat_rend.h and whitespace changes to avoid merge conflicts --- lib_dec/ivas_stat_dec.h | 2 ++ lib_rend/ivas_crend.c | 1 + lib_rend/ivas_orient_trk.c | 4 ++++ lib_rend/ivas_rotation.c | 3 +++ lib_rend/ivas_stat_rend.h | 4 +--- lib_rend/lib_rend.h | 8 ++++---- lib_util/head_rotation_file_reader.c | 1 + 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index ff1e567e78..04bf534e41 100755 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1762,6 +1762,7 @@ typedef struct ivas_reverb_state_t } REVERB_DATA, *REVERB_HANDLE; + #ifndef FIX_I109_ORIENTATION_TRACKING typedef struct ivas_orient_trk_state_t { @@ -1791,6 +1792,7 @@ typedef struct ivas_orient_trk_state_t } ivas_orient_trk_state_t; #endif + /* Main Crend structure */ typedef struct ivas_crend_state_t { diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 31fd20240d..fadb082f5c 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -2187,6 +2187,7 @@ ivas_error ivas_rend_openCrend( hCrend->hTrack = NULL; } #endif + if ( ( hRendCfg != NULL ) && ( hRendCfg->roomAcoustics.late_reverb_on ) ) { if ( ( error = ivas_reverb_open( &( hCrend->hReverb ), diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 22ffdf64cb..dc889b7d08 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -53,6 +53,7 @@ /* TODO relate to frame rate - assumed here 50Hz, i.e. 20ms frame length */ #define OTR_UPDATE_RATE ( 50.0f ) /* rate of the Process() calls [Hz]; 1x per IVAS frame */ + /*------------------------------------------------------------------------------------------* * Local functions *------------------------------------------------------------------------------------------*/ @@ -303,6 +304,7 @@ void ivas_orient_trk_Init( /* Track relative to a reference orientation */ pOTR->trackingType = OTR_TRACKING_REF_ORIENT; #endif + /* configuration parameters */ pOTR->centerAdaptationRate = 1.0f / 30.0f; pOTR->offCenterAdaptationRate = 1.0f / 8.0f; @@ -433,6 +435,7 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( } #endif + /*-------------------------------------------------------------------* * ivas_orient_trk_Process() * @@ -643,6 +646,7 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ivas_orient_trk_GetTrackedOrientation() * diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index f657dd6672..4772d9afe0 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -70,12 +70,14 @@ ivas_error ivas_headTrack_open( ( *hHeadTrackData )->lrSwitchedCurrent = 0; ( *hHeadTrackData )->lrSwitchedNext = 0; #ifdef FIX_I109_ORIENTATION_TRACKING + if ( ( ( *hHeadTrackData )->OrientationTracker = (ivas_orient_trk_state_t *) malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking" ); } ivas_orient_trk_Init( ( *hHeadTrackData )->OrientationTracker ); #endif + /* Initialise Rmat_prev to I, Rmat will be computed later */ for ( i = 0; i < 3; i++ ) { @@ -215,6 +217,7 @@ void Quat2Euler( } #endif + /*------------------------------------------------------------------------- * rotateAziEle() * diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 2799b251e2..3770346c19 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -209,8 +209,6 @@ typedef struct float lfeOutputGains[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS]; } IVAS_REND_LfeRouting; -<<<<<<< HEAD -======= #ifdef FIX_197_CREND_INTERFACE_LIB_REND_H typedef struct @@ -219,7 +217,6 @@ typedef struct IVAS_QUATERNION headPositions[RENDERER_HEAD_POSITIONS_PER_FRAME]; float crossfade[L_FRAME48k / RENDERER_HEAD_POSITIONS_PER_FRAME]; } IVAS_REND_HeadRotData; ->>>>>>> main #endif /*----------------------------------------------------------------------------------* @@ -720,6 +717,7 @@ typedef struct ivas_orient_trk_state_t } ivas_orient_trk_state_t; #endif + /*----------------------------------------------------------------------------------* * TD ISm Object Renderer structure *----------------------------------------------------------------------------------*/ diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 3637fa87fb..c5a8ce6343 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -270,13 +270,13 @@ ivas_error IVAS_REND_InitConfig( ); int16_t IVAS_REND_GetRenderConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ - const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ ); int16_t IVAS_REND_FeedRenderConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ - const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); ivas_error IVAS_REND_SetHeadRotation( diff --git a/lib_util/head_rotation_file_reader.c b/lib_util/head_rotation_file_reader.c index 8be293c89a..92e2acfd52 100644 --- a/lib_util/head_rotation_file_reader.c +++ b/lib_util/head_rotation_file_reader.c @@ -157,6 +157,7 @@ ivas_error HeadRotationFileReading( } #endif + /*-----------------------------------------------------------------------* * HeadRotationFileReader_close() * -- GitLab From 0b014d8a18ed5b966aac8b86936289537a8b73c4 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 23 Feb 2023 13:38:40 +0100 Subject: [PATCH 066/140] preemptively accept FIX_343_TO_UPPER to avoid merge conflicts --- apps/decoder.c | 56 ----------------------------------------------- apps/encoder.c | 26 ---------------------- apps/renderer.c | 6 ----- lib_com/options.h | 1 - 4 files changed, 89 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 7fac28c52c..ddc9cedd4a 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -624,9 +624,7 @@ static IVAS_DEC_AUDIO_CONFIG cmdline2config( char argv_to_upper[FILENAME_MAX]; strncpy( argv_to_upper, argv, sizeof( argv_to_upper ) - 1 ); -#ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; -#endif to_upper( argv_to_upper ); if ( strcmp( argv_to_upper, "EXT" ) == 0 ) /* external renderer */ @@ -705,9 +703,6 @@ static bool parseCmdlIVAS_dec( char argv_to_upper[FILENAME_MAX]; #ifdef DEBUGGING float ftmp; -#ifndef FIX_343_TO_UPPER - char stmp[FILENAME_MAX]; -#endif arg->forcedRendMode = IVAS_DEC_FORCE_REND_UNFORCED; arg->forceSubframeBinauralization = false; @@ -775,9 +770,7 @@ static bool parseCmdlIVAS_dec( while ( argv[i][0] == '-' ) { strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); -#ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; -#endif to_upper( argv_to_upper ); if ( strcmp( argv_to_upper, "-VOIP" ) == 0 ) @@ -785,21 +778,13 @@ static bool parseCmdlIVAS_dec( arg->voipMode = 1; i++; } -#ifdef FIX_343_TO_UPPER else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 ) -#else - else if ( strcmp( to_upper( argv[i] ), "-VOIP_HF_ONLY=0" ) == 0 ) -#endif { arg->voipMode = 1; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP; i++; } -#ifdef FIX_343_TO_UPPER else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 ) -#else - else if ( strcmp( to_upper( argv[i] ), "-VOIP_HF_ONLY=1" ) == 0 ) -#endif { arg->voipMode = 1; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; @@ -872,14 +857,9 @@ static bool parseCmdlIVAS_dec( i++; if ( i < argc - 3 ) { -#ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; arg->forcedRendMode = parseForcedRendModeDec( argv_to_upper ); -#else - strncpy( stmp, argv[i], sizeof( stmp ) ); - arg->forcedRendMode = parseForcedRendModeDec( stmp ); -#endif i++; } } @@ -934,7 +914,6 @@ static bool parseCmdlIVAS_dec( } #else -#ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i + 1], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; to_upper( argv_to_upper ); @@ -953,17 +932,9 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } -#else - char tmp[4]; - strcpy( tmp, argv[i + 1] ); -#endif #ifdef FIX_I109_ORIENTATION_TRACKING -#ifndef FIX_343_TO_UPPER - if ( strcmp( to_upper( tmp ), "NON" ) == 0 ) -#else char *tmp = to_upper( argv[i + 1] ); if ( strcmp( to_upper( tmp ), "NONE" ) == 0 ) -#endif { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; } @@ -1028,7 +999,6 @@ static bool parseCmdlIVAS_dec( return false; } -#ifdef FIX_343_TO_UPPER strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) ) @@ -1054,32 +1024,6 @@ static bool parseCmdlIVAS_dec( return false; } } -#else - char *param = to_upper( argv[i] ); - if ( ( strcmp( param, "CENTER" ) == 0 ) || ( strchr( param, 'C' ) != NULL ) ) - { - arg->no_diegetic_pan = 0.f; - } - else if ( ( strcmp( param, "LEFT" ) == 0 ) || ( strchr( param, 'L' ) != NULL ) ) - { - arg->no_diegetic_pan = -1.f; - } - else if ( ( strcmp( param, "RIGHT" ) == 0 ) || ( strchr( param, 'R' ) != NULL ) ) - { - arg->no_diegetic_pan = 1.f; - } - else - { - arg->no_diegetic_pan = (float) atof( param ); - - if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f ) - { - fprintf( stderr, "Error: Incorrect value for panning option argument specified!\n\n" ); - usage_dec(); - return false; - } - } -#endif i++; } diff --git a/apps/encoder.c b/apps/encoder.c index 2aab6d5ae8..09baa814ae 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -884,9 +884,7 @@ static bool parseCmdlIVAS_enc( while ( i < argc - 4 ) { strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); -#ifdef FIX_343_TO_UPPER argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; -#endif to_upper( argv_to_upper ); /*-----------------------------------------------------------------* @@ -898,9 +896,7 @@ static bool parseCmdlIVAS_enc( arg->max_bwidth_user = true; strncpy( stmp, argv[i + 1], sizeof( stmp ) - 1 ); -#ifdef FIX_343_TO_UPPER stmp[sizeof( stmp ) - 1] = '\0'; -#endif to_upper( stmp ); if ( strcmp( stmp, "-NB" ) == 0 || strcmp( stmp, "NB" ) == 0 ) @@ -1088,9 +1084,7 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { strncpy( stmp, argv[i], sizeof( stmp ) ); -#ifdef FIX_343_TO_UPPER stmp[sizeof( stmp ) - 1] = '\0'; -#endif to_upper( argv[i] ); if ( strcmp( argv[i], "LO" ) == 0 ) { @@ -1378,7 +1372,6 @@ static bool parseCmdlIVAS_enc( if ( i < argc - 4 ) { -#ifdef FIX_343_TO_UPPER if ( strcmp( argv[i], "5_1" ) == 0 ) { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; @@ -1396,25 +1389,6 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_4; } else if ( strcmp( argv[i], "7_1_4" ) == 0 ) -#else - if ( strcmp( to_upper( argv[i] ), "5_1" ) == 0 ) - { - arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1; - } - else if ( strcmp( to_upper( argv[i] ), "7_1" ) == 0 ) - { - arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_7_1; - } - else if ( strcmp( to_upper( argv[i] ), "5_1_2" ) == 0 ) - { - arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_2; - } - else if ( strcmp( to_upper( argv[i] ), "5_1_4" ) == 0 ) - { - arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_5_1_4; - } - else if ( strcmp( to_upper( argv[i] ), "7_1_4" ) == 0 ) -#endif { arg->inputFormatConfig.mcLayout = IVAS_ENC_MC_7_1_4; } diff --git a/apps/renderer.c b/apps/renderer.c index 5936add157..97be6af109 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -504,9 +504,7 @@ static void setupWithSingleFormatInput( /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string is empty or contains "NULL" */ char charBuf[FILENAME_MAX]; strncpy( charBuf, args.inMetadataFilePaths[i], min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1 ); -#ifdef FIX_343_TO_UPPER charBuf[min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1] = '\0'; -#endif to_upper( charBuf ); if ( isEmptyString( args.inMetadataFilePaths[i] ) || strncmp( charBuf, "NULL", 4 ) == 0 ) { @@ -1180,9 +1178,7 @@ static bool parseInConfig( /* First check if input is being set to scene description file - this is not covered by parseAudioConfig(). */ strncpy( charBuf, inFormatStr, sizeof( charBuf ) - 1 ); -#ifdef FIX_343_TO_UPPER charBuf[sizeof( charBuf ) - 1] = '\0'; -#endif to_upper( charBuf ); if ( strcmp( charBuf, "META" ) == 0 ) { @@ -1376,9 +1372,7 @@ static IVAS_REND_AudioConfig parseAudioConfig( charBuf[13] = '\0'; strncpy( charBuf, configString, sizeof( charBuf ) - 1 ); -#ifdef FIX_343_TO_UPPER charBuf[sizeof( charBuf ) - 1] = '\0'; -#endif to_upper( charBuf ); if ( ( strcmp( charBuf, "MONO" ) == 0 ) || ( strcmp( charBuf, "HOA0" ) == 0 ) || ( strcmp( charBuf, "SBA0" ) == 0 ) ) diff --git a/lib_com/options.h b/lib_com/options.h index c0cca55010..fe0df43683 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,7 +165,6 @@ #define DISABLE_RES_CHANNELS_MCT /* decode only W and residual for Y when outputting to stereo */ #endif -#define FIX_343_TO_UPPER /* VA: issue 343: safeguard for function to_upper() */ /* ################## End DEVELOPMENT switches ######################### */ -- GitLab From fad6163a2e9ccb9d53d31e2854615baa2c2adec5 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 23 Feb 2023 13:47:28 +0100 Subject: [PATCH 067/140] preemptively accept FIX_198_TDREND_INTERFACE to avoid merge conflicts --- lib_com/options.h | 1 - lib_rend/ivas_objectRenderer.c | 378 --------------------------------- 2 files changed, 379 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index fe0df43683..54393ead8e 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -156,7 +156,6 @@ #define FIX_MEMORY_COUNTING_HRTF_BINARY_FILE #define FIX_334_DEBUG_BE_STEREO_SWITCHING /* FhG: Fix non-BE issue for stereo switching when DEBUGGING is enabled */ -#define FIX_198_TDREND_INTERFACE /* Issue 198: Harmonize interface for TD renderer between decoder and external renderer */ #define DFT_STEREO_SPAR_MIXING #ifdef DFT_STEREO_SPAR_MIXING diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index ddd4d06f9e..dc5e536bc0 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -61,7 +61,6 @@ static void TDREND_Update_object_positions( BINAURAL_TD_OBJECT_RENDERER_HANDLE h const IVAS_FORMAT in_format, const ISM_METADATA_HANDLE *hIsmMetaData, float output[][L_FRAME48k] ); -#ifdef FIX_198_TDREND_INTERFACE static ivas_error ivas_td_binaural_open_unwrap( TDREND_HRFILT_FiltSet_t **hHrtfTD, const int32_t output_Fs, const int16_t nchan_transport, const IVAS_FORMAT ivas_format, const AUDIO_CONFIG transport_config, const IVAS_OUTPUT_SETUP hTransSetup, BINAURAL_TD_OBJECT_RENDERER_HANDLE *hBinRendererTd, int32_t *binaural_latency_ns ); static void ObjRenderIVASFrame_unwrap( RENDER_CONFIG_DATA *hRenderConfig, const int16_t ini_frame, @@ -114,23 +113,8 @@ static ivas_error ivas_td_binaural_open_unwrap( BINAURAL_TD_OBJECT_RENDERER_HANDLE *hBinRendererTd, /* o : TD renderer handle */ int32_t *binaural_latency_ns /* i : Binauralization delay */ ) -#else -/*---------------------------------------------------------------------* - * ivas_td_binaural_open() - * - * Open and initialize TD Object binaural renderer - *---------------------------------------------------------------------*/ - -ivas_error ivas_td_binaural_open( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -) -#endif { -#ifdef FIX_198_TDREND_INTERFACE BINAURAL_TD_OBJECT_RENDERER_HANDLE pBinRendTd; -#else - BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd; -#endif TDREND_PosType_t PosType; int16_t nS; int16_t SrcInd[MAX_NUM_TDREND_CHANNELS]; @@ -143,105 +127,55 @@ ivas_error ivas_td_binaural_open( error = IVAS_ERR_OK; -#ifdef FIX_198_TDREND_INTERFACE if ( ( pBinRendTd = malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) -#else - if ( ( hBinRendererTd = malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) -#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } -#ifdef FIX_198_TDREND_INTERFACE if ( ( pBinRendTd->TdRend_MixSpatSpec_p = malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) -#else - if ( ( hBinRendererTd->TdRend_MixSpatSpec_p = malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) -#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } -#ifdef FIX_198_TDREND_INTERFACE if ( ( pBinRendTd->DirAtten_p = malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) -#else - if ( ( hBinRendererTd->DirAtten_p = malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) -#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } -#ifdef FIX_198_TDREND_INTERFACE if ( ( pBinRendTd->Listener_p = malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) -#else - if ( ( hBinRendererTd->Listener_p = malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) -#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); } -#ifdef FIX_198_TDREND_INTERFACE pBinRendTd->NumOfSrcs = 0; pBinRendTd->MaxSrcInd = -1; /* Mixer spatial setup */ pBinRendTd->TdRend_MixSpatSpec_p->UseCommonDistAttenModel = TRUE; pBinRendTd->TdRend_MixSpatSpec_p->DistAttenModel = 0; /* 0=Turned off, else use TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED */ -#else - hBinRendererTd->NumOfSrcs = 0; - hBinRendererTd->MaxSrcInd = -1; - /* Mixer spatial setup */ - hBinRendererTd->TdRend_MixSpatSpec_p->UseCommonDistAttenModel = TRUE; - hBinRendererTd->TdRend_MixSpatSpec_p->DistAttenModel = 0; /* 0=Turned off, else use TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED */ -#endif - -#ifdef FIX_198_TDREND_INTERFACE TDREND_MIX_Init( pBinRendTd, hHrtfTD, pBinRendTd->TdRend_MixSpatSpec_p, output_Fs ); -#else - TDREND_MIX_Init( hBinRendererTd, &st_ivas->hHrtfTD, hBinRendererTd->TdRend_MixSpatSpec_p, st_ivas->hDecoderConfig->output_Fs ); -#endif /* Set the attenuation (or can set MixSpatSpec.DistAttenModel above) */ -#ifdef FIX_198_TDREND_INTERFACE TDREND_MIX_SetDistAttenModel( pBinRendTd, TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED ); -#else - TDREND_MIX_SetDistAttenModel( hBinRendererTd, TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED ); -#endif /* Add sources to module and mixer, headphones */ PosType = TDREND_POSTYPE_ABSOLUTE; /* or TDREND_POSTYPE_RELATIVE_TO_LISTENER */ -#ifdef FIX_198_TDREND_INTERFACE nchan_rend = nchan_transport; if ( ( ivas_format == MC_FORMAT ) && ( transport_config != AUDIO_CONFIG_LS_CUSTOM ) ) -#else - nchan_rend = st_ivas->nchan_transport; - if ( st_ivas->ivas_format == MC_FORMAT ) -#endif { nchan_rend--; /* Skip LFE channel -- added to the others */ } for ( nS = 0; nS < nchan_rend; nS++ ) { -#ifdef FIX_198_TDREND_INTERFACE if ( ( error = TDREND_MIX_AddSrc( pBinRendTd, &SrcInd[nS], PosType ) ) != IVAS_ERR_OK ) -#else - if ( ( error = TDREND_MIX_AddSrc( hBinRendererTd, &SrcInd[nS], PosType ) ) != IVAS_ERR_OK ) -#endif { return error; } } -#ifdef FIX_198_TDREND_INTERFACE if ( ivas_format == MC_FORMAT ) -#else - if ( st_ivas->ivas_format == MC_FORMAT ) -#endif { -#ifdef FIX_198_TDREND_INTERFACE switch ( transport_config ) -#else - switch ( st_ivas->transport_config ) -#endif { case AUDIO_CONFIG_5_1: ls_azimuth = ls_azimuth_CICP6; @@ -264,24 +198,15 @@ ivas_error ivas_td_binaural_open( ls_elevation = ls_elevation_CICP19; break; case AUDIO_CONFIG_LS_CUSTOM: -#ifdef FIX_198_TDREND_INTERFACE ls_azimuth = hTransSetup.ls_azimuth; ls_elevation = hTransSetup.ls_elevation; -#else - ls_azimuth = st_ivas->hTransSetup.ls_azimuth; - ls_elevation = st_ivas->hTransSetup.ls_elevation; -#endif break; default: ls_azimuth = NULL; ls_elevation = NULL; } -#ifdef FIX_198_TDREND_INTERFACE DirAtten_p = pBinRendTd->DirAtten_p; -#else - DirAtten_p = hBinRendererTd->DirAtten_p; -#endif for ( nS = 0; nS < nchan_rend; nS++ ) { @@ -298,27 +223,15 @@ ivas_error ivas_td_binaural_open( DirAtten_p->ConeOuterAngle = 360.0f; DirAtten_p->ConeOuterGain = 1.0f; -#ifdef FIX_198_TDREND_INTERFACE TDREND_MIX_SRC_SetPos( pBinRendTd, nS, Pos ); TDREND_MIX_SRC_SetDir( pBinRendTd, nS, Dir ); TDREND_MIX_SRC_SetPlayState( pBinRendTd, nS, TDREND_PLAYSTATUS_PLAYING ); TDREND_MIX_SRC_SetDirAtten( pBinRendTd, nS, DirAtten_p ); -#else - TDREND_MIX_SRC_SetPos( hBinRendererTd, nS, Pos ); - TDREND_MIX_SRC_SetDir( hBinRendererTd, nS, Dir ); - TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING ); - TDREND_MIX_SRC_SetDirAtten( hBinRendererTd, nS, DirAtten_p ); -#endif } } -#ifdef FIX_198_TDREND_INTERFACE *hBinRendererTd = pBinRendTd; *binaural_latency_ns = (int32_t) ( ( *hBinRendererTd )->HrFiltSet_p->latency_s * 1000000000.f ); -#else - st_ivas->hBinRendererTd = hBinRendererTd; - st_ivas->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); -#endif return error; } @@ -350,7 +263,6 @@ void ivas_td_binaural_close( return; } -#ifdef FIX_198_TDREND_INTERFACE /*---------------------------------------------------------------------* * ObjRenderIVASFrame() * @@ -411,20 +323,6 @@ static void ObjRenderIVASFrame_unwrap( ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ #endif ) -#else -/*---------------------------------------------------------------------* - * ObjRenderIVASFrame() - * - * Receives the current frames for the object streams, updates metadata - * and renders the current frame. - *---------------------------------------------------------------------*/ - -void ObjRenderIVASFrame( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ - const int16_t output_frame /* i : output frame length */ -) -#endif { int16_t subframe_length; int16_t subframe_idx; @@ -434,25 +332,13 @@ void ObjRenderIVASFrame( #endif subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; -#ifdef FIX_198_TDREND_INTERFACE if ( hRenderConfig != NULL ) -#else - if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ -#endif { -#ifdef FIX_198_TDREND_INTERFACE if ( hRenderConfig->roomAcoustics.late_reverb_on && ( ini_frame == 0 ) ) -#else - if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on && ( st_ivas->ini_frame == 0 ) ) -#endif { #ifdef FIX_197_CREND_INTERFACE -#ifdef FIX_198_TDREND_INTERFACE ivas_reverb_open( &hCrendWrapper->hCrend->hReverb, transport_config, NULL, hRenderConfig, output_Fs ); -#else - ivas_reverb_open( &st_ivas->hCrendWrapper->hCrend->hReverb, st_ivas->transport_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ); -#endif #else ivas_reverb_open( &st_ivas->hCrend->hReverb, st_ivas->transport_config, NULL, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ); #endif @@ -460,17 +346,12 @@ void ObjRenderIVASFrame( } /* Update object position(s) */ -#ifdef FIX_198_TDREND_INTERFACE TDREND_Update_object_positions( hBinRendererTd, nchan_transport, lfe_idx, ivas_format, hIsmMetaData, output ); -#else - TDREND_Update_object_positions( st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, output ); -#endif for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { /* Update the listener's location/orientation */ #ifdef FIX_I109_ORIENTATION_TRACKING -#ifdef FIX_198_TDREND_INTERFACE if ( pOTR != NULL ) { if ( ivas_orient_trk_Process( pOTR, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) @@ -480,63 +361,25 @@ void ObjRenderIVASFrame( } TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( pOTR != NULL ) ? &trackedHeadOrientation : NULL ); #else - if ( st_ivas->hHeadTrackData != NULL ) - { - if ( ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, &st_ivas->hHeadTrackData->Quaternions[subframe_idx], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) - { - exit( -1 ); - } - } - TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, - st_ivas->hDecoderConfig->Opt_Headrotation, - ( st_ivas->hHeadTrackData != NULL ) ? &trackedHeadOrientation : NULL ); -#endif -#else -#ifdef FIX_198_TDREND_INTERFACE TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL ); -#else - TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, - st_ivas->hDecoderConfig->Opt_Headrotation, - ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[subframe_idx] : NULL ); -#endif #endif -#ifdef FIX_198_TDREND_INTERFACE if ( ( hRenderConfig != NULL ) && ( hRenderConfig->roomAcoustics.late_reverb_on ) ) -#else - if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) -#endif { #ifdef FIX_197_CREND_INTERFACE -#ifdef FIX_198_TDREND_INTERFACE ivas_reverb_process( hCrendWrapper->hCrend->hReverb, transport_config, 0, output, reverb_signal, subframe_idx ); -#else - ivas_reverb_process( st_ivas->hCrendWrapper->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); -#endif #else ivas_reverb_process( st_ivas->hCrend->hReverb, st_ivas->transport_config, 0, output, reverb_signal, subframe_idx ); #endif } /* Render subframe */ -#ifdef FIX_198_TDREND_INTERFACE TDREND_GetMix( hBinRendererTd, output, subframe_length, subframe_idx ); -#else - TDREND_GetMix( st_ivas->hBinRendererTd, output, subframe_length, subframe_idx ); -#endif } -#ifdef FIX_198_TDREND_INTERFACE if ( hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ -#else - if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ -#endif { -#ifdef FIX_198_TDREND_INTERFACE if ( hRenderConfig->roomAcoustics.late_reverb_on ) -#else - if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) -#endif { /* add reverb to rendered signals */ v_add( reverb_signal[0], output[0], output[0], output_frame ); @@ -759,31 +602,11 @@ ivas_error ivas_rend_TDObjRendOpen( LSSETUP_CUSTOM_STRUCT *customLsInput, const int32_t outFs ) { -#ifndef FIX_198_TDREND_INTERFACE - /* TODO tmu : Based on ivas_td_binaural_open() - could be harmonized / refactored - - review error handling - - review hHrtfTD init - */ - BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd; - TDREND_PosType_t PosType; - int16_t nS; - int16_t SrcInd[MAX_NUM_TDREND_CHANNELS]; - const float *ls_azimuth, *ls_elevation; - float Pos[3]; - float Dir[3]; - TDREND_DirAtten_t *DirAtten_p; -#endif -#ifdef FIX_198_TDREND_INTERFACE int16_t nchan_transport; AUDIO_CONFIG transport_config; IVAS_FORMAT ivas_format; IVAS_OUTPUT_SETUP hTransSetup; -#else - int16_t nchan_rend; - ivas_error error; -#endif -#ifdef FIX_198_TDREND_INTERFACE if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { getAudioConfigNumChannels( inConfig, &nchan_transport ); @@ -799,126 +622,6 @@ ivas_error ivas_rend_TDObjRendOpen( return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); -#else - - error = IVAS_ERR_OK; - - if ( ( hBinRendererTd = malloc( sizeof( BINAURAL_TD_OBJECT_RENDERER ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); - } - if ( ( hBinRendererTd->TdRend_MixSpatSpec_p = malloc( sizeof( TDREND_MixSpatSpec_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); - } - if ( ( hBinRendererTd->DirAtten_p = malloc( sizeof( TDREND_DirAtten_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); - } - if ( ( hBinRendererTd->Listener_p = malloc( sizeof( TDREND_MIX_Listener_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TD renderer\n" ) ); - } - - if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) - { - getAudioConfigNumChannels( inConfig, &nchan_rend ); - if ( getAudioConfigType( inConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) - { - nchan_rend--; /* Skip LFE channel -- added to the others */ - } - } - else - { - nchan_rend = customLsInput->num_spk; - } - - hBinRendererTd->NumOfSrcs = 0; - hBinRendererTd->MaxSrcInd = -1; - - /* Mixer spatial setup */ - hBinRendererTd->TdRend_MixSpatSpec_p->UseCommonDistAttenModel = TRUE; - hBinRendererTd->TdRend_MixSpatSpec_p->DistAttenModel = 0; /* 0=Turned off, else use TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED */ - - TDREND_MIX_Init( hBinRendererTd, &pTDRend->hHrtfTD, hBinRendererTd->TdRend_MixSpatSpec_p, outFs ); - - /* Set the attenuation (or can set MixSpatSpec.DistAttenModel above) */ - TDREND_MIX_SetDistAttenModel( hBinRendererTd, TDREND_DIST_ATTEN_MODEL_INV_DIST_CLAMPED ); - - /* Add sources to module and mixer, headphones */ - PosType = TDREND_POSTYPE_ABSOLUTE; /* or TDREND_POSTYPE_RELATIVE_TO_LISTENER */ - - for ( nS = 0; nS < nchan_rend; nS++ ) - { - if ( ( error = TDREND_MIX_AddSrc( hBinRendererTd, &SrcInd[nS], PosType ) ) != IVAS_ERR_OK ) - { - return error; - } - } - - if ( getAudioConfigType( inConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) - { - switch ( inConfig ) - { - case IVAS_REND_AUDIO_CONFIG_5_1: - ls_azimuth = ls_azimuth_CICP6; - ls_elevation = ls_elevation_CICP6; - break; - case IVAS_REND_AUDIO_CONFIG_7_1: - ls_azimuth = ls_azimuth_CICP12; - ls_elevation = ls_elevation_CICP12; - break; - case IVAS_REND_AUDIO_CONFIG_5_1_2: - ls_azimuth = ls_azimuth_CICP14; - ls_elevation = ls_elevation_CICP14; - break; - case IVAS_REND_AUDIO_CONFIG_5_1_4: - ls_azimuth = ls_azimuth_CICP16; - ls_elevation = ls_elevation_CICP16; - break; - case IVAS_REND_AUDIO_CONFIG_7_1_4: - ls_azimuth = ls_azimuth_CICP19; - ls_elevation = ls_elevation_CICP19; - break; - case IVAS_REND_AUDIO_CONFIG_LS_CUSTOM: - ls_azimuth = customLsInput->ls_azimuth; - ls_elevation = customLsInput->ls_elevation; - break; - default: - ls_azimuth = NULL; - ls_elevation = NULL; - } - - DirAtten_p = hBinRendererTd->DirAtten_p; - - for ( nS = 0; nS < nchan_rend; nS++ ) - { - /* Set source positions according to loudspeaker layout */ - Pos[0] = cosf( ls_elevation[nS] * PI_OVER_180 ) * cosf( ls_azimuth[nS] * PI_OVER_180 ); - Pos[1] = cosf( ls_elevation[nS] * PI_OVER_180 ) * sinf( ls_azimuth[nS] * PI_OVER_180 ); - Pos[2] = sinf( ls_elevation[nS] * PI_OVER_180 ); - Dir[0] = 1.0f; - Dir[1] = 0.0f; - Dir[2] = 0.0f; - - /* Source directivity info */ - DirAtten_p->ConeInnerAngle = 360.0f; - DirAtten_p->ConeOuterAngle = 360.0f; - DirAtten_p->ConeOuterGain = 1.0f; - - TDREND_MIX_SRC_SetPos( hBinRendererTd, nS, Pos ); - TDREND_MIX_SRC_SetDir( hBinRendererTd, nS, Dir ); - TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING ); - TDREND_MIX_SRC_SetDirAtten( hBinRendererTd, nS, DirAtten_p ); - } - } - - pTDRend->hBinRendererTd = hBinRendererTd; - - pTDRend->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); - - return IVAS_ERR_OK; -#endif } /*---------------------------------------------------------------------* @@ -939,36 +642,22 @@ ivas_error ivas_rend_TDObjRenderFrame( float output[][L_FRAME48k] /* i/o: SCE channels / Binaural synthesis */ ) { -#ifndef FIX_198_TDREND_INTERFACE - int16_t subframe_length; - int16_t subframe_idx; - ISM_METADATA_HANDLE hIsmMetaData[1]; -#else ISM_METADATA_FRAME hIsmMetaDataFrame; ISM_METADATA_HANDLE hIsmMetaData[1]; -#endif int16_t lfe_idx; int16_t num_src; /* TODO tmu : pass down renderer config struct */ // float reverb_signal[BINAURAL_CHANNELS][L_FRAME48k]; IVAS_FORMAT ivas_format; IVAS_REND_AudioConfigType inConfigType; -#ifdef FIX_198_TDREND_INTERFACE AUDIO_CONFIG transport_config; int32_t output_Fs; -#else -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif -#endif push_wmops( "ivas_rend_TDObjRenderFrame" ); inConfigType = getAudioConfigType( inConfig ); lfe_idx = LFE_CHANNEL; -#ifdef FIX_198_TDREND_INTERFACE hIsmMetaData[0] = NULL; -#endif if ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) { @@ -987,20 +676,12 @@ ivas_error ivas_rend_TDObjRenderFrame( { ivas_format = ISM_FORMAT; num_src = 1; -#ifdef FIX_198_TDREND_INTERFACE hIsmMetaData[0] = &hIsmMetaDataFrame; -#else - hIsmMetaData[0] = malloc( sizeof( ISM_METADATA_FRAME ) ); -#endif hIsmMetaData[0]->azimuth = currentPos->azimuth; hIsmMetaData[0]->elevation = currentPos->elevation; } -#ifndef FIX_198_TDREND_INTERFACE - subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; -#endif -#ifdef FIX_198_TDREND_INTERFACE transport_config = getIvasAudioConfigFromRendAudioConfig( inConfig ); output_Fs = output_frame * 50; @@ -1013,65 +694,6 @@ ivas_error ivas_rend_TDObjRenderFrame( #endif ); -#else - - /* TODO tmu : pass down renderer config struct and decide what to do about ini_frame ? */ - // if ( hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ - // { - // if ( hRenderConfig->roomAcoustics.late_reverb_on && ( st_ivas->ini_frame == 0 ) ) - // { - // ivas_reverb_open( &pTDRend->hCrend->hReverb, pTDRend->transport_config, NULL, pTDRend->hRenderConfig, pTDRend->hDecoderConfig->output_Fs ); - // } - // } - - /* Update object position(s) */ - TDREND_Update_object_positions( pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, output ); - - /* TODO tmu : needs a refactor / better approach */ - if ( ivas_format == ISM_FORMAT ) - { - free( hIsmMetaData[0] ); - } - - for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) - { - /* Update the listener's location/orientation */ -#ifdef FIX_I109_ORIENTATION_TRACKING - if ( headRotData->headRotEnabled ) - { - ivas_orient_trk_Process( headRotData->hOrientationTracker, - &headRotData->headPositions[subframe_idx], - FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, - &trackedHeadOrientation ); - } - TDREND_Update_listener_orientation( pTDRend->hBinRendererTd, headRotData->headRotEnabled, ( headRotData != NULL ) ? &trackedHeadOrientation : NULL ); -#else - TDREND_Update_listener_orientation( pTDRend->hBinRendererTd, headRotData->headRotEnabled, ( headRotData != NULL ) ? &headRotData->headPositions[subframe_idx] : NULL ); -#endif - - /* TODO tmu : pass down renderer config struct */ - // if ( ( hRenderConfig != NULL ) && ( hRenderConfig->roomAcoustics.late_reverb_on ) ) - // { - // ivas_reverb_process( hCrend->hReverb, transport_config, 0, output, reverb_signal, subframe_idx ); - // } - - /* Render subframe */ - TDREND_GetMix( pTDRend->hBinRendererTd, output, subframe_length, subframe_idx ); - } - - /* TODO tmu : pass down renderer config struct */ - // if ( pTDRend->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ - // { - // if ( pTDRend->hRenderConfig->roomAcoustics.late_reverb_on ) - // { - // /* add reverb to rendered signals */ - // v_add( reverb_signal[0], output[0], output[0], output_frame ); - // v_add( reverb_signal[1], output[1], output[1], output_frame ); - // } - // } - - -#endif pop_wmops(); return IVAS_ERR_OK; -- GitLab From d5e8d27423ca7f6bd1bb03a43735bb2c6149d72f Mon Sep 17 00:00:00 2001 From: hsd Date: Thu, 23 Feb 2023 16:44:02 +0100 Subject: [PATCH 068/140] [add] OTR_REFERENCE_VECTOR_TRACKING feature --- Workspace_msvc/lib_util.vcxproj | 2 + apps/decoder.c | 107 ++- apps/renderer.c | 77 ++ lib_com/common_api_types.h | 7 + lib_com/ivas_cnst.h | 12 +- lib_com/ivas_prot.h | 8 + lib_com/options.h | 9 + lib_dec/ivas_init_dec.c | 14 + lib_dec/ivas_stat_dec.h | 1 - lib_dec/lib_dec.c | 27 + lib_dec/lib_dec.h | 8 + lib_rend/ivas_objectRenderer.c | 14 +- lib_rend/ivas_objectRenderer_sfx.c | 8 + lib_rend/ivas_orient_trk.c | 214 +++++ lib_rend/lib_rend.c | 31 + lib_rend/lib_rend.h | 10 +- lib_util/vector3_pair_file_reader.c | 166 ++++ lib_util/vector3_pair_file_reader.h | 89 ++ scripts/config/self_test.prm | 8 + scripts/trajectories/const000-Vector3.csv | 4 + .../trajectories/full-circle-4s-Vector3.csv | 200 +++++ .../full-circle-4s-ccw-Vector3.csv | 200 +++++ scripts/trajectories/full-circle-4s-ccw.csv | 800 ++++++++++++++++++ scripts/trajectories/full-circle-4s.csv | 800 ++++++++++++++++++ ...ull-circle-with-up-and-down-4s-Vector3.csv | 200 +++++ ...circle-with-up-and-down-4s-ccw-Vector3.csv | 200 +++++ .../full-circle-with-up-and-down-4s-ccw.csv | 800 ++++++++++++++++++ .../full-circle-with-up-and-down-4s.csv | 800 ++++++++++++++++++ tests/renderer/test_renderer.py | 86 ++ tests/renderer/utils.py | 24 +- 30 files changed, 4919 insertions(+), 7 deletions(-) create mode 100644 lib_util/vector3_pair_file_reader.c create mode 100644 lib_util/vector3_pair_file_reader.h create mode 100644 scripts/trajectories/const000-Vector3.csv create mode 100644 scripts/trajectories/full-circle-4s-Vector3.csv create mode 100644 scripts/trajectories/full-circle-4s-ccw-Vector3.csv create mode 100644 scripts/trajectories/full-circle-4s-ccw.csv create mode 100644 scripts/trajectories/full-circle-4s.csv create mode 100644 scripts/trajectories/full-circle-with-up-and-down-4s-Vector3.csv create mode 100644 scripts/trajectories/full-circle-with-up-and-down-4s-ccw-Vector3.csv create mode 100644 scripts/trajectories/full-circle-with-up-and-down-4s-ccw.csv create mode 100644 scripts/trajectories/full-circle-with-up-and-down-4s.csv diff --git a/Workspace_msvc/lib_util.vcxproj b/Workspace_msvc/lib_util.vcxproj index 32bebc7536..5b5e5f30cc 100644 --- a/Workspace_msvc/lib_util.vcxproj +++ b/Workspace_msvc/lib_util.vcxproj @@ -146,6 +146,7 @@ + @@ -167,6 +168,7 @@ + diff --git a/apps/decoder.c b/apps/decoder.c index 7fac28c52c..d3bd41ec98 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -43,6 +43,9 @@ #include "ls_custom_file_reader.h" #include "hrtf_file_reader.h" #include "head_rotation_file_reader.h" +#ifdef OTR_REFERENCE_VECTOR_TRACKING +#include "vector3_pair_file_reader.h" +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #include "jbm_file_writer.h" #include "evs_rtp_payload.h" #ifdef DEBUGGING @@ -73,6 +76,10 @@ static #define IVAS_PUBLIC_ORIENT_TRK_NONE ( 0 ) #define IVAS_PUBLIC_ORIENT_TRK_REF ( 1 ) #define IVAS_PUBLIC_ORIENT_TRK_AVG ( 2 ) +#ifdef OTR_REFERENCE_VECTOR_TRACKING +#define IVAS_PUBLIC_ORIENT_TRK_REF_VEC ( 3 ) +#define IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ( 4 ) +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else #define IVAS_PUBLIC_ORIENT_TRK_REF 0 #define IVAS_PUBLIC_ORIENT_TRK_AVG 1 @@ -94,6 +101,10 @@ typedef struct bool enableReferenceRotation; char *refrotTrajFileName; #endif +#ifdef OTR_REFERENCE_VECTOR_TRACKING + bool enableReferenceVectorTracking; + char *referenceVectorTrajFileName; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #ifdef SUPPORT_JBM_TRACEFILE char *jbmTraceFilename; #endif @@ -131,7 +142,11 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING +static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, HeadRotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); +#else /* OTR_REFERENCE_VECTOR_TRACKING */ static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, HeadRotFileReader *refRotReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); +#endif #else static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); #endif @@ -163,6 +178,9 @@ int main( #ifdef FIX_I109_ORIENTATION_TRACKING HeadRotFileReader *refRotReader = NULL; #endif +#ifdef OTR_REFERENCE_VECTOR_TRACKING + Vector3PairFileReader *referenceVectorReader = NULL; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ ivas_error error = IVAS_ERR_UNKNOWN; int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE]; RenderConfigReader *renderConfigReader = NULL; @@ -269,6 +287,19 @@ int main( } } #endif +#ifdef OTR_REFERENCE_VECTOR_TRACKING + /*------------------------------------------------------------------------------------------* + * Open reference vector trajectory file + *------------------------------------------------------------------------------------------*/ + if ( arg.enableReferenceVectorTracking ) + { + if ( ( error = Vector3PairFileReader_open( arg.referenceVectorTrajFileName, &referenceVectorReader ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: Can't open reference vector trajectory file %s \n\n", arg.referenceVectorTrajFileName ); + goto cleanup; + } + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ /*------------------------------------------------------------------------------------------* * Open custom loudspeaker layout file @@ -518,7 +549,11 @@ int main( else { #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + error = decodeG192( arg, hBsReader, headRotReader, refRotReader, referenceVectorReader, hIvasDec, pcmBuf ); +#else error = decodeG192( arg, hBsReader, headRotReader, refRotReader, hIvasDec, pcmBuf ); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else error = decodeG192( arg, hBsReader, headRotReader, hIvasDec, pcmBuf ); #endif @@ -581,7 +616,9 @@ cleanup: #ifdef FIX_I109_ORIENTATION_TRACKING HeadRotationFileReader_close( &refRotReader ); #endif - +#ifdef OTR_REFERENCE_VECTOR_TRACKING + Vector3PairFileReader_close( &referenceVectorReader ); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ RenderConfigReader_close( &renderConfigReader ); if ( BS_Reader_Close( &hBsReader ) != IVAS_ERR_OK ) @@ -728,6 +765,10 @@ static bool parseCmdlIVAS_dec( arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; arg->enableReferenceRotation = false; arg->headrotTrajFileName = NULL; +#ifdef OTR_REFERENCE_VECTOR_TRACKING + arg->enableReferenceVectorTracking = false; + arg->referenceVectorTrajFileName = NULL; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; #endif @@ -947,6 +988,16 @@ static bool parseCmdlIVAS_dec( { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_AVG; } +#ifdef OTR_REFERENCE_VECTOR_TRACKING + else if ( strcmp( argv_to_upper, "REF_VEC" ) == 0 ) + { + arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF_VEC; + } + else if ( strcmp( argv_to_upper, "REF_VEC_LEV" ) == 0 ) + { + arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV; + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ else { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", argv[i + 1] ); @@ -954,7 +1005,7 @@ static bool parseCmdlIVAS_dec( return false; } #else - char tmp[4]; + char tmp[11]; strcpy( tmp, argv[i + 1] ); #endif #ifdef FIX_I109_ORIENTATION_TRACKING @@ -978,6 +1029,16 @@ static bool parseCmdlIVAS_dec( { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_AVG; } +#ifdef OTR_REFERENCE_VECTOR_TRACKING + else if ( strcmp( to_upper( tmp ), "REF_VEC" ) == 0 ) + { + arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF_VEC; + } + else if ( strcmp( to_upper( tmp ), "REF_VEC_LEV" ) == 0 ) + { + arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV; + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ else { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", tmp ); @@ -1004,6 +1065,23 @@ static bool parseCmdlIVAS_dec( i++; } #endif +#ifdef OTR_REFERENCE_VECTOR_TRACKING + else if ( strcmp( argv_to_upper, "-RVF" ) == 0 ) + { + arg->enableReferenceVectorTracking = true; + i++; + + if ( argc - i <= 4 || argv[i][0] == '-' ) + { + fprintf( stderr, "Error: reference vector trajectory file name not specified!\n\n" ); + usage_dec(); + return false; + } + + arg->referenceVectorTrajFileName = argv[i]; + i++; + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ else if ( strcmp( argv_to_upper, "-RENDER_CONFIG" ) == 0 ) { arg->renderConfigEnabled = true; @@ -1232,6 +1310,10 @@ static void usage_dec( void ) #else fprintf( stdout, "-otr tracking_type : head orientation tracking type: 'ref' or 'avg' (only for binaural rendering)\n" ); #endif +#ifdef OTR_REFERENCE_VECTOR_TRACKING + fprintf( stdout, "-rvf File : Reference vector specified by external trajectory file\n" ); + fprintf( stdout, " works only in combination with -otr ref_vec and ref_vec_lev modes\n" ); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ fprintf( stdout, "-render_config file : Renderer configuration file\n" ); fprintf( stdout, "-no_diegetic_pan : panning mono no dietic sound to stereo -1<= pan <=1,\n" ); fprintf( stdout, " left or l or 1->left, right or r or -1->right, center or c or 0->middle\n" ); @@ -1429,6 +1511,9 @@ static ivas_error decodeG192( HeadRotFileReader *headRotReader, #ifdef FIX_I109_ORIENTATION_TRACKING HeadRotFileReader *refRotReader, +#ifdef OTR_REFERENCE_VECTOR_TRACKING + Vector3PairFileReader *referenceVectorReader, +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) @@ -1564,6 +1649,24 @@ static ivas_error decodeG192( goto cleanup; } } +#ifdef OTR_REFERENCE_VECTOR_TRACKING + /* reference vector */ + if ( arg.enableReferenceVectorTracking ) + { + IVAS_VECTOR3 listenerPosition, referencePosition; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif /* Run decoder for one frame (get rendered output) */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) diff --git a/apps/renderer.c b/apps/renderer.c index 5936add157..5706c418c4 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -44,6 +44,9 @@ #include "cmdln_parser.h" #include "common_api_types.h" #include "head_rotation_file_reader.h" +#ifdef OTR_REFERENCE_VECTOR_TRACKING +#include "vector3_pair_file_reader.h" +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #include "hrtf_file_reader.h" #include "ism_file_reader.h" #include "lib_rend.h" @@ -125,6 +128,9 @@ typedef struct int16_t numInMetadataFiles; char headRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + char referenceVectorFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; #endif char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; @@ -163,6 +169,9 @@ typedef enum CmdLnOptionId_inputMetadata, CmdLnOptionId_listFormats, CmdLnOptionId_inputGain, +#ifdef OTR_REFERENCE_VECTOR_TRACKING + CmdLnOptionId_referenceVectorFile, +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { @@ -237,7 +246,11 @@ static const CmdLnParser_Option cliOptions[] = { .match = "tracking_type", .matchShort = "otr", #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + .description = "Head orientation tracking type: 'none', 'ref', 'avg' or `ref_vec` or `ref_vec_lev` (only for BINAURAL and BINAURAL_ROOM)", +#else .description = "Head orientation tracking type: 'none', 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else .description = "Head orientation tracking type: 'ref' or 'avg' (only for BINAURAL and BINAURAL_ROOM)", #endif @@ -276,6 +289,14 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "l", .description = "List supported audio formats", }, +#ifdef OTR_REFERENCE_VECTOR_TRACKING + { + .id = CmdLnOptionId_referenceVectorFile, + .match = "reference_vector_file", + .matchShort = "rvf", + .description = "Reference vector trajectory file for simulation of head tracking (only for BINAURAL and BINAURAL_ROOM outputs)", + }, +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ }; static const int32_t numCliOptions = sizeof( cliOptions ) / sizeof( CmdLnParser_Option ); @@ -539,6 +560,9 @@ int main( IVAS_REND_HANDLE hIvasRend; HeadRotFileReader *headRotReader = NULL; #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + Vector3PairFileReader *referenceVectorReader = NULL; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ HeadRotFileReader *referenceRotReader = NULL; #endif hrtfFileReader *hrtfFileReader = NULL; @@ -591,6 +615,9 @@ int main( #endif convert_backslash( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + convert_backslash( args.referenceVectorFilePath ); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ convert_backslash( args.referenceRotationFilePath ); #endif convert_backslash( args.inLfePanningMatrixFile ); @@ -613,6 +640,16 @@ int main( exit( -1 ); } } +#ifdef OTR_REFERENCE_VECTOR_TRACKING + if ( !isEmptyString( args.referenceVectorFilePath ) ) + { + if ( Vector3PairFileReader_open( args.referenceVectorFilePath, &referenceVectorReader ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error opening file: %s\n", args.referenceVectorFilePath ); + exit( -1 ); + } + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif if ( !isEmptyString( args.customHrtfFilePath ) ) @@ -941,6 +978,22 @@ int main( } #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + if ( referenceVectorReader != NULL ) + { + IVAS_VECTOR3 listenerPos, refPos; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ /* Read from reference rotation trajectory file if specified */ if ( referenceRotReader != NULL ) { @@ -1120,6 +1173,9 @@ int main( AudioFileWriter_close( &audioWriter ); HeadRotationFileReader_close( &headRotReader ); #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + Vector3PairFileReader_close( &referenceVectorReader ); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ HeadRotationFileReader_close( &referenceRotReader ); #endif hrtfFileReader_close( &hrtfFileReader ); @@ -1360,6 +1416,18 @@ static bool parseOrientationTracking( { *tracking_type = IVAS_ORIENT_TRK_AVG; } +#ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + else if ( strcmp( value, "REF_VEC" ) == 0 ) + { + *tracking_type = IVAS_ORIENT_TRK_REF_VEC; + } + else if ( strcmp( value, "REF_VEC_LEV" ) == 0 ) + { + *tracking_type = IVAS_ORIENT_TRK_REF_VEC_LEV; + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ +#endif else { fprintf( stderr, "Error: Invalid orientation tracking type %s \n\n", value ); @@ -1580,6 +1648,9 @@ static CmdlnArgs defaultArgs( clearString( args.headRotationFilePath ); #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + clearString( args.referenceVectorFilePath ); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ clearString( args.referenceRotationFilePath ); #endif clearString( args.customHrtfFilePath ); @@ -1665,6 +1736,12 @@ static void parseOption( strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + case CmdLnOptionId_referenceVectorFile: + assert( numOptionValues == 1 ); + strncpy( args->referenceVectorFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); + break; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ case CmdLnOptionId_refRotFile: assert( numOptionValues == 1 ); strncpy( args->referenceRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 2a15165be0..408d14f24d 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -83,6 +83,13 @@ typedef struct } IVAS_QUATERNION; +#ifdef OTR_REFERENCE_VECTOR_TRACKING +typedef struct +{ + float x, y, z; +} IVAS_VECTOR3; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ + typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_qmetadata_frame_struct *IVAS_MASA_QMETADATA_HANDLE; diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 5f408d4e4b..3395d6002d 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1462,6 +1462,10 @@ typedef enum #define IVAS_ORIENT_TRK_NONE 0 #define IVAS_ORIENT_TRK_REF 1 #define IVAS_ORIENT_TRK_AVG 2 +#ifdef OTR_REFERENCE_VECTOR_TRACKING +#define IVAS_ORIENT_TRK_REF_VEC 3 +#define IVAS_ORIENT_TRK_REF_VEC_LEV 4 +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else #define IVAS_ORIENT_TRK_REF 0 #define IVAS_ORIENT_TRK_AVG 1 @@ -1476,7 +1480,13 @@ typedef enum #endif OTR_TRACKING_REF_ORIENT = IVAS_ORIENT_TRK_REF, /* track orientation relative to external reference orientation (default: no rotation) */ OTR_TRACKING_AVG_ORIENT = IVAS_ORIENT_TRK_AVG /* track orientation relative to average orientation */ - +#ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + , + OTR_TRACKING_REF_VEC = IVAS_ORIENT_TRK_REF_VEC, /* track orientation relative to external reference vector */ + OTR_TRACKING_REF_VEC_LEV = IVAS_ORIENT_TRK_REF_VEC_LEV /* track orientation relative to level component of external reference vector */ +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ +#endif } OTR_TRACKING_T; diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 206b6e4f0a..bc55b95454 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5750,6 +5750,14 @@ ivas_error ivas_orient_trk_GetTrackedRotation( ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ IVAS_QUATERNION *pRotation /* i/o : processed rotation */ ); + +#ifdef OTR_REFERENCE_VECTOR_TRACKING +ivas_error ivas_orient_trk_SetReferenceVector( + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + const IVAS_VECTOR3 listenerPos, /* i : Listener position */ + const IVAS_VECTOR3 refPos /* i : Reference position */ +); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif #ifdef FIX_I109_ORIENTATION_TRACKING diff --git a/lib_com/options.h b/lib_com/options.h index c0cca55010..7aefebb064 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,6 +168,15 @@ #define FIX_343_TO_UPPER /* VA: issue 343: safeguard for function to_upper() */ +#ifdef FIX_I109_ORIENTATION_TRACKING +#define OTR_REFERENCE_VECTOR_TRACKING /* FhG: enables the reference position orientation tracking mode */ +#endif +#define TD_REND_FIX_DIV_BY_ZERO /* FhG: avoid division by zero in sincResample fn */ +#ifndef FIX_198_TDREND_INTERFACE +#define TD_REND_FIX_MSAN /* FhG: fixes uninitialized read in ivas_rend_TDObjRendOpen */ +#endif +#define TD_TDREND_FIX_NULLPTR_ACCESS /* FhG: avoid nullptr access in ivas_rend_TDObjRendOpen */ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index ab2b52b600..e1faf69d30 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -757,6 +757,20 @@ ivas_error ivas_init_decoder( { ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_REF_ORIENT ); } +#ifdef OTR_REFERENCE_VECTOR_TRACKING + else if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_REF_VEC ) + { + ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_REF_VEC ); + } + else if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_REF_VEC_LEV ) + { + ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_REF_VEC_LEV ); + } + else + { + return IVAS_ERR_WRONG_MODE; + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ } #endif diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index ff1e567e78..f833b8a922 100755 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1363,7 +1363,6 @@ typedef struct ivas_orient_trk_state_t IVAS_QUATERNION absAvgRot; /* average absolute orientation */ IVAS_QUATERNION refRot; /* reference orientation */ IVAS_QUATERNION trkRot; /* tracked rotation */ - } ivas_orient_trk_state_t; #endif diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 93f1a944de..4f1bb97a1f 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -943,6 +943,33 @@ ivas_error IVAS_DEC_FeedRefRotData( return IVAS_ERR_OK; } + +#ifdef OTR_REFERENCE_VECTOR_TRACKING +/*---------------------------------------------------------------------* + * IVAS_DEC_FeedRefVectorData( ) + * + * Feed the decoder with a reference vector spanning from listenerPos + * to refPos. Only available in OTR_TRACKING_REF_POS and + * OTR_TRACKING_REF_POS_LEV modes. + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_FeedRefVectorData( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const IVAS_VECTOR3 listenerPos, /* i : Listener position */ + const IVAS_VECTOR3 refPos /* i : Reference position */ +) +{ + ivas_orient_trk_state_t *pOtr; + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHeadTrackData == NULL || hIvasDec->st_ivas->hHeadTrackData->OrientationTracker == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + pOtr = hIvasDec->st_ivas->hHeadTrackData->OrientationTracker; + return ivas_orient_trk_SetReferenceVector( pOtr, listenerPos, refPos ); +} +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif /*---------------------------------------------------------------------* diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index d2e7b5d98b..b956f46eac 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -186,6 +186,14 @@ ivas_error IVAS_DEC_FeedRefRotData( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ IVAS_QUATERNION rotation /* i : reference rotation data */ ); +#ifdef OTR_REFERENCE_VECTOR_TRACKING +/*! r: error code */ +ivas_error IVAS_DEC_FeedRefVectorData( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const IVAS_VECTOR3 listenerPos, /* i : Listener position */ + const IVAS_VECTOR3 refPos /* i : Reference position */ +); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif /*! r: error code */ diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index ddd4d06f9e..86612a34fc 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -794,8 +794,16 @@ ivas_error ivas_rend_TDObjRendOpen( } transport_config = getIvasAudioConfigFromRendAudioConfig( inConfig ); ivas_format = ( getAudioConfigType( inConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) ? MC_FORMAT : ISM_FORMAT; +#ifdef TD_TDREND_FIX_NULLPTR_ACCESS + if ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) + { + hTransSetup.ls_azimuth = customLsInput->ls_azimuth; + hTransSetup.ls_elevation = customLsInput->ls_elevation; + } +#else hTransSetup.ls_azimuth = customLsInput->ls_azimuth; hTransSetup.ls_elevation = customLsInput->ls_elevation; +#endif /* TD_TDREND_FIX_NULLPTR_ACCESS */ return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); @@ -917,6 +925,10 @@ ivas_error ivas_rend_TDObjRendOpen( pTDRend->binaural_latency_ns = (int32_t) ( hBinRendererTd->HrFiltSet_p->latency_s * 1000000000.f ); +#ifdef TD_REND_FIX_MSAN + TDREND_Clear_Update_flags( hBinRendererTd ); +#endif /* TD_REND_FIX_MSAN */ + return IVAS_ERR_OK; #endif } @@ -1011,7 +1023,7 @@ ivas_error ivas_rend_TDObjRenderFrame( , headRotData->hOrientationTracker // TODO @Philips check if orientation tracking already done before renderer calls this function #endif - ); + ); #else diff --git a/lib_rend/ivas_objectRenderer_sfx.c b/lib_rend/ivas_objectRenderer_sfx.c index 7a9ddd6b85..bba639b0c0 100644 --- a/lib_rend/ivas_objectRenderer_sfx.c +++ b/lib_rend/ivas_objectRenderer_sfx.c @@ -181,6 +181,14 @@ static void sincResample( const float *p_sinc_forward; const float *p_sinc_backward; +#ifdef TD_REND_FIX_DIV_BY_ZERO + /* avoid division by 0 */ + if ( 0 == length_out ) + { + return; + } +#endif /* TD_REND_FIX_DIV_BY_ZERO */ + /* Compute fractional time step */ t_step = (float) ( length_in ) / (float) ( length_out ); t_frac = 0; diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 22ffdf64cb..f71009829a 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -102,6 +102,34 @@ void QuaternionInverse( const IVAS_QUATERNION q, IVAS_QUATERNION *const result ); +#ifdef OTR_REFERENCE_VECTOR_TRACKING +float QuaternionLength( + const IVAS_QUATERNION q ); + +IVAS_VECTOR3 VectorSubtract( + const IVAS_VECTOR3 p1, + const IVAS_VECTOR3 p2 ); + +IVAS_VECTOR3 VectorCrossProduct( + const IVAS_VECTOR3 p1, + const IVAS_VECTOR3 p2 ); + +float VectorDotProduct( + const IVAS_VECTOR3 p1, + const IVAS_VECTOR3 p2 ); + +float VectorLength( + const IVAS_VECTOR3 p ); + +IVAS_VECTOR3 VectorNormalize( + const IVAS_VECTOR3 p ); + +void VectorRotationToQuaternion( + const IVAS_VECTOR3 p1, + const IVAS_VECTOR3 p2, + IVAS_QUATERNION *const result ); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ + /*------------------------------------------------------------------------------------------* * Quaternion product *------------------------------------------------------------------------------------------*/ @@ -236,6 +264,112 @@ void QuaternionInverse( QuaternionDivision( *r, dot_product, r ); } +#ifdef OTR_REFERENCE_VECTOR_TRACKING +/*------------------------------------------------------------------------------------------* + * Computes the length of a quaternion + *------------------------------------------------------------------------------------------*/ +float QuaternionLength( + const IVAS_QUATERNION q ) +{ + return sqrtf( q.w * q.w + q.x * q.x + q.y * q.y + q.z * q.z ); +} + +/*------------------------------------------------------------------------------------------* + * Computes the difference of two vectors + *------------------------------------------------------------------------------------------*/ +IVAS_VECTOR3 VectorSubtract( + const IVAS_VECTOR3 p1, + const IVAS_VECTOR3 p2 ) +{ + IVAS_VECTOR3 result; + result.x = p1.x - p2.x; + result.y = p1.y - p2.y; + result.z = p1.z - p2.z; + return result; +} + +/*------------------------------------------------------------------------------------------* + * Computes the cross product of two vectors + *------------------------------------------------------------------------------------------*/ +IVAS_VECTOR3 VectorCrossProduct( + const IVAS_VECTOR3 p1, + const IVAS_VECTOR3 p2 ) +{ + IVAS_VECTOR3 result; + result.x = p1.y * p2.z - p1.z * p2.y; + result.y = p1.z * p2.x - p1.x * p2.z; + result.z = p1.x * p2.y - p1.y * p2.x; + return result; +} + +/*------------------------------------------------------------------------------------------* + * Computes the dot product of two vectors + *------------------------------------------------------------------------------------------*/ +float VectorDotProduct( + const IVAS_VECTOR3 p1, + const IVAS_VECTOR3 p2 ) +{ + return p1.x * p2.x + p1.y * p2.y + p1.z * p2.z; +} + +/*------------------------------------------------------------------------------------------* + * Computes the length of a vector + *------------------------------------------------------------------------------------------*/ +float VectorLength( + const IVAS_VECTOR3 p ) +{ + return sqrtf( p.x * p.x + p.y * p.y + p.z * p.z ); +} + +/*------------------------------------------------------------------------------------------* + * Normalizes a vector + *------------------------------------------------------------------------------------------*/ +IVAS_VECTOR3 VectorNormalize( + const IVAS_VECTOR3 p ) +{ + IVAS_VECTOR3 result; + const float length = VectorLength( p ); + result.x = p.x / length; + result.y = p.y / length; + result.z = p.z / length; + return result; +} + +/*------------------------------------------------------------------------------------------* + * Computes a quaternion representing the rotation from vector p1 to vector p2 + *------------------------------------------------------------------------------------------*/ +void VectorRotationToQuaternion( + const IVAS_VECTOR3 p1, + const IVAS_VECTOR3 p2, + IVAS_QUATERNION *const r ) +{ + float dot_product; + IVAS_VECTOR3 cross_product, p1_normalized, p2_normalized; + + p1_normalized = VectorNormalize( p1 ); + p2_normalized = VectorNormalize( p2 ); + cross_product = VectorCrossProduct( p1_normalized, p2_normalized ); + dot_product = VectorDotProduct( p1_normalized, p2_normalized ); + + if ( dot_product < -0.999999 ) + { + /* happens when the p1 vector is parallel to p2, but direction is flipped */ + r->w = 0.0f; + r->x = 0.0f; + r->y = 0.0f; + r->z = 1.0f; + } + else + { + /* all regular cases */ + r->x = cross_product.x; + r->y = cross_product.y; + r->z = cross_product.z; + r->w = 1.0 + dot_product; + } + QuaternionNormalize( *r, r ); +} +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else static float ClipAngle( const float angle, @@ -312,6 +446,9 @@ void ivas_orient_trk_Init( pOTR->alpha = sinf( PI2 * pOTR->offCenterAdaptationRate / OTR_UPDATE_RATE ); /* start adaptation at off-center rate = fastest rate */ #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + pOTR->trkRot = identity; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ pOTR->absAvgRot = identity; /* Use frontal and horiontal orientation as reference orientation, unless/until overridden */ pOTR->refRot = identity; @@ -393,6 +530,14 @@ ivas_error ivas_orient_trk_GetMainOrientation( case OTR_TRACKING_AVG_ORIENT: *pOrientation = pOTR->absAvgRot; break; +#ifdef OTR_REFERENCE_VECTOR_TRACKING + case OTR_TRACKING_REF_VEC: + *pOrientation = pOTR->refRot; + break; + case OTR_TRACKING_REF_VEC_LEV: + *pOrientation = pOTR->refRot; + break; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ } return IVAS_ERR_OK; } @@ -411,6 +556,59 @@ ivas_error ivas_orient_trk_GetTrackedRotation( return IVAS_ERR_OK; } + +#ifdef OTR_REFERENCE_VECTOR_TRACKING +ivas_error ivas_orient_trk_SetReferenceVector( + ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ + const IVAS_VECTOR3 listenerPos, /* i : Listener position */ + const IVAS_VECTOR3 refPos /* i : Reference position */ +) +{ + IVAS_VECTOR3 acousticFrontVector, ivasForwardVector; + float acousticFrontVectorLength; + + if ( pOTR == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + switch ( pOTR->trackingType ) + { + case OTR_TRACKING_REF_ORIENT: + case OTR_TRACKING_AVG_ORIENT: + return IVAS_ERR_WRONG_MODE; + case OTR_TRACKING_NONE: + case OTR_TRACKING_REF_VEC: + acousticFrontVector = VectorSubtract( listenerPos, refPos ); + break; + case OTR_TRACKING_REF_VEC_LEV: + { + IVAS_VECTOR3 listenerPosLevel, refPosLevel; + /* ignore the height difference between listener position and reference position */ + listenerPosLevel.z = refPosLevel.z = listenerPos.z; + listenerPosLevel.x = listenerPos.x; + listenerPosLevel.y = listenerPos.y; + refPosLevel.x = refPos.x; + refPosLevel.y = refPos.y; + acousticFrontVector = VectorSubtract( listenerPosLevel, refPosLevel ); + } + } + + acousticFrontVectorLength = VectorLength( acousticFrontVector ); + /* if the length is zero, the user has entered insensible listener and reference positions */ + if ( acousticFrontVectorLength < 0.0001f ) + { + return IVAS_ERR_WRONG_PARAMS; + } + + ivasForwardVector.x = -1.0f; + ivasForwardVector.y = 0.0f; + ivasForwardVector.z = 0.0f; + VectorRotationToQuaternion( acousticFrontVector, ivasForwardVector, &pOTR->refRot ); + + return IVAS_ERR_OK; +} +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #else /*-------------------------------------------------------------------* * ivas_orient_trk_SetAbsoluteOrientation() @@ -453,6 +651,9 @@ ivas_error ivas_orient_trk_Process( float alpha = pOTR->alpha; float ang; ivas_error result; +#ifdef OTR_REFERENCE_VECTOR_TRACKING + IVAS_QUATERNION refRot_absRot_product; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ if ( pOTR == NULL || pTrkRot == NULL ) { @@ -515,7 +716,20 @@ ivas_error ivas_orient_trk_Process( /* Compute filter coefficient corresponding to desired cutoff frequency */ pOTR->alpha = sinf( 2.0f * EVS_PI * cutoffFrequency / updateRate ); break; +#ifdef OTR_REFERENCE_VECTOR_TRACKING + case OTR_TRACKING_REF_VEC: + case OTR_TRACKING_REF_VEC_LEV: + { + /* This processing step of the OTR_TRACKING_REF_POS/OTR_TRACKING_REF_POS_LEVEL is identical */ + QuaternionProduct( pOTR->refRot, *pAbsRot, &refRot_absRot_product ); + pTrkRot->w = refRot_absRot_product.w; + pTrkRot->x = refRot_absRot_product.x; + pTrkRot->y = refRot_absRot_product.y; + pTrkRot->z = refRot_absRot_product.z; + break; + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ default: result = IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Non-supported orientation tracking adaptation type" ); break; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index b040fbeb72..80bf5d5a30 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3779,6 +3779,14 @@ ivas_error IVAS_REND_SetOrientationTrackingMode( case IVAS_ORIENT_TRK_REF: mode = OTR_TRACKING_REF_ORIENT; break; +#ifdef OTR_REFERENCE_VECTOR_TRACKING + case IVAS_ORIENT_TRK_REF_VEC: + mode = OTR_TRACKING_REF_VEC; + break; + case IVAS_ORIENT_TRK_REF_VEC_LEV: + mode = OTR_TRACKING_REF_VEC_LEV; + break; +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ case IVAS_ORIENT_TRK_NONE: default: mode = OTR_TRACKING_NONE; @@ -3837,6 +3845,29 @@ ivas_error IVAS_REND_GetTrackedRotation( return IVAS_ERR_OK; } + +#ifdef OTR_REFERENCE_VECTOR_TRACKING +/*---------------------------------------------------------------------* + * IVAS_REND_SetReferenceVector( ) + * + * Sets a reference vector spanning from listenerPos to refPos. Only + * available in OTR_TRACKING_REF_POS and OTR_TRACKING_REF_POS_LEV modes. + *---------------------------------------------------------------------*/ + +ivas_error IVAS_REND_SetReferenceVector( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_VECTOR3 listenerPos, /* i : Listener position */ + const IVAS_VECTOR3 refPos /* i : Reference position */ +) +{ + if ( hIvasRend == NULL || hIvasRend->headRotData.hOrientationTracker == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + return ivas_orient_trk_SetReferenceVector( hIvasRend->headRotData.hOrientationTracker, listenerPos, refPos ); +} +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ #endif /* Take one channel from input buffer and copy it to each channel diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 3637fa87fb..fff13205b3 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -304,7 +304,15 @@ ivas_error IVAS_REND_GetTrackedRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_QUATERNION *pRotation /* i/o: Quaternion pointer for processed rotation */ ); -#endif + +#ifdef OTR_REFERENCE_VECTOR_TRACKING +ivas_error IVAS_REND_SetReferenceVector( + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_VECTOR3 listenerPos, /* i : Listener position */ + const IVAS_VECTOR3 refPos /* i : Reference position */ +); +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ +#endif /* FIX_I109_ORIENTATION_TRACKING */ ivas_error IVAS_REND_GetSamples( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ diff --git a/lib_util/vector3_pair_file_reader.c b/lib_util/vector3_pair_file_reader.c new file mode 100644 index 0000000000..1b8a95bc88 --- /dev/null +++ b/lib_util/vector3_pair_file_reader.c @@ -0,0 +1,166 @@ +/****************************************************************************************************** + + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., + Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, + Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other + contributors to this repository. All Rights Reserved. + + This software is protected by copyright law and by international treaties. + The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, + Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., + Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, + Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other + contributors to this repository retain full ownership rights in their respective contributions in + the software. This notice grants no license of any kind, including but not limited to patent + license, nor is any license granted by implication, estoppel or otherwise. + + Contributors are required to enter into the IVAS codec Public Collaboration agreement before making + contributions. + + This software is provided "AS IS", without any express or implied warranties. The software is in the + development stage. It is intended exclusively for experts who have experience with such software and + solely for the purpose of inspection. All implied warranties of non-infringement, merchantability + and fitness for a particular purpose are hereby disclaimed and excluded. + + Any dispute, controversy or claim arising under or in relation to providing this software shall be + submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in + accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and + the United Nations Convention on Contracts on the International Sales of Goods. + +*******************************************************************************************************/ + +#include "vector3_pair_file_reader.h" +#include +#include +#include +#include +#include "prot.h" +#include "options.h" /* only included to get access to the feature-defines */ + +#ifdef OTR_REFERENCE_VECTOR_TRACKING + +struct Vector3PairFileReader +{ + FILE *trajFile; + char *file_path; +}; + +/*-----------------------------------------------------------------------* + * Vector3PairFileReader_open() + * + * Allocate and initialize reader + *-----------------------------------------------------------------------*/ + +ivas_error Vector3PairFileReader_open( + const char *trajFilePath, /* i : trajectory file name */ + Vector3PairFileReader **vector3PairReader /* o : Vector3PairFileReader handle */ +) +{ + Vector3PairFileReader *self; + FILE *trajFile; + + /* Open trajectory file */ + if ( strlen( trajFilePath ) < 1 ) + { + return IVAS_ERR_FAILED_FILE_OPEN; + } + + trajFile = fopen( trajFilePath, "r" ); + + if ( !trajFile ) + { + return IVAS_ERR_FAILED_FILE_OPEN; + } + + self = calloc( sizeof( Vector3PairFileReader ), 1 ); + self->trajFile = trajFile; + self->file_path = calloc( sizeof( char ), strlen( trajFilePath ) + 1 ); + strcpy( self->file_path, trajFilePath ); + + *vector3PairReader = self; + + return IVAS_ERR_OK; +} + + +/*-----------------------------------------------------------------------* + * Vector3PairFileReader_read() + * + * Read one line of values from the trajectory file + *-----------------------------------------------------------------------*/ + +ivas_error Vector3PairFileReader_read( + Vector3PairFileReader *vector3PairReader, /* i/o: Vector3PairFileReader handle */ + IVAS_VECTOR3 *pFirst, /* o : first x,y,z position in the line */ + IVAS_VECTOR3 *pSecond /* o : second x,y,z position in the line */ +) +{ + float x1, y1, z1, x2, y2, z2; + + if ( vector3PairReader == NULL || pFirst == NULL || pSecond == NULL ) + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + + if ( 6 != fscanf( vector3PairReader->trajFile, "%f,%f,%f,%f,%f,%f", &x1, &y1, &z1, &x2, &y2, &z2 ) ) + { + if ( feof( vector3PairReader->trajFile ) ) + { + rewind( vector3PairReader->trajFile ); + return Vector3PairFileReader_read( vector3PairReader, pFirst, pSecond ); + } + return IVAS_ERR_FAILED_FILE_PARSE; + } + + pFirst->x = x1; + pFirst->y = y1; + pFirst->z = z1; + pSecond->x = x2; + pSecond->y = y2; + pSecond->z = z2; + + return IVAS_ERR_OK; +} + +/*-----------------------------------------------------------------------* + * Vector3PairFileReader_close() + * + * Deallocates memory for the Head-Tracking reader + *-----------------------------------------------------------------------*/ + +void Vector3PairFileReader_close( + Vector3PairFileReader **reader /* i/o: Vector3PairFileReader handle */ +) +{ + if ( reader == NULL || *reader == NULL ) + { + return; + } + + fclose( ( *reader )->trajFile ); + free( ( *reader )->file_path ); + free( *reader ); + *reader = NULL; + + return; +} + + +/*-----------------------------------------------------------------------* + * Vector3PairFileReader_getFilePath() + * + * + *-----------------------------------------------------------------------*/ + +const char *Vector3PairFileReader_getFilePath( + Vector3PairFileReader *reader /* i/o: Vector3PairFileReader handle */ +) +{ + if ( reader == NULL ) + { + return NULL; + } + + return reader->file_path; +} + +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ diff --git a/lib_util/vector3_pair_file_reader.h b/lib_util/vector3_pair_file_reader.h new file mode 100644 index 0000000000..a2fd706fc2 --- /dev/null +++ b/lib_util/vector3_pair_file_reader.h @@ -0,0 +1,89 @@ +/****************************************************************************************************** + + (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., + Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, + Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other + contributors to this repository. All Rights Reserved. + + This software is protected by copyright law and by international treaties. + The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, + Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., + Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, + Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other + contributors to this repository retain full ownership rights in their respective contributions in + the software. This notice grants no license of any kind, including but not limited to patent + license, nor is any license granted by implication, estoppel or otherwise. + + Contributors are required to enter into the IVAS codec Public Collaboration agreement before making + contributions. + + This software is provided "AS IS", without any express or implied warranties. The software is in the + development stage. It is intended exclusively for experts who have experience with such software and + solely for the purpose of inspection. All implied warranties of non-infringement, merchantability + and fitness for a particular purpose are hereby disclaimed and excluded. + + Any dispute, controversy or claim arising under or in relation to providing this software shall be + submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in + accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and + the United Nations Convention on Contracts on the International Sales of Goods. + +*******************************************************************************************************/ + +#ifndef IVAS_V3PAIR_FILE_READER_H +#define IVAS_V3PAIR_FILE_READER_H + +#include "common_api_types.h" +#include "ivas_error.h" +#include "options.h" /* only included to get access to the feature-defines */ + +#ifdef OTR_REFERENCE_VECTOR_TRACKING + +typedef struct Vector3PairFileReader Vector3PairFileReader; + +/*-----------------------------------------------------------------------* + * Vector3PairFileReader_open() + * + * Allocate and initialize Head-Tracking handle + *-----------------------------------------------------------------------*/ + +ivas_error Vector3PairFileReader_open( + const char *trajFilePath, /* i : trajectory file name */ + Vector3PairFileReader **vector3PairReader /* o : Vector3PairFileReader handle */ +); + +/*-----------------------------------------------------------------------* + * Vector3PairFileReader_read() + * + * Read one line of values from the trajectory file + *-----------------------------------------------------------------------*/ + +ivas_error Vector3PairFileReader_read( + Vector3PairFileReader *vector3PairReader, /* i/o: Vector3PairFileReader handle */ + IVAS_VECTOR3 *pFirst, /* o : first x,y,z position in the line */ + IVAS_VECTOR3 *pSecond /* o : second x,y,z position in the line */ +); + +/*-----------------------------------------------------------------------* + * Vector3PairFileReader_close() + * + * Deallocates memory for the handle + *-----------------------------------------------------------------------*/ + +void Vector3PairFileReader_close( + Vector3PairFileReader **vector3PairReader /* i/o: Vector3PairFileReader handle */ +); + +/*-----------------------------------------------------------------------* + * Vector3PairFileReader_getFilePath() + * + * + *-----------------------------------------------------------------------*/ + +const char *Vector3PairFileReader_getFilePath( + Vector3PairFileReader *vector3PairReader /* i/o: Vector3PairFileReader handle */ +); + +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ + +#endif /* IVAS_V3PAIR_FILE_READER_H */ diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 7f94afadb6..af6ed5de18 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -473,6 +473,14 @@ //../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit //../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrAvg.tst +// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, reference vector tracking +../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit +../IVAS_dec -t trajectories/full-circle-4s.csv -rvf trajectories/full-circle-4s-Vector3.csv -otr ref_vec BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrRefPos.tst + +// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, reference vector tracking in level mode +../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit +../IVAS_dec -t trajectories/full-circle-with-up-and-down-4s.csv -rvf trajectories/full-circle-with-up-and-down-4s-Vector3.csv -otr ref_vec_lev BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrRefPosLev.tst + // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c.pcm bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_DTX_Binaural_FEC5.tst diff --git a/scripts/trajectories/const000-Vector3.csv b/scripts/trajectories/const000-Vector3.csv new file mode 100644 index 0000000000..f47ae12e5d --- /dev/null +++ b/scripts/trajectories/const000-Vector3.csv @@ -0,0 +1,4 @@ +0.0, 0.0, 0.0, 1.0, 0.0, 0.0 +0.0, 0.0, 0.0, 1.0, 0.0, 0.0 +0.0, 0.0, 0.0, 1.0, 0.0, 0.0 +0.0, 0.0, 0.0, 1.0, 0.0, 0.0 diff --git a/scripts/trajectories/full-circle-4s-Vector3.csv b/scripts/trajectories/full-circle-4s-Vector3.csv new file mode 100644 index 0000000000..38a3505239 --- /dev/null +++ b/scripts/trajectories/full-circle-4s-Vector3.csv @@ -0,0 +1,200 @@ +0.0000,0.0000,0.0000,0.9995,-0.0314,0.0000 +0.0000,0.0000,0.0000,0.9980,-0.0628,0.0000 +0.0000,0.0000,0.0000,0.9956,-0.0941,0.0000 +0.0000,0.0000,0.0000,0.9921,-0.1253,0.0000 +0.0000,0.0000,0.0000,0.9877,-0.1564,0.0000 +0.0000,0.0000,0.0000,0.9823,-0.1874,0.0000 +0.0000,0.0000,0.0000,0.9759,-0.2181,0.0000 +0.0000,0.0000,0.0000,0.9686,-0.2487,0.0000 +0.0000,0.0000,0.0000,0.9603,-0.2790,0.0000 +0.0000,0.0000,0.0000,0.9511,-0.3090,0.0000 +0.0000,0.0000,0.0000,0.9409,-0.3387,0.0000 +0.0000,0.0000,0.0000,0.9298,-0.3681,0.0000 +0.0000,0.0000,0.0000,0.9178,-0.3971,0.0000 +0.0000,0.0000,0.0000,0.9048,-0.4258,0.0000 +0.0000,0.0000,0.0000,0.8910,-0.4540,0.0000 +0.0000,0.0000,0.0000,0.8763,-0.4818,0.0000 +0.0000,0.0000,0.0000,0.8607,-0.5090,0.0000 +0.0000,0.0000,0.0000,0.8443,-0.5358,0.0000 +0.0000,0.0000,0.0000,0.8271,-0.5621,0.0000 +0.0000,0.0000,0.0000,0.8090,-0.5878,0.0000 +0.0000,0.0000,0.0000,0.7902,-0.6129,0.0000 +0.0000,0.0000,0.0000,0.7705,-0.6374,0.0000 +0.0000,0.0000,0.0000,0.7501,-0.6613,0.0000 +0.0000,0.0000,0.0000,0.7290,-0.6845,0.0000 +0.0000,0.0000,0.0000,0.7071,-0.7071,0.0000 +0.0000,0.0000,0.0000,0.6845,-0.7290,0.0000 +0.0000,0.0000,0.0000,0.6613,-0.7501,0.0000 +0.0000,0.0000,0.0000,0.6374,-0.7705,0.0000 +0.0000,0.0000,0.0000,0.6129,-0.7902,0.0000 +0.0000,0.0000,0.0000,0.5878,-0.8090,0.0000 +0.0000,0.0000,0.0000,0.5621,-0.8271,0.0000 +0.0000,0.0000,0.0000,0.5358,-0.8443,0.0000 +0.0000,0.0000,0.0000,0.5090,-0.8607,0.0000 +0.0000,0.0000,0.0000,0.4818,-0.8763,0.0000 +0.0000,0.0000,0.0000,0.4540,-0.8910,0.0000 +0.0000,0.0000,0.0000,0.4258,-0.9048,0.0000 +0.0000,0.0000,0.0000,0.3971,-0.9178,0.0000 +0.0000,0.0000,0.0000,0.3681,-0.9298,0.0000 +0.0000,0.0000,0.0000,0.3387,-0.9409,0.0000 +0.0000,0.0000,0.0000,0.3090,-0.9511,0.0000 +0.0000,0.0000,0.0000,0.2790,-0.9603,0.0000 +0.0000,0.0000,0.0000,0.2487,-0.9686,0.0000 +0.0000,0.0000,0.0000,0.2181,-0.9759,0.0000 +0.0000,0.0000,0.0000,0.1874,-0.9823,0.0000 +0.0000,0.0000,0.0000,0.1564,-0.9877,0.0000 +0.0000,0.0000,0.0000,0.1253,-0.9921,0.0000 +0.0000,0.0000,0.0000,0.0941,-0.9956,0.0000 +0.0000,0.0000,0.0000,0.0628,-0.9980,0.0000 +0.0000,0.0000,0.0000,0.0314,-0.9995,0.0000 +0.0000,0.0000,0.0000,-0.0000,-1.0000,0.0000 +0.0000,0.0000,0.0000,-0.0314,-0.9995,0.0000 +0.0000,0.0000,0.0000,-0.0628,-0.9980,0.0000 +0.0000,0.0000,0.0000,-0.0941,-0.9956,0.0000 +0.0000,0.0000,0.0000,-0.1253,-0.9921,0.0000 +0.0000,0.0000,0.0000,-0.1564,-0.9877,0.0000 +0.0000,0.0000,0.0000,-0.1874,-0.9823,0.0000 +0.0000,0.0000,0.0000,-0.2181,-0.9759,0.0000 +0.0000,0.0000,0.0000,-0.2487,-0.9686,0.0000 +0.0000,0.0000,0.0000,-0.2790,-0.9603,0.0000 +0.0000,0.0000,0.0000,-0.3090,-0.9511,0.0000 +0.0000,0.0000,0.0000,-0.3387,-0.9409,0.0000 +0.0000,0.0000,0.0000,-0.3681,-0.9298,0.0000 +0.0000,0.0000,0.0000,-0.3971,-0.9178,0.0000 +0.0000,0.0000,0.0000,-0.4258,-0.9048,0.0000 +0.0000,0.0000,0.0000,-0.4540,-0.8910,0.0000 +0.0000,0.0000,0.0000,-0.4818,-0.8763,0.0000 +0.0000,0.0000,0.0000,-0.5090,-0.8607,0.0000 +0.0000,0.0000,0.0000,-0.5358,-0.8443,0.0000 +0.0000,0.0000,0.0000,-0.5621,-0.8271,0.0000 +0.0000,0.0000,0.0000,-0.5878,-0.8090,0.0000 +0.0000,0.0000,0.0000,-0.6129,-0.7902,0.0000 +0.0000,0.0000,0.0000,-0.6374,-0.7705,0.0000 +0.0000,0.0000,0.0000,-0.6613,-0.7501,0.0000 +0.0000,0.0000,0.0000,-0.6845,-0.7290,0.0000 +0.0000,0.0000,0.0000,-0.7071,-0.7071,0.0000 +0.0000,0.0000,0.0000,-0.7290,-0.6845,0.0000 +0.0000,0.0000,0.0000,-0.7501,-0.6613,0.0000 +0.0000,0.0000,0.0000,-0.7705,-0.6374,0.0000 +0.0000,0.0000,0.0000,-0.7902,-0.6129,0.0000 +0.0000,0.0000,0.0000,-0.8090,-0.5878,0.0000 +0.0000,0.0000,0.0000,-0.8271,-0.5621,0.0000 +0.0000,0.0000,0.0000,-0.8443,-0.5358,0.0000 +0.0000,0.0000,0.0000,-0.8607,-0.5090,0.0000 +0.0000,0.0000,0.0000,-0.8763,-0.4818,0.0000 +0.0000,0.0000,0.0000,-0.8910,-0.4540,0.0000 +0.0000,0.0000,0.0000,-0.9048,-0.4258,0.0000 +0.0000,0.0000,0.0000,-0.9178,-0.3971,0.0000 +0.0000,0.0000,0.0000,-0.9298,-0.3681,0.0000 +0.0000,0.0000,0.0000,-0.9409,-0.3387,0.0000 +0.0000,0.0000,0.0000,-0.9511,-0.3090,0.0000 +0.0000,0.0000,0.0000,-0.9603,-0.2790,0.0000 +0.0000,0.0000,0.0000,-0.9686,-0.2487,0.0000 +0.0000,0.0000,0.0000,-0.9759,-0.2181,0.0000 +0.0000,0.0000,0.0000,-0.9823,-0.1874,0.0000 +0.0000,0.0000,0.0000,-0.9877,-0.1564,0.0000 +0.0000,0.0000,0.0000,-0.9921,-0.1253,0.0000 +0.0000,0.0000,0.0000,-0.9956,-0.0941,0.0000 +0.0000,0.0000,0.0000,-0.9980,-0.0628,0.0000 +0.0000,0.0000,0.0000,-0.9995,-0.0314,0.0000 +0.0000,0.0000,0.0000,-1.0000,0.0000,0.0000 +0.0000,0.0000,0.0000,-0.9995,0.0314,0.0000 +0.0000,0.0000,0.0000,-0.9980,0.0628,0.0000 +0.0000,0.0000,0.0000,-0.9956,0.0941,0.0000 +0.0000,0.0000,0.0000,-0.9921,0.1253,0.0000 +0.0000,0.0000,0.0000,-0.9877,0.1564,0.0000 +0.0000,0.0000,0.0000,-0.9823,0.1874,0.0000 +0.0000,0.0000,0.0000,-0.9759,0.2181,0.0000 +0.0000,0.0000,0.0000,-0.9686,0.2487,0.0000 +0.0000,0.0000,0.0000,-0.9603,0.2790,0.0000 +0.0000,0.0000,0.0000,-0.9511,0.3090,0.0000 +0.0000,0.0000,0.0000,-0.9409,0.3387,0.0000 +0.0000,0.0000,0.0000,-0.9298,0.3681,0.0000 +0.0000,0.0000,0.0000,-0.9178,0.3971,0.0000 +0.0000,0.0000,0.0000,-0.9048,0.4258,0.0000 +0.0000,0.0000,0.0000,-0.8910,0.4540,0.0000 +0.0000,0.0000,0.0000,-0.8763,0.4818,0.0000 +0.0000,0.0000,0.0000,-0.8607,0.5090,0.0000 +0.0000,0.0000,0.0000,-0.8443,0.5358,0.0000 +0.0000,0.0000,0.0000,-0.8271,0.5621,0.0000 +0.0000,0.0000,0.0000,-0.8090,0.5878,0.0000 +0.0000,0.0000,0.0000,-0.7902,0.6129,0.0000 +0.0000,0.0000,0.0000,-0.7705,0.6374,0.0000 +0.0000,0.0000,0.0000,-0.7501,0.6613,0.0000 +0.0000,0.0000,0.0000,-0.7290,0.6845,0.0000 +0.0000,0.0000,0.0000,-0.7071,0.7071,0.0000 +0.0000,0.0000,0.0000,-0.6845,0.7290,0.0000 +0.0000,0.0000,0.0000,-0.6613,0.7501,0.0000 +0.0000,0.0000,0.0000,-0.6374,0.7705,0.0000 +0.0000,0.0000,0.0000,-0.6129,0.7902,0.0000 +0.0000,0.0000,0.0000,-0.5878,0.8090,0.0000 +0.0000,0.0000,0.0000,-0.5621,0.8271,0.0000 +0.0000,0.0000,0.0000,-0.5358,0.8443,0.0000 +0.0000,0.0000,0.0000,-0.5090,0.8607,0.0000 +0.0000,0.0000,0.0000,-0.4818,0.8763,0.0000 +0.0000,0.0000,0.0000,-0.4540,0.8910,0.0000 +0.0000,0.0000,0.0000,-0.4258,0.9048,0.0000 +0.0000,0.0000,0.0000,-0.3971,0.9178,0.0000 +0.0000,0.0000,0.0000,-0.3681,0.9298,0.0000 +0.0000,0.0000,0.0000,-0.3387,0.9409,0.0000 +0.0000,0.0000,0.0000,-0.3090,0.9511,0.0000 +0.0000,0.0000,0.0000,-0.2790,0.9603,0.0000 +0.0000,0.0000,0.0000,-0.2487,0.9686,0.0000 +0.0000,0.0000,0.0000,-0.2181,0.9759,0.0000 +0.0000,0.0000,0.0000,-0.1874,0.9823,0.0000 +0.0000,0.0000,0.0000,-0.1564,0.9877,0.0000 +0.0000,0.0000,0.0000,-0.1253,0.9921,0.0000 +0.0000,0.0000,0.0000,-0.0941,0.9956,0.0000 +0.0000,0.0000,0.0000,-0.0628,0.9980,0.0000 +0.0000,0.0000,0.0000,-0.0314,0.9995,0.0000 +0.0000,0.0000,0.0000,0.0000,1.0000,0.0000 +0.0000,0.0000,0.0000,0.0314,0.9995,0.0000 +0.0000,0.0000,0.0000,0.0628,0.9980,0.0000 +0.0000,0.0000,0.0000,0.0941,0.9956,0.0000 +0.0000,0.0000,0.0000,0.1253,0.9921,0.0000 +0.0000,0.0000,0.0000,0.1564,0.9877,0.0000 +0.0000,0.0000,0.0000,0.1874,0.9823,0.0000 +0.0000,0.0000,0.0000,0.2181,0.9759,0.0000 +0.0000,0.0000,0.0000,0.2487,0.9686,0.0000 +0.0000,0.0000,0.0000,0.2790,0.9603,0.0000 +0.0000,0.0000,0.0000,0.3090,0.9511,0.0000 +0.0000,0.0000,0.0000,0.3387,0.9409,0.0000 +0.0000,0.0000,0.0000,0.3681,0.9298,0.0000 +0.0000,0.0000,0.0000,0.3971,0.9178,0.0000 +0.0000,0.0000,0.0000,0.4258,0.9048,0.0000 +0.0000,0.0000,0.0000,0.4540,0.8910,0.0000 +0.0000,0.0000,0.0000,0.4818,0.8763,0.0000 +0.0000,0.0000,0.0000,0.5090,0.8607,0.0000 +0.0000,0.0000,0.0000,0.5358,0.8443,0.0000 +0.0000,0.0000,0.0000,0.5621,0.8271,0.0000 +0.0000,0.0000,0.0000,0.5878,0.8090,0.0000 +0.0000,0.0000,0.0000,0.6129,0.7902,0.0000 +0.0000,0.0000,0.0000,0.6374,0.7705,0.0000 +0.0000,0.0000,0.0000,0.6613,0.7501,0.0000 +0.0000,0.0000,0.0000,0.6845,0.7290,0.0000 +0.0000,0.0000,0.0000,0.7071,0.7071,0.0000 +0.0000,0.0000,0.0000,0.7290,0.6845,0.0000 +0.0000,0.0000,0.0000,0.7501,0.6613,0.0000 +0.0000,0.0000,0.0000,0.7705,0.6374,0.0000 +0.0000,0.0000,0.0000,0.7902,0.6129,0.0000 +0.0000,0.0000,0.0000,0.8090,0.5878,0.0000 +0.0000,0.0000,0.0000,0.8271,0.5621,0.0000 +0.0000,0.0000,0.0000,0.8443,0.5358,0.0000 +0.0000,0.0000,0.0000,0.8607,0.5090,0.0000 +0.0000,0.0000,0.0000,0.8763,0.4818,0.0000 +0.0000,0.0000,0.0000,0.8910,0.4540,0.0000 +0.0000,0.0000,0.0000,0.9048,0.4258,0.0000 +0.0000,0.0000,0.0000,0.9178,0.3971,0.0000 +0.0000,0.0000,0.0000,0.9298,0.3681,0.0000 +0.0000,0.0000,0.0000,0.9409,0.3387,0.0000 +0.0000,0.0000,0.0000,0.9511,0.3090,0.0000 +0.0000,0.0000,0.0000,0.9603,0.2790,0.0000 +0.0000,0.0000,0.0000,0.9686,0.2487,0.0000 +0.0000,0.0000,0.0000,0.9759,0.2181,0.0000 +0.0000,0.0000,0.0000,0.9823,0.1874,0.0000 +0.0000,0.0000,0.0000,0.9877,0.1564,0.0000 +0.0000,0.0000,0.0000,0.9921,0.1253,0.0000 +0.0000,0.0000,0.0000,0.9956,0.0941,0.0000 +0.0000,0.0000,0.0000,0.9980,0.0628,0.0000 +0.0000,0.0000,0.0000,0.9995,0.0314,0.0000 +0.0000,0.0000,0.0000,1.0000,-0.0000,0.0000 diff --git a/scripts/trajectories/full-circle-4s-ccw-Vector3.csv b/scripts/trajectories/full-circle-4s-ccw-Vector3.csv new file mode 100644 index 0000000000..37b2904ea4 --- /dev/null +++ b/scripts/trajectories/full-circle-4s-ccw-Vector3.csv @@ -0,0 +1,200 @@ +0.0000,0.0000,0.0000,0.9995,0.0314,0.0000 +0.0000,0.0000,0.0000,0.9980,0.0628,0.0000 +0.0000,0.0000,0.0000,0.9956,0.0941,0.0000 +0.0000,0.0000,0.0000,0.9921,0.1253,0.0000 +0.0000,0.0000,0.0000,0.9877,0.1564,0.0000 +0.0000,0.0000,0.0000,0.9823,0.1874,0.0000 +0.0000,0.0000,0.0000,0.9759,0.2181,0.0000 +0.0000,0.0000,0.0000,0.9686,0.2487,0.0000 +0.0000,0.0000,0.0000,0.9603,0.2790,0.0000 +0.0000,0.0000,0.0000,0.9511,0.3090,0.0000 +0.0000,0.0000,0.0000,0.9409,0.3387,0.0000 +0.0000,0.0000,0.0000,0.9298,0.3681,0.0000 +0.0000,0.0000,0.0000,0.9178,0.3971,0.0000 +0.0000,0.0000,0.0000,0.9048,0.4258,0.0000 +0.0000,0.0000,0.0000,0.8910,0.4540,0.0000 +0.0000,0.0000,0.0000,0.8763,0.4818,0.0000 +0.0000,0.0000,0.0000,0.8607,0.5090,0.0000 +0.0000,0.0000,0.0000,0.8443,0.5358,0.0000 +0.0000,0.0000,0.0000,0.8271,0.5621,0.0000 +0.0000,0.0000,0.0000,0.8090,0.5878,0.0000 +0.0000,0.0000,0.0000,0.7902,0.6129,0.0000 +0.0000,0.0000,0.0000,0.7705,0.6374,0.0000 +0.0000,0.0000,0.0000,0.7501,0.6613,0.0000 +0.0000,0.0000,0.0000,0.7290,0.6845,0.0000 +0.0000,0.0000,0.0000,0.7071,0.7071,0.0000 +0.0000,0.0000,0.0000,0.6845,0.7290,0.0000 +0.0000,0.0000,0.0000,0.6613,0.7501,0.0000 +0.0000,0.0000,0.0000,0.6374,0.7705,0.0000 +0.0000,0.0000,0.0000,0.6129,0.7902,0.0000 +0.0000,0.0000,0.0000,0.5878,0.8090,0.0000 +0.0000,0.0000,0.0000,0.5621,0.8271,0.0000 +0.0000,0.0000,0.0000,0.5358,0.8443,0.0000 +0.0000,0.0000,0.0000,0.5090,0.8607,0.0000 +0.0000,0.0000,0.0000,0.4818,0.8763,0.0000 +0.0000,0.0000,0.0000,0.4540,0.8910,0.0000 +0.0000,0.0000,0.0000,0.4258,0.9048,0.0000 +0.0000,0.0000,0.0000,0.3971,0.9178,0.0000 +0.0000,0.0000,0.0000,0.3681,0.9298,0.0000 +0.0000,0.0000,0.0000,0.3387,0.9409,0.0000 +0.0000,0.0000,0.0000,0.3090,0.9511,0.0000 +0.0000,0.0000,0.0000,0.2790,0.9603,0.0000 +0.0000,0.0000,0.0000,0.2487,0.9686,0.0000 +0.0000,0.0000,0.0000,0.2181,0.9759,0.0000 +0.0000,0.0000,0.0000,0.1874,0.9823,0.0000 +0.0000,0.0000,0.0000,0.1564,0.9877,0.0000 +0.0000,0.0000,0.0000,0.1253,0.9921,0.0000 +0.0000,0.0000,0.0000,0.0941,0.9956,0.0000 +0.0000,0.0000,0.0000,0.0628,0.9980,0.0000 +0.0000,0.0000,0.0000,0.0314,0.9995,0.0000 +0.0000,0.0000,0.0000,-0.0000,1.0000,0.0000 +0.0000,0.0000,0.0000,-0.0314,0.9995,0.0000 +0.0000,0.0000,0.0000,-0.0628,0.9980,0.0000 +0.0000,0.0000,0.0000,-0.0941,0.9956,0.0000 +0.0000,0.0000,0.0000,-0.1253,0.9921,0.0000 +0.0000,0.0000,0.0000,-0.1564,0.9877,0.0000 +0.0000,0.0000,0.0000,-0.1874,0.9823,0.0000 +0.0000,0.0000,0.0000,-0.2181,0.9759,0.0000 +0.0000,0.0000,0.0000,-0.2487,0.9686,0.0000 +0.0000,0.0000,0.0000,-0.2790,0.9603,0.0000 +0.0000,0.0000,0.0000,-0.3090,0.9511,0.0000 +0.0000,0.0000,0.0000,-0.3387,0.9409,0.0000 +0.0000,0.0000,0.0000,-0.3681,0.9298,0.0000 +0.0000,0.0000,0.0000,-0.3971,0.9178,0.0000 +0.0000,0.0000,0.0000,-0.4258,0.9048,0.0000 +0.0000,0.0000,0.0000,-0.4540,0.8910,0.0000 +0.0000,0.0000,0.0000,-0.4818,0.8763,0.0000 +0.0000,0.0000,0.0000,-0.5090,0.8607,0.0000 +0.0000,0.0000,0.0000,-0.5358,0.8443,0.0000 +0.0000,0.0000,0.0000,-0.5621,0.8271,0.0000 +0.0000,0.0000,0.0000,-0.5878,0.8090,0.0000 +0.0000,0.0000,0.0000,-0.6129,0.7902,0.0000 +0.0000,0.0000,0.0000,-0.6374,0.7705,0.0000 +0.0000,0.0000,0.0000,-0.6613,0.7501,0.0000 +0.0000,0.0000,0.0000,-0.6845,0.7290,0.0000 +0.0000,0.0000,0.0000,-0.7071,0.7071,0.0000 +0.0000,0.0000,0.0000,-0.7290,0.6845,0.0000 +0.0000,0.0000,0.0000,-0.7501,0.6613,0.0000 +0.0000,0.0000,0.0000,-0.7705,0.6374,0.0000 +0.0000,0.0000,0.0000,-0.7902,0.6129,0.0000 +0.0000,0.0000,0.0000,-0.8090,0.5878,0.0000 +0.0000,0.0000,0.0000,-0.8271,0.5621,0.0000 +0.0000,0.0000,0.0000,-0.8443,0.5358,0.0000 +0.0000,0.0000,0.0000,-0.8607,0.5090,0.0000 +0.0000,0.0000,0.0000,-0.8763,0.4818,0.0000 +0.0000,0.0000,0.0000,-0.8910,0.4540,0.0000 +0.0000,0.0000,0.0000,-0.9048,0.4258,0.0000 +0.0000,0.0000,0.0000,-0.9178,0.3971,0.0000 +0.0000,0.0000,0.0000,-0.9298,0.3681,0.0000 +0.0000,0.0000,0.0000,-0.9409,0.3387,0.0000 +0.0000,0.0000,0.0000,-0.9511,0.3090,0.0000 +0.0000,0.0000,0.0000,-0.9603,0.2790,0.0000 +0.0000,0.0000,0.0000,-0.9686,0.2487,0.0000 +0.0000,0.0000,0.0000,-0.9759,0.2181,0.0000 +0.0000,0.0000,0.0000,-0.9823,0.1874,0.0000 +0.0000,0.0000,0.0000,-0.9877,0.1564,0.0000 +0.0000,0.0000,0.0000,-0.9921,0.1253,0.0000 +0.0000,0.0000,0.0000,-0.9956,0.0941,0.0000 +0.0000,0.0000,0.0000,-0.9980,0.0628,0.0000 +0.0000,0.0000,0.0000,-0.9995,0.0314,0.0000 +0.0000,0.0000,0.0000,-1.0000,-0.0000,0.0000 +0.0000,0.0000,0.0000,-0.9995,-0.0314,0.0000 +0.0000,0.0000,0.0000,-0.9980,-0.0628,0.0000 +0.0000,0.0000,0.0000,-0.9956,-0.0941,0.0000 +0.0000,0.0000,0.0000,-0.9921,-0.1253,0.0000 +0.0000,0.0000,0.0000,-0.9877,-0.1564,0.0000 +0.0000,0.0000,0.0000,-0.9823,-0.1874,0.0000 +0.0000,0.0000,0.0000,-0.9759,-0.2181,0.0000 +0.0000,0.0000,0.0000,-0.9686,-0.2487,0.0000 +0.0000,0.0000,0.0000,-0.9603,-0.2790,0.0000 +0.0000,0.0000,0.0000,-0.9511,-0.3090,0.0000 +0.0000,0.0000,0.0000,-0.9409,-0.3387,0.0000 +0.0000,0.0000,0.0000,-0.9298,-0.3681,0.0000 +0.0000,0.0000,0.0000,-0.9178,-0.3971,0.0000 +0.0000,0.0000,0.0000,-0.9048,-0.4258,0.0000 +0.0000,0.0000,0.0000,-0.8910,-0.4540,0.0000 +0.0000,0.0000,0.0000,-0.8763,-0.4818,0.0000 +0.0000,0.0000,0.0000,-0.8607,-0.5090,0.0000 +0.0000,0.0000,0.0000,-0.8443,-0.5358,0.0000 +0.0000,0.0000,0.0000,-0.8271,-0.5621,0.0000 +0.0000,0.0000,0.0000,-0.8090,-0.5878,0.0000 +0.0000,0.0000,0.0000,-0.7902,-0.6129,0.0000 +0.0000,0.0000,0.0000,-0.7705,-0.6374,0.0000 +0.0000,0.0000,0.0000,-0.7501,-0.6613,0.0000 +0.0000,0.0000,0.0000,-0.7290,-0.6845,0.0000 +0.0000,0.0000,0.0000,-0.7071,-0.7071,0.0000 +0.0000,0.0000,0.0000,-0.6845,-0.7290,0.0000 +0.0000,0.0000,0.0000,-0.6613,-0.7501,0.0000 +0.0000,0.0000,0.0000,-0.6374,-0.7705,0.0000 +0.0000,0.0000,0.0000,-0.6129,-0.7902,0.0000 +0.0000,0.0000,0.0000,-0.5878,-0.8090,0.0000 +0.0000,0.0000,0.0000,-0.5621,-0.8271,0.0000 +0.0000,0.0000,0.0000,-0.5358,-0.8443,0.0000 +0.0000,0.0000,0.0000,-0.5090,-0.8607,0.0000 +0.0000,0.0000,0.0000,-0.4818,-0.8763,0.0000 +0.0000,0.0000,0.0000,-0.4540,-0.8910,0.0000 +0.0000,0.0000,0.0000,-0.4258,-0.9048,0.0000 +0.0000,0.0000,0.0000,-0.3971,-0.9178,0.0000 +0.0000,0.0000,0.0000,-0.3681,-0.9298,0.0000 +0.0000,0.0000,0.0000,-0.3387,-0.9409,0.0000 +0.0000,0.0000,0.0000,-0.3090,-0.9511,0.0000 +0.0000,0.0000,0.0000,-0.2790,-0.9603,0.0000 +0.0000,0.0000,0.0000,-0.2487,-0.9686,0.0000 +0.0000,0.0000,0.0000,-0.2181,-0.9759,0.0000 +0.0000,0.0000,0.0000,-0.1874,-0.9823,0.0000 +0.0000,0.0000,0.0000,-0.1564,-0.9877,0.0000 +0.0000,0.0000,0.0000,-0.1253,-0.9921,0.0000 +0.0000,0.0000,0.0000,-0.0941,-0.9956,0.0000 +0.0000,0.0000,0.0000,-0.0628,-0.9980,0.0000 +0.0000,0.0000,0.0000,-0.0314,-0.9995,0.0000 +0.0000,0.0000,0.0000,0.0000,-1.0000,0.0000 +0.0000,0.0000,0.0000,0.0314,-0.9995,0.0000 +0.0000,0.0000,0.0000,0.0628,-0.9980,0.0000 +0.0000,0.0000,0.0000,0.0941,-0.9956,0.0000 +0.0000,0.0000,0.0000,0.1253,-0.9921,0.0000 +0.0000,0.0000,0.0000,0.1564,-0.9877,0.0000 +0.0000,0.0000,0.0000,0.1874,-0.9823,0.0000 +0.0000,0.0000,0.0000,0.2181,-0.9759,0.0000 +0.0000,0.0000,0.0000,0.2487,-0.9686,0.0000 +0.0000,0.0000,0.0000,0.2790,-0.9603,0.0000 +0.0000,0.0000,0.0000,0.3090,-0.9511,0.0000 +0.0000,0.0000,0.0000,0.3387,-0.9409,0.0000 +0.0000,0.0000,0.0000,0.3681,-0.9298,0.0000 +0.0000,0.0000,0.0000,0.3971,-0.9178,0.0000 +0.0000,0.0000,0.0000,0.4258,-0.9048,0.0000 +0.0000,0.0000,0.0000,0.4540,-0.8910,0.0000 +0.0000,0.0000,0.0000,0.4818,-0.8763,0.0000 +0.0000,0.0000,0.0000,0.5090,-0.8607,0.0000 +0.0000,0.0000,0.0000,0.5358,-0.8443,0.0000 +0.0000,0.0000,0.0000,0.5621,-0.8271,0.0000 +0.0000,0.0000,0.0000,0.5878,-0.8090,0.0000 +0.0000,0.0000,0.0000,0.6129,-0.7902,0.0000 +0.0000,0.0000,0.0000,0.6374,-0.7705,0.0000 +0.0000,0.0000,0.0000,0.6613,-0.7501,0.0000 +0.0000,0.0000,0.0000,0.6845,-0.7290,0.0000 +0.0000,0.0000,0.0000,0.7071,-0.7071,0.0000 +0.0000,0.0000,0.0000,0.7290,-0.6845,0.0000 +0.0000,0.0000,0.0000,0.7501,-0.6613,0.0000 +0.0000,0.0000,0.0000,0.7705,-0.6374,0.0000 +0.0000,0.0000,0.0000,0.7902,-0.6129,0.0000 +0.0000,0.0000,0.0000,0.8090,-0.5878,0.0000 +0.0000,0.0000,0.0000,0.8271,-0.5621,0.0000 +0.0000,0.0000,0.0000,0.8443,-0.5358,0.0000 +0.0000,0.0000,0.0000,0.8607,-0.5090,0.0000 +0.0000,0.0000,0.0000,0.8763,-0.4818,0.0000 +0.0000,0.0000,0.0000,0.8910,-0.4540,0.0000 +0.0000,0.0000,0.0000,0.9048,-0.4258,0.0000 +0.0000,0.0000,0.0000,0.9178,-0.3971,0.0000 +0.0000,0.0000,0.0000,0.9298,-0.3681,0.0000 +0.0000,0.0000,0.0000,0.9409,-0.3387,0.0000 +0.0000,0.0000,0.0000,0.9511,-0.3090,0.0000 +0.0000,0.0000,0.0000,0.9603,-0.2790,0.0000 +0.0000,0.0000,0.0000,0.9686,-0.2487,0.0000 +0.0000,0.0000,0.0000,0.9759,-0.2181,0.0000 +0.0000,0.0000,0.0000,0.9823,-0.1874,0.0000 +0.0000,0.0000,0.0000,0.9877,-0.1564,0.0000 +0.0000,0.0000,0.0000,0.9921,-0.1253,0.0000 +0.0000,0.0000,0.0000,0.9956,-0.0941,0.0000 +0.0000,0.0000,0.0000,0.9980,-0.0628,0.0000 +0.0000,0.0000,0.0000,0.9995,-0.0314,0.0000 +0.0000,0.0000,0.0000,1.0000,0.0000,0.0000 diff --git a/scripts/trajectories/full-circle-4s-ccw.csv b/scripts/trajectories/full-circle-4s-ccw.csv new file mode 100644 index 0000000000..13eeae28e1 --- /dev/null +++ b/scripts/trajectories/full-circle-4s-ccw.csv @@ -0,0 +1,800 @@ +0.9999,0.0000,0.0000,0.0157 +0.9999,0.0000,0.0000,0.0157 +0.9999,0.0000,0.0000,0.0157 +0.9999,0.0000,0.0000,0.0157 +0.9995,0.0000,0.0000,0.0314 +0.9995,0.0000,0.0000,0.0314 +0.9995,0.0000,0.0000,0.0314 +0.9995,0.0000,0.0000,0.0314 +0.9989,0.0000,0.0000,0.0471 +0.9989,0.0000,0.0000,0.0471 +0.9989,0.0000,0.0000,0.0471 +0.9989,0.0000,0.0000,0.0471 +0.9980,0.0000,0.0000,0.0628 +0.9980,0.0000,0.0000,0.0628 +0.9980,0.0000,0.0000,0.0628 +0.9980,0.0000,0.0000,0.0628 +0.9969,0.0000,0.0000,0.0785 +0.9969,0.0000,0.0000,0.0785 +0.9969,0.0000,0.0000,0.0785 +0.9969,0.0000,0.0000,0.0785 +0.9956,0.0000,0.0000,0.0941 +0.9956,0.0000,0.0000,0.0941 +0.9956,0.0000,0.0000,0.0941 +0.9956,0.0000,0.0000,0.0941 +0.9940,0.0000,0.0000,0.1097 +0.9940,0.0000,0.0000,0.1097 +0.9940,0.0000,0.0000,0.1097 +0.9940,0.0000,0.0000,0.1097 +0.9921,0.0000,0.0000,0.1253 +0.9921,0.0000,0.0000,0.1253 +0.9921,0.0000,0.0000,0.1253 +0.9921,0.0000,0.0000,0.1253 +0.9900,0.0000,0.0000,0.1409 +0.9900,0.0000,0.0000,0.1409 +0.9900,0.0000,0.0000,0.1409 +0.9900,0.0000,0.0000,0.1409 +0.9877,0.0000,0.0000,0.1564 +0.9877,0.0000,0.0000,0.1564 +0.9877,0.0000,0.0000,0.1564 +0.9877,0.0000,0.0000,0.1564 +0.9851,0.0000,0.0000,0.1719 +0.9851,0.0000,0.0000,0.1719 +0.9851,0.0000,0.0000,0.1719 +0.9851,0.0000,0.0000,0.1719 +0.9823,0.0000,0.0000,0.1874 +0.9823,0.0000,0.0000,0.1874 +0.9823,0.0000,0.0000,0.1874 +0.9823,0.0000,0.0000,0.1874 +0.9792,0.0000,0.0000,0.2028 +0.9792,0.0000,0.0000,0.2028 +0.9792,0.0000,0.0000,0.2028 +0.9792,0.0000,0.0000,0.2028 +0.9759,0.0000,0.0000,0.2181 +0.9759,0.0000,0.0000,0.2181 +0.9759,0.0000,0.0000,0.2181 +0.9759,0.0000,0.0000,0.2181 +0.9724,0.0000,0.0000,0.2334 +0.9724,0.0000,0.0000,0.2334 +0.9724,0.0000,0.0000,0.2334 +0.9724,0.0000,0.0000,0.2334 +0.9686,0.0000,0.0000,0.2487 +0.9686,0.0000,0.0000,0.2487 +0.9686,0.0000,0.0000,0.2487 +0.9686,0.0000,0.0000,0.2487 +0.9646,0.0000,0.0000,0.2639 +0.9646,0.0000,0.0000,0.2639 +0.9646,0.0000,0.0000,0.2639 +0.9646,0.0000,0.0000,0.2639 +0.9603,0.0000,0.0000,0.2790 +0.9603,0.0000,0.0000,0.2790 +0.9603,0.0000,0.0000,0.2790 +0.9603,0.0000,0.0000,0.2790 +0.9558,0.0000,0.0000,0.2940 +0.9558,0.0000,0.0000,0.2940 +0.9558,0.0000,0.0000,0.2940 +0.9558,0.0000,0.0000,0.2940 +0.9511,0.0000,0.0000,0.3090 +0.9511,0.0000,0.0000,0.3090 +0.9511,0.0000,0.0000,0.3090 +0.9511,0.0000,0.0000,0.3090 +0.9461,0.0000,0.0000,0.3239 +0.9461,0.0000,0.0000,0.3239 +0.9461,0.0000,0.0000,0.3239 +0.9461,0.0000,0.0000,0.3239 +0.9409,0.0000,0.0000,0.3387 +0.9409,0.0000,0.0000,0.3387 +0.9409,0.0000,0.0000,0.3387 +0.9409,0.0000,0.0000,0.3387 +0.9354,0.0000,0.0000,0.3535 +0.9354,0.0000,0.0000,0.3535 +0.9354,0.0000,0.0000,0.3535 +0.9354,0.0000,0.0000,0.3535 +0.9298,0.0000,0.0000,0.3681 +0.9298,0.0000,0.0000,0.3681 +0.9298,0.0000,0.0000,0.3681 +0.9298,0.0000,0.0000,0.3681 +0.9239,0.0000,0.0000,0.3827 +0.9239,0.0000,0.0000,0.3827 +0.9239,0.0000,0.0000,0.3827 +0.9239,0.0000,0.0000,0.3827 +0.9178,0.0000,0.0000,0.3971 +0.9178,0.0000,0.0000,0.3971 +0.9178,0.0000,0.0000,0.3971 +0.9178,0.0000,0.0000,0.3971 +0.9114,0.0000,0.0000,0.4115 +0.9114,0.0000,0.0000,0.4115 +0.9114,0.0000,0.0000,0.4115 +0.9114,0.0000,0.0000,0.4115 +0.9048,0.0000,0.0000,0.4258 +0.9048,0.0000,0.0000,0.4258 +0.9048,0.0000,0.0000,0.4258 +0.9048,0.0000,0.0000,0.4258 +0.8980,0.0000,0.0000,0.4399 +0.8980,0.0000,0.0000,0.4399 +0.8980,0.0000,0.0000,0.4399 +0.8980,0.0000,0.0000,0.4399 +0.8910,0.0000,0.0000,0.4540 +0.8910,0.0000,0.0000,0.4540 +0.8910,0.0000,0.0000,0.4540 +0.8910,0.0000,0.0000,0.4540 +0.8838,0.0000,0.0000,0.4679 +0.8838,0.0000,0.0000,0.4679 +0.8838,0.0000,0.0000,0.4679 +0.8838,0.0000,0.0000,0.4679 +0.8763,0.0000,0.0000,0.4818 +0.8763,0.0000,0.0000,0.4818 +0.8763,0.0000,0.0000,0.4818 +0.8763,0.0000,0.0000,0.4818 +0.8686,0.0000,0.0000,0.4955 +0.8686,0.0000,0.0000,0.4955 +0.8686,0.0000,0.0000,0.4955 +0.8686,0.0000,0.0000,0.4955 +0.8607,0.0000,0.0000,0.5090 +0.8607,0.0000,0.0000,0.5090 +0.8607,0.0000,0.0000,0.5090 +0.8607,0.0000,0.0000,0.5090 +0.8526,0.0000,0.0000,0.5225 +0.8526,0.0000,0.0000,0.5225 +0.8526,0.0000,0.0000,0.5225 +0.8526,0.0000,0.0000,0.5225 +0.8443,0.0000,0.0000,0.5358 +0.8443,0.0000,0.0000,0.5358 +0.8443,0.0000,0.0000,0.5358 +0.8443,0.0000,0.0000,0.5358 +0.8358,0.0000,0.0000,0.5490 +0.8358,0.0000,0.0000,0.5490 +0.8358,0.0000,0.0000,0.5490 +0.8358,0.0000,0.0000,0.5490 +0.8271,0.0000,0.0000,0.5621 +0.8271,0.0000,0.0000,0.5621 +0.8271,0.0000,0.0000,0.5621 +0.8271,0.0000,0.0000,0.5621 +0.8181,0.0000,0.0000,0.5750 +0.8181,0.0000,0.0000,0.5750 +0.8181,0.0000,0.0000,0.5750 +0.8181,0.0000,0.0000,0.5750 +0.8090,0.0000,0.0000,0.5878 +0.8090,0.0000,0.0000,0.5878 +0.8090,0.0000,0.0000,0.5878 +0.8090,0.0000,0.0000,0.5878 +0.7997,0.0000,0.0000,0.6004 +0.7997,0.0000,0.0000,0.6004 +0.7997,0.0000,0.0000,0.6004 +0.7997,0.0000,0.0000,0.6004 +0.7902,0.0000,0.0000,0.6129 +0.7902,0.0000,0.0000,0.6129 +0.7902,0.0000,0.0000,0.6129 +0.7902,0.0000,0.0000,0.6129 +0.7804,0.0000,0.0000,0.6252 +0.7804,0.0000,0.0000,0.6252 +0.7804,0.0000,0.0000,0.6252 +0.7804,0.0000,0.0000,0.6252 +0.7705,0.0000,0.0000,0.6374 +0.7705,0.0000,0.0000,0.6374 +0.7705,0.0000,0.0000,0.6374 +0.7705,0.0000,0.0000,0.6374 +0.7604,0.0000,0.0000,0.6494 +0.7604,0.0000,0.0000,0.6494 +0.7604,0.0000,0.0000,0.6494 +0.7604,0.0000,0.0000,0.6494 +0.7501,0.0000,0.0000,0.6613 +0.7501,0.0000,0.0000,0.6613 +0.7501,0.0000,0.0000,0.6613 +0.7501,0.0000,0.0000,0.6613 +0.7396,0.0000,0.0000,0.6730 +0.7396,0.0000,0.0000,0.6730 +0.7396,0.0000,0.0000,0.6730 +0.7396,0.0000,0.0000,0.6730 +0.7290,0.0000,0.0000,0.6845 +0.7290,0.0000,0.0000,0.6845 +0.7290,0.0000,0.0000,0.6845 +0.7290,0.0000,0.0000,0.6845 +0.7181,0.0000,0.0000,0.6959 +0.7181,0.0000,0.0000,0.6959 +0.7181,0.0000,0.0000,0.6959 +0.7181,0.0000,0.0000,0.6959 +0.7071,0.0000,0.0000,0.7071 +0.7071,0.0000,0.0000,0.7071 +0.7071,0.0000,0.0000,0.7071 +0.7071,0.0000,0.0000,0.7071 +0.6959,0.0000,0.0000,0.7181 +0.6959,0.0000,0.0000,0.7181 +0.6959,0.0000,0.0000,0.7181 +0.6959,0.0000,0.0000,0.7181 +0.6845,0.0000,0.0000,0.7290 +0.6845,0.0000,0.0000,0.7290 +0.6845,0.0000,0.0000,0.7290 +0.6845,0.0000,0.0000,0.7290 +0.6730,0.0000,0.0000,0.7396 +0.6730,0.0000,0.0000,0.7396 +0.6730,0.0000,0.0000,0.7396 +0.6730,0.0000,0.0000,0.7396 +0.6613,0.0000,0.0000,0.7501 +0.6613,0.0000,0.0000,0.7501 +0.6613,0.0000,0.0000,0.7501 +0.6613,0.0000,0.0000,0.7501 +0.6494,0.0000,0.0000,0.7604 +0.6494,0.0000,0.0000,0.7604 +0.6494,0.0000,0.0000,0.7604 +0.6494,0.0000,0.0000,0.7604 +0.6374,0.0000,0.0000,0.7705 +0.6374,0.0000,0.0000,0.7705 +0.6374,0.0000,0.0000,0.7705 +0.6374,0.0000,0.0000,0.7705 +0.6252,0.0000,0.0000,0.7804 +0.6252,0.0000,0.0000,0.7804 +0.6252,0.0000,0.0000,0.7804 +0.6252,0.0000,0.0000,0.7804 +0.6129,0.0000,0.0000,0.7902 +0.6129,0.0000,0.0000,0.7902 +0.6129,0.0000,0.0000,0.7902 +0.6129,0.0000,0.0000,0.7902 +0.6004,0.0000,0.0000,0.7997 +0.6004,0.0000,0.0000,0.7997 +0.6004,0.0000,0.0000,0.7997 +0.6004,0.0000,0.0000,0.7997 +0.5878,0.0000,0.0000,0.8090 +0.5878,0.0000,0.0000,0.8090 +0.5878,0.0000,0.0000,0.8090 +0.5878,0.0000,0.0000,0.8090 +0.5750,0.0000,0.0000,0.8181 +0.5750,0.0000,0.0000,0.8181 +0.5750,0.0000,0.0000,0.8181 +0.5750,0.0000,0.0000,0.8181 +0.5621,0.0000,0.0000,0.8271 +0.5621,0.0000,0.0000,0.8271 +0.5621,0.0000,0.0000,0.8271 +0.5621,0.0000,0.0000,0.8271 +0.5490,0.0000,0.0000,0.8358 +0.5490,0.0000,0.0000,0.8358 +0.5490,0.0000,0.0000,0.8358 +0.5490,0.0000,0.0000,0.8358 +0.5358,0.0000,0.0000,0.8443 +0.5358,0.0000,0.0000,0.8443 +0.5358,0.0000,0.0000,0.8443 +0.5358,0.0000,0.0000,0.8443 +0.5225,0.0000,0.0000,0.8526 +0.5225,0.0000,0.0000,0.8526 +0.5225,0.0000,0.0000,0.8526 +0.5225,0.0000,0.0000,0.8526 +0.5090,0.0000,0.0000,0.8607 +0.5090,0.0000,0.0000,0.8607 +0.5090,0.0000,0.0000,0.8607 +0.5090,0.0000,0.0000,0.8607 +0.4955,0.0000,0.0000,0.8686 +0.4955,0.0000,0.0000,0.8686 +0.4955,0.0000,0.0000,0.8686 +0.4955,0.0000,0.0000,0.8686 +0.4818,0.0000,0.0000,0.8763 +0.4818,0.0000,0.0000,0.8763 +0.4818,0.0000,0.0000,0.8763 +0.4818,0.0000,0.0000,0.8763 +0.4679,0.0000,0.0000,0.8838 +0.4679,0.0000,0.0000,0.8838 +0.4679,0.0000,0.0000,0.8838 +0.4679,0.0000,0.0000,0.8838 +0.4540,0.0000,0.0000,0.8910 +0.4540,0.0000,0.0000,0.8910 +0.4540,0.0000,0.0000,0.8910 +0.4540,0.0000,0.0000,0.8910 +0.4399,0.0000,0.0000,0.8980 +0.4399,0.0000,0.0000,0.8980 +0.4399,0.0000,0.0000,0.8980 +0.4399,0.0000,0.0000,0.8980 +0.4258,0.0000,0.0000,0.9048 +0.4258,0.0000,0.0000,0.9048 +0.4258,0.0000,0.0000,0.9048 +0.4258,0.0000,0.0000,0.9048 +0.4115,0.0000,0.0000,0.9114 +0.4115,0.0000,0.0000,0.9114 +0.4115,0.0000,0.0000,0.9114 +0.4115,0.0000,0.0000,0.9114 +0.3971,0.0000,0.0000,0.9178 +0.3971,0.0000,0.0000,0.9178 +0.3971,0.0000,0.0000,0.9178 +0.3971,0.0000,0.0000,0.9178 +0.3827,0.0000,0.0000,0.9239 +0.3827,0.0000,0.0000,0.9239 +0.3827,0.0000,0.0000,0.9239 +0.3827,0.0000,0.0000,0.9239 +0.3681,0.0000,0.0000,0.9298 +0.3681,0.0000,0.0000,0.9298 +0.3681,0.0000,0.0000,0.9298 +0.3681,0.0000,0.0000,0.9298 +0.3535,0.0000,0.0000,0.9354 +0.3535,0.0000,0.0000,0.9354 +0.3535,0.0000,0.0000,0.9354 +0.3535,0.0000,0.0000,0.9354 +0.3387,0.0000,0.0000,0.9409 +0.3387,0.0000,0.0000,0.9409 +0.3387,0.0000,0.0000,0.9409 +0.3387,0.0000,0.0000,0.9409 +0.3239,0.0000,0.0000,0.9461 +0.3239,0.0000,0.0000,0.9461 +0.3239,0.0000,0.0000,0.9461 +0.3239,0.0000,0.0000,0.9461 +0.3090,0.0000,0.0000,0.9511 +0.3090,0.0000,0.0000,0.9511 +0.3090,0.0000,0.0000,0.9511 +0.3090,0.0000,0.0000,0.9511 +0.2940,0.0000,0.0000,0.9558 +0.2940,0.0000,0.0000,0.9558 +0.2940,0.0000,0.0000,0.9558 +0.2940,0.0000,0.0000,0.9558 +0.2790,0.0000,0.0000,0.9603 +0.2790,0.0000,0.0000,0.9603 +0.2790,0.0000,0.0000,0.9603 +0.2790,0.0000,0.0000,0.9603 +0.2639,0.0000,0.0000,0.9646 +0.2639,0.0000,0.0000,0.9646 +0.2639,0.0000,0.0000,0.9646 +0.2639,0.0000,0.0000,0.9646 +0.2487,0.0000,0.0000,0.9686 +0.2487,0.0000,0.0000,0.9686 +0.2487,0.0000,0.0000,0.9686 +0.2487,0.0000,0.0000,0.9686 +0.2334,0.0000,0.0000,0.9724 +0.2334,0.0000,0.0000,0.9724 +0.2334,0.0000,0.0000,0.9724 +0.2334,0.0000,0.0000,0.9724 +0.2181,0.0000,0.0000,0.9759 +0.2181,0.0000,0.0000,0.9759 +0.2181,0.0000,0.0000,0.9759 +0.2181,0.0000,0.0000,0.9759 +0.2028,0.0000,0.0000,0.9792 +0.2028,0.0000,0.0000,0.9792 +0.2028,0.0000,0.0000,0.9792 +0.2028,0.0000,0.0000,0.9792 +0.1874,0.0000,0.0000,0.9823 +0.1874,0.0000,0.0000,0.9823 +0.1874,0.0000,0.0000,0.9823 +0.1874,0.0000,0.0000,0.9823 +0.1719,0.0000,0.0000,0.9851 +0.1719,0.0000,0.0000,0.9851 +0.1719,0.0000,0.0000,0.9851 +0.1719,0.0000,0.0000,0.9851 +0.1564,0.0000,0.0000,0.9877 +0.1564,0.0000,0.0000,0.9877 +0.1564,0.0000,0.0000,0.9877 +0.1564,0.0000,0.0000,0.9877 +0.1409,0.0000,0.0000,0.9900 +0.1409,0.0000,0.0000,0.9900 +0.1409,0.0000,0.0000,0.9900 +0.1409,0.0000,0.0000,0.9900 +0.1253,0.0000,0.0000,0.9921 +0.1253,0.0000,0.0000,0.9921 +0.1253,0.0000,0.0000,0.9921 +0.1253,0.0000,0.0000,0.9921 +0.1097,0.0000,0.0000,0.9940 +0.1097,0.0000,0.0000,0.9940 +0.1097,0.0000,0.0000,0.9940 +0.1097,0.0000,0.0000,0.9940 +0.0941,0.0000,0.0000,0.9956 +0.0941,0.0000,0.0000,0.9956 +0.0941,0.0000,0.0000,0.9956 +0.0941,0.0000,0.0000,0.9956 +0.0785,0.0000,0.0000,0.9969 +0.0785,0.0000,0.0000,0.9969 +0.0785,0.0000,0.0000,0.9969 +0.0785,0.0000,0.0000,0.9969 +0.0628,0.0000,0.0000,0.9980 +0.0628,0.0000,0.0000,0.9980 +0.0628,0.0000,0.0000,0.9980 +0.0628,0.0000,0.0000,0.9980 +0.0471,0.0000,0.0000,0.9989 +0.0471,0.0000,0.0000,0.9989 +0.0471,0.0000,0.0000,0.9989 +0.0471,0.0000,0.0000,0.9989 +0.0314,0.0000,0.0000,0.9995 +0.0314,0.0000,0.0000,0.9995 +0.0314,0.0000,0.0000,0.9995 +0.0314,0.0000,0.0000,0.9995 +0.0157,0.0000,0.0000,0.9999 +0.0157,0.0000,0.0000,0.9999 +0.0157,0.0000,0.0000,0.9999 +0.0157,0.0000,0.0000,0.9999 +-0.0000,0.0000,0.0000,1.0000 +-0.0000,0.0000,0.0000,1.0000 +-0.0000,0.0000,0.0000,1.0000 +-0.0000,0.0000,0.0000,1.0000 +-0.0157,0.0000,0.0000,0.9999 +-0.0157,0.0000,0.0000,0.9999 +-0.0157,0.0000,0.0000,0.9999 +-0.0157,0.0000,0.0000,0.9999 +-0.0314,0.0000,0.0000,0.9995 +-0.0314,0.0000,0.0000,0.9995 +-0.0314,0.0000,0.0000,0.9995 +-0.0314,0.0000,0.0000,0.9995 +-0.0471,0.0000,0.0000,0.9989 +-0.0471,0.0000,0.0000,0.9989 +-0.0471,0.0000,0.0000,0.9989 +-0.0471,0.0000,0.0000,0.9989 +-0.0628,0.0000,0.0000,0.9980 +-0.0628,0.0000,0.0000,0.9980 +-0.0628,0.0000,0.0000,0.9980 +-0.0628,0.0000,0.0000,0.9980 +-0.0785,0.0000,0.0000,0.9969 +-0.0785,0.0000,0.0000,0.9969 +-0.0785,0.0000,0.0000,0.9969 +-0.0785,0.0000,0.0000,0.9969 +-0.0941,0.0000,0.0000,0.9956 +-0.0941,0.0000,0.0000,0.9956 +-0.0941,0.0000,0.0000,0.9956 +-0.0941,0.0000,0.0000,0.9956 +-0.1097,0.0000,0.0000,0.9940 +-0.1097,0.0000,0.0000,0.9940 +-0.1097,0.0000,0.0000,0.9940 +-0.1097,0.0000,0.0000,0.9940 +-0.1253,0.0000,0.0000,0.9921 +-0.1253,0.0000,0.0000,0.9921 +-0.1253,0.0000,0.0000,0.9921 +-0.1253,0.0000,0.0000,0.9921 +-0.1409,0.0000,0.0000,0.9900 +-0.1409,0.0000,0.0000,0.9900 +-0.1409,0.0000,0.0000,0.9900 +-0.1409,0.0000,0.0000,0.9900 +-0.1564,0.0000,0.0000,0.9877 +-0.1564,0.0000,0.0000,0.9877 +-0.1564,0.0000,0.0000,0.9877 +-0.1564,0.0000,0.0000,0.9877 +-0.1719,0.0000,0.0000,0.9851 +-0.1719,0.0000,0.0000,0.9851 +-0.1719,0.0000,0.0000,0.9851 +-0.1719,0.0000,0.0000,0.9851 +-0.1874,0.0000,0.0000,0.9823 +-0.1874,0.0000,0.0000,0.9823 +-0.1874,0.0000,0.0000,0.9823 +-0.1874,0.0000,0.0000,0.9823 +-0.2028,0.0000,0.0000,0.9792 +-0.2028,0.0000,0.0000,0.9792 +-0.2028,0.0000,0.0000,0.9792 +-0.2028,0.0000,0.0000,0.9792 +-0.2181,0.0000,0.0000,0.9759 +-0.2181,0.0000,0.0000,0.9759 +-0.2181,0.0000,0.0000,0.9759 +-0.2181,0.0000,0.0000,0.9759 +-0.2334,0.0000,0.0000,0.9724 +-0.2334,0.0000,0.0000,0.9724 +-0.2334,0.0000,0.0000,0.9724 +-0.2334,0.0000,0.0000,0.9724 +-0.2487,0.0000,0.0000,0.9686 +-0.2487,0.0000,0.0000,0.9686 +-0.2487,0.0000,0.0000,0.9686 +-0.2487,0.0000,0.0000,0.9686 +-0.2639,0.0000,0.0000,0.9646 +-0.2639,0.0000,0.0000,0.9646 +-0.2639,0.0000,0.0000,0.9646 +-0.2639,0.0000,0.0000,0.9646 +-0.2790,0.0000,0.0000,0.9603 +-0.2790,0.0000,0.0000,0.9603 +-0.2790,0.0000,0.0000,0.9603 +-0.2790,0.0000,0.0000,0.9603 +-0.2940,0.0000,0.0000,0.9558 +-0.2940,0.0000,0.0000,0.9558 +-0.2940,0.0000,0.0000,0.9558 +-0.2940,0.0000,0.0000,0.9558 +-0.3090,0.0000,0.0000,0.9511 +-0.3090,0.0000,0.0000,0.9511 +-0.3090,0.0000,0.0000,0.9511 +-0.3090,0.0000,0.0000,0.9511 +-0.3239,0.0000,0.0000,0.9461 +-0.3239,0.0000,0.0000,0.9461 +-0.3239,0.0000,0.0000,0.9461 +-0.3239,0.0000,0.0000,0.9461 +-0.3387,0.0000,0.0000,0.9409 +-0.3387,0.0000,0.0000,0.9409 +-0.3387,0.0000,0.0000,0.9409 +-0.3387,0.0000,0.0000,0.9409 +-0.3535,0.0000,0.0000,0.9354 +-0.3535,0.0000,0.0000,0.9354 +-0.3535,0.0000,0.0000,0.9354 +-0.3535,0.0000,0.0000,0.9354 +-0.3681,0.0000,0.0000,0.9298 +-0.3681,0.0000,0.0000,0.9298 +-0.3681,0.0000,0.0000,0.9298 +-0.3681,0.0000,0.0000,0.9298 +-0.3827,0.0000,0.0000,0.9239 +-0.3827,0.0000,0.0000,0.9239 +-0.3827,0.0000,0.0000,0.9239 +-0.3827,0.0000,0.0000,0.9239 +-0.3971,0.0000,0.0000,0.9178 +-0.3971,0.0000,0.0000,0.9178 +-0.3971,0.0000,0.0000,0.9178 +-0.3971,0.0000,0.0000,0.9178 +-0.4115,0.0000,0.0000,0.9114 +-0.4115,0.0000,0.0000,0.9114 +-0.4115,0.0000,0.0000,0.9114 +-0.4115,0.0000,0.0000,0.9114 +-0.4258,0.0000,0.0000,0.9048 +-0.4258,0.0000,0.0000,0.9048 +-0.4258,0.0000,0.0000,0.9048 +-0.4258,0.0000,0.0000,0.9048 +-0.4399,0.0000,0.0000,0.8980 +-0.4399,0.0000,0.0000,0.8980 +-0.4399,0.0000,0.0000,0.8980 +-0.4399,0.0000,0.0000,0.8980 +-0.4540,0.0000,0.0000,0.8910 +-0.4540,0.0000,0.0000,0.8910 +-0.4540,0.0000,0.0000,0.8910 +-0.4540,0.0000,0.0000,0.8910 +-0.4679,0.0000,0.0000,0.8838 +-0.4679,0.0000,0.0000,0.8838 +-0.4679,0.0000,0.0000,0.8838 +-0.4679,0.0000,0.0000,0.8838 +-0.4818,0.0000,0.0000,0.8763 +-0.4818,0.0000,0.0000,0.8763 +-0.4818,0.0000,0.0000,0.8763 +-0.4818,0.0000,0.0000,0.8763 +-0.4955,0.0000,0.0000,0.8686 +-0.4955,0.0000,0.0000,0.8686 +-0.4955,0.0000,0.0000,0.8686 +-0.4955,0.0000,0.0000,0.8686 +-0.5090,0.0000,0.0000,0.8607 +-0.5090,0.0000,0.0000,0.8607 +-0.5090,0.0000,0.0000,0.8607 +-0.5090,0.0000,0.0000,0.8607 +-0.5225,0.0000,0.0000,0.8526 +-0.5225,0.0000,0.0000,0.8526 +-0.5225,0.0000,0.0000,0.8526 +-0.5225,0.0000,0.0000,0.8526 +-0.5358,0.0000,0.0000,0.8443 +-0.5358,0.0000,0.0000,0.8443 +-0.5358,0.0000,0.0000,0.8443 +-0.5358,0.0000,0.0000,0.8443 +-0.5490,0.0000,0.0000,0.8358 +-0.5490,0.0000,0.0000,0.8358 +-0.5490,0.0000,0.0000,0.8358 +-0.5490,0.0000,0.0000,0.8358 +-0.5621,0.0000,0.0000,0.8271 +-0.5621,0.0000,0.0000,0.8271 +-0.5621,0.0000,0.0000,0.8271 +-0.5621,0.0000,0.0000,0.8271 +-0.5750,0.0000,0.0000,0.8181 +-0.5750,0.0000,0.0000,0.8181 +-0.5750,0.0000,0.0000,0.8181 +-0.5750,0.0000,0.0000,0.8181 +-0.5878,0.0000,0.0000,0.8090 +-0.5878,0.0000,0.0000,0.8090 +-0.5878,0.0000,0.0000,0.8090 +-0.5878,0.0000,0.0000,0.8090 +-0.6004,0.0000,0.0000,0.7997 +-0.6004,0.0000,0.0000,0.7997 +-0.6004,0.0000,0.0000,0.7997 +-0.6004,0.0000,0.0000,0.7997 +-0.6129,0.0000,0.0000,0.7902 +-0.6129,0.0000,0.0000,0.7902 +-0.6129,0.0000,0.0000,0.7902 +-0.6129,0.0000,0.0000,0.7902 +-0.6252,0.0000,0.0000,0.7804 +-0.6252,0.0000,0.0000,0.7804 +-0.6252,0.0000,0.0000,0.7804 +-0.6252,0.0000,0.0000,0.7804 +-0.6374,0.0000,0.0000,0.7705 +-0.6374,0.0000,0.0000,0.7705 +-0.6374,0.0000,0.0000,0.7705 +-0.6374,0.0000,0.0000,0.7705 +-0.6494,0.0000,0.0000,0.7604 +-0.6494,0.0000,0.0000,0.7604 +-0.6494,0.0000,0.0000,0.7604 +-0.6494,0.0000,0.0000,0.7604 +-0.6613,0.0000,0.0000,0.7501 +-0.6613,0.0000,0.0000,0.7501 +-0.6613,0.0000,0.0000,0.7501 +-0.6613,0.0000,0.0000,0.7501 +-0.6730,0.0000,0.0000,0.7396 +-0.6730,0.0000,0.0000,0.7396 +-0.6730,0.0000,0.0000,0.7396 +-0.6730,0.0000,0.0000,0.7396 +-0.6845,0.0000,0.0000,0.7290 +-0.6845,0.0000,0.0000,0.7290 +-0.6845,0.0000,0.0000,0.7290 +-0.6845,0.0000,0.0000,0.7290 +-0.6959,0.0000,0.0000,0.7181 +-0.6959,0.0000,0.0000,0.7181 +-0.6959,0.0000,0.0000,0.7181 +-0.6959,0.0000,0.0000,0.7181 +-0.7071,0.0000,0.0000,0.7071 +-0.7071,0.0000,0.0000,0.7071 +-0.7071,0.0000,0.0000,0.7071 +-0.7071,0.0000,0.0000,0.7071 +-0.7181,0.0000,0.0000,0.6959 +-0.7181,0.0000,0.0000,0.6959 +-0.7181,0.0000,0.0000,0.6959 +-0.7181,0.0000,0.0000,0.6959 +-0.7290,0.0000,0.0000,0.6845 +-0.7290,0.0000,0.0000,0.6845 +-0.7290,0.0000,0.0000,0.6845 +-0.7290,0.0000,0.0000,0.6845 +-0.7396,0.0000,0.0000,0.6730 +-0.7396,0.0000,0.0000,0.6730 +-0.7396,0.0000,0.0000,0.6730 +-0.7396,0.0000,0.0000,0.6730 +-0.7501,0.0000,0.0000,0.6613 +-0.7501,0.0000,0.0000,0.6613 +-0.7501,0.0000,0.0000,0.6613 +-0.7501,0.0000,0.0000,0.6613 +-0.7604,0.0000,0.0000,0.6494 +-0.7604,0.0000,0.0000,0.6494 +-0.7604,0.0000,0.0000,0.6494 +-0.7604,0.0000,0.0000,0.6494 +-0.7705,0.0000,0.0000,0.6374 +-0.7705,0.0000,0.0000,0.6374 +-0.7705,0.0000,0.0000,0.6374 +-0.7705,0.0000,0.0000,0.6374 +-0.7804,0.0000,0.0000,0.6252 +-0.7804,0.0000,0.0000,0.6252 +-0.7804,0.0000,0.0000,0.6252 +-0.7804,0.0000,0.0000,0.6252 +-0.7902,0.0000,0.0000,0.6129 +-0.7902,0.0000,0.0000,0.6129 +-0.7902,0.0000,0.0000,0.6129 +-0.7902,0.0000,0.0000,0.6129 +-0.7997,0.0000,0.0000,0.6004 +-0.7997,0.0000,0.0000,0.6004 +-0.7997,0.0000,0.0000,0.6004 +-0.7997,0.0000,0.0000,0.6004 +-0.8090,0.0000,0.0000,0.5878 +-0.8090,0.0000,0.0000,0.5878 +-0.8090,0.0000,0.0000,0.5878 +-0.8090,0.0000,0.0000,0.5878 +-0.8182,0.0000,0.0000,0.5750 +-0.8182,0.0000,0.0000,0.5750 +-0.8182,0.0000,0.0000,0.5750 +-0.8182,0.0000,0.0000,0.5750 +-0.8271,0.0000,0.0000,0.5621 +-0.8271,0.0000,0.0000,0.5621 +-0.8271,0.0000,0.0000,0.5621 +-0.8271,0.0000,0.0000,0.5621 +-0.8358,0.0000,0.0000,0.5490 +-0.8358,0.0000,0.0000,0.5490 +-0.8358,0.0000,0.0000,0.5490 +-0.8358,0.0000,0.0000,0.5490 +-0.8443,0.0000,0.0000,0.5358 +-0.8443,0.0000,0.0000,0.5358 +-0.8443,0.0000,0.0000,0.5358 +-0.8443,0.0000,0.0000,0.5358 +-0.8526,0.0000,0.0000,0.5225 +-0.8526,0.0000,0.0000,0.5225 +-0.8526,0.0000,0.0000,0.5225 +-0.8526,0.0000,0.0000,0.5225 +-0.8607,0.0000,0.0000,0.5090 +-0.8607,0.0000,0.0000,0.5090 +-0.8607,0.0000,0.0000,0.5090 +-0.8607,0.0000,0.0000,0.5090 +-0.8686,0.0000,0.0000,0.4955 +-0.8686,0.0000,0.0000,0.4955 +-0.8686,0.0000,0.0000,0.4955 +-0.8686,0.0000,0.0000,0.4955 +-0.8763,0.0000,0.0000,0.4818 +-0.8763,0.0000,0.0000,0.4818 +-0.8763,0.0000,0.0000,0.4818 +-0.8763,0.0000,0.0000,0.4818 +-0.8838,0.0000,0.0000,0.4679 +-0.8838,0.0000,0.0000,0.4679 +-0.8838,0.0000,0.0000,0.4679 +-0.8838,0.0000,0.0000,0.4679 +-0.8910,0.0000,0.0000,0.4540 +-0.8910,0.0000,0.0000,0.4540 +-0.8910,0.0000,0.0000,0.4540 +-0.8910,0.0000,0.0000,0.4540 +-0.8980,0.0000,0.0000,0.4399 +-0.8980,0.0000,0.0000,0.4399 +-0.8980,0.0000,0.0000,0.4399 +-0.8980,0.0000,0.0000,0.4399 +-0.9048,0.0000,0.0000,0.4258 +-0.9048,0.0000,0.0000,0.4258 +-0.9048,0.0000,0.0000,0.4258 +-0.9048,0.0000,0.0000,0.4258 +-0.9114,0.0000,0.0000,0.4115 +-0.9114,0.0000,0.0000,0.4115 +-0.9114,0.0000,0.0000,0.4115 +-0.9114,0.0000,0.0000,0.4115 +-0.9178,0.0000,0.0000,0.3971 +-0.9178,0.0000,0.0000,0.3971 +-0.9178,0.0000,0.0000,0.3971 +-0.9178,0.0000,0.0000,0.3971 +-0.9239,0.0000,0.0000,0.3827 +-0.9239,0.0000,0.0000,0.3827 +-0.9239,0.0000,0.0000,0.3827 +-0.9239,0.0000,0.0000,0.3827 +-0.9298,0.0000,0.0000,0.3681 +-0.9298,0.0000,0.0000,0.3681 +-0.9298,0.0000,0.0000,0.3681 +-0.9298,0.0000,0.0000,0.3681 +-0.9354,0.0000,0.0000,0.3535 +-0.9354,0.0000,0.0000,0.3535 +-0.9354,0.0000,0.0000,0.3535 +-0.9354,0.0000,0.0000,0.3535 +-0.9409,0.0000,0.0000,0.3387 +-0.9409,0.0000,0.0000,0.3387 +-0.9409,0.0000,0.0000,0.3387 +-0.9409,0.0000,0.0000,0.3387 +-0.9461,0.0000,0.0000,0.3239 +-0.9461,0.0000,0.0000,0.3239 +-0.9461,0.0000,0.0000,0.3239 +-0.9461,0.0000,0.0000,0.3239 +-0.9511,0.0000,0.0000,0.3090 +-0.9511,0.0000,0.0000,0.3090 +-0.9511,0.0000,0.0000,0.3090 +-0.9511,0.0000,0.0000,0.3090 +-0.9558,0.0000,0.0000,0.2940 +-0.9558,0.0000,0.0000,0.2940 +-0.9558,0.0000,0.0000,0.2940 +-0.9558,0.0000,0.0000,0.2940 +-0.9603,0.0000,0.0000,0.2790 +-0.9603,0.0000,0.0000,0.2790 +-0.9603,0.0000,0.0000,0.2790 +-0.9603,0.0000,0.0000,0.2790 +-0.9646,0.0000,0.0000,0.2639 +-0.9646,0.0000,0.0000,0.2639 +-0.9646,0.0000,0.0000,0.2639 +-0.9646,0.0000,0.0000,0.2639 +-0.9686,0.0000,0.0000,0.2487 +-0.9686,0.0000,0.0000,0.2487 +-0.9686,0.0000,0.0000,0.2487 +-0.9686,0.0000,0.0000,0.2487 +-0.9724,0.0000,0.0000,0.2334 +-0.9724,0.0000,0.0000,0.2334 +-0.9724,0.0000,0.0000,0.2334 +-0.9724,0.0000,0.0000,0.2334 +-0.9759,0.0000,0.0000,0.2181 +-0.9759,0.0000,0.0000,0.2181 +-0.9759,0.0000,0.0000,0.2181 +-0.9759,0.0000,0.0000,0.2181 +-0.9792,0.0000,0.0000,0.2028 +-0.9792,0.0000,0.0000,0.2028 +-0.9792,0.0000,0.0000,0.2028 +-0.9792,0.0000,0.0000,0.2028 +-0.9823,0.0000,0.0000,0.1874 +-0.9823,0.0000,0.0000,0.1874 +-0.9823,0.0000,0.0000,0.1874 +-0.9823,0.0000,0.0000,0.1874 +-0.9851,0.0000,0.0000,0.1719 +-0.9851,0.0000,0.0000,0.1719 +-0.9851,0.0000,0.0000,0.1719 +-0.9851,0.0000,0.0000,0.1719 +-0.9877,0.0000,0.0000,0.1564 +-0.9877,0.0000,0.0000,0.1564 +-0.9877,0.0000,0.0000,0.1564 +-0.9877,0.0000,0.0000,0.1564 +-0.9900,0.0000,0.0000,0.1409 +-0.9900,0.0000,0.0000,0.1409 +-0.9900,0.0000,0.0000,0.1409 +-0.9900,0.0000,0.0000,0.1409 +-0.9921,0.0000,0.0000,0.1253 +-0.9921,0.0000,0.0000,0.1253 +-0.9921,0.0000,0.0000,0.1253 +-0.9921,0.0000,0.0000,0.1253 +-0.9940,0.0000,0.0000,0.1097 +-0.9940,0.0000,0.0000,0.1097 +-0.9940,0.0000,0.0000,0.1097 +-0.9940,0.0000,0.0000,0.1097 +-0.9956,0.0000,0.0000,0.0941 +-0.9956,0.0000,0.0000,0.0941 +-0.9956,0.0000,0.0000,0.0941 +-0.9956,0.0000,0.0000,0.0941 +-0.9969,0.0000,0.0000,0.0785 +-0.9969,0.0000,0.0000,0.0785 +-0.9969,0.0000,0.0000,0.0785 +-0.9969,0.0000,0.0000,0.0785 +-0.9980,0.0000,0.0000,0.0628 +-0.9980,0.0000,0.0000,0.0628 +-0.9980,0.0000,0.0000,0.0628 +-0.9980,0.0000,0.0000,0.0628 +-0.9989,0.0000,0.0000,0.0471 +-0.9989,0.0000,0.0000,0.0471 +-0.9989,0.0000,0.0000,0.0471 +-0.9989,0.0000,0.0000,0.0471 +-0.9995,0.0000,0.0000,0.0314 +-0.9995,0.0000,0.0000,0.0314 +-0.9995,0.0000,0.0000,0.0314 +-0.9995,0.0000,0.0000,0.0314 +-0.9999,0.0000,0.0000,0.0157 +-0.9999,0.0000,0.0000,0.0157 +-0.9999,0.0000,0.0000,0.0157 +-0.9999,0.0000,0.0000,0.0157 +1.0000,0.0000,0.0000,0.0000 +1.0000,0.0000,0.0000,0.0000 +1.0000,0.0000,0.0000,0.0000 +1.0000,0.0000,0.0000,0.0000 diff --git a/scripts/trajectories/full-circle-4s.csv b/scripts/trajectories/full-circle-4s.csv new file mode 100644 index 0000000000..4174a531b7 --- /dev/null +++ b/scripts/trajectories/full-circle-4s.csv @@ -0,0 +1,800 @@ +0.9999,0.0000,0.0000,-0.0157 +0.9999,0.0000,0.0000,-0.0157 +0.9999,0.0000,0.0000,-0.0157 +0.9999,0.0000,0.0000,-0.0157 +0.9995,0.0000,0.0000,-0.0314 +0.9995,0.0000,0.0000,-0.0314 +0.9995,0.0000,0.0000,-0.0314 +0.9995,0.0000,0.0000,-0.0314 +0.9989,0.0000,0.0000,-0.0471 +0.9989,0.0000,0.0000,-0.0471 +0.9989,0.0000,0.0000,-0.0471 +0.9989,0.0000,0.0000,-0.0471 +0.9980,0.0000,0.0000,-0.0628 +0.9980,0.0000,0.0000,-0.0628 +0.9980,0.0000,0.0000,-0.0628 +0.9980,0.0000,0.0000,-0.0628 +0.9969,0.0000,0.0000,-0.0785 +0.9969,0.0000,0.0000,-0.0785 +0.9969,0.0000,0.0000,-0.0785 +0.9969,0.0000,0.0000,-0.0785 +0.9956,0.0000,0.0000,-0.0941 +0.9956,0.0000,0.0000,-0.0941 +0.9956,0.0000,0.0000,-0.0941 +0.9956,0.0000,0.0000,-0.0941 +0.9940,0.0000,0.0000,-0.1097 +0.9940,0.0000,0.0000,-0.1097 +0.9940,0.0000,0.0000,-0.1097 +0.9940,0.0000,0.0000,-0.1097 +0.9921,0.0000,0.0000,-0.1253 +0.9921,0.0000,0.0000,-0.1253 +0.9921,0.0000,0.0000,-0.1253 +0.9921,0.0000,0.0000,-0.1253 +0.9900,0.0000,0.0000,-0.1409 +0.9900,0.0000,0.0000,-0.1409 +0.9900,0.0000,0.0000,-0.1409 +0.9900,0.0000,0.0000,-0.1409 +0.9877,0.0000,0.0000,-0.1564 +0.9877,0.0000,0.0000,-0.1564 +0.9877,0.0000,0.0000,-0.1564 +0.9877,0.0000,0.0000,-0.1564 +0.9851,0.0000,0.0000,-0.1719 +0.9851,0.0000,0.0000,-0.1719 +0.9851,0.0000,0.0000,-0.1719 +0.9851,0.0000,0.0000,-0.1719 +0.9823,0.0000,0.0000,-0.1874 +0.9823,0.0000,0.0000,-0.1874 +0.9823,0.0000,0.0000,-0.1874 +0.9823,0.0000,0.0000,-0.1874 +0.9792,0.0000,0.0000,-0.2028 +0.9792,0.0000,0.0000,-0.2028 +0.9792,0.0000,0.0000,-0.2028 +0.9792,0.0000,0.0000,-0.2028 +0.9759,0.0000,0.0000,-0.2181 +0.9759,0.0000,0.0000,-0.2181 +0.9759,0.0000,0.0000,-0.2181 +0.9759,0.0000,0.0000,-0.2181 +0.9724,0.0000,0.0000,-0.2334 +0.9724,0.0000,0.0000,-0.2334 +0.9724,0.0000,0.0000,-0.2334 +0.9724,0.0000,0.0000,-0.2334 +0.9686,0.0000,0.0000,-0.2487 +0.9686,0.0000,0.0000,-0.2487 +0.9686,0.0000,0.0000,-0.2487 +0.9686,0.0000,0.0000,-0.2487 +0.9646,0.0000,0.0000,-0.2639 +0.9646,0.0000,0.0000,-0.2639 +0.9646,0.0000,0.0000,-0.2639 +0.9646,0.0000,0.0000,-0.2639 +0.9603,0.0000,0.0000,-0.2790 +0.9603,0.0000,0.0000,-0.2790 +0.9603,0.0000,0.0000,-0.2790 +0.9603,0.0000,0.0000,-0.2790 +0.9558,0.0000,0.0000,-0.2940 +0.9558,0.0000,0.0000,-0.2940 +0.9558,0.0000,0.0000,-0.2940 +0.9558,0.0000,0.0000,-0.2940 +0.9511,0.0000,0.0000,-0.3090 +0.9511,0.0000,0.0000,-0.3090 +0.9511,0.0000,0.0000,-0.3090 +0.9511,0.0000,0.0000,-0.3090 +0.9461,0.0000,0.0000,-0.3239 +0.9461,0.0000,0.0000,-0.3239 +0.9461,0.0000,0.0000,-0.3239 +0.9461,0.0000,0.0000,-0.3239 +0.9409,0.0000,0.0000,-0.3387 +0.9409,0.0000,0.0000,-0.3387 +0.9409,0.0000,0.0000,-0.3387 +0.9409,0.0000,0.0000,-0.3387 +0.9354,0.0000,0.0000,-0.3535 +0.9354,0.0000,0.0000,-0.3535 +0.9354,0.0000,0.0000,-0.3535 +0.9354,0.0000,0.0000,-0.3535 +0.9298,0.0000,0.0000,-0.3681 +0.9298,0.0000,0.0000,-0.3681 +0.9298,0.0000,0.0000,-0.3681 +0.9298,0.0000,0.0000,-0.3681 +0.9239,0.0000,0.0000,-0.3827 +0.9239,0.0000,0.0000,-0.3827 +0.9239,0.0000,0.0000,-0.3827 +0.9239,0.0000,0.0000,-0.3827 +0.9178,0.0000,0.0000,-0.3971 +0.9178,0.0000,0.0000,-0.3971 +0.9178,0.0000,0.0000,-0.3971 +0.9178,0.0000,0.0000,-0.3971 +0.9114,0.0000,0.0000,-0.4115 +0.9114,0.0000,0.0000,-0.4115 +0.9114,0.0000,0.0000,-0.4115 +0.9114,0.0000,0.0000,-0.4115 +0.9048,0.0000,0.0000,-0.4258 +0.9048,0.0000,0.0000,-0.4258 +0.9048,0.0000,0.0000,-0.4258 +0.9048,0.0000,0.0000,-0.4258 +0.8980,0.0000,0.0000,-0.4399 +0.8980,0.0000,0.0000,-0.4399 +0.8980,0.0000,0.0000,-0.4399 +0.8980,0.0000,0.0000,-0.4399 +0.8910,0.0000,0.0000,-0.4540 +0.8910,0.0000,0.0000,-0.4540 +0.8910,0.0000,0.0000,-0.4540 +0.8910,0.0000,0.0000,-0.4540 +0.8838,0.0000,0.0000,-0.4679 +0.8838,0.0000,0.0000,-0.4679 +0.8838,0.0000,0.0000,-0.4679 +0.8838,0.0000,0.0000,-0.4679 +0.8763,0.0000,0.0000,-0.4818 +0.8763,0.0000,0.0000,-0.4818 +0.8763,0.0000,0.0000,-0.4818 +0.8763,0.0000,0.0000,-0.4818 +0.8686,0.0000,0.0000,-0.4955 +0.8686,0.0000,0.0000,-0.4955 +0.8686,0.0000,0.0000,-0.4955 +0.8686,0.0000,0.0000,-0.4955 +0.8607,0.0000,0.0000,-0.5090 +0.8607,0.0000,0.0000,-0.5090 +0.8607,0.0000,0.0000,-0.5090 +0.8607,0.0000,0.0000,-0.5090 +0.8526,0.0000,0.0000,-0.5225 +0.8526,0.0000,0.0000,-0.5225 +0.8526,0.0000,0.0000,-0.5225 +0.8526,0.0000,0.0000,-0.5225 +0.8443,0.0000,0.0000,-0.5358 +0.8443,0.0000,0.0000,-0.5358 +0.8443,0.0000,0.0000,-0.5358 +0.8443,0.0000,0.0000,-0.5358 +0.8358,0.0000,0.0000,-0.5490 +0.8358,0.0000,0.0000,-0.5490 +0.8358,0.0000,0.0000,-0.5490 +0.8358,0.0000,0.0000,-0.5490 +0.8271,0.0000,0.0000,-0.5621 +0.8271,0.0000,0.0000,-0.5621 +0.8271,0.0000,0.0000,-0.5621 +0.8271,0.0000,0.0000,-0.5621 +0.8181,0.0000,0.0000,-0.5750 +0.8181,0.0000,0.0000,-0.5750 +0.8181,0.0000,0.0000,-0.5750 +0.8181,0.0000,0.0000,-0.5750 +0.8090,0.0000,0.0000,-0.5878 +0.8090,0.0000,0.0000,-0.5878 +0.8090,0.0000,0.0000,-0.5878 +0.8090,0.0000,0.0000,-0.5878 +0.7997,0.0000,0.0000,-0.6004 +0.7997,0.0000,0.0000,-0.6004 +0.7997,0.0000,0.0000,-0.6004 +0.7997,0.0000,0.0000,-0.6004 +0.7902,0.0000,0.0000,-0.6129 +0.7902,0.0000,0.0000,-0.6129 +0.7902,0.0000,0.0000,-0.6129 +0.7902,0.0000,0.0000,-0.6129 +0.7804,0.0000,0.0000,-0.6252 +0.7804,0.0000,0.0000,-0.6252 +0.7804,0.0000,0.0000,-0.6252 +0.7804,0.0000,0.0000,-0.6252 +0.7705,0.0000,0.0000,-0.6374 +0.7705,0.0000,0.0000,-0.6374 +0.7705,0.0000,0.0000,-0.6374 +0.7705,0.0000,0.0000,-0.6374 +0.7604,0.0000,0.0000,-0.6494 +0.7604,0.0000,0.0000,-0.6494 +0.7604,0.0000,0.0000,-0.6494 +0.7604,0.0000,0.0000,-0.6494 +0.7501,0.0000,0.0000,-0.6613 +0.7501,0.0000,0.0000,-0.6613 +0.7501,0.0000,0.0000,-0.6613 +0.7501,0.0000,0.0000,-0.6613 +0.7396,0.0000,0.0000,-0.6730 +0.7396,0.0000,0.0000,-0.6730 +0.7396,0.0000,0.0000,-0.6730 +0.7396,0.0000,0.0000,-0.6730 +0.7290,0.0000,0.0000,-0.6845 +0.7290,0.0000,0.0000,-0.6845 +0.7290,0.0000,0.0000,-0.6845 +0.7290,0.0000,0.0000,-0.6845 +0.7181,0.0000,0.0000,-0.6959 +0.7181,0.0000,0.0000,-0.6959 +0.7181,0.0000,0.0000,-0.6959 +0.7181,0.0000,0.0000,-0.6959 +0.7071,0.0000,0.0000,-0.7071 +0.7071,0.0000,0.0000,-0.7071 +0.7071,0.0000,0.0000,-0.7071 +0.7071,0.0000,0.0000,-0.7071 +0.6959,0.0000,0.0000,-0.7181 +0.6959,0.0000,0.0000,-0.7181 +0.6959,0.0000,0.0000,-0.7181 +0.6959,0.0000,0.0000,-0.7181 +0.6845,0.0000,0.0000,-0.7290 +0.6845,0.0000,0.0000,-0.7290 +0.6845,0.0000,0.0000,-0.7290 +0.6845,0.0000,0.0000,-0.7290 +0.6730,0.0000,0.0000,-0.7396 +0.6730,0.0000,0.0000,-0.7396 +0.6730,0.0000,0.0000,-0.7396 +0.6730,0.0000,0.0000,-0.7396 +0.6613,0.0000,0.0000,-0.7501 +0.6613,0.0000,0.0000,-0.7501 +0.6613,0.0000,0.0000,-0.7501 +0.6613,0.0000,0.0000,-0.7501 +0.6494,0.0000,0.0000,-0.7604 +0.6494,0.0000,0.0000,-0.7604 +0.6494,0.0000,0.0000,-0.7604 +0.6494,0.0000,0.0000,-0.7604 +0.6374,0.0000,0.0000,-0.7705 +0.6374,0.0000,0.0000,-0.7705 +0.6374,0.0000,0.0000,-0.7705 +0.6374,0.0000,0.0000,-0.7705 +0.6252,0.0000,0.0000,-0.7804 +0.6252,0.0000,0.0000,-0.7804 +0.6252,0.0000,0.0000,-0.7804 +0.6252,0.0000,0.0000,-0.7804 +0.6129,0.0000,0.0000,-0.7902 +0.6129,0.0000,0.0000,-0.7902 +0.6129,0.0000,0.0000,-0.7902 +0.6129,0.0000,0.0000,-0.7902 +0.6004,0.0000,0.0000,-0.7997 +0.6004,0.0000,0.0000,-0.7997 +0.6004,0.0000,0.0000,-0.7997 +0.6004,0.0000,0.0000,-0.7997 +0.5878,0.0000,0.0000,-0.8090 +0.5878,0.0000,0.0000,-0.8090 +0.5878,0.0000,0.0000,-0.8090 +0.5878,0.0000,0.0000,-0.8090 +0.5750,0.0000,0.0000,-0.8181 +0.5750,0.0000,0.0000,-0.8181 +0.5750,0.0000,0.0000,-0.8181 +0.5750,0.0000,0.0000,-0.8181 +0.5621,0.0000,0.0000,-0.8271 +0.5621,0.0000,0.0000,-0.8271 +0.5621,0.0000,0.0000,-0.8271 +0.5621,0.0000,0.0000,-0.8271 +0.5490,0.0000,0.0000,-0.8358 +0.5490,0.0000,0.0000,-0.8358 +0.5490,0.0000,0.0000,-0.8358 +0.5490,0.0000,0.0000,-0.8358 +0.5358,0.0000,0.0000,-0.8443 +0.5358,0.0000,0.0000,-0.8443 +0.5358,0.0000,0.0000,-0.8443 +0.5358,0.0000,0.0000,-0.8443 +0.5225,0.0000,0.0000,-0.8526 +0.5225,0.0000,0.0000,-0.8526 +0.5225,0.0000,0.0000,-0.8526 +0.5225,0.0000,0.0000,-0.8526 +0.5090,0.0000,0.0000,-0.8607 +0.5090,0.0000,0.0000,-0.8607 +0.5090,0.0000,0.0000,-0.8607 +0.5090,0.0000,0.0000,-0.8607 +0.4955,0.0000,0.0000,-0.8686 +0.4955,0.0000,0.0000,-0.8686 +0.4955,0.0000,0.0000,-0.8686 +0.4955,0.0000,0.0000,-0.8686 +0.4818,0.0000,0.0000,-0.8763 +0.4818,0.0000,0.0000,-0.8763 +0.4818,0.0000,0.0000,-0.8763 +0.4818,0.0000,0.0000,-0.8763 +0.4679,0.0000,0.0000,-0.8838 +0.4679,0.0000,0.0000,-0.8838 +0.4679,0.0000,0.0000,-0.8838 +0.4679,0.0000,0.0000,-0.8838 +0.4540,0.0000,0.0000,-0.8910 +0.4540,0.0000,0.0000,-0.8910 +0.4540,0.0000,0.0000,-0.8910 +0.4540,0.0000,0.0000,-0.8910 +0.4399,0.0000,0.0000,-0.8980 +0.4399,0.0000,0.0000,-0.8980 +0.4399,0.0000,0.0000,-0.8980 +0.4399,0.0000,0.0000,-0.8980 +0.4258,0.0000,0.0000,-0.9048 +0.4258,0.0000,0.0000,-0.9048 +0.4258,0.0000,0.0000,-0.9048 +0.4258,0.0000,0.0000,-0.9048 +0.4115,0.0000,0.0000,-0.9114 +0.4115,0.0000,0.0000,-0.9114 +0.4115,0.0000,0.0000,-0.9114 +0.4115,0.0000,0.0000,-0.9114 +0.3971,0.0000,0.0000,-0.9178 +0.3971,0.0000,0.0000,-0.9178 +0.3971,0.0000,0.0000,-0.9178 +0.3971,0.0000,0.0000,-0.9178 +0.3827,0.0000,0.0000,-0.9239 +0.3827,0.0000,0.0000,-0.9239 +0.3827,0.0000,0.0000,-0.9239 +0.3827,0.0000,0.0000,-0.9239 +0.3681,0.0000,0.0000,-0.9298 +0.3681,0.0000,0.0000,-0.9298 +0.3681,0.0000,0.0000,-0.9298 +0.3681,0.0000,0.0000,-0.9298 +0.3535,0.0000,0.0000,-0.9354 +0.3535,0.0000,0.0000,-0.9354 +0.3535,0.0000,0.0000,-0.9354 +0.3535,0.0000,0.0000,-0.9354 +0.3387,0.0000,0.0000,-0.9409 +0.3387,0.0000,0.0000,-0.9409 +0.3387,0.0000,0.0000,-0.9409 +0.3387,0.0000,0.0000,-0.9409 +0.3239,0.0000,0.0000,-0.9461 +0.3239,0.0000,0.0000,-0.9461 +0.3239,0.0000,0.0000,-0.9461 +0.3239,0.0000,0.0000,-0.9461 +0.3090,0.0000,0.0000,-0.9511 +0.3090,0.0000,0.0000,-0.9511 +0.3090,0.0000,0.0000,-0.9511 +0.3090,0.0000,0.0000,-0.9511 +0.2940,0.0000,0.0000,-0.9558 +0.2940,0.0000,0.0000,-0.9558 +0.2940,0.0000,0.0000,-0.9558 +0.2940,0.0000,0.0000,-0.9558 +0.2790,0.0000,0.0000,-0.9603 +0.2790,0.0000,0.0000,-0.9603 +0.2790,0.0000,0.0000,-0.9603 +0.2790,0.0000,0.0000,-0.9603 +0.2639,0.0000,0.0000,-0.9646 +0.2639,0.0000,0.0000,-0.9646 +0.2639,0.0000,0.0000,-0.9646 +0.2639,0.0000,0.0000,-0.9646 +0.2487,0.0000,0.0000,-0.9686 +0.2487,0.0000,0.0000,-0.9686 +0.2487,0.0000,0.0000,-0.9686 +0.2487,0.0000,0.0000,-0.9686 +0.2334,0.0000,0.0000,-0.9724 +0.2334,0.0000,0.0000,-0.9724 +0.2334,0.0000,0.0000,-0.9724 +0.2334,0.0000,0.0000,-0.9724 +0.2181,0.0000,0.0000,-0.9759 +0.2181,0.0000,0.0000,-0.9759 +0.2181,0.0000,0.0000,-0.9759 +0.2181,0.0000,0.0000,-0.9759 +0.2028,0.0000,0.0000,-0.9792 +0.2028,0.0000,0.0000,-0.9792 +0.2028,0.0000,0.0000,-0.9792 +0.2028,0.0000,0.0000,-0.9792 +0.1874,0.0000,0.0000,-0.9823 +0.1874,0.0000,0.0000,-0.9823 +0.1874,0.0000,0.0000,-0.9823 +0.1874,0.0000,0.0000,-0.9823 +0.1719,0.0000,0.0000,-0.9851 +0.1719,0.0000,0.0000,-0.9851 +0.1719,0.0000,0.0000,-0.9851 +0.1719,0.0000,0.0000,-0.9851 +0.1564,0.0000,0.0000,-0.9877 +0.1564,0.0000,0.0000,-0.9877 +0.1564,0.0000,0.0000,-0.9877 +0.1564,0.0000,0.0000,-0.9877 +0.1409,0.0000,0.0000,-0.9900 +0.1409,0.0000,0.0000,-0.9900 +0.1409,0.0000,0.0000,-0.9900 +0.1409,0.0000,0.0000,-0.9900 +0.1253,0.0000,0.0000,-0.9921 +0.1253,0.0000,0.0000,-0.9921 +0.1253,0.0000,0.0000,-0.9921 +0.1253,0.0000,0.0000,-0.9921 +0.1097,0.0000,0.0000,-0.9940 +0.1097,0.0000,0.0000,-0.9940 +0.1097,0.0000,0.0000,-0.9940 +0.1097,0.0000,0.0000,-0.9940 +0.0941,0.0000,0.0000,-0.9956 +0.0941,0.0000,0.0000,-0.9956 +0.0941,0.0000,0.0000,-0.9956 +0.0941,0.0000,0.0000,-0.9956 +0.0785,0.0000,0.0000,-0.9969 +0.0785,0.0000,0.0000,-0.9969 +0.0785,0.0000,0.0000,-0.9969 +0.0785,0.0000,0.0000,-0.9969 +0.0628,0.0000,0.0000,-0.9980 +0.0628,0.0000,0.0000,-0.9980 +0.0628,0.0000,0.0000,-0.9980 +0.0628,0.0000,0.0000,-0.9980 +0.0471,0.0000,0.0000,-0.9989 +0.0471,0.0000,0.0000,-0.9989 +0.0471,0.0000,0.0000,-0.9989 +0.0471,0.0000,0.0000,-0.9989 +0.0314,0.0000,0.0000,-0.9995 +0.0314,0.0000,0.0000,-0.9995 +0.0314,0.0000,0.0000,-0.9995 +0.0314,0.0000,0.0000,-0.9995 +0.0157,0.0000,0.0000,-0.9999 +0.0157,0.0000,0.0000,-0.9999 +0.0157,0.0000,0.0000,-0.9999 +0.0157,0.0000,0.0000,-0.9999 +-0.0000,0.0000,0.0000,-1.0000 +-0.0000,0.0000,0.0000,-1.0000 +-0.0000,0.0000,0.0000,-1.0000 +-0.0000,0.0000,0.0000,-1.0000 +-0.0157,0.0000,0.0000,-0.9999 +-0.0157,0.0000,0.0000,-0.9999 +-0.0157,0.0000,0.0000,-0.9999 +-0.0157,0.0000,0.0000,-0.9999 +-0.0314,0.0000,0.0000,-0.9995 +-0.0314,0.0000,0.0000,-0.9995 +-0.0314,0.0000,0.0000,-0.9995 +-0.0314,0.0000,0.0000,-0.9995 +-0.0471,0.0000,0.0000,-0.9989 +-0.0471,0.0000,0.0000,-0.9989 +-0.0471,0.0000,0.0000,-0.9989 +-0.0471,0.0000,0.0000,-0.9989 +-0.0628,0.0000,0.0000,-0.9980 +-0.0628,0.0000,0.0000,-0.9980 +-0.0628,0.0000,0.0000,-0.9980 +-0.0628,0.0000,0.0000,-0.9980 +-0.0785,0.0000,0.0000,-0.9969 +-0.0785,0.0000,0.0000,-0.9969 +-0.0785,0.0000,0.0000,-0.9969 +-0.0785,0.0000,0.0000,-0.9969 +-0.0941,0.0000,0.0000,-0.9956 +-0.0941,0.0000,0.0000,-0.9956 +-0.0941,0.0000,0.0000,-0.9956 +-0.0941,0.0000,0.0000,-0.9956 +-0.1097,0.0000,0.0000,-0.9940 +-0.1097,0.0000,0.0000,-0.9940 +-0.1097,0.0000,0.0000,-0.9940 +-0.1097,0.0000,0.0000,-0.9940 +-0.1253,0.0000,0.0000,-0.9921 +-0.1253,0.0000,0.0000,-0.9921 +-0.1253,0.0000,0.0000,-0.9921 +-0.1253,0.0000,0.0000,-0.9921 +-0.1409,0.0000,0.0000,-0.9900 +-0.1409,0.0000,0.0000,-0.9900 +-0.1409,0.0000,0.0000,-0.9900 +-0.1409,0.0000,0.0000,-0.9900 +-0.1564,0.0000,0.0000,-0.9877 +-0.1564,0.0000,0.0000,-0.9877 +-0.1564,0.0000,0.0000,-0.9877 +-0.1564,0.0000,0.0000,-0.9877 +-0.1719,0.0000,0.0000,-0.9851 +-0.1719,0.0000,0.0000,-0.9851 +-0.1719,0.0000,0.0000,-0.9851 +-0.1719,0.0000,0.0000,-0.9851 +-0.1874,0.0000,0.0000,-0.9823 +-0.1874,0.0000,0.0000,-0.9823 +-0.1874,0.0000,0.0000,-0.9823 +-0.1874,0.0000,0.0000,-0.9823 +-0.2028,0.0000,0.0000,-0.9792 +-0.2028,0.0000,0.0000,-0.9792 +-0.2028,0.0000,0.0000,-0.9792 +-0.2028,0.0000,0.0000,-0.9792 +-0.2181,0.0000,0.0000,-0.9759 +-0.2181,0.0000,0.0000,-0.9759 +-0.2181,0.0000,0.0000,-0.9759 +-0.2181,0.0000,0.0000,-0.9759 +-0.2334,0.0000,0.0000,-0.9724 +-0.2334,0.0000,0.0000,-0.9724 +-0.2334,0.0000,0.0000,-0.9724 +-0.2334,0.0000,0.0000,-0.9724 +-0.2487,0.0000,0.0000,-0.9686 +-0.2487,0.0000,0.0000,-0.9686 +-0.2487,0.0000,0.0000,-0.9686 +-0.2487,0.0000,0.0000,-0.9686 +-0.2639,0.0000,0.0000,-0.9646 +-0.2639,0.0000,0.0000,-0.9646 +-0.2639,0.0000,0.0000,-0.9646 +-0.2639,0.0000,0.0000,-0.9646 +-0.2790,0.0000,0.0000,-0.9603 +-0.2790,0.0000,0.0000,-0.9603 +-0.2790,0.0000,0.0000,-0.9603 +-0.2790,0.0000,0.0000,-0.9603 +-0.2940,0.0000,0.0000,-0.9558 +-0.2940,0.0000,0.0000,-0.9558 +-0.2940,0.0000,0.0000,-0.9558 +-0.2940,0.0000,0.0000,-0.9558 +-0.3090,0.0000,0.0000,-0.9511 +-0.3090,0.0000,0.0000,-0.9511 +-0.3090,0.0000,0.0000,-0.9511 +-0.3090,0.0000,0.0000,-0.9511 +-0.3239,0.0000,0.0000,-0.9461 +-0.3239,0.0000,0.0000,-0.9461 +-0.3239,0.0000,0.0000,-0.9461 +-0.3239,0.0000,0.0000,-0.9461 +-0.3387,0.0000,0.0000,-0.9409 +-0.3387,0.0000,0.0000,-0.9409 +-0.3387,0.0000,0.0000,-0.9409 +-0.3387,0.0000,0.0000,-0.9409 +-0.3535,0.0000,0.0000,-0.9354 +-0.3535,0.0000,0.0000,-0.9354 +-0.3535,0.0000,0.0000,-0.9354 +-0.3535,0.0000,0.0000,-0.9354 +-0.3681,0.0000,0.0000,-0.9298 +-0.3681,0.0000,0.0000,-0.9298 +-0.3681,0.0000,0.0000,-0.9298 +-0.3681,0.0000,0.0000,-0.9298 +-0.3827,0.0000,0.0000,-0.9239 +-0.3827,0.0000,0.0000,-0.9239 +-0.3827,0.0000,0.0000,-0.9239 +-0.3827,0.0000,0.0000,-0.9239 +-0.3971,0.0000,0.0000,-0.9178 +-0.3971,0.0000,0.0000,-0.9178 +-0.3971,0.0000,0.0000,-0.9178 +-0.3971,0.0000,0.0000,-0.9178 +-0.4115,0.0000,0.0000,-0.9114 +-0.4115,0.0000,0.0000,-0.9114 +-0.4115,0.0000,0.0000,-0.9114 +-0.4115,0.0000,0.0000,-0.9114 +-0.4258,0.0000,0.0000,-0.9048 +-0.4258,0.0000,0.0000,-0.9048 +-0.4258,0.0000,0.0000,-0.9048 +-0.4258,0.0000,0.0000,-0.9048 +-0.4399,0.0000,0.0000,-0.8980 +-0.4399,0.0000,0.0000,-0.8980 +-0.4399,0.0000,0.0000,-0.8980 +-0.4399,0.0000,0.0000,-0.8980 +-0.4540,0.0000,0.0000,-0.8910 +-0.4540,0.0000,0.0000,-0.8910 +-0.4540,0.0000,0.0000,-0.8910 +-0.4540,0.0000,0.0000,-0.8910 +-0.4679,0.0000,0.0000,-0.8838 +-0.4679,0.0000,0.0000,-0.8838 +-0.4679,0.0000,0.0000,-0.8838 +-0.4679,0.0000,0.0000,-0.8838 +-0.4818,0.0000,0.0000,-0.8763 +-0.4818,0.0000,0.0000,-0.8763 +-0.4818,0.0000,0.0000,-0.8763 +-0.4818,0.0000,0.0000,-0.8763 +-0.4955,0.0000,0.0000,-0.8686 +-0.4955,0.0000,0.0000,-0.8686 +-0.4955,0.0000,0.0000,-0.8686 +-0.4955,0.0000,0.0000,-0.8686 +-0.5090,0.0000,0.0000,-0.8607 +-0.5090,0.0000,0.0000,-0.8607 +-0.5090,0.0000,0.0000,-0.8607 +-0.5090,0.0000,0.0000,-0.8607 +-0.5225,0.0000,0.0000,-0.8526 +-0.5225,0.0000,0.0000,-0.8526 +-0.5225,0.0000,0.0000,-0.8526 +-0.5225,0.0000,0.0000,-0.8526 +-0.5358,0.0000,0.0000,-0.8443 +-0.5358,0.0000,0.0000,-0.8443 +-0.5358,0.0000,0.0000,-0.8443 +-0.5358,0.0000,0.0000,-0.8443 +-0.5490,0.0000,0.0000,-0.8358 +-0.5490,0.0000,0.0000,-0.8358 +-0.5490,0.0000,0.0000,-0.8358 +-0.5490,0.0000,0.0000,-0.8358 +-0.5621,0.0000,0.0000,-0.8271 +-0.5621,0.0000,0.0000,-0.8271 +-0.5621,0.0000,0.0000,-0.8271 +-0.5621,0.0000,0.0000,-0.8271 +-0.5750,0.0000,0.0000,-0.8181 +-0.5750,0.0000,0.0000,-0.8181 +-0.5750,0.0000,0.0000,-0.8181 +-0.5750,0.0000,0.0000,-0.8181 +-0.5878,0.0000,0.0000,-0.8090 +-0.5878,0.0000,0.0000,-0.8090 +-0.5878,0.0000,0.0000,-0.8090 +-0.5878,0.0000,0.0000,-0.8090 +-0.6004,0.0000,0.0000,-0.7997 +-0.6004,0.0000,0.0000,-0.7997 +-0.6004,0.0000,0.0000,-0.7997 +-0.6004,0.0000,0.0000,-0.7997 +-0.6129,0.0000,0.0000,-0.7902 +-0.6129,0.0000,0.0000,-0.7902 +-0.6129,0.0000,0.0000,-0.7902 +-0.6129,0.0000,0.0000,-0.7902 +-0.6252,0.0000,0.0000,-0.7804 +-0.6252,0.0000,0.0000,-0.7804 +-0.6252,0.0000,0.0000,-0.7804 +-0.6252,0.0000,0.0000,-0.7804 +-0.6374,0.0000,0.0000,-0.7705 +-0.6374,0.0000,0.0000,-0.7705 +-0.6374,0.0000,0.0000,-0.7705 +-0.6374,0.0000,0.0000,-0.7705 +-0.6494,0.0000,0.0000,-0.7604 +-0.6494,0.0000,0.0000,-0.7604 +-0.6494,0.0000,0.0000,-0.7604 +-0.6494,0.0000,0.0000,-0.7604 +-0.6613,0.0000,0.0000,-0.7501 +-0.6613,0.0000,0.0000,-0.7501 +-0.6613,0.0000,0.0000,-0.7501 +-0.6613,0.0000,0.0000,-0.7501 +-0.6730,0.0000,0.0000,-0.7396 +-0.6730,0.0000,0.0000,-0.7396 +-0.6730,0.0000,0.0000,-0.7396 +-0.6730,0.0000,0.0000,-0.7396 +-0.6845,0.0000,0.0000,-0.7290 +-0.6845,0.0000,0.0000,-0.7290 +-0.6845,0.0000,0.0000,-0.7290 +-0.6845,0.0000,0.0000,-0.7290 +-0.6959,0.0000,0.0000,-0.7181 +-0.6959,0.0000,0.0000,-0.7181 +-0.6959,0.0000,0.0000,-0.7181 +-0.6959,0.0000,0.0000,-0.7181 +-0.7071,0.0000,0.0000,-0.7071 +-0.7071,0.0000,0.0000,-0.7071 +-0.7071,0.0000,0.0000,-0.7071 +-0.7071,0.0000,0.0000,-0.7071 +-0.7181,0.0000,0.0000,-0.6959 +-0.7181,0.0000,0.0000,-0.6959 +-0.7181,0.0000,0.0000,-0.6959 +-0.7181,0.0000,0.0000,-0.6959 +-0.7290,0.0000,0.0000,-0.6845 +-0.7290,0.0000,0.0000,-0.6845 +-0.7290,0.0000,0.0000,-0.6845 +-0.7290,0.0000,0.0000,-0.6845 +-0.7396,0.0000,0.0000,-0.6730 +-0.7396,0.0000,0.0000,-0.6730 +-0.7396,0.0000,0.0000,-0.6730 +-0.7396,0.0000,0.0000,-0.6730 +-0.7501,0.0000,0.0000,-0.6613 +-0.7501,0.0000,0.0000,-0.6613 +-0.7501,0.0000,0.0000,-0.6613 +-0.7501,0.0000,0.0000,-0.6613 +-0.7604,0.0000,0.0000,-0.6494 +-0.7604,0.0000,0.0000,-0.6494 +-0.7604,0.0000,0.0000,-0.6494 +-0.7604,0.0000,0.0000,-0.6494 +-0.7705,0.0000,0.0000,-0.6374 +-0.7705,0.0000,0.0000,-0.6374 +-0.7705,0.0000,0.0000,-0.6374 +-0.7705,0.0000,0.0000,-0.6374 +-0.7804,0.0000,0.0000,-0.6252 +-0.7804,0.0000,0.0000,-0.6252 +-0.7804,0.0000,0.0000,-0.6252 +-0.7804,0.0000,0.0000,-0.6252 +-0.7902,0.0000,0.0000,-0.6129 +-0.7902,0.0000,0.0000,-0.6129 +-0.7902,0.0000,0.0000,-0.6129 +-0.7902,0.0000,0.0000,-0.6129 +-0.7997,0.0000,0.0000,-0.6004 +-0.7997,0.0000,0.0000,-0.6004 +-0.7997,0.0000,0.0000,-0.6004 +-0.7997,0.0000,0.0000,-0.6004 +-0.8090,0.0000,0.0000,-0.5878 +-0.8090,0.0000,0.0000,-0.5878 +-0.8090,0.0000,0.0000,-0.5878 +-0.8090,0.0000,0.0000,-0.5878 +-0.8182,0.0000,0.0000,-0.5750 +-0.8182,0.0000,0.0000,-0.5750 +-0.8182,0.0000,0.0000,-0.5750 +-0.8182,0.0000,0.0000,-0.5750 +-0.8271,0.0000,0.0000,-0.5621 +-0.8271,0.0000,0.0000,-0.5621 +-0.8271,0.0000,0.0000,-0.5621 +-0.8271,0.0000,0.0000,-0.5621 +-0.8358,0.0000,0.0000,-0.5490 +-0.8358,0.0000,0.0000,-0.5490 +-0.8358,0.0000,0.0000,-0.5490 +-0.8358,0.0000,0.0000,-0.5490 +-0.8443,0.0000,0.0000,-0.5358 +-0.8443,0.0000,0.0000,-0.5358 +-0.8443,0.0000,0.0000,-0.5358 +-0.8443,0.0000,0.0000,-0.5358 +-0.8526,0.0000,0.0000,-0.5225 +-0.8526,0.0000,0.0000,-0.5225 +-0.8526,0.0000,0.0000,-0.5225 +-0.8526,0.0000,0.0000,-0.5225 +-0.8607,0.0000,0.0000,-0.5090 +-0.8607,0.0000,0.0000,-0.5090 +-0.8607,0.0000,0.0000,-0.5090 +-0.8607,0.0000,0.0000,-0.5090 +-0.8686,0.0000,0.0000,-0.4955 +-0.8686,0.0000,0.0000,-0.4955 +-0.8686,0.0000,0.0000,-0.4955 +-0.8686,0.0000,0.0000,-0.4955 +-0.8763,0.0000,0.0000,-0.4818 +-0.8763,0.0000,0.0000,-0.4818 +-0.8763,0.0000,0.0000,-0.4818 +-0.8763,0.0000,0.0000,-0.4818 +-0.8838,0.0000,0.0000,-0.4679 +-0.8838,0.0000,0.0000,-0.4679 +-0.8838,0.0000,0.0000,-0.4679 +-0.8838,0.0000,0.0000,-0.4679 +-0.8910,0.0000,0.0000,-0.4540 +-0.8910,0.0000,0.0000,-0.4540 +-0.8910,0.0000,0.0000,-0.4540 +-0.8910,0.0000,0.0000,-0.4540 +-0.8980,0.0000,0.0000,-0.4399 +-0.8980,0.0000,0.0000,-0.4399 +-0.8980,0.0000,0.0000,-0.4399 +-0.8980,0.0000,0.0000,-0.4399 +-0.9048,0.0000,0.0000,-0.4258 +-0.9048,0.0000,0.0000,-0.4258 +-0.9048,0.0000,0.0000,-0.4258 +-0.9048,0.0000,0.0000,-0.4258 +-0.9114,0.0000,0.0000,-0.4115 +-0.9114,0.0000,0.0000,-0.4115 +-0.9114,0.0000,0.0000,-0.4115 +-0.9114,0.0000,0.0000,-0.4115 +-0.9178,0.0000,0.0000,-0.3971 +-0.9178,0.0000,0.0000,-0.3971 +-0.9178,0.0000,0.0000,-0.3971 +-0.9178,0.0000,0.0000,-0.3971 +-0.9239,0.0000,0.0000,-0.3827 +-0.9239,0.0000,0.0000,-0.3827 +-0.9239,0.0000,0.0000,-0.3827 +-0.9239,0.0000,0.0000,-0.3827 +-0.9298,0.0000,0.0000,-0.3681 +-0.9298,0.0000,0.0000,-0.3681 +-0.9298,0.0000,0.0000,-0.3681 +-0.9298,0.0000,0.0000,-0.3681 +-0.9354,0.0000,0.0000,-0.3535 +-0.9354,0.0000,0.0000,-0.3535 +-0.9354,0.0000,0.0000,-0.3535 +-0.9354,0.0000,0.0000,-0.3535 +-0.9409,0.0000,0.0000,-0.3387 +-0.9409,0.0000,0.0000,-0.3387 +-0.9409,0.0000,0.0000,-0.3387 +-0.9409,0.0000,0.0000,-0.3387 +-0.9461,0.0000,0.0000,-0.3239 +-0.9461,0.0000,0.0000,-0.3239 +-0.9461,0.0000,0.0000,-0.3239 +-0.9461,0.0000,0.0000,-0.3239 +-0.9511,0.0000,0.0000,-0.3090 +-0.9511,0.0000,0.0000,-0.3090 +-0.9511,0.0000,0.0000,-0.3090 +-0.9511,0.0000,0.0000,-0.3090 +-0.9558,0.0000,0.0000,-0.2940 +-0.9558,0.0000,0.0000,-0.2940 +-0.9558,0.0000,0.0000,-0.2940 +-0.9558,0.0000,0.0000,-0.2940 +-0.9603,0.0000,0.0000,-0.2790 +-0.9603,0.0000,0.0000,-0.2790 +-0.9603,0.0000,0.0000,-0.2790 +-0.9603,0.0000,0.0000,-0.2790 +-0.9646,0.0000,0.0000,-0.2639 +-0.9646,0.0000,0.0000,-0.2639 +-0.9646,0.0000,0.0000,-0.2639 +-0.9646,0.0000,0.0000,-0.2639 +-0.9686,0.0000,0.0000,-0.2487 +-0.9686,0.0000,0.0000,-0.2487 +-0.9686,0.0000,0.0000,-0.2487 +-0.9686,0.0000,0.0000,-0.2487 +-0.9724,0.0000,0.0000,-0.2334 +-0.9724,0.0000,0.0000,-0.2334 +-0.9724,0.0000,0.0000,-0.2334 +-0.9724,0.0000,0.0000,-0.2334 +-0.9759,0.0000,0.0000,-0.2181 +-0.9759,0.0000,0.0000,-0.2181 +-0.9759,0.0000,0.0000,-0.2181 +-0.9759,0.0000,0.0000,-0.2181 +-0.9792,0.0000,0.0000,-0.2028 +-0.9792,0.0000,0.0000,-0.2028 +-0.9792,0.0000,0.0000,-0.2028 +-0.9792,0.0000,0.0000,-0.2028 +-0.9823,0.0000,0.0000,-0.1874 +-0.9823,0.0000,0.0000,-0.1874 +-0.9823,0.0000,0.0000,-0.1874 +-0.9823,0.0000,0.0000,-0.1874 +-0.9851,0.0000,0.0000,-0.1719 +-0.9851,0.0000,0.0000,-0.1719 +-0.9851,0.0000,0.0000,-0.1719 +-0.9851,0.0000,0.0000,-0.1719 +-0.9877,0.0000,0.0000,-0.1564 +-0.9877,0.0000,0.0000,-0.1564 +-0.9877,0.0000,0.0000,-0.1564 +-0.9877,0.0000,0.0000,-0.1564 +-0.9900,0.0000,0.0000,-0.1409 +-0.9900,0.0000,0.0000,-0.1409 +-0.9900,0.0000,0.0000,-0.1409 +-0.9900,0.0000,0.0000,-0.1409 +-0.9921,0.0000,0.0000,-0.1253 +-0.9921,0.0000,0.0000,-0.1253 +-0.9921,0.0000,0.0000,-0.1253 +-0.9921,0.0000,0.0000,-0.1253 +-0.9940,0.0000,0.0000,-0.1097 +-0.9940,0.0000,0.0000,-0.1097 +-0.9940,0.0000,0.0000,-0.1097 +-0.9940,0.0000,0.0000,-0.1097 +-0.9956,0.0000,0.0000,-0.0941 +-0.9956,0.0000,0.0000,-0.0941 +-0.9956,0.0000,0.0000,-0.0941 +-0.9956,0.0000,0.0000,-0.0941 +-0.9969,0.0000,0.0000,-0.0785 +-0.9969,0.0000,0.0000,-0.0785 +-0.9969,0.0000,0.0000,-0.0785 +-0.9969,0.0000,0.0000,-0.0785 +-0.9980,0.0000,0.0000,-0.0628 +-0.9980,0.0000,0.0000,-0.0628 +-0.9980,0.0000,0.0000,-0.0628 +-0.9980,0.0000,0.0000,-0.0628 +-0.9989,0.0000,0.0000,-0.0471 +-0.9989,0.0000,0.0000,-0.0471 +-0.9989,0.0000,0.0000,-0.0471 +-0.9989,0.0000,0.0000,-0.0471 +-0.9995,0.0000,0.0000,-0.0314 +-0.9995,0.0000,0.0000,-0.0314 +-0.9995,0.0000,0.0000,-0.0314 +-0.9995,0.0000,0.0000,-0.0314 +-0.9999,0.0000,0.0000,-0.0157 +-0.9999,0.0000,0.0000,-0.0157 +-0.9999,0.0000,0.0000,-0.0157 +-0.9999,0.0000,0.0000,-0.0157 +1.0000,0.0000,0.0000,-0.0000 +1.0000,0.0000,0.0000,-0.0000 +1.0000,0.0000,0.0000,-0.0000 +1.0000,0.0000,0.0000,-0.0000 diff --git a/scripts/trajectories/full-circle-with-up-and-down-4s-Vector3.csv b/scripts/trajectories/full-circle-with-up-and-down-4s-Vector3.csv new file mode 100644 index 0000000000..8fe2d2fe05 --- /dev/null +++ b/scripts/trajectories/full-circle-with-up-and-down-4s-Vector3.csv @@ -0,0 +1,200 @@ +0.0000,0.0000,0.0000,0.7012,-0.0220,-0.7126 +0.0000,0.0000,0.0000,0.7057,-0.0444,-0.7071 +0.0000,0.0000,0.0000,0.7095,-0.0671,-0.7015 +0.0000,0.0000,0.0000,0.7125,-0.0900,-0.6959 +0.0000,0.0000,0.0000,0.7147,-0.1132,-0.6903 +0.0000,0.0000,0.0000,0.7161,-0.1366,-0.6845 +0.0000,0.0000,0.0000,0.7166,-0.1602,-0.6788 +0.0000,0.0000,0.0000,0.7164,-0.1839,-0.6730 +0.0000,0.0000,0.0000,0.7153,-0.2078,-0.6672 +0.0000,0.0000,0.0000,0.7134,-0.2318,-0.6613 +0.0000,0.0000,0.0000,0.7106,-0.2558,-0.6554 +0.0000,0.0000,0.0000,0.7070,-0.2799,-0.6494 +0.0000,0.0000,0.0000,0.7025,-0.3040,-0.6435 +0.0000,0.0000,0.0000,0.6972,-0.3281,-0.6374 +0.0000,0.0000,0.0000,0.6910,-0.3521,-0.6314 +0.0000,0.0000,0.0000,0.6839,-0.3760,-0.6252 +0.0000,0.0000,0.0000,0.6760,-0.3998,-0.6191 +0.0000,0.0000,0.0000,0.6671,-0.4234,-0.6129 +0.0000,0.0000,0.0000,0.6575,-0.4468,-0.6067 +0.0000,0.0000,0.0000,0.6470,-0.4700,-0.6004 +0.0000,0.0000,0.0000,0.6356,-0.4930,-0.5941 +0.0000,0.0000,0.0000,0.6234,-0.5157,-0.5878 +0.0000,0.0000,0.0000,0.6103,-0.5380,-0.5814 +0.0000,0.0000,0.0000,0.5964,-0.5601,-0.5750 +0.0000,0.0000,0.0000,0.5817,-0.5817,-0.5686 +0.0000,0.0000,0.0000,0.5662,-0.6029,-0.5621 +0.0000,0.0000,0.0000,0.5499,-0.6237,-0.5556 +0.0000,0.0000,0.0000,0.5328,-0.6440,-0.5490 +0.0000,0.0000,0.0000,0.5149,-0.6638,-0.5424 +0.0000,0.0000,0.0000,0.4963,-0.6831,-0.5358 +0.0000,0.0000,0.0000,0.4769,-0.7018,-0.5292 +0.0000,0.0000,0.0000,0.4569,-0.7199,-0.5225 +0.0000,0.0000,0.0000,0.4361,-0.7374,-0.5158 +0.0000,0.0000,0.0000,0.4147,-0.7543,-0.5090 +0.0000,0.0000,0.0000,0.3926,-0.7705,-0.5023 +0.0000,0.0000,0.0000,0.3698,-0.7860,-0.4955 +0.0000,0.0000,0.0000,0.3465,-0.8007,-0.4886 +0.0000,0.0000,0.0000,0.3226,-0.8148,-0.4818 +0.0000,0.0000,0.0000,0.2981,-0.8280,-0.4749 +0.0000,0.0000,0.0000,0.2731,-0.8405,-0.4679 +0.0000,0.0000,0.0000,0.2476,-0.8522,-0.4610 +0.0000,0.0000,0.0000,0.2216,-0.8630,-0.4540 +0.0000,0.0000,0.0000,0.1951,-0.8730,-0.4470 +0.0000,0.0000,0.0000,0.1683,-0.8821,-0.4399 +0.0000,0.0000,0.0000,0.1410,-0.8904,-0.4329 +0.0000,0.0000,0.0000,0.1134,-0.8977,-0.4258 +0.0000,0.0000,0.0000,0.0855,-0.9041,-0.4187 +0.0000,0.0000,0.0000,0.0572,-0.9096,-0.4115 +0.0000,0.0000,0.0000,0.0287,-0.9142,-0.4043 +0.0000,0.0000,0.0000,-0.0000,-0.9178,-0.3971 +0.0000,0.0000,0.0000,-0.0289,-0.9204,-0.3899 +0.0000,0.0000,0.0000,-0.0580,-0.9221,-0.3827 +0.0000,0.0000,0.0000,-0.0872,-0.9227,-0.3754 +0.0000,0.0000,0.0000,-0.1165,-0.9224,-0.3681 +0.0000,0.0000,0.0000,-0.1459,-0.9212,-0.3608 +0.0000,0.0000,0.0000,-0.1753,-0.9189,-0.3535 +0.0000,0.0000,0.0000,-0.2047,-0.9156,-0.3461 +0.0000,0.0000,0.0000,-0.2340,-0.9113,-0.3387 +0.0000,0.0000,0.0000,-0.2632,-0.9060,-0.3313 +0.0000,0.0000,0.0000,-0.2924,-0.8998,-0.3239 +0.0000,0.0000,0.0000,-0.3213,-0.8925,-0.3165 +0.0000,0.0000,0.0000,-0.3501,-0.8843,-0.3090 +0.0000,0.0000,0.0000,-0.3787,-0.8750,-0.3015 +0.0000,0.0000,0.0000,-0.4070,-0.8648,-0.2940 +0.0000,0.0000,0.0000,-0.4350,-0.8536,-0.2865 +0.0000,0.0000,0.0000,-0.4626,-0.8415,-0.2790 +0.0000,0.0000,0.0000,-0.4899,-0.8284,-0.2714 +0.0000,0.0000,0.0000,-0.5168,-0.8144,-0.2639 +0.0000,0.0000,0.0000,-0.5433,-0.7995,-0.2563 +0.0000,0.0000,0.0000,-0.5693,-0.7836,-0.2487 +0.0000,0.0000,0.0000,-0.5948,-0.7669,-0.2411 +0.0000,0.0000,0.0000,-0.6198,-0.7492,-0.2334 +0.0000,0.0000,0.0000,-0.6442,-0.7307,-0.2258 +0.0000,0.0000,0.0000,-0.6681,-0.7114,-0.2181 +0.0000,0.0000,0.0000,-0.6913,-0.6913,-0.2105 +0.0000,0.0000,0.0000,-0.7138,-0.6703,-0.2028 +0.0000,0.0000,0.0000,-0.7357,-0.6486,-0.1951 +0.0000,0.0000,0.0000,-0.7569,-0.6261,-0.1874 +0.0000,0.0000,0.0000,-0.7773,-0.6029,-0.1797 +0.0000,0.0000,0.0000,-0.7970,-0.5790,-0.1719 +0.0000,0.0000,0.0000,-0.8159,-0.5545,-0.1642 +0.0000,0.0000,0.0000,-0.8339,-0.5292,-0.1564 +0.0000,0.0000,0.0000,-0.8512,-0.5034,-0.1487 +0.0000,0.0000,0.0000,-0.8676,-0.4769,-0.1409 +0.0000,0.0000,0.0000,-0.8831,-0.4499,-0.1331 +0.0000,0.0000,0.0000,-0.8977,-0.4224,-0.1253 +0.0000,0.0000,0.0000,-0.9114,-0.3944,-0.1175 +0.0000,0.0000,0.0000,-0.9242,-0.3659,-0.1097 +0.0000,0.0000,0.0000,-0.9360,-0.3370,-0.1019 +0.0000,0.0000,0.0000,-0.9468,-0.3076,-0.0941 +0.0000,0.0000,0.0000,-0.9567,-0.2779,-0.0863 +0.0000,0.0000,0.0000,-0.9656,-0.2479,-0.0785 +0.0000,0.0000,0.0000,-0.9735,-0.2176,-0.0706 +0.0000,0.0000,0.0000,-0.9803,-0.1870,-0.0628 +0.0000,0.0000,0.0000,-0.9862,-0.1562,-0.0549 +0.0000,0.0000,0.0000,-0.9910,-0.1252,-0.0471 +0.0000,0.0000,0.0000,-0.9948,-0.0940,-0.0393 +0.0000,0.0000,0.0000,-0.9975,-0.0628,-0.0314 +0.0000,0.0000,0.0000,-0.9992,-0.0314,-0.0236 +0.0000,0.0000,0.0000,-0.9999,0.0000,-0.0157 +0.0000,0.0000,0.0000,-0.9995,0.0314,-0.0079 +0.0000,0.0000,0.0000,-0.9980,0.0628,0.0000 +0.0000,0.0000,0.0000,-0.9955,0.0941,0.0079 +0.0000,0.0000,0.0000,-0.9920,0.1253,0.0157 +0.0000,0.0000,0.0000,-0.9874,0.1564,0.0236 +0.0000,0.0000,0.0000,-0.9818,0.1873,0.0314 +0.0000,0.0000,0.0000,-0.9752,0.2180,0.0393 +0.0000,0.0000,0.0000,-0.9675,0.2484,0.0471 +0.0000,0.0000,0.0000,-0.9588,0.2786,0.0550 +0.0000,0.0000,0.0000,-0.9492,0.3084,0.0628 +0.0000,0.0000,0.0000,-0.9385,0.3379,0.0706 +0.0000,0.0000,0.0000,-0.9269,0.3670,0.0785 +0.0000,0.0000,0.0000,-0.9143,0.3957,0.0863 +0.0000,0.0000,0.0000,-0.9008,0.4239,0.0941 +0.0000,0.0000,0.0000,-0.8864,0.4516,0.1019 +0.0000,0.0000,0.0000,-0.8710,0.4788,0.1097 +0.0000,0.0000,0.0000,-0.8548,0.5055,0.1175 +0.0000,0.0000,0.0000,-0.8377,0.5316,0.1253 +0.0000,0.0000,0.0000,-0.8197,0.5571,0.1331 +0.0000,0.0000,0.0000,-0.8009,0.5819,0.1409 +0.0000,0.0000,0.0000,-0.7814,0.6061,0.1487 +0.0000,0.0000,0.0000,-0.7610,0.6296,0.1564 +0.0000,0.0000,0.0000,-0.7399,0.6523,0.1642 +0.0000,0.0000,0.0000,-0.7181,0.6744,0.1719 +0.0000,0.0000,0.0000,-0.6956,0.6956,0.1797 +0.0000,0.0000,0.0000,-0.6724,0.7161,0.1874 +0.0000,0.0000,0.0000,-0.6486,0.7357,0.1951 +0.0000,0.0000,0.0000,-0.6242,0.7545,0.2028 +0.0000,0.0000,0.0000,-0.5992,0.7725,0.2105 +0.0000,0.0000,0.0000,-0.5736,0.7895,0.2181 +0.0000,0.0000,0.0000,-0.5476,0.8057,0.2258 +0.0000,0.0000,0.0000,-0.5210,0.8210,0.2334 +0.0000,0.0000,0.0000,-0.4940,0.8354,0.2411 +0.0000,0.0000,0.0000,-0.4666,0.8488,0.2487 +0.0000,0.0000,0.0000,-0.4388,0.8612,0.2563 +0.0000,0.0000,0.0000,-0.4107,0.8728,0.2639 +0.0000,0.0000,0.0000,-0.3822,0.8833,0.2714 +0.0000,0.0000,0.0000,-0.3535,0.8929,0.2790 +0.0000,0.0000,0.0000,-0.3245,0.9014,0.2865 +0.0000,0.0000,0.0000,-0.2954,0.9090,0.2940 +0.0000,0.0000,0.0000,-0.2660,0.9156,0.3015 +0.0000,0.0000,0.0000,-0.2365,0.9212,0.3090 +0.0000,0.0000,0.0000,-0.2069,0.9258,0.3165 +0.0000,0.0000,0.0000,-0.1773,0.9293,0.3239 +0.0000,0.0000,0.0000,-0.1476,0.9319,0.3313 +0.0000,0.0000,0.0000,-0.1179,0.9335,0.3387 +0.0000,0.0000,0.0000,-0.0883,0.9340,0.3461 +0.0000,0.0000,0.0000,-0.0587,0.9336,0.3535 +0.0000,0.0000,0.0000,-0.0293,0.9322,0.3608 +0.0000,0.0000,0.0000,0.0000,0.9298,0.3681 +0.0000,0.0000,0.0000,0.0291,0.9264,0.3754 +0.0000,0.0000,0.0000,0.0580,0.9221,0.3827 +0.0000,0.0000,0.0000,0.0867,0.9168,0.3899 +0.0000,0.0000,0.0000,0.1150,0.9105,0.3971 +0.0000,0.0000,0.0000,0.1431,0.9033,0.4043 +0.0000,0.0000,0.0000,0.1708,0.8953,0.4115 +0.0000,0.0000,0.0000,0.1981,0.8863,0.4187 +0.0000,0.0000,0.0000,0.2250,0.8764,0.4258 +0.0000,0.0000,0.0000,0.2515,0.8657,0.4329 +0.0000,0.0000,0.0000,0.2775,0.8541,0.4399 +0.0000,0.0000,0.0000,0.3030,0.8417,0.4470 +0.0000,0.0000,0.0000,0.3280,0.8284,0.4540 +0.0000,0.0000,0.0000,0.3524,0.8144,0.4610 +0.0000,0.0000,0.0000,0.3763,0.7997,0.4679 +0.0000,0.0000,0.0000,0.3995,0.7841,0.4749 +0.0000,0.0000,0.0000,0.4222,0.7679,0.4818 +0.0000,0.0000,0.0000,0.4441,0.7510,0.4886 +0.0000,0.0000,0.0000,0.4654,0.7334,0.4955 +0.0000,0.0000,0.0000,0.4860,0.7152,0.5023 +0.0000,0.0000,0.0000,0.5059,0.6964,0.5090 +0.0000,0.0000,0.0000,0.5251,0.6769,0.5158 +0.0000,0.0000,0.0000,0.5435,0.6570,0.5225 +0.0000,0.0000,0.0000,0.5611,0.6365,0.5292 +0.0000,0.0000,0.0000,0.5780,0.6155,0.5358 +0.0000,0.0000,0.0000,0.5940,0.5940,0.5424 +0.0000,0.0000,0.0000,0.6093,0.5721,0.5490 +0.0000,0.0000,0.0000,0.6237,0.5499,0.5556 +0.0000,0.0000,0.0000,0.6373,0.5272,0.5621 +0.0000,0.0000,0.0000,0.6500,0.5042,0.5686 +0.0000,0.0000,0.0000,0.6619,0.4809,0.5750 +0.0000,0.0000,0.0000,0.6729,0.4573,0.5814 +0.0000,0.0000,0.0000,0.6831,0.4335,0.5878 +0.0000,0.0000,0.0000,0.6924,0.4095,0.5941 +0.0000,0.0000,0.0000,0.7008,0.3852,0.6004 +0.0000,0.0000,0.0000,0.7083,0.3609,0.6067 +0.0000,0.0000,0.0000,0.7150,0.3364,0.6129 +0.0000,0.0000,0.0000,0.7207,0.3119,0.6191 +0.0000,0.0000,0.0000,0.7256,0.2873,0.6252 +0.0000,0.0000,0.0000,0.7296,0.2627,0.6314 +0.0000,0.0000,0.0000,0.7328,0.2381,0.6374 +0.0000,0.0000,0.0000,0.7351,0.2136,0.6435 +0.0000,0.0000,0.0000,0.7365,0.1891,0.6494 +0.0000,0.0000,0.0000,0.7371,0.1648,0.6554 +0.0000,0.0000,0.0000,0.7368,0.1406,0.6613 +0.0000,0.0000,0.0000,0.7357,0.1165,0.6672 +0.0000,0.0000,0.0000,0.7338,0.0927,0.6730 +0.0000,0.0000,0.0000,0.7311,0.0691,0.6788 +0.0000,0.0000,0.0000,0.7275,0.0458,0.6845 +0.0000,0.0000,0.0000,0.7232,0.0227,0.6903 +0.0000,0.0000,0.0000,0.7181,-0.0000,0.6959 diff --git a/scripts/trajectories/full-circle-with-up-and-down-4s-ccw-Vector3.csv b/scripts/trajectories/full-circle-with-up-and-down-4s-ccw-Vector3.csv new file mode 100644 index 0000000000..6310889020 --- /dev/null +++ b/scripts/trajectories/full-circle-with-up-and-down-4s-ccw-Vector3.csv @@ -0,0 +1,200 @@ +0.0000,0.0000,0.0000,0.7012,0.0220,0.7126 +0.0000,0.0000,0.0000,0.7057,0.0444,0.7071 +0.0000,0.0000,0.0000,0.7095,0.0671,0.7015 +0.0000,0.0000,0.0000,0.7125,0.0900,0.6959 +0.0000,0.0000,0.0000,0.7147,0.1132,0.6903 +0.0000,0.0000,0.0000,0.7161,0.1366,0.6845 +0.0000,0.0000,0.0000,0.7166,0.1602,0.6788 +0.0000,0.0000,0.0000,0.7164,0.1839,0.6730 +0.0000,0.0000,0.0000,0.7153,0.2078,0.6672 +0.0000,0.0000,0.0000,0.7134,0.2318,0.6613 +0.0000,0.0000,0.0000,0.7106,0.2558,0.6554 +0.0000,0.0000,0.0000,0.7070,0.2799,0.6494 +0.0000,0.0000,0.0000,0.7025,0.3040,0.6435 +0.0000,0.0000,0.0000,0.6972,0.3281,0.6374 +0.0000,0.0000,0.0000,0.6910,0.3521,0.6314 +0.0000,0.0000,0.0000,0.6839,0.3760,0.6252 +0.0000,0.0000,0.0000,0.6760,0.3998,0.6191 +0.0000,0.0000,0.0000,0.6671,0.4234,0.6129 +0.0000,0.0000,0.0000,0.6575,0.4468,0.6067 +0.0000,0.0000,0.0000,0.6470,0.4700,0.6004 +0.0000,0.0000,0.0000,0.6356,0.4930,0.5941 +0.0000,0.0000,0.0000,0.6234,0.5157,0.5878 +0.0000,0.0000,0.0000,0.6103,0.5380,0.5814 +0.0000,0.0000,0.0000,0.5964,0.5601,0.5750 +0.0000,0.0000,0.0000,0.5817,0.5817,0.5686 +0.0000,0.0000,0.0000,0.5662,0.6029,0.5621 +0.0000,0.0000,0.0000,0.5499,0.6237,0.5556 +0.0000,0.0000,0.0000,0.5328,0.6440,0.5490 +0.0000,0.0000,0.0000,0.5149,0.6638,0.5424 +0.0000,0.0000,0.0000,0.4963,0.6831,0.5358 +0.0000,0.0000,0.0000,0.4769,0.7018,0.5292 +0.0000,0.0000,0.0000,0.4569,0.7199,0.5225 +0.0000,0.0000,0.0000,0.4361,0.7374,0.5158 +0.0000,0.0000,0.0000,0.4147,0.7543,0.5090 +0.0000,0.0000,0.0000,0.3926,0.7705,0.5023 +0.0000,0.0000,0.0000,0.3698,0.7860,0.4955 +0.0000,0.0000,0.0000,0.3465,0.8007,0.4886 +0.0000,0.0000,0.0000,0.3226,0.8148,0.4818 +0.0000,0.0000,0.0000,0.2981,0.8280,0.4749 +0.0000,0.0000,0.0000,0.2731,0.8405,0.4679 +0.0000,0.0000,0.0000,0.2476,0.8522,0.4610 +0.0000,0.0000,0.0000,0.2216,0.8630,0.4540 +0.0000,0.0000,0.0000,0.1951,0.8730,0.4470 +0.0000,0.0000,0.0000,0.1683,0.8821,0.4399 +0.0000,0.0000,0.0000,0.1410,0.8904,0.4329 +0.0000,0.0000,0.0000,0.1134,0.8977,0.4258 +0.0000,0.0000,0.0000,0.0855,0.9041,0.4187 +0.0000,0.0000,0.0000,0.0572,0.9096,0.4115 +0.0000,0.0000,0.0000,0.0287,0.9142,0.4043 +0.0000,0.0000,0.0000,-0.0000,0.9178,0.3971 +0.0000,0.0000,0.0000,-0.0289,0.9204,0.3899 +0.0000,0.0000,0.0000,-0.0580,0.9221,0.3827 +0.0000,0.0000,0.0000,-0.0872,0.9227,0.3754 +0.0000,0.0000,0.0000,-0.1165,0.9224,0.3681 +0.0000,0.0000,0.0000,-0.1459,0.9212,0.3608 +0.0000,0.0000,0.0000,-0.1753,0.9189,0.3535 +0.0000,0.0000,0.0000,-0.2047,0.9156,0.3461 +0.0000,0.0000,0.0000,-0.2340,0.9113,0.3387 +0.0000,0.0000,0.0000,-0.2632,0.9060,0.3313 +0.0000,0.0000,0.0000,-0.2924,0.8998,0.3239 +0.0000,0.0000,0.0000,-0.3213,0.8925,0.3165 +0.0000,0.0000,0.0000,-0.3501,0.8843,0.3090 +0.0000,0.0000,0.0000,-0.3787,0.8750,0.3015 +0.0000,0.0000,0.0000,-0.4070,0.8648,0.2940 +0.0000,0.0000,0.0000,-0.4350,0.8536,0.2865 +0.0000,0.0000,0.0000,-0.4626,0.8415,0.2790 +0.0000,0.0000,0.0000,-0.4899,0.8284,0.2714 +0.0000,0.0000,0.0000,-0.5168,0.8144,0.2639 +0.0000,0.0000,0.0000,-0.5433,0.7995,0.2563 +0.0000,0.0000,0.0000,-0.5693,0.7836,0.2487 +0.0000,0.0000,0.0000,-0.5948,0.7669,0.2411 +0.0000,0.0000,0.0000,-0.6198,0.7492,0.2334 +0.0000,0.0000,0.0000,-0.6442,0.7307,0.2258 +0.0000,0.0000,0.0000,-0.6681,0.7114,0.2181 +0.0000,0.0000,0.0000,-0.6913,0.6913,0.2105 +0.0000,0.0000,0.0000,-0.7138,0.6703,0.2028 +0.0000,0.0000,0.0000,-0.7357,0.6486,0.1951 +0.0000,0.0000,0.0000,-0.7569,0.6261,0.1874 +0.0000,0.0000,0.0000,-0.7773,0.6029,0.1797 +0.0000,0.0000,0.0000,-0.7970,0.5790,0.1719 +0.0000,0.0000,0.0000,-0.8159,0.5545,0.1642 +0.0000,0.0000,0.0000,-0.8339,0.5292,0.1564 +0.0000,0.0000,0.0000,-0.8512,0.5034,0.1487 +0.0000,0.0000,0.0000,-0.8676,0.4769,0.1409 +0.0000,0.0000,0.0000,-0.8831,0.4499,0.1331 +0.0000,0.0000,0.0000,-0.8977,0.4224,0.1253 +0.0000,0.0000,0.0000,-0.9114,0.3944,0.1175 +0.0000,0.0000,0.0000,-0.9242,0.3659,0.1097 +0.0000,0.0000,0.0000,-0.9360,0.3370,0.1019 +0.0000,0.0000,0.0000,-0.9468,0.3076,0.0941 +0.0000,0.0000,0.0000,-0.9567,0.2779,0.0863 +0.0000,0.0000,0.0000,-0.9656,0.2479,0.0785 +0.0000,0.0000,0.0000,-0.9735,0.2176,0.0706 +0.0000,0.0000,0.0000,-0.9803,0.1870,0.0628 +0.0000,0.0000,0.0000,-0.9862,0.1562,0.0549 +0.0000,0.0000,0.0000,-0.9910,0.1252,0.0471 +0.0000,0.0000,0.0000,-0.9948,0.0940,0.0393 +0.0000,0.0000,0.0000,-0.9975,0.0628,0.0314 +0.0000,0.0000,0.0000,-0.9992,0.0314,0.0236 +0.0000,0.0000,0.0000,-0.9999,-0.0000,0.0157 +0.0000,0.0000,0.0000,-0.9995,-0.0314,0.0079 +0.0000,0.0000,0.0000,-0.9980,-0.0628,-0.0000 +0.0000,0.0000,0.0000,-0.9955,-0.0941,-0.0079 +0.0000,0.0000,0.0000,-0.9920,-0.1253,-0.0157 +0.0000,0.0000,0.0000,-0.9874,-0.1564,-0.0236 +0.0000,0.0000,0.0000,-0.9818,-0.1873,-0.0314 +0.0000,0.0000,0.0000,-0.9752,-0.2180,-0.0393 +0.0000,0.0000,0.0000,-0.9675,-0.2484,-0.0471 +0.0000,0.0000,0.0000,-0.9588,-0.2786,-0.0550 +0.0000,0.0000,0.0000,-0.9492,-0.3084,-0.0628 +0.0000,0.0000,0.0000,-0.9385,-0.3379,-0.0706 +0.0000,0.0000,0.0000,-0.9269,-0.3670,-0.0785 +0.0000,0.0000,0.0000,-0.9143,-0.3957,-0.0863 +0.0000,0.0000,0.0000,-0.9008,-0.4239,-0.0941 +0.0000,0.0000,0.0000,-0.8864,-0.4516,-0.1019 +0.0000,0.0000,0.0000,-0.8710,-0.4788,-0.1097 +0.0000,0.0000,0.0000,-0.8548,-0.5055,-0.1175 +0.0000,0.0000,0.0000,-0.8377,-0.5316,-0.1253 +0.0000,0.0000,0.0000,-0.8197,-0.5571,-0.1331 +0.0000,0.0000,0.0000,-0.8009,-0.5819,-0.1409 +0.0000,0.0000,0.0000,-0.7814,-0.6061,-0.1487 +0.0000,0.0000,0.0000,-0.7610,-0.6296,-0.1564 +0.0000,0.0000,0.0000,-0.7399,-0.6523,-0.1642 +0.0000,0.0000,0.0000,-0.7181,-0.6744,-0.1719 +0.0000,0.0000,0.0000,-0.6956,-0.6956,-0.1797 +0.0000,0.0000,0.0000,-0.6724,-0.7161,-0.1874 +0.0000,0.0000,0.0000,-0.6486,-0.7357,-0.1951 +0.0000,0.0000,0.0000,-0.6242,-0.7545,-0.2028 +0.0000,0.0000,0.0000,-0.5992,-0.7725,-0.2105 +0.0000,0.0000,0.0000,-0.5736,-0.7895,-0.2181 +0.0000,0.0000,0.0000,-0.5476,-0.8057,-0.2258 +0.0000,0.0000,0.0000,-0.5210,-0.8210,-0.2334 +0.0000,0.0000,0.0000,-0.4940,-0.8354,-0.2411 +0.0000,0.0000,0.0000,-0.4666,-0.8488,-0.2487 +0.0000,0.0000,0.0000,-0.4388,-0.8612,-0.2563 +0.0000,0.0000,0.0000,-0.4107,-0.8728,-0.2639 +0.0000,0.0000,0.0000,-0.3822,-0.8833,-0.2714 +0.0000,0.0000,0.0000,-0.3535,-0.8929,-0.2790 +0.0000,0.0000,0.0000,-0.3245,-0.9014,-0.2865 +0.0000,0.0000,0.0000,-0.2954,-0.9090,-0.2940 +0.0000,0.0000,0.0000,-0.2660,-0.9156,-0.3015 +0.0000,0.0000,0.0000,-0.2365,-0.9212,-0.3090 +0.0000,0.0000,0.0000,-0.2069,-0.9258,-0.3165 +0.0000,0.0000,0.0000,-0.1773,-0.9293,-0.3239 +0.0000,0.0000,0.0000,-0.1476,-0.9319,-0.3313 +0.0000,0.0000,0.0000,-0.1179,-0.9335,-0.3387 +0.0000,0.0000,0.0000,-0.0883,-0.9340,-0.3461 +0.0000,0.0000,0.0000,-0.0587,-0.9336,-0.3535 +0.0000,0.0000,0.0000,-0.0293,-0.9322,-0.3608 +0.0000,0.0000,0.0000,0.0000,-0.9298,-0.3681 +0.0000,0.0000,0.0000,0.0291,-0.9264,-0.3754 +0.0000,0.0000,0.0000,0.0580,-0.9221,-0.3827 +0.0000,0.0000,0.0000,0.0867,-0.9168,-0.3899 +0.0000,0.0000,0.0000,0.1150,-0.9105,-0.3971 +0.0000,0.0000,0.0000,0.1431,-0.9033,-0.4043 +0.0000,0.0000,0.0000,0.1708,-0.8953,-0.4115 +0.0000,0.0000,0.0000,0.1981,-0.8863,-0.4187 +0.0000,0.0000,0.0000,0.2250,-0.8764,-0.4258 +0.0000,0.0000,0.0000,0.2515,-0.8657,-0.4329 +0.0000,0.0000,0.0000,0.2775,-0.8541,-0.4399 +0.0000,0.0000,0.0000,0.3030,-0.8417,-0.4470 +0.0000,0.0000,0.0000,0.3280,-0.8284,-0.4540 +0.0000,0.0000,0.0000,0.3524,-0.8144,-0.4610 +0.0000,0.0000,0.0000,0.3763,-0.7997,-0.4679 +0.0000,0.0000,0.0000,0.3995,-0.7841,-0.4749 +0.0000,0.0000,0.0000,0.4222,-0.7679,-0.4818 +0.0000,0.0000,0.0000,0.4441,-0.7510,-0.4886 +0.0000,0.0000,0.0000,0.4654,-0.7334,-0.4955 +0.0000,0.0000,0.0000,0.4860,-0.7152,-0.5023 +0.0000,0.0000,0.0000,0.5059,-0.6964,-0.5090 +0.0000,0.0000,0.0000,0.5251,-0.6769,-0.5158 +0.0000,0.0000,0.0000,0.5435,-0.6570,-0.5225 +0.0000,0.0000,0.0000,0.5611,-0.6365,-0.5292 +0.0000,0.0000,0.0000,0.5780,-0.6155,-0.5358 +0.0000,0.0000,0.0000,0.5940,-0.5940,-0.5424 +0.0000,0.0000,0.0000,0.6093,-0.5721,-0.5490 +0.0000,0.0000,0.0000,0.6237,-0.5499,-0.5556 +0.0000,0.0000,0.0000,0.6373,-0.5272,-0.5621 +0.0000,0.0000,0.0000,0.6500,-0.5042,-0.5686 +0.0000,0.0000,0.0000,0.6619,-0.4809,-0.5750 +0.0000,0.0000,0.0000,0.6729,-0.4573,-0.5814 +0.0000,0.0000,0.0000,0.6831,-0.4335,-0.5878 +0.0000,0.0000,0.0000,0.6924,-0.4095,-0.5941 +0.0000,0.0000,0.0000,0.7008,-0.3852,-0.6004 +0.0000,0.0000,0.0000,0.7083,-0.3609,-0.6067 +0.0000,0.0000,0.0000,0.7150,-0.3364,-0.6129 +0.0000,0.0000,0.0000,0.7207,-0.3119,-0.6191 +0.0000,0.0000,0.0000,0.7256,-0.2873,-0.6252 +0.0000,0.0000,0.0000,0.7296,-0.2627,-0.6314 +0.0000,0.0000,0.0000,0.7328,-0.2381,-0.6374 +0.0000,0.0000,0.0000,0.7351,-0.2136,-0.6435 +0.0000,0.0000,0.0000,0.7365,-0.1891,-0.6494 +0.0000,0.0000,0.0000,0.7371,-0.1648,-0.6554 +0.0000,0.0000,0.0000,0.7368,-0.1406,-0.6613 +0.0000,0.0000,0.0000,0.7357,-0.1165,-0.6672 +0.0000,0.0000,0.0000,0.7338,-0.0927,-0.6730 +0.0000,0.0000,0.0000,0.7311,-0.0691,-0.6788 +0.0000,0.0000,0.0000,0.7275,-0.0458,-0.6845 +0.0000,0.0000,0.0000,0.7232,-0.0227,-0.6903 +0.0000,0.0000,0.0000,0.7181,0.0000,-0.6959 diff --git a/scripts/trajectories/full-circle-with-up-and-down-4s-ccw.csv b/scripts/trajectories/full-circle-with-up-and-down-4s-ccw.csv new file mode 100644 index 0000000000..1e4a316720 --- /dev/null +++ b/scripts/trajectories/full-circle-with-up-and-down-4s-ccw.csv @@ -0,0 +1,800 @@ +0.9223,-0.0000,-0.3863,0.0119 +0.9223,-0.0000,-0.3863,0.0119 +0.9223,-0.0000,-0.3863,0.0119 +0.9223,-0.0000,-0.3863,0.0119 +0.9235,-0.0000,-0.3828,0.0240 +0.9235,-0.0000,-0.3828,0.0240 +0.9235,-0.0000,-0.3828,0.0240 +0.9235,-0.0000,-0.3828,0.0240 +0.9245,-0.0000,-0.3794,0.0363 +0.9245,-0.0000,-0.3794,0.0363 +0.9245,-0.0000,-0.3794,0.0363 +0.9245,-0.0000,-0.3794,0.0363 +0.9253,-0.0000,-0.3760,0.0486 +0.9253,-0.0000,-0.3760,0.0486 +0.9253,-0.0000,-0.3760,0.0486 +0.9253,-0.0000,-0.3760,0.0486 +0.9259,-0.0000,-0.3727,0.0611 +0.9259,-0.0000,-0.3727,0.0611 +0.9259,-0.0000,-0.3727,0.0611 +0.9259,-0.0000,-0.3727,0.0611 +0.9263,-0.0000,-0.3695,0.0737 +0.9263,-0.0000,-0.3695,0.0737 +0.9263,-0.0000,-0.3695,0.0737 +0.9263,-0.0000,-0.3695,0.0737 +0.9265,-0.0000,-0.3663,0.0865 +0.9265,-0.0000,-0.3663,0.0865 +0.9265,-0.0000,-0.3663,0.0865 +0.9265,-0.0000,-0.3663,0.0865 +0.9264,-0.0000,-0.3632,0.0993 +0.9264,-0.0000,-0.3632,0.0993 +0.9264,-0.0000,-0.3632,0.0993 +0.9264,-0.0000,-0.3632,0.0993 +0.9261,-0.0000,-0.3602,0.1122 +0.9261,-0.0000,-0.3602,0.1122 +0.9261,-0.0000,-0.3602,0.1122 +0.9261,-0.0000,-0.3602,0.1122 +0.9256,-0.0000,-0.3572,0.1252 +0.9256,-0.0000,-0.3572,0.1252 +0.9256,-0.0000,-0.3572,0.1252 +0.9256,-0.0000,-0.3572,0.1252 +0.9248,-0.0000,-0.3543,0.1383 +0.9248,-0.0000,-0.3543,0.1383 +0.9248,-0.0000,-0.3543,0.1383 +0.9248,-0.0000,-0.3543,0.1383 +0.9239,-0.0000,-0.3515,0.1515 +0.9239,-0.0000,-0.3515,0.1515 +0.9239,-0.0000,-0.3515,0.1515 +0.9239,-0.0000,-0.3515,0.1515 +0.9226,-0.0000,-0.3487,0.1648 +0.9226,-0.0000,-0.3487,0.1648 +0.9226,-0.0000,-0.3487,0.1648 +0.9226,-0.0000,-0.3487,0.1648 +0.9212,-0.0000,-0.3460,0.1781 +0.9212,-0.0000,-0.3460,0.1781 +0.9212,-0.0000,-0.3460,0.1781 +0.9212,-0.0000,-0.3460,0.1781 +0.9195,-0.0000,-0.3433,0.1914 +0.9195,-0.0000,-0.3433,0.1914 +0.9195,-0.0000,-0.3433,0.1914 +0.9195,-0.0000,-0.3433,0.1914 +0.9176,-0.0000,-0.3407,0.2049 +0.9176,-0.0000,-0.3407,0.2049 +0.9176,-0.0000,-0.3407,0.2049 +0.9176,-0.0000,-0.3407,0.2049 +0.9154,-0.0000,-0.3382,0.2183 +0.9154,-0.0000,-0.3382,0.2183 +0.9154,-0.0000,-0.3382,0.2183 +0.9154,-0.0000,-0.3382,0.2183 +0.9130,-0.0000,-0.3357,0.2319 +0.9130,-0.0000,-0.3357,0.2319 +0.9130,-0.0000,-0.3357,0.2319 +0.9130,-0.0000,-0.3357,0.2319 +0.9104,-0.0000,-0.3332,0.2454 +0.9104,-0.0000,-0.3332,0.2454 +0.9104,-0.0000,-0.3332,0.2454 +0.9104,-0.0000,-0.3332,0.2454 +0.9075,-0.0000,-0.3308,0.2590 +0.9075,-0.0000,-0.3308,0.2590 +0.9075,-0.0000,-0.3308,0.2590 +0.9075,-0.0000,-0.3308,0.2590 +0.9043,-0.0000,-0.3285,0.2726 +0.9043,-0.0000,-0.3285,0.2726 +0.9043,-0.0000,-0.3285,0.2726 +0.9043,-0.0000,-0.3285,0.2726 +0.9009,-0.0000,-0.3262,0.2862 +0.9009,-0.0000,-0.3262,0.2862 +0.9009,-0.0000,-0.3262,0.2862 +0.9009,-0.0000,-0.3262,0.2862 +0.8973,-0.0000,-0.3240,0.2998 +0.8973,-0.0000,-0.3240,0.2998 +0.8973,-0.0000,-0.3240,0.2998 +0.8973,-0.0000,-0.3240,0.2998 +0.8934,-0.0000,-0.3218,0.3134 +0.8934,-0.0000,-0.3218,0.3134 +0.8934,-0.0000,-0.3218,0.3134 +0.8934,-0.0000,-0.3218,0.3134 +0.8893,-0.0000,-0.3197,0.3271 +0.8893,-0.0000,-0.3197,0.3271 +0.8893,-0.0000,-0.3197,0.3271 +0.8893,-0.0000,-0.3197,0.3271 +0.8849,-0.0000,-0.3176,0.3407 +0.8849,-0.0000,-0.3176,0.3407 +0.8849,-0.0000,-0.3176,0.3407 +0.8849,-0.0000,-0.3176,0.3407 +0.8803,-0.0000,-0.3156,0.3543 +0.8803,-0.0000,-0.3156,0.3543 +0.8803,-0.0000,-0.3156,0.3543 +0.8803,-0.0000,-0.3156,0.3543 +0.8754,-0.0000,-0.3136,0.3678 +0.8754,-0.0000,-0.3136,0.3678 +0.8754,-0.0000,-0.3136,0.3678 +0.8754,-0.0000,-0.3136,0.3678 +0.8703,-0.0000,-0.3116,0.3814 +0.8703,-0.0000,-0.3116,0.3814 +0.8703,-0.0000,-0.3116,0.3814 +0.8703,-0.0000,-0.3116,0.3814 +0.8650,-0.0000,-0.3097,0.3949 +0.8650,-0.0000,-0.3097,0.3949 +0.8650,-0.0000,-0.3097,0.3949 +0.8650,-0.0000,-0.3097,0.3949 +0.8593,-0.0000,-0.3079,0.4083 +0.8593,-0.0000,-0.3079,0.4083 +0.8593,-0.0000,-0.3079,0.4083 +0.8593,-0.0000,-0.3079,0.4083 +0.8535,-0.0000,-0.3061,0.4217 +0.8535,-0.0000,-0.3061,0.4217 +0.8535,-0.0000,-0.3061,0.4217 +0.8535,-0.0000,-0.3061,0.4217 +0.8474,-0.0000,-0.3043,0.4351 +0.8474,-0.0000,-0.3043,0.4351 +0.8474,-0.0000,-0.3043,0.4351 +0.8474,-0.0000,-0.3043,0.4351 +0.8410,-0.0000,-0.3026,0.4484 +0.8410,-0.0000,-0.3026,0.4484 +0.8410,-0.0000,-0.3026,0.4484 +0.8410,-0.0000,-0.3026,0.4484 +0.8344,-0.0000,-0.3010,0.4617 +0.8344,-0.0000,-0.3010,0.4617 +0.8344,-0.0000,-0.3010,0.4617 +0.8344,-0.0000,-0.3010,0.4617 +0.8276,-0.0000,-0.2993,0.4748 +0.8276,-0.0000,-0.2993,0.4748 +0.8276,-0.0000,-0.2993,0.4748 +0.8276,-0.0000,-0.2993,0.4748 +0.8205,-0.0000,-0.2978,0.4879 +0.8205,-0.0000,-0.2978,0.4879 +0.8205,-0.0000,-0.2978,0.4879 +0.8205,-0.0000,-0.2978,0.4879 +0.8132,-0.0000,-0.2962,0.5010 +0.8132,-0.0000,-0.2962,0.5010 +0.8132,-0.0000,-0.2962,0.5010 +0.8132,-0.0000,-0.2962,0.5010 +0.8056,-0.0000,-0.2947,0.5139 +0.8056,-0.0000,-0.2947,0.5139 +0.8056,-0.0000,-0.2947,0.5139 +0.8056,-0.0000,-0.2947,0.5139 +0.7978,-0.0000,-0.2932,0.5267 +0.7978,-0.0000,-0.2932,0.5267 +0.7978,-0.0000,-0.2932,0.5267 +0.7978,-0.0000,-0.2932,0.5267 +0.7898,-0.0000,-0.2918,0.5395 +0.7898,-0.0000,-0.2918,0.5395 +0.7898,-0.0000,-0.2918,0.5395 +0.7898,-0.0000,-0.2918,0.5395 +0.7815,-0.0000,-0.2904,0.5521 +0.7815,-0.0000,-0.2904,0.5521 +0.7815,-0.0000,-0.2904,0.5521 +0.7815,-0.0000,-0.2904,0.5521 +0.7730,-0.0000,-0.2891,0.5647 +0.7730,-0.0000,-0.2891,0.5647 +0.7730,-0.0000,-0.2891,0.5647 +0.7730,-0.0000,-0.2891,0.5647 +0.7643,-0.0000,-0.2878,0.5771 +0.7643,-0.0000,-0.2878,0.5771 +0.7643,-0.0000,-0.2878,0.5771 +0.7643,-0.0000,-0.2878,0.5771 +0.7553,-0.0000,-0.2865,0.5894 +0.7553,-0.0000,-0.2865,0.5894 +0.7553,-0.0000,-0.2865,0.5894 +0.7553,-0.0000,-0.2865,0.5894 +0.7461,-0.0000,-0.2853,0.6016 +0.7461,-0.0000,-0.2853,0.6016 +0.7461,-0.0000,-0.2853,0.6016 +0.7461,-0.0000,-0.2853,0.6016 +0.7367,-0.0000,-0.2841,0.6136 +0.7367,-0.0000,-0.2841,0.6136 +0.7367,-0.0000,-0.2841,0.6136 +0.7367,-0.0000,-0.2841,0.6136 +0.7271,-0.0000,-0.2830,0.6255 +0.7271,-0.0000,-0.2830,0.6255 +0.7271,-0.0000,-0.2830,0.6255 +0.7271,-0.0000,-0.2830,0.6255 +0.7172,-0.0000,-0.2819,0.6373 +0.7172,-0.0000,-0.2819,0.6373 +0.7172,-0.0000,-0.2819,0.6373 +0.7172,-0.0000,-0.2819,0.6373 +0.7071,-0.0000,-0.2808,0.6490 +0.7071,-0.0000,-0.2808,0.6490 +0.7071,-0.0000,-0.2808,0.6490 +0.7071,-0.0000,-0.2808,0.6490 +0.6968,-0.0000,-0.2798,0.6604 +0.6968,-0.0000,-0.2798,0.6604 +0.6968,-0.0000,-0.2798,0.6604 +0.6968,-0.0000,-0.2798,0.6604 +0.6863,-0.0000,-0.2788,0.6718 +0.6863,-0.0000,-0.2788,0.6718 +0.6863,-0.0000,-0.2788,0.6718 +0.6863,-0.0000,-0.2788,0.6718 +0.6756,-0.0000,-0.2779,0.6829 +0.6756,-0.0000,-0.2779,0.6829 +0.6756,-0.0000,-0.2779,0.6829 +0.6756,-0.0000,-0.2779,0.6829 +0.6646,-0.0000,-0.2769,0.6940 +0.6646,-0.0000,-0.2769,0.6940 +0.6646,-0.0000,-0.2769,0.6940 +0.6646,-0.0000,-0.2769,0.6940 +0.6535,-0.0000,-0.2761,0.7048 +0.6535,-0.0000,-0.2761,0.7048 +0.6535,-0.0000,-0.2761,0.7048 +0.6535,-0.0000,-0.2761,0.7048 +0.6422,-0.0000,-0.2752,0.7155 +0.6422,-0.0000,-0.2752,0.7155 +0.6422,-0.0000,-0.2752,0.7155 +0.6422,-0.0000,-0.2752,0.7155 +0.6306,-0.0000,-0.2744,0.7260 +0.6306,-0.0000,-0.2744,0.7260 +0.6306,-0.0000,-0.2744,0.7260 +0.6306,-0.0000,-0.2744,0.7260 +0.6189,-0.0000,-0.2737,0.7363 +0.6189,-0.0000,-0.2737,0.7363 +0.6189,-0.0000,-0.2737,0.7363 +0.6189,-0.0000,-0.2737,0.7363 +0.6069,-0.0000,-0.2730,0.7464 +0.6069,-0.0000,-0.2730,0.7464 +0.6069,-0.0000,-0.2730,0.7464 +0.6069,-0.0000,-0.2730,0.7464 +0.5948,-0.0000,-0.2723,0.7563 +0.5948,-0.0000,-0.2723,0.7563 +0.5948,-0.0000,-0.2723,0.7563 +0.5948,-0.0000,-0.2723,0.7563 +0.5825,-0.0000,-0.2716,0.7661 +0.5825,-0.0000,-0.2716,0.7661 +0.5825,-0.0000,-0.2716,0.7661 +0.5825,-0.0000,-0.2716,0.7661 +0.5700,-0.0000,-0.2710,0.7756 +0.5700,-0.0000,-0.2710,0.7756 +0.5700,-0.0000,-0.2710,0.7756 +0.5700,-0.0000,-0.2710,0.7756 +0.5574,-0.0000,-0.2705,0.7850 +0.5574,-0.0000,-0.2705,0.7850 +0.5574,-0.0000,-0.2705,0.7850 +0.5574,-0.0000,-0.2705,0.7850 +0.5445,-0.0000,-0.2700,0.7941 +0.5445,-0.0000,-0.2700,0.7941 +0.5445,-0.0000,-0.2700,0.7941 +0.5445,-0.0000,-0.2700,0.7941 +0.5315,-0.0000,-0.2695,0.8030 +0.5315,-0.0000,-0.2695,0.8030 +0.5315,-0.0000,-0.2695,0.8030 +0.5315,-0.0000,-0.2695,0.8030 +0.5184,-0.0000,-0.2691,0.8117 +0.5184,-0.0000,-0.2691,0.8117 +0.5184,-0.0000,-0.2691,0.8117 +0.5184,-0.0000,-0.2691,0.8117 +0.5050,-0.0000,-0.2687,0.8202 +0.5050,-0.0000,-0.2687,0.8202 +0.5050,-0.0000,-0.2687,0.8202 +0.5050,-0.0000,-0.2687,0.8202 +0.4915,-0.0000,-0.2684,0.8285 +0.4915,-0.0000,-0.2684,0.8285 +0.4915,-0.0000,-0.2684,0.8285 +0.4915,-0.0000,-0.2684,0.8285 +0.4779,-0.0000,-0.2682,0.8365 +0.4779,-0.0000,-0.2682,0.8365 +0.4779,-0.0000,-0.2682,0.8365 +0.4779,-0.0000,-0.2682,0.8365 +0.4640,-0.0000,-0.2680,0.8443 +0.4640,-0.0000,-0.2680,0.8443 +0.4640,-0.0000,-0.2680,0.8443 +0.4640,-0.0000,-0.2680,0.8443 +0.4501,-0.0000,-0.2678,0.8519 +0.4501,-0.0000,-0.2678,0.8519 +0.4501,-0.0000,-0.2678,0.8519 +0.4501,-0.0000,-0.2678,0.8519 +0.4360,-0.0000,-0.2677,0.8592 +0.4360,-0.0000,-0.2677,0.8592 +0.4360,-0.0000,-0.2677,0.8592 +0.4360,-0.0000,-0.2677,0.8592 +0.4218,-0.0000,-0.2677,0.8663 +0.4218,-0.0000,-0.2677,0.8663 +0.4218,-0.0000,-0.2677,0.8663 +0.4218,-0.0000,-0.2677,0.8663 +0.4074,-0.0000,-0.2677,0.8731 +0.4074,-0.0000,-0.2677,0.8731 +0.4074,-0.0000,-0.2677,0.8731 +0.4074,-0.0000,-0.2677,0.8731 +0.3929,-0.0000,-0.2678,0.8797 +0.3929,-0.0000,-0.2678,0.8797 +0.3929,-0.0000,-0.2678,0.8797 +0.3929,-0.0000,-0.2678,0.8797 +0.3783,-0.0000,-0.2680,0.8860 +0.3783,-0.0000,-0.2680,0.8860 +0.3783,-0.0000,-0.2680,0.8860 +0.3783,-0.0000,-0.2680,0.8860 +0.3635,-0.0000,-0.2683,0.8921 +0.3635,-0.0000,-0.2683,0.8921 +0.3635,-0.0000,-0.2683,0.8921 +0.3635,-0.0000,-0.2683,0.8921 +0.3487,-0.0000,-0.2687,0.8979 +0.3487,-0.0000,-0.2687,0.8979 +0.3487,-0.0000,-0.2687,0.8979 +0.3487,-0.0000,-0.2687,0.8979 +0.3337,-0.0000,-0.2692,0.9034 +0.3337,-0.0000,-0.2692,0.9034 +0.3337,-0.0000,-0.2692,0.9034 +0.3337,-0.0000,-0.2692,0.9034 +0.3186,-0.0000,-0.2698,0.9087 +0.3186,-0.0000,-0.2698,0.9087 +0.3186,-0.0000,-0.2698,0.9087 +0.3186,-0.0000,-0.2698,0.9087 +0.3034,-0.0000,-0.2705,0.9136 +0.3034,-0.0000,-0.2705,0.9136 +0.3034,-0.0000,-0.2705,0.9136 +0.3034,-0.0000,-0.2705,0.9136 +0.2882,-0.0000,-0.2714,0.9183 +0.2882,-0.0000,-0.2714,0.9183 +0.2882,-0.0000,-0.2714,0.9183 +0.2882,-0.0000,-0.2714,0.9183 +0.2728,-0.0000,-0.2725,0.9227 +0.2728,-0.0000,-0.2725,0.9227 +0.2728,-0.0000,-0.2725,0.9227 +0.2728,-0.0000,-0.2725,0.9227 +0.2573,-0.0000,-0.2738,0.9267 +0.2573,-0.0000,-0.2738,0.9267 +0.2573,-0.0000,-0.2738,0.9267 +0.2573,-0.0000,-0.2738,0.9267 +0.2418,-0.0000,-0.2753,0.9305 +0.2418,-0.0000,-0.2753,0.9305 +0.2418,-0.0000,-0.2753,0.9305 +0.2418,-0.0000,-0.2753,0.9305 +0.2262,-0.0000,-0.2771,0.9339 +0.2262,-0.0000,-0.2771,0.9339 +0.2262,-0.0000,-0.2771,0.9339 +0.2262,-0.0000,-0.2771,0.9339 +0.2105,-0.0000,-0.2792,0.9369 +0.2105,-0.0000,-0.2792,0.9369 +0.2105,-0.0000,-0.2792,0.9369 +0.2105,-0.0000,-0.2792,0.9369 +0.1947,-0.0000,-0.2818,0.9395 +0.1947,-0.0000,-0.2818,0.9395 +0.1947,-0.0000,-0.2818,0.9395 +0.1947,-0.0000,-0.2818,0.9395 +0.1789,-0.0000,-0.2848,0.9417 +0.1789,-0.0000,-0.2848,0.9417 +0.1789,-0.0000,-0.2848,0.9417 +0.1789,-0.0000,-0.2848,0.9417 +0.1630,-0.0000,-0.2886,0.9435 +0.1630,-0.0000,-0.2886,0.9435 +0.1630,-0.0000,-0.2886,0.9435 +0.1630,-0.0000,-0.2886,0.9435 +0.1471,-0.0000,-0.2933,0.9446 +0.1471,-0.0000,-0.2933,0.9446 +0.1471,-0.0000,-0.2933,0.9446 +0.1471,-0.0000,-0.2933,0.9446 +0.1312,-0.0000,-0.2991,0.9452 +0.1312,-0.0000,-0.2991,0.9452 +0.1312,-0.0000,-0.2991,0.9452 +0.1312,-0.0000,-0.2991,0.9452 +0.1152,-0.0000,-0.3067,0.9448 +0.1152,-0.0000,-0.3067,0.9448 +0.1152,-0.0000,-0.3067,0.9448 +0.1152,-0.0000,-0.3067,0.9448 +0.0991,-0.0000,-0.3167,0.9433 +0.0991,-0.0000,-0.3167,0.9433 +0.0991,-0.0000,-0.3167,0.9433 +0.0991,-0.0000,-0.3167,0.9433 +0.0831,-0.0000,-0.3307,0.9401 +0.0831,-0.0000,-0.3307,0.9401 +0.0831,-0.0000,-0.3307,0.9401 +0.0831,-0.0000,-0.3307,0.9401 +0.0670,-0.0000,-0.3514,0.9338 +0.0670,-0.0000,-0.3514,0.9338 +0.0670,-0.0000,-0.3514,0.9338 +0.0670,-0.0000,-0.3514,0.9338 +0.0510,-0.0000,-0.3848,0.9216 +0.0510,-0.0000,-0.3848,0.9216 +0.0510,-0.0000,-0.3848,0.9216 +0.0510,-0.0000,-0.3848,0.9216 +0.0351,-0.0000,-0.4473,0.8937 +0.0351,-0.0000,-0.4473,0.8937 +0.0351,-0.0000,-0.4473,0.8937 +0.0351,-0.0000,-0.4473,0.8937 +0.0196,-0.0000,-0.6000,0.7997 +0.0196,-0.0000,-0.6000,0.7997 +0.0196,-0.0000,-0.6000,0.7997 +0.0196,-0.0000,-0.6000,0.7997 +0.0079,-0.0000,-1.0000,-0.0001 +0.0079,-0.0000,-1.0000,-0.0001 +0.0079,-0.0000,-1.0000,-0.0001 +0.0079,-0.0000,-1.0000,-0.0001 +0.0162,-0.0000,-0.2425,-0.9700 +0.0162,-0.0000,-0.2425,-0.9700 +0.0162,-0.0000,-0.2425,-0.9700 +0.0162,-0.0000,-0.2425,-0.9700 +0.0314,-0.0000,0.0000,-0.9995 +0.0314,-0.0000,0.0000,-0.9995 +0.0314,-0.0000,0.0000,-0.9995 +0.0314,-0.0000,0.0000,-0.9995 +0.0473,-0.0000,0.0831,-0.9954 +0.0473,-0.0000,0.0831,-0.9954 +0.0473,-0.0000,0.0831,-0.9954 +0.0473,-0.0000,0.0831,-0.9954 +0.0633,-0.0000,0.1241,-0.9902 +0.0633,-0.0000,0.1241,-0.9902 +0.0633,-0.0000,0.1241,-0.9902 +0.0633,-0.0000,0.1241,-0.9902 +0.0793,-0.0000,0.1485,-0.9857 +0.0793,-0.0000,0.1485,-0.9857 +0.0793,-0.0000,0.1485,-0.9857 +0.0793,-0.0000,0.1485,-0.9857 +0.0954,-0.0000,0.1646,-0.9817 +0.0954,-0.0000,0.1646,-0.9817 +0.0954,-0.0000,0.1646,-0.9817 +0.0954,-0.0000,0.1646,-0.9817 +0.1114,-0.0000,0.1762,-0.9780 +0.1114,-0.0000,0.1762,-0.9780 +0.1114,-0.0000,0.1762,-0.9780 +0.1114,-0.0000,0.1762,-0.9780 +0.1275,-0.0000,0.1848,-0.9745 +0.1275,-0.0000,0.1848,-0.9745 +0.1275,-0.0000,0.1848,-0.9745 +0.1275,-0.0000,0.1848,-0.9745 +0.1435,-0.0000,0.1915,-0.9709 +0.1435,-0.0000,0.1915,-0.9709 +0.1435,-0.0000,0.1915,-0.9709 +0.1435,-0.0000,0.1915,-0.9709 +0.1594,-0.0000,0.1970,-0.9674 +0.1594,-0.0000,0.1970,-0.9674 +0.1594,-0.0000,0.1970,-0.9674 +0.1594,-0.0000,0.1970,-0.9674 +0.1753,-0.0000,0.2014,-0.9637 +0.1753,-0.0000,0.2014,-0.9637 +0.1753,-0.0000,0.2014,-0.9637 +0.1753,-0.0000,0.2014,-0.9637 +0.1912,-0.0000,0.2052,-0.9599 +0.1912,-0.0000,0.2052,-0.9599 +0.1912,-0.0000,0.2052,-0.9599 +0.1912,-0.0000,0.2052,-0.9599 +0.2070,-0.0000,0.2085,-0.9559 +0.2070,-0.0000,0.2085,-0.9559 +0.2070,-0.0000,0.2085,-0.9559 +0.2070,-0.0000,0.2085,-0.9559 +0.2227,-0.0000,0.2113,-0.9517 +0.2227,-0.0000,0.2113,-0.9517 +0.2227,-0.0000,0.2113,-0.9517 +0.2227,-0.0000,0.2113,-0.9517 +0.2384,-0.0000,0.2138,-0.9473 +0.2384,-0.0000,0.2138,-0.9473 +0.2384,-0.0000,0.2138,-0.9473 +0.2384,-0.0000,0.2138,-0.9473 +0.2540,-0.0000,0.2161,-0.9428 +0.2540,-0.0000,0.2161,-0.9428 +0.2540,-0.0000,0.2161,-0.9428 +0.2540,-0.0000,0.2161,-0.9428 +0.2695,-0.0000,0.2181,-0.9380 +0.2695,-0.0000,0.2181,-0.9380 +0.2695,-0.0000,0.2181,-0.9380 +0.2695,-0.0000,0.2181,-0.9380 +0.2849,-0.0000,0.2200,-0.9330 +0.2849,-0.0000,0.2200,-0.9330 +0.2849,-0.0000,0.2200,-0.9330 +0.2849,-0.0000,0.2200,-0.9330 +0.3002,-0.0000,0.2217,-0.9277 +0.3002,-0.0000,0.2217,-0.9277 +0.3002,-0.0000,0.2217,-0.9277 +0.3002,-0.0000,0.2217,-0.9277 +0.3155,-0.0000,0.2233,-0.9223 +0.3155,-0.0000,0.2233,-0.9223 +0.3155,-0.0000,0.2233,-0.9223 +0.3155,-0.0000,0.2233,-0.9223 +0.3306,-0.0000,0.2248,-0.9166 +0.3306,-0.0000,0.2248,-0.9166 +0.3306,-0.0000,0.2248,-0.9166 +0.3306,-0.0000,0.2248,-0.9166 +0.3457,-0.0000,0.2263,-0.9107 +0.3457,-0.0000,0.2263,-0.9107 +0.3457,-0.0000,0.2263,-0.9107 +0.3457,-0.0000,0.2263,-0.9107 +0.3606,-0.0000,0.2277,-0.9045 +0.3606,-0.0000,0.2277,-0.9045 +0.3606,-0.0000,0.2277,-0.9045 +0.3606,-0.0000,0.2277,-0.9045 +0.3754,-0.0000,0.2290,-0.8981 +0.3754,-0.0000,0.2290,-0.8981 +0.3754,-0.0000,0.2290,-0.8981 +0.3754,-0.0000,0.2290,-0.8981 +0.3901,-0.0000,0.2303,-0.8915 +0.3901,-0.0000,0.2303,-0.8915 +0.3901,-0.0000,0.2303,-0.8915 +0.3901,-0.0000,0.2303,-0.8915 +0.4047,-0.0000,0.2315,-0.8847 +0.4047,-0.0000,0.2315,-0.8847 +0.4047,-0.0000,0.2315,-0.8847 +0.4047,-0.0000,0.2315,-0.8847 +0.4192,-0.0000,0.2327,-0.8776 +0.4192,-0.0000,0.2327,-0.8776 +0.4192,-0.0000,0.2327,-0.8776 +0.4192,-0.0000,0.2327,-0.8776 +0.4335,-0.0000,0.2339,-0.8703 +0.4335,-0.0000,0.2339,-0.8703 +0.4335,-0.0000,0.2339,-0.8703 +0.4335,-0.0000,0.2339,-0.8703 +0.4477,-0.0000,0.2351,-0.8627 +0.4477,-0.0000,0.2351,-0.8627 +0.4477,-0.0000,0.2351,-0.8627 +0.4477,-0.0000,0.2351,-0.8627 +0.4617,-0.0000,0.2362,-0.8550 +0.4617,-0.0000,0.2362,-0.8550 +0.4617,-0.0000,0.2362,-0.8550 +0.4617,-0.0000,0.2362,-0.8550 +0.4756,-0.0000,0.2374,-0.8470 +0.4756,-0.0000,0.2374,-0.8470 +0.4756,-0.0000,0.2374,-0.8470 +0.4756,-0.0000,0.2374,-0.8470 +0.4894,-0.0000,0.2385,-0.8388 +0.4894,-0.0000,0.2385,-0.8388 +0.4894,-0.0000,0.2385,-0.8388 +0.4894,-0.0000,0.2385,-0.8388 +0.5030,-0.0000,0.2396,-0.8304 +0.5030,-0.0000,0.2396,-0.8304 +0.5030,-0.0000,0.2396,-0.8304 +0.5030,-0.0000,0.2396,-0.8304 +0.5164,-0.0000,0.2408,-0.8218 +0.5164,-0.0000,0.2408,-0.8218 +0.5164,-0.0000,0.2408,-0.8218 +0.5164,-0.0000,0.2408,-0.8218 +0.5297,-0.0000,0.2419,-0.8130 +0.5297,-0.0000,0.2419,-0.8130 +0.5297,-0.0000,0.2419,-0.8130 +0.5297,-0.0000,0.2419,-0.8130 +0.5428,-0.0000,0.2431,-0.8039 +0.5428,-0.0000,0.2431,-0.8039 +0.5428,-0.0000,0.2431,-0.8039 +0.5428,-0.0000,0.2431,-0.8039 +0.5558,-0.0000,0.2442,-0.7947 +0.5558,-0.0000,0.2442,-0.7947 +0.5558,-0.0000,0.2442,-0.7947 +0.5558,-0.0000,0.2442,-0.7947 +0.5685,-0.0000,0.2454,-0.7852 +0.5685,-0.0000,0.2454,-0.7852 +0.5685,-0.0000,0.2454,-0.7852 +0.5685,-0.0000,0.2454,-0.7852 +0.5811,-0.0000,0.2465,-0.7756 +0.5811,-0.0000,0.2465,-0.7756 +0.5811,-0.0000,0.2465,-0.7756 +0.5811,-0.0000,0.2465,-0.7756 +0.5936,-0.0000,0.2477,-0.7657 +0.5936,-0.0000,0.2477,-0.7657 +0.5936,-0.0000,0.2477,-0.7657 +0.5936,-0.0000,0.2477,-0.7657 +0.6058,-0.0000,0.2489,-0.7557 +0.6058,-0.0000,0.2489,-0.7557 +0.6058,-0.0000,0.2489,-0.7557 +0.6058,-0.0000,0.2489,-0.7557 +0.6179,-0.0000,0.2501,-0.7455 +0.6179,-0.0000,0.2501,-0.7455 +0.6179,-0.0000,0.2501,-0.7455 +0.6179,-0.0000,0.2501,-0.7455 +0.6297,-0.0000,0.2513,-0.7351 +0.6297,-0.0000,0.2513,-0.7351 +0.6297,-0.0000,0.2513,-0.7351 +0.6297,-0.0000,0.2513,-0.7351 +0.6414,-0.0000,0.2525,-0.7245 +0.6414,-0.0000,0.2525,-0.7245 +0.6414,-0.0000,0.2525,-0.7245 +0.6414,-0.0000,0.2525,-0.7245 +0.6528,-0.0000,0.2538,-0.7137 +0.6528,-0.0000,0.2538,-0.7137 +0.6528,-0.0000,0.2538,-0.7137 +0.6528,-0.0000,0.2538,-0.7137 +0.6641,-0.0000,0.2550,-0.7028 +0.6641,-0.0000,0.2550,-0.7028 +0.6641,-0.0000,0.2550,-0.7028 +0.6641,-0.0000,0.2550,-0.7028 +0.6752,-0.0000,0.2563,-0.6917 +0.6752,-0.0000,0.2563,-0.6917 +0.6752,-0.0000,0.2563,-0.6917 +0.6752,-0.0000,0.2563,-0.6917 +0.6860,-0.0000,0.2576,-0.6804 +0.6860,-0.0000,0.2576,-0.6804 +0.6860,-0.0000,0.2576,-0.6804 +0.6860,-0.0000,0.2576,-0.6804 +0.6967,-0.0000,0.2590,-0.6690 +0.6967,-0.0000,0.2590,-0.6690 +0.6967,-0.0000,0.2590,-0.6690 +0.6967,-0.0000,0.2590,-0.6690 +0.7071,-0.0000,0.2603,-0.6575 +0.7071,-0.0000,0.2603,-0.6575 +0.7071,-0.0000,0.2603,-0.6575 +0.7071,-0.0000,0.2603,-0.6575 +0.7173,-0.0000,0.2617,-0.6457 +0.7173,-0.0000,0.2617,-0.6457 +0.7173,-0.0000,0.2617,-0.6457 +0.7173,-0.0000,0.2617,-0.6457 +0.7273,-0.0000,0.2631,-0.6339 +0.7273,-0.0000,0.2631,-0.6339 +0.7273,-0.0000,0.2631,-0.6339 +0.7273,-0.0000,0.2631,-0.6339 +0.7371,-0.0000,0.2645,-0.6219 +0.7371,-0.0000,0.2645,-0.6219 +0.7371,-0.0000,0.2645,-0.6219 +0.7371,-0.0000,0.2645,-0.6219 +0.7467,-0.0000,0.2659,-0.6097 +0.7467,-0.0000,0.2659,-0.6097 +0.7467,-0.0000,0.2659,-0.6097 +0.7467,-0.0000,0.2659,-0.6097 +0.7560,-0.0000,0.2674,-0.5974 +0.7560,-0.0000,0.2674,-0.5974 +0.7560,-0.0000,0.2674,-0.5974 +0.7560,-0.0000,0.2674,-0.5974 +0.7651,-0.0000,0.2689,-0.5851 +0.7651,-0.0000,0.2689,-0.5851 +0.7651,-0.0000,0.2689,-0.5851 +0.7651,-0.0000,0.2689,-0.5851 +0.7740,-0.0000,0.2705,-0.5725 +0.7740,-0.0000,0.2705,-0.5725 +0.7740,-0.0000,0.2705,-0.5725 +0.7740,-0.0000,0.2705,-0.5725 +0.7826,-0.0000,0.2720,-0.5599 +0.7826,-0.0000,0.2720,-0.5599 +0.7826,-0.0000,0.2720,-0.5599 +0.7826,-0.0000,0.2720,-0.5599 +0.7910,-0.0000,0.2736,-0.5472 +0.7910,-0.0000,0.2736,-0.5472 +0.7910,-0.0000,0.2736,-0.5472 +0.7910,-0.0000,0.2736,-0.5472 +0.7992,-0.0000,0.2752,-0.5343 +0.7992,-0.0000,0.2752,-0.5343 +0.7992,-0.0000,0.2752,-0.5343 +0.7992,-0.0000,0.2752,-0.5343 +0.8072,-0.0000,0.2769,-0.5214 +0.8072,-0.0000,0.2769,-0.5214 +0.8072,-0.0000,0.2769,-0.5214 +0.8072,-0.0000,0.2769,-0.5214 +0.8149,-0.0000,0.2786,-0.5083 +0.8149,-0.0000,0.2786,-0.5083 +0.8149,-0.0000,0.2786,-0.5083 +0.8149,-0.0000,0.2786,-0.5083 +0.8223,-0.0000,0.2803,-0.4952 +0.8223,-0.0000,0.2803,-0.4952 +0.8223,-0.0000,0.2803,-0.4952 +0.8223,-0.0000,0.2803,-0.4952 +0.8295,-0.0000,0.2820,-0.4820 +0.8295,-0.0000,0.2820,-0.4820 +0.8295,-0.0000,0.2820,-0.4820 +0.8295,-0.0000,0.2820,-0.4820 +0.8365,-0.0000,0.2838,-0.4687 +0.8365,-0.0000,0.2838,-0.4687 +0.8365,-0.0000,0.2838,-0.4687 +0.8365,-0.0000,0.2838,-0.4687 +0.8433,-0.0000,0.2857,-0.4553 +0.8433,-0.0000,0.2857,-0.4553 +0.8433,-0.0000,0.2857,-0.4553 +0.8433,-0.0000,0.2857,-0.4553 +0.8497,-0.0000,0.2875,-0.4419 +0.8497,-0.0000,0.2875,-0.4419 +0.8497,-0.0000,0.2875,-0.4419 +0.8497,-0.0000,0.2875,-0.4419 +0.8560,-0.0000,0.2894,-0.4284 +0.8560,-0.0000,0.2894,-0.4284 +0.8560,-0.0000,0.2894,-0.4284 +0.8560,-0.0000,0.2894,-0.4284 +0.8620,-0.0000,0.2913,-0.4148 +0.8620,-0.0000,0.2913,-0.4148 +0.8620,-0.0000,0.2913,-0.4148 +0.8620,-0.0000,0.2913,-0.4148 +0.8677,-0.0000,0.2933,-0.4012 +0.8677,-0.0000,0.2933,-0.4012 +0.8677,-0.0000,0.2933,-0.4012 +0.8677,-0.0000,0.2933,-0.4012 +0.8732,-0.0000,0.2953,-0.3876 +0.8732,-0.0000,0.2953,-0.3876 +0.8732,-0.0000,0.2953,-0.3876 +0.8732,-0.0000,0.2953,-0.3876 +0.8785,-0.0000,0.2974,-0.3739 +0.8785,-0.0000,0.2974,-0.3739 +0.8785,-0.0000,0.2974,-0.3739 +0.8785,-0.0000,0.2974,-0.3739 +0.8835,-0.0000,0.2995,-0.3602 +0.8835,-0.0000,0.2995,-0.3602 +0.8835,-0.0000,0.2995,-0.3602 +0.8835,-0.0000,0.2995,-0.3602 +0.8883,-0.0000,0.3016,-0.3465 +0.8883,-0.0000,0.3016,-0.3465 +0.8883,-0.0000,0.3016,-0.3465 +0.8883,-0.0000,0.3016,-0.3465 +0.8928,-0.0000,0.3038,-0.3327 +0.8928,-0.0000,0.3038,-0.3327 +0.8928,-0.0000,0.3038,-0.3327 +0.8928,-0.0000,0.3038,-0.3327 +0.8970,-0.0000,0.3060,-0.3189 +0.8970,-0.0000,0.3060,-0.3189 +0.8970,-0.0000,0.3060,-0.3189 +0.8970,-0.0000,0.3060,-0.3189 +0.9010,-0.0000,0.3083,-0.3051 +0.9010,-0.0000,0.3083,-0.3051 +0.9010,-0.0000,0.3083,-0.3051 +0.9010,-0.0000,0.3083,-0.3051 +0.9048,-0.0000,0.3106,-0.2913 +0.9048,-0.0000,0.3106,-0.2913 +0.9048,-0.0000,0.3106,-0.2913 +0.9048,-0.0000,0.3106,-0.2913 +0.9083,-0.0000,0.3130,-0.2776 +0.9083,-0.0000,0.3130,-0.2776 +0.9083,-0.0000,0.3130,-0.2776 +0.9083,-0.0000,0.3130,-0.2776 +0.9116,-0.0000,0.3154,-0.2638 +0.9116,-0.0000,0.3154,-0.2638 +0.9116,-0.0000,0.3154,-0.2638 +0.9116,-0.0000,0.3154,-0.2638 +0.9146,-0.0000,0.3179,-0.2500 +0.9146,-0.0000,0.3179,-0.2500 +0.9146,-0.0000,0.3179,-0.2500 +0.9146,-0.0000,0.3179,-0.2500 +0.9174,-0.0000,0.3204,-0.2363 +0.9174,-0.0000,0.3204,-0.2363 +0.9174,-0.0000,0.3204,-0.2363 +0.9174,-0.0000,0.3204,-0.2363 +0.9199,-0.0000,0.3229,-0.2226 +0.9199,-0.0000,0.3229,-0.2226 +0.9199,-0.0000,0.3229,-0.2226 +0.9199,-0.0000,0.3229,-0.2226 +0.9222,-0.0000,0.3256,-0.2089 +0.9222,-0.0000,0.3256,-0.2089 +0.9222,-0.0000,0.3256,-0.2089 +0.9222,-0.0000,0.3256,-0.2089 +0.9242,-0.0000,0.3282,-0.1952 +0.9242,-0.0000,0.3282,-0.1952 +0.9242,-0.0000,0.3282,-0.1952 +0.9242,-0.0000,0.3282,-0.1952 +0.9260,-0.0000,0.3309,-0.1817 +0.9260,-0.0000,0.3309,-0.1817 +0.9260,-0.0000,0.3309,-0.1817 +0.9260,-0.0000,0.3309,-0.1817 +0.9276,-0.0000,0.3337,-0.1681 +0.9276,-0.0000,0.3337,-0.1681 +0.9276,-0.0000,0.3337,-0.1681 +0.9276,-0.0000,0.3337,-0.1681 +0.9289,-0.0000,0.3366,-0.1546 +0.9289,-0.0000,0.3366,-0.1546 +0.9289,-0.0000,0.3366,-0.1546 +0.9289,-0.0000,0.3366,-0.1546 +0.9300,-0.0000,0.3395,-0.1412 +0.9300,-0.0000,0.3395,-0.1412 +0.9300,-0.0000,0.3395,-0.1412 +0.9300,-0.0000,0.3395,-0.1412 +0.9308,-0.0000,0.3424,-0.1279 +0.9308,-0.0000,0.3424,-0.1279 +0.9308,-0.0000,0.3424,-0.1279 +0.9308,-0.0000,0.3424,-0.1279 +0.9314,-0.0000,0.3454,-0.1146 +0.9314,-0.0000,0.3454,-0.1146 +0.9314,-0.0000,0.3454,-0.1146 +0.9314,-0.0000,0.3454,-0.1146 +0.9318,-0.0000,0.3485,-0.1015 +0.9318,-0.0000,0.3485,-0.1015 +0.9318,-0.0000,0.3485,-0.1015 +0.9318,-0.0000,0.3485,-0.1015 +0.9320,-0.0000,0.3516,-0.0884 +0.9320,-0.0000,0.3516,-0.0884 +0.9320,-0.0000,0.3516,-0.0884 +0.9320,-0.0000,0.3516,-0.0884 +0.9319,-0.0000,0.3548,-0.0754 +0.9319,-0.0000,0.3548,-0.0754 +0.9319,-0.0000,0.3548,-0.0754 +0.9319,-0.0000,0.3548,-0.0754 +0.9316,-0.0000,0.3581,-0.0625 +0.9316,-0.0000,0.3581,-0.0625 +0.9316,-0.0000,0.3581,-0.0625 +0.9316,-0.0000,0.3581,-0.0625 +0.9311,-0.0000,0.3614,-0.0498 +0.9311,-0.0000,0.3614,-0.0498 +0.9311,-0.0000,0.3614,-0.0498 +0.9311,-0.0000,0.3614,-0.0498 +0.9303,-0.0000,0.3648,-0.0371 +0.9303,-0.0000,0.3648,-0.0371 +0.9303,-0.0000,0.3648,-0.0371 +0.9303,-0.0000,0.3648,-0.0371 +0.9294,-0.0000,0.3683,-0.0246 +0.9294,-0.0000,0.3683,-0.0246 +0.9294,-0.0000,0.3683,-0.0246 +0.9294,-0.0000,0.3683,-0.0246 +0.9282,-0.0000,0.3718,-0.0122 +0.9282,-0.0000,0.3718,-0.0122 +0.9282,-0.0000,0.3718,-0.0122 +0.9282,-0.0000,0.3718,-0.0122 +0.9269,0.0000,0.3754,0.0000 +0.9269,0.0000,0.3754,0.0000 +0.9269,0.0000,0.3754,0.0000 +0.9269,0.0000,0.3754,0.0000 diff --git a/scripts/trajectories/full-circle-with-up-and-down-4s.csv b/scripts/trajectories/full-circle-with-up-and-down-4s.csv new file mode 100644 index 0000000000..31692f4673 --- /dev/null +++ b/scripts/trajectories/full-circle-with-up-and-down-4s.csv @@ -0,0 +1,800 @@ +0.9223,-0.0000,0.3863,-0.0119 +0.9223,-0.0000,0.3863,-0.0119 +0.9223,-0.0000,0.3863,-0.0119 +0.9223,-0.0000,0.3863,-0.0119 +0.9235,-0.0000,0.3828,-0.0240 +0.9235,-0.0000,0.3828,-0.0240 +0.9235,-0.0000,0.3828,-0.0240 +0.9235,-0.0000,0.3828,-0.0240 +0.9245,-0.0000,0.3794,-0.0363 +0.9245,-0.0000,0.3794,-0.0363 +0.9245,-0.0000,0.3794,-0.0363 +0.9245,-0.0000,0.3794,-0.0363 +0.9253,-0.0000,0.3760,-0.0486 +0.9253,-0.0000,0.3760,-0.0486 +0.9253,-0.0000,0.3760,-0.0486 +0.9253,-0.0000,0.3760,-0.0486 +0.9259,-0.0000,0.3727,-0.0611 +0.9259,-0.0000,0.3727,-0.0611 +0.9259,-0.0000,0.3727,-0.0611 +0.9259,-0.0000,0.3727,-0.0611 +0.9263,-0.0000,0.3695,-0.0737 +0.9263,-0.0000,0.3695,-0.0737 +0.9263,-0.0000,0.3695,-0.0737 +0.9263,-0.0000,0.3695,-0.0737 +0.9265,-0.0000,0.3663,-0.0865 +0.9265,-0.0000,0.3663,-0.0865 +0.9265,-0.0000,0.3663,-0.0865 +0.9265,-0.0000,0.3663,-0.0865 +0.9264,-0.0000,0.3632,-0.0993 +0.9264,-0.0000,0.3632,-0.0993 +0.9264,-0.0000,0.3632,-0.0993 +0.9264,-0.0000,0.3632,-0.0993 +0.9261,-0.0000,0.3602,-0.1122 +0.9261,-0.0000,0.3602,-0.1122 +0.9261,-0.0000,0.3602,-0.1122 +0.9261,-0.0000,0.3602,-0.1122 +0.9256,-0.0000,0.3572,-0.1252 +0.9256,-0.0000,0.3572,-0.1252 +0.9256,-0.0000,0.3572,-0.1252 +0.9256,-0.0000,0.3572,-0.1252 +0.9248,-0.0000,0.3543,-0.1383 +0.9248,-0.0000,0.3543,-0.1383 +0.9248,-0.0000,0.3543,-0.1383 +0.9248,-0.0000,0.3543,-0.1383 +0.9239,-0.0000,0.3515,-0.1515 +0.9239,-0.0000,0.3515,-0.1515 +0.9239,-0.0000,0.3515,-0.1515 +0.9239,-0.0000,0.3515,-0.1515 +0.9226,-0.0000,0.3487,-0.1648 +0.9226,-0.0000,0.3487,-0.1648 +0.9226,-0.0000,0.3487,-0.1648 +0.9226,-0.0000,0.3487,-0.1648 +0.9212,-0.0000,0.3460,-0.1781 +0.9212,-0.0000,0.3460,-0.1781 +0.9212,-0.0000,0.3460,-0.1781 +0.9212,-0.0000,0.3460,-0.1781 +0.9195,-0.0000,0.3433,-0.1914 +0.9195,-0.0000,0.3433,-0.1914 +0.9195,-0.0000,0.3433,-0.1914 +0.9195,-0.0000,0.3433,-0.1914 +0.9176,-0.0000,0.3407,-0.2049 +0.9176,-0.0000,0.3407,-0.2049 +0.9176,-0.0000,0.3407,-0.2049 +0.9176,-0.0000,0.3407,-0.2049 +0.9154,-0.0000,0.3382,-0.2183 +0.9154,-0.0000,0.3382,-0.2183 +0.9154,-0.0000,0.3382,-0.2183 +0.9154,-0.0000,0.3382,-0.2183 +0.9130,-0.0000,0.3357,-0.2319 +0.9130,-0.0000,0.3357,-0.2319 +0.9130,-0.0000,0.3357,-0.2319 +0.9130,-0.0000,0.3357,-0.2319 +0.9104,-0.0000,0.3332,-0.2454 +0.9104,-0.0000,0.3332,-0.2454 +0.9104,-0.0000,0.3332,-0.2454 +0.9104,-0.0000,0.3332,-0.2454 +0.9075,-0.0000,0.3308,-0.2590 +0.9075,-0.0000,0.3308,-0.2590 +0.9075,-0.0000,0.3308,-0.2590 +0.9075,-0.0000,0.3308,-0.2590 +0.9043,-0.0000,0.3285,-0.2726 +0.9043,-0.0000,0.3285,-0.2726 +0.9043,-0.0000,0.3285,-0.2726 +0.9043,-0.0000,0.3285,-0.2726 +0.9009,-0.0000,0.3262,-0.2862 +0.9009,-0.0000,0.3262,-0.2862 +0.9009,-0.0000,0.3262,-0.2862 +0.9009,-0.0000,0.3262,-0.2862 +0.8973,-0.0000,0.3240,-0.2998 +0.8973,-0.0000,0.3240,-0.2998 +0.8973,-0.0000,0.3240,-0.2998 +0.8973,-0.0000,0.3240,-0.2998 +0.8934,-0.0000,0.3218,-0.3134 +0.8934,-0.0000,0.3218,-0.3134 +0.8934,-0.0000,0.3218,-0.3134 +0.8934,-0.0000,0.3218,-0.3134 +0.8893,-0.0000,0.3197,-0.3271 +0.8893,-0.0000,0.3197,-0.3271 +0.8893,-0.0000,0.3197,-0.3271 +0.8893,-0.0000,0.3197,-0.3271 +0.8849,-0.0000,0.3176,-0.3407 +0.8849,-0.0000,0.3176,-0.3407 +0.8849,-0.0000,0.3176,-0.3407 +0.8849,-0.0000,0.3176,-0.3407 +0.8803,-0.0000,0.3156,-0.3543 +0.8803,-0.0000,0.3156,-0.3543 +0.8803,-0.0000,0.3156,-0.3543 +0.8803,-0.0000,0.3156,-0.3543 +0.8754,-0.0000,0.3136,-0.3678 +0.8754,-0.0000,0.3136,-0.3678 +0.8754,-0.0000,0.3136,-0.3678 +0.8754,-0.0000,0.3136,-0.3678 +0.8703,-0.0000,0.3116,-0.3814 +0.8703,-0.0000,0.3116,-0.3814 +0.8703,-0.0000,0.3116,-0.3814 +0.8703,-0.0000,0.3116,-0.3814 +0.8650,-0.0000,0.3097,-0.3949 +0.8650,-0.0000,0.3097,-0.3949 +0.8650,-0.0000,0.3097,-0.3949 +0.8650,-0.0000,0.3097,-0.3949 +0.8593,-0.0000,0.3079,-0.4083 +0.8593,-0.0000,0.3079,-0.4083 +0.8593,-0.0000,0.3079,-0.4083 +0.8593,-0.0000,0.3079,-0.4083 +0.8535,-0.0000,0.3061,-0.4217 +0.8535,-0.0000,0.3061,-0.4217 +0.8535,-0.0000,0.3061,-0.4217 +0.8535,-0.0000,0.3061,-0.4217 +0.8474,-0.0000,0.3043,-0.4351 +0.8474,-0.0000,0.3043,-0.4351 +0.8474,-0.0000,0.3043,-0.4351 +0.8474,-0.0000,0.3043,-0.4351 +0.8410,-0.0000,0.3026,-0.4484 +0.8410,-0.0000,0.3026,-0.4484 +0.8410,-0.0000,0.3026,-0.4484 +0.8410,-0.0000,0.3026,-0.4484 +0.8344,-0.0000,0.3010,-0.4617 +0.8344,-0.0000,0.3010,-0.4617 +0.8344,-0.0000,0.3010,-0.4617 +0.8344,-0.0000,0.3010,-0.4617 +0.8276,-0.0000,0.2993,-0.4748 +0.8276,-0.0000,0.2993,-0.4748 +0.8276,-0.0000,0.2993,-0.4748 +0.8276,-0.0000,0.2993,-0.4748 +0.8205,-0.0000,0.2978,-0.4879 +0.8205,-0.0000,0.2978,-0.4879 +0.8205,-0.0000,0.2978,-0.4879 +0.8205,-0.0000,0.2978,-0.4879 +0.8132,-0.0000,0.2962,-0.5010 +0.8132,-0.0000,0.2962,-0.5010 +0.8132,-0.0000,0.2962,-0.5010 +0.8132,-0.0000,0.2962,-0.5010 +0.8056,-0.0000,0.2947,-0.5139 +0.8056,-0.0000,0.2947,-0.5139 +0.8056,-0.0000,0.2947,-0.5139 +0.8056,-0.0000,0.2947,-0.5139 +0.7978,-0.0000,0.2932,-0.5267 +0.7978,-0.0000,0.2932,-0.5267 +0.7978,-0.0000,0.2932,-0.5267 +0.7978,-0.0000,0.2932,-0.5267 +0.7898,-0.0000,0.2918,-0.5395 +0.7898,-0.0000,0.2918,-0.5395 +0.7898,-0.0000,0.2918,-0.5395 +0.7898,-0.0000,0.2918,-0.5395 +0.7815,-0.0000,0.2904,-0.5521 +0.7815,-0.0000,0.2904,-0.5521 +0.7815,-0.0000,0.2904,-0.5521 +0.7815,-0.0000,0.2904,-0.5521 +0.7730,-0.0000,0.2891,-0.5647 +0.7730,-0.0000,0.2891,-0.5647 +0.7730,-0.0000,0.2891,-0.5647 +0.7730,-0.0000,0.2891,-0.5647 +0.7643,-0.0000,0.2878,-0.5771 +0.7643,-0.0000,0.2878,-0.5771 +0.7643,-0.0000,0.2878,-0.5771 +0.7643,-0.0000,0.2878,-0.5771 +0.7553,-0.0000,0.2865,-0.5894 +0.7553,-0.0000,0.2865,-0.5894 +0.7553,-0.0000,0.2865,-0.5894 +0.7553,-0.0000,0.2865,-0.5894 +0.7461,-0.0000,0.2853,-0.6016 +0.7461,-0.0000,0.2853,-0.6016 +0.7461,-0.0000,0.2853,-0.6016 +0.7461,-0.0000,0.2853,-0.6016 +0.7367,-0.0000,0.2841,-0.6136 +0.7367,-0.0000,0.2841,-0.6136 +0.7367,-0.0000,0.2841,-0.6136 +0.7367,-0.0000,0.2841,-0.6136 +0.7271,-0.0000,0.2830,-0.6255 +0.7271,-0.0000,0.2830,-0.6255 +0.7271,-0.0000,0.2830,-0.6255 +0.7271,-0.0000,0.2830,-0.6255 +0.7172,-0.0000,0.2819,-0.6373 +0.7172,-0.0000,0.2819,-0.6373 +0.7172,-0.0000,0.2819,-0.6373 +0.7172,-0.0000,0.2819,-0.6373 +0.7071,-0.0000,0.2808,-0.6490 +0.7071,-0.0000,0.2808,-0.6490 +0.7071,-0.0000,0.2808,-0.6490 +0.7071,-0.0000,0.2808,-0.6490 +0.6968,-0.0000,0.2798,-0.6604 +0.6968,-0.0000,0.2798,-0.6604 +0.6968,-0.0000,0.2798,-0.6604 +0.6968,-0.0000,0.2798,-0.6604 +0.6863,-0.0000,0.2788,-0.6718 +0.6863,-0.0000,0.2788,-0.6718 +0.6863,-0.0000,0.2788,-0.6718 +0.6863,-0.0000,0.2788,-0.6718 +0.6756,-0.0000,0.2779,-0.6829 +0.6756,-0.0000,0.2779,-0.6829 +0.6756,-0.0000,0.2779,-0.6829 +0.6756,-0.0000,0.2779,-0.6829 +0.6646,-0.0000,0.2769,-0.6940 +0.6646,-0.0000,0.2769,-0.6940 +0.6646,-0.0000,0.2769,-0.6940 +0.6646,-0.0000,0.2769,-0.6940 +0.6535,-0.0000,0.2761,-0.7048 +0.6535,-0.0000,0.2761,-0.7048 +0.6535,-0.0000,0.2761,-0.7048 +0.6535,-0.0000,0.2761,-0.7048 +0.6422,-0.0000,0.2752,-0.7155 +0.6422,-0.0000,0.2752,-0.7155 +0.6422,-0.0000,0.2752,-0.7155 +0.6422,-0.0000,0.2752,-0.7155 +0.6306,-0.0000,0.2744,-0.7260 +0.6306,-0.0000,0.2744,-0.7260 +0.6306,-0.0000,0.2744,-0.7260 +0.6306,-0.0000,0.2744,-0.7260 +0.6189,-0.0000,0.2737,-0.7363 +0.6189,-0.0000,0.2737,-0.7363 +0.6189,-0.0000,0.2737,-0.7363 +0.6189,-0.0000,0.2737,-0.7363 +0.6069,-0.0000,0.2730,-0.7464 +0.6069,-0.0000,0.2730,-0.7464 +0.6069,-0.0000,0.2730,-0.7464 +0.6069,-0.0000,0.2730,-0.7464 +0.5948,-0.0000,0.2723,-0.7563 +0.5948,-0.0000,0.2723,-0.7563 +0.5948,-0.0000,0.2723,-0.7563 +0.5948,-0.0000,0.2723,-0.7563 +0.5825,-0.0000,0.2716,-0.7661 +0.5825,-0.0000,0.2716,-0.7661 +0.5825,-0.0000,0.2716,-0.7661 +0.5825,-0.0000,0.2716,-0.7661 +0.5700,-0.0000,0.2710,-0.7756 +0.5700,-0.0000,0.2710,-0.7756 +0.5700,-0.0000,0.2710,-0.7756 +0.5700,-0.0000,0.2710,-0.7756 +0.5574,-0.0000,0.2705,-0.7850 +0.5574,-0.0000,0.2705,-0.7850 +0.5574,-0.0000,0.2705,-0.7850 +0.5574,-0.0000,0.2705,-0.7850 +0.5445,-0.0000,0.2700,-0.7941 +0.5445,-0.0000,0.2700,-0.7941 +0.5445,-0.0000,0.2700,-0.7941 +0.5445,-0.0000,0.2700,-0.7941 +0.5315,-0.0000,0.2695,-0.8030 +0.5315,-0.0000,0.2695,-0.8030 +0.5315,-0.0000,0.2695,-0.8030 +0.5315,-0.0000,0.2695,-0.8030 +0.5184,-0.0000,0.2691,-0.8117 +0.5184,-0.0000,0.2691,-0.8117 +0.5184,-0.0000,0.2691,-0.8117 +0.5184,-0.0000,0.2691,-0.8117 +0.5050,-0.0000,0.2687,-0.8202 +0.5050,-0.0000,0.2687,-0.8202 +0.5050,-0.0000,0.2687,-0.8202 +0.5050,-0.0000,0.2687,-0.8202 +0.4915,-0.0000,0.2684,-0.8285 +0.4915,-0.0000,0.2684,-0.8285 +0.4915,-0.0000,0.2684,-0.8285 +0.4915,-0.0000,0.2684,-0.8285 +0.4779,-0.0000,0.2682,-0.8365 +0.4779,-0.0000,0.2682,-0.8365 +0.4779,-0.0000,0.2682,-0.8365 +0.4779,-0.0000,0.2682,-0.8365 +0.4640,-0.0000,0.2680,-0.8443 +0.4640,-0.0000,0.2680,-0.8443 +0.4640,-0.0000,0.2680,-0.8443 +0.4640,-0.0000,0.2680,-0.8443 +0.4501,-0.0000,0.2678,-0.8519 +0.4501,-0.0000,0.2678,-0.8519 +0.4501,-0.0000,0.2678,-0.8519 +0.4501,-0.0000,0.2678,-0.8519 +0.4360,-0.0000,0.2677,-0.8592 +0.4360,-0.0000,0.2677,-0.8592 +0.4360,-0.0000,0.2677,-0.8592 +0.4360,-0.0000,0.2677,-0.8592 +0.4218,-0.0000,0.2677,-0.8663 +0.4218,-0.0000,0.2677,-0.8663 +0.4218,-0.0000,0.2677,-0.8663 +0.4218,-0.0000,0.2677,-0.8663 +0.4074,-0.0000,0.2677,-0.8731 +0.4074,-0.0000,0.2677,-0.8731 +0.4074,-0.0000,0.2677,-0.8731 +0.4074,-0.0000,0.2677,-0.8731 +0.3929,-0.0000,0.2678,-0.8797 +0.3929,-0.0000,0.2678,-0.8797 +0.3929,-0.0000,0.2678,-0.8797 +0.3929,-0.0000,0.2678,-0.8797 +0.3783,-0.0000,0.2680,-0.8860 +0.3783,-0.0000,0.2680,-0.8860 +0.3783,-0.0000,0.2680,-0.8860 +0.3783,-0.0000,0.2680,-0.8860 +0.3635,-0.0000,0.2683,-0.8921 +0.3635,-0.0000,0.2683,-0.8921 +0.3635,-0.0000,0.2683,-0.8921 +0.3635,-0.0000,0.2683,-0.8921 +0.3487,-0.0000,0.2687,-0.8979 +0.3487,-0.0000,0.2687,-0.8979 +0.3487,-0.0000,0.2687,-0.8979 +0.3487,-0.0000,0.2687,-0.8979 +0.3337,-0.0000,0.2692,-0.9034 +0.3337,-0.0000,0.2692,-0.9034 +0.3337,-0.0000,0.2692,-0.9034 +0.3337,-0.0000,0.2692,-0.9034 +0.3186,-0.0000,0.2698,-0.9087 +0.3186,-0.0000,0.2698,-0.9087 +0.3186,-0.0000,0.2698,-0.9087 +0.3186,-0.0000,0.2698,-0.9087 +0.3034,-0.0000,0.2705,-0.9136 +0.3034,-0.0000,0.2705,-0.9136 +0.3034,-0.0000,0.2705,-0.9136 +0.3034,-0.0000,0.2705,-0.9136 +0.2882,-0.0000,0.2714,-0.9183 +0.2882,-0.0000,0.2714,-0.9183 +0.2882,-0.0000,0.2714,-0.9183 +0.2882,-0.0000,0.2714,-0.9183 +0.2728,-0.0000,0.2725,-0.9227 +0.2728,-0.0000,0.2725,-0.9227 +0.2728,-0.0000,0.2725,-0.9227 +0.2728,-0.0000,0.2725,-0.9227 +0.2573,-0.0000,0.2738,-0.9267 +0.2573,-0.0000,0.2738,-0.9267 +0.2573,-0.0000,0.2738,-0.9267 +0.2573,-0.0000,0.2738,-0.9267 +0.2418,-0.0000,0.2753,-0.9305 +0.2418,-0.0000,0.2753,-0.9305 +0.2418,-0.0000,0.2753,-0.9305 +0.2418,-0.0000,0.2753,-0.9305 +0.2262,-0.0000,0.2771,-0.9339 +0.2262,-0.0000,0.2771,-0.9339 +0.2262,-0.0000,0.2771,-0.9339 +0.2262,-0.0000,0.2771,-0.9339 +0.2105,-0.0000,0.2792,-0.9369 +0.2105,-0.0000,0.2792,-0.9369 +0.2105,-0.0000,0.2792,-0.9369 +0.2105,-0.0000,0.2792,-0.9369 +0.1947,-0.0000,0.2818,-0.9395 +0.1947,-0.0000,0.2818,-0.9395 +0.1947,-0.0000,0.2818,-0.9395 +0.1947,-0.0000,0.2818,-0.9395 +0.1789,-0.0000,0.2848,-0.9417 +0.1789,-0.0000,0.2848,-0.9417 +0.1789,-0.0000,0.2848,-0.9417 +0.1789,-0.0000,0.2848,-0.9417 +0.1630,-0.0000,0.2886,-0.9435 +0.1630,-0.0000,0.2886,-0.9435 +0.1630,-0.0000,0.2886,-0.9435 +0.1630,-0.0000,0.2886,-0.9435 +0.1471,-0.0000,0.2933,-0.9446 +0.1471,-0.0000,0.2933,-0.9446 +0.1471,-0.0000,0.2933,-0.9446 +0.1471,-0.0000,0.2933,-0.9446 +0.1312,-0.0000,0.2991,-0.9452 +0.1312,-0.0000,0.2991,-0.9452 +0.1312,-0.0000,0.2991,-0.9452 +0.1312,-0.0000,0.2991,-0.9452 +0.1152,-0.0000,0.3067,-0.9448 +0.1152,-0.0000,0.3067,-0.9448 +0.1152,-0.0000,0.3067,-0.9448 +0.1152,-0.0000,0.3067,-0.9448 +0.0991,-0.0000,0.3167,-0.9433 +0.0991,-0.0000,0.3167,-0.9433 +0.0991,-0.0000,0.3167,-0.9433 +0.0991,-0.0000,0.3167,-0.9433 +0.0831,-0.0000,0.3307,-0.9401 +0.0831,-0.0000,0.3307,-0.9401 +0.0831,-0.0000,0.3307,-0.9401 +0.0831,-0.0000,0.3307,-0.9401 +0.0670,-0.0000,0.3514,-0.9338 +0.0670,-0.0000,0.3514,-0.9338 +0.0670,-0.0000,0.3514,-0.9338 +0.0670,-0.0000,0.3514,-0.9338 +0.0510,-0.0000,0.3848,-0.9216 +0.0510,-0.0000,0.3848,-0.9216 +0.0510,-0.0000,0.3848,-0.9216 +0.0510,-0.0000,0.3848,-0.9216 +0.0351,-0.0000,0.4473,-0.8937 +0.0351,-0.0000,0.4473,-0.8937 +0.0351,-0.0000,0.4473,-0.8937 +0.0351,-0.0000,0.4473,-0.8937 +0.0196,-0.0000,0.6000,-0.7997 +0.0196,-0.0000,0.6000,-0.7997 +0.0196,-0.0000,0.6000,-0.7997 +0.0196,-0.0000,0.6000,-0.7997 +0.0079,0.0000,1.0000,0.0001 +0.0079,0.0000,1.0000,0.0001 +0.0079,0.0000,1.0000,0.0001 +0.0079,0.0000,1.0000,0.0001 +0.0162,0.0000,0.2425,0.9700 +0.0162,0.0000,0.2425,0.9700 +0.0162,0.0000,0.2425,0.9700 +0.0162,0.0000,0.2425,0.9700 +0.0314,-0.0000,-0.0000,0.9995 +0.0314,-0.0000,-0.0000,0.9995 +0.0314,-0.0000,-0.0000,0.9995 +0.0314,-0.0000,-0.0000,0.9995 +0.0473,-0.0000,-0.0831,0.9954 +0.0473,-0.0000,-0.0831,0.9954 +0.0473,-0.0000,-0.0831,0.9954 +0.0473,-0.0000,-0.0831,0.9954 +0.0633,-0.0000,-0.1241,0.9902 +0.0633,-0.0000,-0.1241,0.9902 +0.0633,-0.0000,-0.1241,0.9902 +0.0633,-0.0000,-0.1241,0.9902 +0.0793,-0.0000,-0.1485,0.9857 +0.0793,-0.0000,-0.1485,0.9857 +0.0793,-0.0000,-0.1485,0.9857 +0.0793,-0.0000,-0.1485,0.9857 +0.0954,-0.0000,-0.1646,0.9817 +0.0954,-0.0000,-0.1646,0.9817 +0.0954,-0.0000,-0.1646,0.9817 +0.0954,-0.0000,-0.1646,0.9817 +0.1114,-0.0000,-0.1762,0.9780 +0.1114,-0.0000,-0.1762,0.9780 +0.1114,-0.0000,-0.1762,0.9780 +0.1114,-0.0000,-0.1762,0.9780 +0.1275,-0.0000,-0.1848,0.9745 +0.1275,-0.0000,-0.1848,0.9745 +0.1275,-0.0000,-0.1848,0.9745 +0.1275,-0.0000,-0.1848,0.9745 +0.1435,-0.0000,-0.1915,0.9709 +0.1435,-0.0000,-0.1915,0.9709 +0.1435,-0.0000,-0.1915,0.9709 +0.1435,-0.0000,-0.1915,0.9709 +0.1594,-0.0000,-0.1970,0.9674 +0.1594,-0.0000,-0.1970,0.9674 +0.1594,-0.0000,-0.1970,0.9674 +0.1594,-0.0000,-0.1970,0.9674 +0.1753,-0.0000,-0.2014,0.9637 +0.1753,-0.0000,-0.2014,0.9637 +0.1753,-0.0000,-0.2014,0.9637 +0.1753,-0.0000,-0.2014,0.9637 +0.1912,-0.0000,-0.2052,0.9599 +0.1912,-0.0000,-0.2052,0.9599 +0.1912,-0.0000,-0.2052,0.9599 +0.1912,-0.0000,-0.2052,0.9599 +0.2070,-0.0000,-0.2085,0.9559 +0.2070,-0.0000,-0.2085,0.9559 +0.2070,-0.0000,-0.2085,0.9559 +0.2070,-0.0000,-0.2085,0.9559 +0.2227,-0.0000,-0.2113,0.9517 +0.2227,-0.0000,-0.2113,0.9517 +0.2227,-0.0000,-0.2113,0.9517 +0.2227,-0.0000,-0.2113,0.9517 +0.2384,-0.0000,-0.2138,0.9473 +0.2384,-0.0000,-0.2138,0.9473 +0.2384,-0.0000,-0.2138,0.9473 +0.2384,-0.0000,-0.2138,0.9473 +0.2540,-0.0000,-0.2161,0.9428 +0.2540,-0.0000,-0.2161,0.9428 +0.2540,-0.0000,-0.2161,0.9428 +0.2540,-0.0000,-0.2161,0.9428 +0.2695,-0.0000,-0.2181,0.9380 +0.2695,-0.0000,-0.2181,0.9380 +0.2695,-0.0000,-0.2181,0.9380 +0.2695,-0.0000,-0.2181,0.9380 +0.2849,-0.0000,-0.2200,0.9330 +0.2849,-0.0000,-0.2200,0.9330 +0.2849,-0.0000,-0.2200,0.9330 +0.2849,-0.0000,-0.2200,0.9330 +0.3002,-0.0000,-0.2217,0.9277 +0.3002,-0.0000,-0.2217,0.9277 +0.3002,-0.0000,-0.2217,0.9277 +0.3002,-0.0000,-0.2217,0.9277 +0.3155,-0.0000,-0.2233,0.9223 +0.3155,-0.0000,-0.2233,0.9223 +0.3155,-0.0000,-0.2233,0.9223 +0.3155,-0.0000,-0.2233,0.9223 +0.3306,-0.0000,-0.2248,0.9166 +0.3306,-0.0000,-0.2248,0.9166 +0.3306,-0.0000,-0.2248,0.9166 +0.3306,-0.0000,-0.2248,0.9166 +0.3457,-0.0000,-0.2263,0.9107 +0.3457,-0.0000,-0.2263,0.9107 +0.3457,-0.0000,-0.2263,0.9107 +0.3457,-0.0000,-0.2263,0.9107 +0.3606,-0.0000,-0.2277,0.9045 +0.3606,-0.0000,-0.2277,0.9045 +0.3606,-0.0000,-0.2277,0.9045 +0.3606,-0.0000,-0.2277,0.9045 +0.3754,-0.0000,-0.2290,0.8981 +0.3754,-0.0000,-0.2290,0.8981 +0.3754,-0.0000,-0.2290,0.8981 +0.3754,-0.0000,-0.2290,0.8981 +0.3901,-0.0000,-0.2303,0.8915 +0.3901,-0.0000,-0.2303,0.8915 +0.3901,-0.0000,-0.2303,0.8915 +0.3901,-0.0000,-0.2303,0.8915 +0.4047,-0.0000,-0.2315,0.8847 +0.4047,-0.0000,-0.2315,0.8847 +0.4047,-0.0000,-0.2315,0.8847 +0.4047,-0.0000,-0.2315,0.8847 +0.4192,-0.0000,-0.2327,0.8776 +0.4192,-0.0000,-0.2327,0.8776 +0.4192,-0.0000,-0.2327,0.8776 +0.4192,-0.0000,-0.2327,0.8776 +0.4335,-0.0000,-0.2339,0.8703 +0.4335,-0.0000,-0.2339,0.8703 +0.4335,-0.0000,-0.2339,0.8703 +0.4335,-0.0000,-0.2339,0.8703 +0.4477,-0.0000,-0.2351,0.8627 +0.4477,-0.0000,-0.2351,0.8627 +0.4477,-0.0000,-0.2351,0.8627 +0.4477,-0.0000,-0.2351,0.8627 +0.4617,-0.0000,-0.2362,0.8550 +0.4617,-0.0000,-0.2362,0.8550 +0.4617,-0.0000,-0.2362,0.8550 +0.4617,-0.0000,-0.2362,0.8550 +0.4756,-0.0000,-0.2374,0.8470 +0.4756,-0.0000,-0.2374,0.8470 +0.4756,-0.0000,-0.2374,0.8470 +0.4756,-0.0000,-0.2374,0.8470 +0.4894,-0.0000,-0.2385,0.8388 +0.4894,-0.0000,-0.2385,0.8388 +0.4894,-0.0000,-0.2385,0.8388 +0.4894,-0.0000,-0.2385,0.8388 +0.5030,-0.0000,-0.2396,0.8304 +0.5030,-0.0000,-0.2396,0.8304 +0.5030,-0.0000,-0.2396,0.8304 +0.5030,-0.0000,-0.2396,0.8304 +0.5164,-0.0000,-0.2408,0.8218 +0.5164,-0.0000,-0.2408,0.8218 +0.5164,-0.0000,-0.2408,0.8218 +0.5164,-0.0000,-0.2408,0.8218 +0.5297,-0.0000,-0.2419,0.8130 +0.5297,-0.0000,-0.2419,0.8130 +0.5297,-0.0000,-0.2419,0.8130 +0.5297,-0.0000,-0.2419,0.8130 +0.5428,-0.0000,-0.2431,0.8039 +0.5428,-0.0000,-0.2431,0.8039 +0.5428,-0.0000,-0.2431,0.8039 +0.5428,-0.0000,-0.2431,0.8039 +0.5558,-0.0000,-0.2442,0.7947 +0.5558,-0.0000,-0.2442,0.7947 +0.5558,-0.0000,-0.2442,0.7947 +0.5558,-0.0000,-0.2442,0.7947 +0.5685,-0.0000,-0.2454,0.7852 +0.5685,-0.0000,-0.2454,0.7852 +0.5685,-0.0000,-0.2454,0.7852 +0.5685,-0.0000,-0.2454,0.7852 +0.5811,-0.0000,-0.2465,0.7756 +0.5811,-0.0000,-0.2465,0.7756 +0.5811,-0.0000,-0.2465,0.7756 +0.5811,-0.0000,-0.2465,0.7756 +0.5936,-0.0000,-0.2477,0.7657 +0.5936,-0.0000,-0.2477,0.7657 +0.5936,-0.0000,-0.2477,0.7657 +0.5936,-0.0000,-0.2477,0.7657 +0.6058,-0.0000,-0.2489,0.7557 +0.6058,-0.0000,-0.2489,0.7557 +0.6058,-0.0000,-0.2489,0.7557 +0.6058,-0.0000,-0.2489,0.7557 +0.6179,-0.0000,-0.2501,0.7455 +0.6179,-0.0000,-0.2501,0.7455 +0.6179,-0.0000,-0.2501,0.7455 +0.6179,-0.0000,-0.2501,0.7455 +0.6297,-0.0000,-0.2513,0.7351 +0.6297,-0.0000,-0.2513,0.7351 +0.6297,-0.0000,-0.2513,0.7351 +0.6297,-0.0000,-0.2513,0.7351 +0.6414,-0.0000,-0.2525,0.7245 +0.6414,-0.0000,-0.2525,0.7245 +0.6414,-0.0000,-0.2525,0.7245 +0.6414,-0.0000,-0.2525,0.7245 +0.6528,-0.0000,-0.2538,0.7137 +0.6528,-0.0000,-0.2538,0.7137 +0.6528,-0.0000,-0.2538,0.7137 +0.6528,-0.0000,-0.2538,0.7137 +0.6641,-0.0000,-0.2550,0.7028 +0.6641,-0.0000,-0.2550,0.7028 +0.6641,-0.0000,-0.2550,0.7028 +0.6641,-0.0000,-0.2550,0.7028 +0.6752,-0.0000,-0.2563,0.6917 +0.6752,-0.0000,-0.2563,0.6917 +0.6752,-0.0000,-0.2563,0.6917 +0.6752,-0.0000,-0.2563,0.6917 +0.6860,-0.0000,-0.2576,0.6804 +0.6860,-0.0000,-0.2576,0.6804 +0.6860,-0.0000,-0.2576,0.6804 +0.6860,-0.0000,-0.2576,0.6804 +0.6967,-0.0000,-0.2590,0.6690 +0.6967,-0.0000,-0.2590,0.6690 +0.6967,-0.0000,-0.2590,0.6690 +0.6967,-0.0000,-0.2590,0.6690 +0.7071,-0.0000,-0.2603,0.6575 +0.7071,-0.0000,-0.2603,0.6575 +0.7071,-0.0000,-0.2603,0.6575 +0.7071,-0.0000,-0.2603,0.6575 +0.7173,-0.0000,-0.2617,0.6457 +0.7173,-0.0000,-0.2617,0.6457 +0.7173,-0.0000,-0.2617,0.6457 +0.7173,-0.0000,-0.2617,0.6457 +0.7273,-0.0000,-0.2631,0.6339 +0.7273,-0.0000,-0.2631,0.6339 +0.7273,-0.0000,-0.2631,0.6339 +0.7273,-0.0000,-0.2631,0.6339 +0.7371,-0.0000,-0.2645,0.6219 +0.7371,-0.0000,-0.2645,0.6219 +0.7371,-0.0000,-0.2645,0.6219 +0.7371,-0.0000,-0.2645,0.6219 +0.7467,-0.0000,-0.2659,0.6097 +0.7467,-0.0000,-0.2659,0.6097 +0.7467,-0.0000,-0.2659,0.6097 +0.7467,-0.0000,-0.2659,0.6097 +0.7560,-0.0000,-0.2674,0.5974 +0.7560,-0.0000,-0.2674,0.5974 +0.7560,-0.0000,-0.2674,0.5974 +0.7560,-0.0000,-0.2674,0.5974 +0.7651,-0.0000,-0.2689,0.5851 +0.7651,-0.0000,-0.2689,0.5851 +0.7651,-0.0000,-0.2689,0.5851 +0.7651,-0.0000,-0.2689,0.5851 +0.7740,-0.0000,-0.2705,0.5725 +0.7740,-0.0000,-0.2705,0.5725 +0.7740,-0.0000,-0.2705,0.5725 +0.7740,-0.0000,-0.2705,0.5725 +0.7826,-0.0000,-0.2720,0.5599 +0.7826,-0.0000,-0.2720,0.5599 +0.7826,-0.0000,-0.2720,0.5599 +0.7826,-0.0000,-0.2720,0.5599 +0.7910,-0.0000,-0.2736,0.5472 +0.7910,-0.0000,-0.2736,0.5472 +0.7910,-0.0000,-0.2736,0.5472 +0.7910,-0.0000,-0.2736,0.5472 +0.7992,-0.0000,-0.2752,0.5343 +0.7992,-0.0000,-0.2752,0.5343 +0.7992,-0.0000,-0.2752,0.5343 +0.7992,-0.0000,-0.2752,0.5343 +0.8072,-0.0000,-0.2769,0.5214 +0.8072,-0.0000,-0.2769,0.5214 +0.8072,-0.0000,-0.2769,0.5214 +0.8072,-0.0000,-0.2769,0.5214 +0.8149,-0.0000,-0.2786,0.5083 +0.8149,-0.0000,-0.2786,0.5083 +0.8149,-0.0000,-0.2786,0.5083 +0.8149,-0.0000,-0.2786,0.5083 +0.8223,-0.0000,-0.2803,0.4952 +0.8223,-0.0000,-0.2803,0.4952 +0.8223,-0.0000,-0.2803,0.4952 +0.8223,-0.0000,-0.2803,0.4952 +0.8295,-0.0000,-0.2820,0.4820 +0.8295,-0.0000,-0.2820,0.4820 +0.8295,-0.0000,-0.2820,0.4820 +0.8295,-0.0000,-0.2820,0.4820 +0.8365,-0.0000,-0.2838,0.4687 +0.8365,-0.0000,-0.2838,0.4687 +0.8365,-0.0000,-0.2838,0.4687 +0.8365,-0.0000,-0.2838,0.4687 +0.8433,-0.0000,-0.2857,0.4553 +0.8433,-0.0000,-0.2857,0.4553 +0.8433,-0.0000,-0.2857,0.4553 +0.8433,-0.0000,-0.2857,0.4553 +0.8497,-0.0000,-0.2875,0.4419 +0.8497,-0.0000,-0.2875,0.4419 +0.8497,-0.0000,-0.2875,0.4419 +0.8497,-0.0000,-0.2875,0.4419 +0.8560,-0.0000,-0.2894,0.4284 +0.8560,-0.0000,-0.2894,0.4284 +0.8560,-0.0000,-0.2894,0.4284 +0.8560,-0.0000,-0.2894,0.4284 +0.8620,-0.0000,-0.2913,0.4148 +0.8620,-0.0000,-0.2913,0.4148 +0.8620,-0.0000,-0.2913,0.4148 +0.8620,-0.0000,-0.2913,0.4148 +0.8677,-0.0000,-0.2933,0.4012 +0.8677,-0.0000,-0.2933,0.4012 +0.8677,-0.0000,-0.2933,0.4012 +0.8677,-0.0000,-0.2933,0.4012 +0.8732,-0.0000,-0.2953,0.3876 +0.8732,-0.0000,-0.2953,0.3876 +0.8732,-0.0000,-0.2953,0.3876 +0.8732,-0.0000,-0.2953,0.3876 +0.8785,-0.0000,-0.2974,0.3739 +0.8785,-0.0000,-0.2974,0.3739 +0.8785,-0.0000,-0.2974,0.3739 +0.8785,-0.0000,-0.2974,0.3739 +0.8835,-0.0000,-0.2995,0.3602 +0.8835,-0.0000,-0.2995,0.3602 +0.8835,-0.0000,-0.2995,0.3602 +0.8835,-0.0000,-0.2995,0.3602 +0.8883,-0.0000,-0.3016,0.3465 +0.8883,-0.0000,-0.3016,0.3465 +0.8883,-0.0000,-0.3016,0.3465 +0.8883,-0.0000,-0.3016,0.3465 +0.8928,-0.0000,-0.3038,0.3327 +0.8928,-0.0000,-0.3038,0.3327 +0.8928,-0.0000,-0.3038,0.3327 +0.8928,-0.0000,-0.3038,0.3327 +0.8970,-0.0000,-0.3060,0.3189 +0.8970,-0.0000,-0.3060,0.3189 +0.8970,-0.0000,-0.3060,0.3189 +0.8970,-0.0000,-0.3060,0.3189 +0.9010,-0.0000,-0.3083,0.3051 +0.9010,-0.0000,-0.3083,0.3051 +0.9010,-0.0000,-0.3083,0.3051 +0.9010,-0.0000,-0.3083,0.3051 +0.9048,-0.0000,-0.3106,0.2913 +0.9048,-0.0000,-0.3106,0.2913 +0.9048,-0.0000,-0.3106,0.2913 +0.9048,-0.0000,-0.3106,0.2913 +0.9083,-0.0000,-0.3130,0.2776 +0.9083,-0.0000,-0.3130,0.2776 +0.9083,-0.0000,-0.3130,0.2776 +0.9083,-0.0000,-0.3130,0.2776 +0.9116,-0.0000,-0.3154,0.2638 +0.9116,-0.0000,-0.3154,0.2638 +0.9116,-0.0000,-0.3154,0.2638 +0.9116,-0.0000,-0.3154,0.2638 +0.9146,-0.0000,-0.3179,0.2500 +0.9146,-0.0000,-0.3179,0.2500 +0.9146,-0.0000,-0.3179,0.2500 +0.9146,-0.0000,-0.3179,0.2500 +0.9174,-0.0000,-0.3204,0.2363 +0.9174,-0.0000,-0.3204,0.2363 +0.9174,-0.0000,-0.3204,0.2363 +0.9174,-0.0000,-0.3204,0.2363 +0.9199,-0.0000,-0.3229,0.2226 +0.9199,-0.0000,-0.3229,0.2226 +0.9199,-0.0000,-0.3229,0.2226 +0.9199,-0.0000,-0.3229,0.2226 +0.9222,-0.0000,-0.3256,0.2089 +0.9222,-0.0000,-0.3256,0.2089 +0.9222,-0.0000,-0.3256,0.2089 +0.9222,-0.0000,-0.3256,0.2089 +0.9242,-0.0000,-0.3282,0.1952 +0.9242,-0.0000,-0.3282,0.1952 +0.9242,-0.0000,-0.3282,0.1952 +0.9242,-0.0000,-0.3282,0.1952 +0.9260,-0.0000,-0.3309,0.1817 +0.9260,-0.0000,-0.3309,0.1817 +0.9260,-0.0000,-0.3309,0.1817 +0.9260,-0.0000,-0.3309,0.1817 +0.9276,-0.0000,-0.3337,0.1681 +0.9276,-0.0000,-0.3337,0.1681 +0.9276,-0.0000,-0.3337,0.1681 +0.9276,-0.0000,-0.3337,0.1681 +0.9289,-0.0000,-0.3366,0.1546 +0.9289,-0.0000,-0.3366,0.1546 +0.9289,-0.0000,-0.3366,0.1546 +0.9289,-0.0000,-0.3366,0.1546 +0.9300,-0.0000,-0.3395,0.1412 +0.9300,-0.0000,-0.3395,0.1412 +0.9300,-0.0000,-0.3395,0.1412 +0.9300,-0.0000,-0.3395,0.1412 +0.9308,-0.0000,-0.3424,0.1279 +0.9308,-0.0000,-0.3424,0.1279 +0.9308,-0.0000,-0.3424,0.1279 +0.9308,-0.0000,-0.3424,0.1279 +0.9314,-0.0000,-0.3454,0.1146 +0.9314,-0.0000,-0.3454,0.1146 +0.9314,-0.0000,-0.3454,0.1146 +0.9314,-0.0000,-0.3454,0.1146 +0.9318,-0.0000,-0.3485,0.1015 +0.9318,-0.0000,-0.3485,0.1015 +0.9318,-0.0000,-0.3485,0.1015 +0.9318,-0.0000,-0.3485,0.1015 +0.9320,-0.0000,-0.3516,0.0884 +0.9320,-0.0000,-0.3516,0.0884 +0.9320,-0.0000,-0.3516,0.0884 +0.9320,-0.0000,-0.3516,0.0884 +0.9319,-0.0000,-0.3548,0.0754 +0.9319,-0.0000,-0.3548,0.0754 +0.9319,-0.0000,-0.3548,0.0754 +0.9319,-0.0000,-0.3548,0.0754 +0.9316,-0.0000,-0.3581,0.0625 +0.9316,-0.0000,-0.3581,0.0625 +0.9316,-0.0000,-0.3581,0.0625 +0.9316,-0.0000,-0.3581,0.0625 +0.9311,-0.0000,-0.3614,0.0498 +0.9311,-0.0000,-0.3614,0.0498 +0.9311,-0.0000,-0.3614,0.0498 +0.9311,-0.0000,-0.3614,0.0498 +0.9303,-0.0000,-0.3648,0.0371 +0.9303,-0.0000,-0.3648,0.0371 +0.9303,-0.0000,-0.3648,0.0371 +0.9303,-0.0000,-0.3648,0.0371 +0.9294,-0.0000,-0.3683,0.0246 +0.9294,-0.0000,-0.3683,0.0246 +0.9294,-0.0000,-0.3683,0.0246 +0.9294,-0.0000,-0.3683,0.0246 +0.9282,-0.0000,-0.3718,0.0122 +0.9282,-0.0000,-0.3718,0.0122 +0.9282,-0.0000,-0.3718,0.0122 +0.9282,-0.0000,-0.3718,0.0122 +0.9269,-0.0000,-0.3754,-0.0000 +0.9269,-0.0000,-0.3754,-0.0000 +0.9269,-0.0000,-0.3754,-0.0000 +0.9269,-0.0000,-0.3754,-0.0000 diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index d2a96f300a..a96fd08b33 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -96,6 +96,92 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt } ) +# This test compares rendering with: +# ref: head rotation trajectory file (OTR=NONE) +# cut: identical head rotation trajectory file as ref but in addition a constant +# reference vector in the looking direction of the coordinate system (OTR=REF_POS) +@pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) +def test_ambisonics_binaural_headrotation_refveczero(test_info, in_fmt, out_fmt, trj_file): + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + "name_extension": "refveczero", + "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv") + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), + "refvec_file": HR_TRAJECTORY_DIR.joinpath("const000-Vector3.csv") + } + ) + +# This test compares rendering with: +# ref: no head rotation (OTR=NONE) +# cut: rendering with head rotation and a ref vector which moves in the +# looking-direction of the head rotation and therefore compensates it (OTR=REF_POS) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) +def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt): + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + "name_extension": "refvecequal", + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), + "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-Vector3.csv") + } + ) + +# This test compares rendering with: +# ref: a head rotation trajectory with elevation (OTR=NONE) +# cut: a static head rotation and a reference position trajectory which moves +# in a way that produces the same acoustic output as the ref head rot trajectory (OTR=REF_POS) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) +def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + "name_extension": "refvec_rotating", + "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), + "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv") + } + ) + +# This test compares rendering with: +# ref: a reference position trajectory with elevation and REF_POS_LEV OTR mode (OTR=REF_POS_LEV) +# cut: a reference position trajectory without the elevation and REF_POS OTR mode (OTR=REF_POS) +# Since the only difference between REF_POS_LEV and REF_POS is that *LEV ignores +# the height difference in positions, the output must be binary equivalent. +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) +def test_ambisonics_binaural_headrotation_refveclev_vs_refvec(test_info, in_fmt, out_fmt): + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + "name_extension": "refveclevel", + "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), + "refveclev_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-Vector3.csv"), + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), + "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-4s-Vector3.csv") + } + ) + """ Multichannel """ diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 90a3353007..7a98dff300 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -107,6 +107,8 @@ def run_renderer( trj_file: Optional[str] = None, name_extension: Optional[str] = None, refrot_file: Optional[str] = None, + refvec_file: Optional[str] = None, + refveclev_file: Optional[str] = None, output_path_base: str = OUTPUT_PATH_CUT, binary_suffix: str = "", is_comparetest: Optional[bool] = False, @@ -122,6 +124,18 @@ def run_renderer( else: refrot_name = "" + if refvec_file is not None: + refvec_name = f"_{refvec_file.stem}" + else: + refvec_name = "" + + if refveclev_file is not None: + refveclev_name = f"_{refveclev_file.stem}" + else: + refveclev_name = "" + + + if not isinstance(out_fmt, str): out_name = f"{out_fmt.stem}" else: @@ -142,7 +156,7 @@ def run_renderer( in_file = FORMAT_TO_FILE[in_fmt] in_name = in_fmt - out_file = str(output_path_base.joinpath(f"{in_name}_to_{out_name}{trj_name}{refrot_name}{name_extension}.wav")) + out_file = str(output_path_base.joinpath(f"{in_name}_to_{out_name}{trj_name}{refrot_name}{refvec_name}{refveclev_name}{name_extension}.wav")) cmd = RENDERER_CMD[:] cmd[2] = str(in_file) @@ -162,6 +176,14 @@ def run_renderer( cmd.extend(["-rf", str(refrot_file)]) cmd.extend(["-otr", "ref"]) + if refvec_file is not None: + cmd.extend(["-rvf", str(refvec_file)]) + cmd.extend(["-otr", "ref_vec"]) + + if refveclev_file is not None: + cmd.extend(["-rvf", str(refveclev_file)]) + cmd.extend(["-otr", "ref_vec_lev"]) + run_cmd(cmd) return pyaudio3dtools.audiofile.readfile(out_file) -- GitLab From f12c7a5a87f78423730c060acac27dde9f6a32eb Mon Sep 17 00:00:00 2001 From: hsd Date: Thu, 23 Feb 2023 17:10:06 +0100 Subject: [PATCH 069/140] [remove] TD_REND_FIX_MSAN flag - issue has been resolved with recent merge from main --- lib_com/options.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index a5f2b4d2d5..b5fd112316 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -167,9 +167,6 @@ #define OTR_REFERENCE_VECTOR_TRACKING /* FhG: enables the reference position orientation tracking mode */ #endif #define TD_REND_FIX_DIV_BY_ZERO /* FhG: avoid division by zero in sincResample fn */ -#ifndef FIX_198_TDREND_INTERFACE -#define TD_REND_FIX_MSAN /* FhG: fixes uninitialized read in ivas_rend_TDObjRendOpen */ -#endif #define TD_TDREND_FIX_NULLPTR_ACCESS /* FhG: avoid nullptr access in ivas_rend_TDObjRendOpen */ /* ################## End DEVELOPMENT switches ######################### */ -- GitLab From f1c7a0e5c9cd054fcbd98ce801f08f1831900cc1 Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 24 Feb 2023 08:34:16 +0100 Subject: [PATCH 070/140] [cleanup] REF_POS* OTR modes have been renamed to REF_VEC and these comments were missed in the refactoring --- tests/renderer/test_renderer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index a96fd08b33..eec053a1aa 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -99,7 +99,7 @@ def test_ambisonics_binaural_headrotation_refrotequal(test_info, in_fmt, out_fmt # This test compares rendering with: # ref: head rotation trajectory file (OTR=NONE) # cut: identical head rotation trajectory file as ref but in addition a constant -# reference vector in the looking direction of the coordinate system (OTR=REF_POS) +# reference vector in the looking direction of the coordinate system (OTR=REF_VEC) @pytest.mark.parametrize("trj_file", HR_TRAJECTORIES_TO_TEST) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) @@ -121,7 +121,7 @@ def test_ambisonics_binaural_headrotation_refveczero(test_info, in_fmt, out_fmt, # This test compares rendering with: # ref: no head rotation (OTR=NONE) # cut: rendering with head rotation and a ref vector which moves in the -# looking-direction of the head rotation and therefore compensates it (OTR=REF_POS) +# looking-direction of the head rotation and therefore compensates it (OTR=REF_VEC) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt): @@ -141,7 +141,7 @@ def test_ambisonics_binaural_headrotation_refvecequal(test_info, in_fmt, out_fmt # This test compares rendering with: # ref: a head rotation trajectory with elevation (OTR=NONE) # cut: a static head rotation and a reference position trajectory which moves -# in a way that produces the same acoustic output as the ref head rot trajectory (OTR=REF_POS) +# in a way that produces the same acoustic output as the ref head rot trajectory (OTR=REF_VEC) @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): @@ -160,9 +160,9 @@ def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out ) # This test compares rendering with: -# ref: a reference position trajectory with elevation and REF_POS_LEV OTR mode (OTR=REF_POS_LEV) -# cut: a reference position trajectory without the elevation and REF_POS OTR mode (OTR=REF_POS) -# Since the only difference between REF_POS_LEV and REF_POS is that *LEV ignores +# ref: a reference position trajectory with elevation and REF_VEC_LEV OTR mode (OTR=REF_VEC_LEV) +# cut: a reference position trajectory without the elevation and REF_VEC OTR mode (OTR=REF_VEC) +# Since the only difference between REF_VEC_LEV and REF_VEC is that *LEV ignores # the height difference in positions, the output must be binary equivalent. @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) -- GitLab From d8efbebb168531b2404f73a593d6c8f84c93fc0b Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 24 Feb 2023 08:34:22 +0100 Subject: [PATCH 071/140] [add] multichannel reference vector test condition --- tests/renderer/test_renderer.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index eec053a1aa..fd228e0d21 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -221,6 +221,27 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file trj_file=HR_TRAJECTORY_DIR.joinpath(f"{trj_file}.csv"), ) +# This test compares rendering with: +# ref: a head rotation trajectory with elevation (OTR=NONE) +# cut: a static head rotation and a reference position trajectory which moves +# in a way that produces the same acoustic output as the ref head rot trajectory (OTR=REF_VEC) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) +def test_multichannel_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + "name_extension": "refvec_rotating", + "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), + "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv") + } + ) + """ ISM """ -- GitLab From 3e71a499b4121906f3b6bf5f8337aa399e99b4f5 Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 24 Feb 2023 08:34:30 +0100 Subject: [PATCH 072/140] [add] ism reference vector test condition --- tests/renderer/test_renderer.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index fd228e0d21..9c5143e808 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -290,6 +290,33 @@ def test_ism_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file): in_meta_files=in_meta_files, ) +# This test compares rendering with: +# ref: a head rotation trajectory with elevation (OTR=NONE) +# cut: a static head rotation and a reference position trajectory which moves +# in a way that produces the same acoustic output as the ref head rot trajectory (OTR=REF_VEC) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_ISM) +def test_ism_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): + try: + in_meta_files = FORMAT_TO_METADATA_FILES[in_fmt] + except: + in_meta_files = None + + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + "name_extension": "refvec_rotating", + "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s.csv"), + "in_meta_files": in_meta_files + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), + "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw-Vector3.csv"), + "in_meta_files": in_meta_files + } + ) """ MASA """ -- GitLab From aa86e88bfad51c29a95eda2d2648d83af08f18b6 Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 24 Feb 2023 09:02:47 +0100 Subject: [PATCH 073/140] [fix] exclude mono and stereo since they're not supported --- tests/renderer/test_renderer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 9c5143e808..2a09faa9f5 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -228,6 +228,9 @@ def test_multichannel_binaural_headrotation(test_info, in_fmt, out_fmt, trj_file @pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) @pytest.mark.parametrize("in_fmt", INPUT_FORMATS_MC) def test_multichannel_binaural_headrotation_refvec_rotating(test_info, in_fmt, out_fmt): + if in_fmt in ["MONO", "STEREO"]: + pytest.skip("MONO or STEREO to Binaural rendering unsupported") + compare_renderer_args( test_info, in_fmt, -- GitLab From 01a6505662528a8a34b105bb1d228bd9de1a0254 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Fri, 24 Feb 2023 09:12:32 +0100 Subject: [PATCH 074/140] pass down orientation tracking struct for TD Object Renderer again - missing after FIX_198_TDREND_INTERFACE --- lib_dec/ivas_objectRenderer_internal.c | 17 ++++++++++-- lib_rend/ivas_objectRenderer.c | 37 +++++++++++++++++++++++--- lib_rend/ivas_prot_rend.h | 4 +++ 3 files changed, 53 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index d2f08ffdd6..56986724f2 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -78,6 +78,19 @@ void ivas_td_binaural_renderer( st_ivas->hCrend, #endif st_ivas->transport_config, - st_ivas->hDecoderConfig->output_Fs, st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, - st_ivas->hIsmMetaData, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Quaternions : NULL, output, output_frame ); + st_ivas->hDecoderConfig->output_Fs, + st_ivas->hBinRendererTd, + st_ivas->nchan_transport, + LFE_CHANNEL, + st_ivas->ivas_format, + st_ivas->hIsmMetaData, + st_ivas->hDecoderConfig->Opt_Headrotation, + ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Quaternions : NULL, + output, + output_frame +#ifdef FIX_I109_ORIENTATION_TRACKING + , + st_ivas->hHeadTrackData->OrientationTracker +#endif + ); } diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index ce5dfe1ffa..7fcae1c0cc 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -240,6 +240,10 @@ void ivas_td_binaural_renderer_unwrap( const IVAS_QUATERNION *Quaternions, /* i : Head tracking data per subframe */ float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ +#ifdef FIX_I109_ORIENTATION_TRACKING + , + ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ +#endif ) { int16_t subframe_length; @@ -274,7 +278,18 @@ void ivas_td_binaural_renderer_unwrap( for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { /* Update the listener's location/orientation */ +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( pOTR != NULL ) + { + if ( ivas_orient_trk_Process( pOTR, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) + { + exit( -1 ); + } + } + TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( pOTR != NULL ) ? &trackedHeadOrientation : NULL ); +#else TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL ); +#endif if ( ( hRenderConfig != NULL ) && ( hRenderConfig->roomAcoustics.late_reverb_on ) ) { @@ -632,9 +647,25 @@ ivas_error ivas_td_binaural_renderer_ext( #endif output_Fs = output_frame * 50; - ivas_td_binaural_renderer_unwrap( NULL, 1, NULL, transport_config, output_Fs, pTDRend->hBinRendererTd, num_src, lfe_idx, - ivas_format, hIsmMetaData, headRotData->headRotEnabled, ( headRotData != NULL ) ? headRotData->headPositions : NULL, - output, output_frame ); + ivas_td_binaural_renderer_unwrap( NULL, + 1, + NULL, + transport_config, + output_Fs, + pTDRend->hBinRendererTd, + num_src, + lfe_idx, + ivas_format, + hIsmMetaData, + headRotData->headRotEnabled, + ( headRotData != NULL ) ? headRotData->headPositions : NULL, + output, + output_frame +#ifdef FIX_I109_ORIENTATION_TRACKING + , + headRotData->hOrientationTracker +#endif + ); pop_wmops(); diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index a05b0d470b..4712ccbf67 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -234,6 +234,10 @@ void ivas_td_binaural_renderer_unwrap( const IVAS_QUATERNION *Quaternions, /* i : Head tracking data per subframe */ float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ +#ifdef FIX_I109_ORIENTATION_TRACKING + , + ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ +#endif ); ivas_error ivas_td_binaural_renderer_ext( -- GitLab From b99cfc179ac67ce242ed142bbdb51b61e0502118 Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 24 Feb 2023 11:43:00 +0100 Subject: [PATCH 075/140] [mod] disabled self_test configs which test the new OTR tracking modes since these do not yet exist on main --- scripts/config/self_test.prm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 879cbd16f7..2fea55188f 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -474,12 +474,12 @@ //../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrAvg.tst // SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, reference vector tracking -../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit -../IVAS_dec -t trajectories/full-circle-4s.csv -rvf trajectories/full-circle-4s-Vector3.csv -otr ref_vec BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrRefPos.tst +//../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit +//../IVAS_dec -t trajectories/full-circle-4s.csv -rvf trajectories/full-circle-4s-Vector3.csv -otr ref_vec BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrRefPos.tst // SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, reference vector tracking in level mode -../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit -../IVAS_dec -t trajectories/full-circle-with-up-and-down-4s.csv -rvf trajectories/full-circle-with-up-and-down-4s-Vector3.csv -otr ref_vec_lev BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrRefPosLev.tst +//../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit +//../IVAS_dec -t trajectories/full-circle-with-up-and-down-4s.csv -rvf trajectories/full-circle-with-up-and-down-4s-Vector3.csv -otr ref_vec_lev BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrRefPosLev.tst // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c.pcm bit -- GitLab From 0abd16f8b34d6491413eb882f07d7575c22e012e Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 24 Feb 2023 11:44:35 +0100 Subject: [PATCH 076/140] [maintenance] clang-format --- lib_rend/ivas_rotation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 347e7331f8..6d78a07453 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -67,7 +67,7 @@ ivas_error ivas_headTrack_open( ( *hHeadTrackData )->lrSwitchedCurrent = 0; ( *hHeadTrackData )->lrSwitchedNext = 0; #ifdef FIX_I109_ORIENTATION_TRACKING - + if ( ( ( *hHeadTrackData )->OrientationTracker = (ivas_orient_trk_state_t *) malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking" ); -- GitLab From 8631ede83d3154fb84dc92422446681ec59b8b8e Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 24 Feb 2023 12:12:46 +0100 Subject: [PATCH 077/140] [fix] nullptr access in case st_ivas->hHeadTrackData is NULL --- lib_dec/ivas_objectRenderer_internal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 56986724f2..f881afc668 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -71,6 +71,11 @@ void ivas_td_binaural_renderer( const int16_t output_frame /* i : output frame length */ ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_state_t *pOtr = NULL; + if(st_ivas->hHeadTrackData != NULL) + pOtr = st_ivas->hHeadTrackData->OrientationTracker; +#endif ivas_td_binaural_renderer_unwrap( st_ivas->hRenderConfig, st_ivas->ini_frame, #ifdef FIX_197_CREND_INTERFACE st_ivas->hCrendWrapper, @@ -90,7 +95,7 @@ void ivas_td_binaural_renderer( output_frame #ifdef FIX_I109_ORIENTATION_TRACKING , - st_ivas->hHeadTrackData->OrientationTracker + pOtr #endif ); } -- GitLab From 2bf733f4db7e997293847bd664ada66fb7f2876c Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 24 Feb 2023 13:22:36 +0100 Subject: [PATCH 078/140] [maintenance] clang-format --- lib_dec/ivas_objectRenderer_internal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index f881afc668..7f11f8e3b5 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -72,9 +72,9 @@ void ivas_td_binaural_renderer( ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_state_t *pOtr = NULL; - if(st_ivas->hHeadTrackData != NULL) - pOtr = st_ivas->hHeadTrackData->OrientationTracker; + ivas_orient_trk_state_t *pOtr = NULL; + if ( st_ivas->hHeadTrackData != NULL ) + pOtr = st_ivas->hHeadTrackData->OrientationTracker; #endif ivas_td_binaural_renderer_unwrap( st_ivas->hRenderConfig, st_ivas->ini_frame, #ifdef FIX_197_CREND_INTERFACE -- GitLab From fcbc1c12f210597a2d606aca5452be9cf1528360 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Sat, 25 Feb 2023 01:23:12 +0100 Subject: [PATCH 079/140] Repair compilation without #FIX_I109 --- apps/renderer.c | 36 ++++++++++++++++++++++++++++++------ lib_rend/ivas_hrtf.c | 36 ------------------------------------ lib_rend/ivas_stat_rend.h | 30 ------------------------------ 3 files changed, 30 insertions(+), 72 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index b2047f4a12..7b039a122c 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -901,16 +901,28 @@ int main( #ifdef FIX_I109_ORIENTATION_TRACKING for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ ) { - HeadRotationFileReading( headRotReader, &quatBuffer[i] ); + if ( HeadRotationFileReading( headRotReader, &quatBuffer[i] ) != IVAS_ERR_OK ) + { + fprintf(stderr, "Error in Head Rotation File Reading.\r\n"); + exit(-1); + } } #else HeadRotationFileReading( headRotReader, quatBuffer, frame ); #endif - IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ); + if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK ) + { + fprintf(stderr, "Error setting Head Rotation.\r\n"); + exit(-1); + } } else { - IVAS_REND_SetHeadRotation( hIvasRend, NULL ); + if ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) + { + fprintf(stderr, "Error setting Head Rotation.\r\n"); + exit(-1); + } } #ifdef FIX_I109_ORIENTATION_TRACKING @@ -918,8 +930,16 @@ int main( if ( referenceRotReader != NULL ) { IVAS_QUATERNION quaternion; - HeadRotationFileReading( referenceRotReader, &quaternion ); - IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ); + if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) + { + fprintf(stderr, "Error in Head Rotation File Reading.\r\n"); + exit(-1); + } + if ( IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) != IVAS_ERR_OK ) + { + fprintf(stderr, "Error setting Reference Rotation.\r\n"); + exit(-1); + } } #endif @@ -1000,7 +1020,11 @@ int main( } } - IVAS_REND_GetSamples( hIvasRend, outBuffer ); + if ( IVAS_REND_GetSamples( hIvasRend, outBuffer ) != IVAS_ERR_OK ) + { + fprintf(stderr, "Error in getting samples\n"); + exit( -1 ); + } int16_t num_out_channels; num_out_channels = outBuffer.config.numChannels; diff --git a/lib_rend/ivas_hrtf.c b/lib_rend/ivas_hrtf.c index 597270c458..d1ffa14d96 100644 --- a/lib_rend/ivas_hrtf.c +++ b/lib_rend/ivas_hrtf.c @@ -203,39 +203,3 @@ void ivas_HRTF_parambin_binary_close( return; } - -#ifndef FIX_I109_ORIENTATION_TRACKING -/*-----------------------------------------------------------------------* - * ivas_headTrack_open() - * - * Allocate and initialize Head-Tracking handle - *-----------------------------------------------------------------------*/ - -ivas_error ivas_headTrack_open( - HEAD_TRACK_DATA_HANDLE *hHeadTrackData /* o : head track handle */ -) -{ - int16_t i; - - /* Allocate Head-Tracking handle */ - if ( ( *hHeadTrackData = (HEAD_TRACK_DATA_HANDLE) malloc( sizeof( HEAD_TRACK_DATA ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for head-tracking memory\n" ) ); - } - - /* Initialization */ - ( *hHeadTrackData )->num_quaternions = 0; - ( *hHeadTrackData )->lrSwitchInterpVal = 0.0f; - ( *hHeadTrackData )->lrSwitchedCurrent = 0; - ( *hHeadTrackData )->lrSwitchedNext = 0; - - /* Initialise Rmat_prev to I, Rmat will be computed later */ - for ( i = 0; i < 3; i++ ) - { - set_zero( ( *hHeadTrackData )->Rmat_prev[i], 3 ); - ( *hHeadTrackData )->Rmat_prev[i][i] = 1.0f; - } - - return IVAS_ERR_OK; -} -#endif diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 9b6285dd66..5f9c89ef7e 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -410,36 +410,6 @@ typedef struct ivas_reverb_state_t } REVERB_DATA, *REVERB_HANDLE; -#ifndef FIX_I109_ORIENTATION_TRACKING - -typedef struct ivas_orient_trk_state_t -{ - OTR_TRACKING_T trackingType; - float centerAdaptationRate; - float offCenterAdaptationRate; - float adaptationAngle; - - float alpha; - - float absYaw; /* absolute orientation */ - float absPitch; - float absRoll; - - float absAvgYaw; /* average absolute orientation */ - float absAvgPitch; - float absAvgRoll; - - float refYaw; /* reference orientation */ - float refPitch; - float refRoll; - - float trkYaw; /* tracked orientation */ - float trkPitch; - float trkRoll; - -} ivas_orient_trk_state_t; -#endif - /*----------------------------------------------------------------------------------* * TD ISm Object Renderer structure -- GitLab From cd112bf41b0b5b3aac3088d0a7290032e931e684 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Sat, 25 Feb 2023 02:16:31 +0100 Subject: [PATCH 080/140] fixed renderer errors, BUT error handling needs implementation re-enabled --- apps/renderer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 7b039a122c..3d585eb470 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -654,6 +654,7 @@ int main( /* === Configure === */ if ( ( error = IVAS_REND_InitConfig( hIvasRend, strlen( args.renderConfigFilePath ) != 0 ) ) != IVAS_ERR_OK ) { + fprintf( stderr, "Error in Renderer Config Init\n" ); exit( -1 ); } @@ -861,7 +862,7 @@ int main( if ( !args.quietModeEnabled ) { - fprintf( stdout, "\n------ Running the renderer ------\n\n" ); + fprintf( stdout, "\n------ Running the rondoror ------\n\n" ); fprintf( stdout, "Frames processed: " ); } else @@ -913,7 +914,7 @@ int main( if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK ) { fprintf(stderr, "Error setting Head Rotation.\r\n"); - exit(-1); + //exit(-1); } } else @@ -921,7 +922,7 @@ int main( if ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) { fprintf(stderr, "Error setting Head Rotation.\r\n"); - exit(-1); + //exit(-1); } } -- GitLab From c49a73996247179b98ba3aadcf70708c755a8450 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Sat, 25 Feb 2023 03:05:35 +0100 Subject: [PATCH 081/140] enabled head rotation error checking except for the NULL case --- apps/renderer.c | 10 +++++----- lib_rend/lib_rend.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 3d585eb470..5c72bd3346 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -913,16 +913,16 @@ int main( #endif if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK ) { - fprintf(stderr, "Error setting Head Rotation.\r\n"); - //exit(-1); + fprintf( stderr, "Error setting Head Rotation\n" ); + exit(-1); } } else { - if ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) + if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT) ) { - fprintf(stderr, "Error setting Head Rotation.\r\n"); - //exit(-1); + fprintf( stderr, "Error setting Head Rotation\n" ); + exit(-1); } } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 86b1c313ab..7c784c545a 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3912,7 +3912,7 @@ ivas_error IVAS_REND_SetHeadRotation( if ( getAudioConfigType( hIvasRend->outputConfig ) != IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL ) { /* Head rotation can be set only with binaural output */ - return IVAS_ERR_METADATA_NOT_EXPECTED; + return IVAS_ERR_INVALID_OUTPUT_FORMAT; } if ( headRot == NULL ) -- GitLab From 9717c5bf05076ed4d2f863e98d4234a505d75e07 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Sat, 25 Feb 2023 03:55:18 +0100 Subject: [PATCH 082/140] appease CLANG --- apps/renderer.c | 20 ++++++++++---------- lib_dec/ivas_objectRenderer_internal.c | 6 +++--- lib_rend/ivas_hrtf.c | 1 - lib_rend/ivas_rotation.c | 1 - 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 5c72bd3346..fbe6d9987b 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -904,8 +904,8 @@ int main( { if ( HeadRotationFileReading( headRotReader, &quatBuffer[i] ) != IVAS_ERR_OK ) { - fprintf(stderr, "Error in Head Rotation File Reading.\r\n"); - exit(-1); + fprintf( stderr, "Error in Head Rotation File Reading.\r\n" ); + exit( -1 ); } } #else @@ -914,15 +914,15 @@ int main( if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK ) { fprintf( stderr, "Error setting Head Rotation\n" ); - exit(-1); + exit( -1 ); } } else { - if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT) ) + if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) { fprintf( stderr, "Error setting Head Rotation\n" ); - exit(-1); + exit( -1 ); } } @@ -933,13 +933,13 @@ int main( IVAS_QUATERNION quaternion; if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) { - fprintf(stderr, "Error in Head Rotation File Reading.\r\n"); - exit(-1); + fprintf( stderr, "Error in Head Rotation File Reading.\r\n" ); + exit( -1 ); } if ( IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) != IVAS_ERR_OK ) { - fprintf(stderr, "Error setting Reference Rotation.\r\n"); - exit(-1); + fprintf( stderr, "Error setting Reference Rotation.\r\n" ); + exit( -1 ); } } #endif @@ -1023,7 +1023,7 @@ int main( if ( IVAS_REND_GetSamples( hIvasRend, outBuffer ) != IVAS_ERR_OK ) { - fprintf(stderr, "Error in getting samples\n"); + fprintf( stderr, "Error in getting samples\n" ); exit( -1 ); } diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index f881afc668..b39be1c69c 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -72,9 +72,9 @@ void ivas_td_binaural_renderer( ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_state_t *pOtr = NULL; - if(st_ivas->hHeadTrackData != NULL) - pOtr = st_ivas->hHeadTrackData->OrientationTracker; + ivas_orient_trk_state_t *pOtr = NULL; + if(st_ivas->hHeadTrackData != NULL) + pOtr = st_ivas->hHeadTrackData->OrientationTracker; #endif ivas_td_binaural_renderer_unwrap( st_ivas->hRenderConfig, st_ivas->ini_frame, #ifdef FIX_197_CREND_INTERFACE diff --git a/lib_rend/ivas_hrtf.c b/lib_rend/ivas_hrtf.c index d1ffa14d96..e411d3bbbf 100644 --- a/lib_rend/ivas_hrtf.c +++ b/lib_rend/ivas_hrtf.c @@ -202,4 +202,3 @@ void ivas_HRTF_parambin_binary_close( return; } - diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 347e7331f8..90354497a0 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -67,7 +67,6 @@ ivas_error ivas_headTrack_open( ( *hHeadTrackData )->lrSwitchedCurrent = 0; ( *hHeadTrackData )->lrSwitchedNext = 0; #ifdef FIX_I109_ORIENTATION_TRACKING - if ( ( ( *hHeadTrackData )->OrientationTracker = (ivas_orient_trk_state_t *) malloc( sizeof( ivas_orient_trk_state_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Orientation tracking" ); -- GitLab From 5855167bc142559b267fd16780bae859edd4bb93 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Sat, 25 Feb 2023 04:04:54 +0100 Subject: [PATCH 083/140] encore --- lib_dec/ivas_objectRenderer_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index b39be1c69c..79dd9901ea 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -73,7 +73,7 @@ void ivas_td_binaural_renderer( { #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_state_t *pOtr = NULL; - if(st_ivas->hHeadTrackData != NULL) + if( st_ivas->hHeadTrackData != NULL ) pOtr = st_ivas->hHeadTrackData->OrientationTracker; #endif ivas_td_binaural_renderer_unwrap( st_ivas->hRenderConfig, st_ivas->ini_frame, -- GitLab From 72b457e524365fa926ea03b45c6f31ebc7d852f8 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Sat, 25 Feb 2023 04:10:25 +0100 Subject: [PATCH 084/140] encore 2 --- lib_dec/ivas_objectRenderer_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 79dd9901ea..7f11f8e3b5 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -73,7 +73,7 @@ void ivas_td_binaural_renderer( { #ifdef FIX_I109_ORIENTATION_TRACKING ivas_orient_trk_state_t *pOtr = NULL; - if( st_ivas->hHeadTrackData != NULL ) + if ( st_ivas->hHeadTrackData != NULL ) pOtr = st_ivas->hHeadTrackData->OrientationTracker; #endif ivas_td_binaural_renderer_unwrap( st_ivas->hRenderConfig, st_ivas->ini_frame, -- GitLab From 687170eb3f1ab0800ac1279e2b082f2460e5f5f3 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Tue, 28 Feb 2023 15:28:25 +0100 Subject: [PATCH 085/140] commenting out future tests wasn't good enough --- scripts/config/self_test.prm | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 4b51a91cfb..93a0acce18 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -378,10 +378,6 @@ ../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.wav bit ../IVAS_dec -t testv/headrot_case03_3000_q.csv BINAURAL 48 bit testv/stv4ISM48s.wav_256000_48-48_TDHR.tst -// 4 ISm with metadata at 256 kbps, 48 kHz in, 48 kHz out, TD BINAURAL out, head rotation, Orientation tracking -//../IVAS_cod -ism 4 testv/stvISM1.csv testv/stvISM2.csv testv/stvISM3.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.pcm bit -//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 48 bit testv/stv4ISM48s.pcm_256000_48-48_TDHR_OtrAvg.tst - // 1 ISm with metadata bitrate switching from 13.2 kbps to 128 kbps, 32 kHz in, 32 kHz out, mono out, DTX on ../IVAS_cod -dtx -ism 1 testv/stvISM1.csv ../scripts/switchPaths/sw_13k2_to_128k_10fr.bin 32 testv/stv32c.wav bit ../IVAS_dec MONO 32 bit testv/stv32c.wav_brate_sw_32-32_mono_dtx.tst @@ -428,10 +424,6 @@ ../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.wav bit ../IVAS_dec -t testv/headrot.csv BINAURAL 32 bit testv/stv3OA32c.wav_SBA_24400_32-32_Binaural_Headrot.tst -// SBA at 24.4 kbps, 32kHz in, 32kHz out, BINAURAL out, Headrotation, Orientation tracking -//../IVAS_cod -sba 3 24400 32 testv/stv3OA32c.pcm bit -//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL 32 bit testv/stv3OA32c.pcm_SBA_24400_32-32_Binaural_Headrot_OtrAvg.tst - // SBA at 24.4 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 24400 32 testv/stv3OA32c.wav bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.wav_SBA_24400_32-32_DTX_Binaural_FEC5.tst @@ -476,10 +468,6 @@ ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.wav bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.wav_SBA_48000_32-32_BinauralRoom_Headrot.tst -// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -//../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit -//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrAvg.tst - // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c.wav bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.wav_SBA_48000_32-32_DTX_Binaural_FEC5.tst @@ -536,10 +524,6 @@ ../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.wav bit ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.wav_SBA_128000_32-32_Binaural_room_Headrot.tst -// SBA at 128 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -//../IVAS_cod -sba 3 128000 32 testv/stv3OA32c.pcm bit -//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_128000_32-32_Binaural_room_Headrot_OtrAvg.tst - // SBA at 192 kbps, 48kHz in, 48kHz out, HOA2 out, random FEC at 5% ../IVAS_cod -sba 3 192000 48 testv/stv3OA48c.wav bit ../IVAS_dec -fec 5 HOA2 48 bit testv/stv3OA48c.wav_SBA_192000_48-48_HOA2_FEC5.tst @@ -674,10 +658,6 @@ ../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 32000 48 testv/stv1MASA2TC48c.wav bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 48 bit testv/stv1MASA2TC48c.wav_32000_48-48_BinauralRoom_Headrot.tst -// MASA 1dir 2TC at 32 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, Headrotation, Orientation tracking -//../IVAS_cod -masa 2 testv/stv_IVASMASA_1dir2TC.met 32000 48 testv/stv_IVASMASA_1dir2TC.pcm bit -//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv_IVASMASA_1dir2TC.pcm_32000_48-48_BinauralRoom_Headrot_OtrAvg.tst - // MASA 1dir 2TC at 48 kbps, 48kHz in, 48kHz out, 7_1_4 out, random FEC at 5% ../IVAS_cod -masa 2 testv/stv1MASA2TC48c.met 48000 48 testv/stv1MASA2TC48c.wav bit ../IVAS_dec -fec 5 7_1_4 48 bit testv/stv1MASA2TC48c.wav_48000_48-48_7_1_4_FEC5.tst @@ -816,10 +796,6 @@ ../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.wav bit ../IVAS_dec -t testv/headrot_case00_3000_q.csv BINAURAL_ROOM 48 bit testv/stv51MC48c.wav_MC51_256000_48-48_BinauralRoom_Headrot.tst -// Multi-channel 5_1 at 256 kbps, 48kHz in, 48kHz out, BINAURAL ROOM out, head rotation, Orientation tracking -//../IVAS_cod -mc 5_1 256000 48 testv/stv51MC48c.pcm bit -//../IVAS_dec -t testv/headrot.csv -otr avg BINAURAL_ROOM 48 bit testv/stv51MC48c.pcm_MC51_256000_48-48_BinauralRoom_Headrot_OtrAvg.tst - // Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.wav bit ../IVAS_dec 5_1 48 bit testv/stv51MC48c.wav_MC51_384000_48-48_5_1.tst -- GitLab From 1278eea70e281d61f99f4b4820a579b2fb6e1ba6 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 1 Mar 2023 12:09:27 +0100 Subject: [PATCH 086/140] Orientation tracking refactoring --- lib_dec/ivas_binRenderer_internal.c | 12 ----- lib_dec/ivas_dirac_dec.c | 11 ----- lib_dec/ivas_ism_renderer.c | 12 ----- lib_dec/ivas_objectRenderer_internal.c | 4 -- lib_dec/lib_dec.c | 4 ++ lib_rend/ivas_dirac_dec_binaural_functions.c | 8 ---- lib_rend/ivas_objectRenderer.c | 22 --------- lib_rend/ivas_orient_trk.c | 20 ++++----- lib_rend/ivas_prot_rend.h | 6 +-- lib_rend/ivas_rotation.c | 33 -------------- lib_rend/lib_rend.c | 47 +++----------------- 11 files changed, 20 insertions(+), 159 deletions(-) diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index d61b488e1b..9c7e07734e 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -989,9 +989,6 @@ void ivas_binRenderer( { int16_t chIdx, k; int16_t numTimeSlots = MAX_PARAM_SPATIAL_SUBFRAMES; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif push_wmops( "fastconv_binaural_rendering" ); @@ -1014,16 +1011,7 @@ void ivas_binRenderer( /* Rotation in SHD (HOA3) */ if ( hHeadTrackData->shd_rot_max_order == -1 ) { -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, - &hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], - FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, - &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); -#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); -#endif - rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hHeadTrackData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, 3 ); } else if ( hHeadTrackData->shd_rot_max_order > 0 ) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 3aa3edb0d1..f46815a4b6 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1810,9 +1810,6 @@ void ivas_dirac_dec( float *reference_power, *reference_power_smooth; float *onset_filter, *onset_filter_subframe, *p_onset_filter = NULL; uint16_t coherence_flag; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif push_wmops( "ivas_dirac_dec" ); @@ -1879,15 +1876,7 @@ void ivas_dirac_dec( if ( st_ivas->hHeadTrackData ) { -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, - &st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], - (float) ( FRAMES_PER_SEC * ( sf2 - sf1 ) ), - &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, st_ivas->hHeadTrackData->Rmat ); -#else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); -#endif p_Rmat = &st_ivas->hHeadTrackData->Rmat[0][0]; diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 3e2c027eca..a965a0ffed 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -110,9 +110,6 @@ void ivas_ism_render( int16_t num_objects, nchan_out_woLFE, lfe_index; int16_t azimuth, elevation; float Rmat[3][3]; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif num_objects = st_ivas->nchan_transport; nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; @@ -136,17 +133,8 @@ void ivas_ism_render( if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, - &st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], - FRAMES_PER_SEC, - &trackedHeadOrientation ); - /* Calculate rotation matrix from the quaternion */ - QuatToRotMat( trackedHeadOrientation, Rmat ); -#else /* Calculate rotation matrix from the quaternion */ QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], Rmat ); -#endif } for ( i = 0; i < num_objects; i++ ) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 7f11f8e3b5..b9fade9290 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -93,9 +93,5 @@ void ivas_td_binaural_renderer( ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Quaternions : NULL, output, output_frame -#ifdef FIX_I109_ORIENTATION_TRACKING - , - pOtr -#endif ); } diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index b9db571d2b..cd19fe9d52 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -911,10 +911,14 @@ ivas_error IVAS_DEC_FeedHeadTrackData( /* Move head-tracking data to the decoder handle */ for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation[i], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, hHeadTrackData->Quaternions ); +#else hHeadTrackData->Quaternions[i].w = orientation[i].w; hHeadTrackData->Quaternions[i].x = orientation[i].x; hHeadTrackData->Quaternions[i].y = orientation[i].y; hHeadTrackData->Quaternions[i].z = orientation[i].z; +#endif } hIvasDec->st_ivas->hHeadTrackData->num_quaternions = 0; diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index bc8e3351f0..020dd27cfa 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -426,9 +426,6 @@ static void ivas_dirac_dec_binaural_internal( uint8_t firstSlot, slotEnd; int16_t max_band_decorr; DIFFUSE_DISTRIBUTION_DATA diffuseDistData; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif firstSlot = firstSubframe * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); slotEnd = ( firstSubframe + nSubframes ) * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); @@ -561,12 +558,7 @@ static void ivas_dirac_dec_binaural_internal( if ( st_ivas->hHeadTrackData && st_ivas->hHeadTrackData->num_quaternions >= 0 ) { -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( st_ivas->hHeadTrackData->OrientationTracker, &st_ivas->hHeadTrackData->Quaternions[firstSubframe], FRAMES_PER_SEC, &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, Rmat ); -#else QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[firstSubframe], Rmat ); -#endif if ( nchan_transport == 2 ) { diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 7fcae1c0cc..b0f5295ded 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -240,18 +240,11 @@ void ivas_td_binaural_renderer_unwrap( const IVAS_QUATERNION *Quaternions, /* i : Head tracking data per subframe */ float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ -#ifdef FIX_I109_ORIENTATION_TRACKING - , - ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ -#endif ) { int16_t subframe_length; int16_t subframe_idx; float reverb_signal[BINAURAL_CHANNELS][L_FRAME48k]; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; if ( hRenderConfig != NULL ) @@ -278,18 +271,7 @@ void ivas_td_binaural_renderer_unwrap( for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { /* Update the listener's location/orientation */ -#ifdef FIX_I109_ORIENTATION_TRACKING - if ( pOTR != NULL ) - { - if ( ivas_orient_trk_Process( pOTR, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &trackedHeadOrientation ) != IVAS_ERR_OK ) - { - exit( -1 ); - } - } - TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( pOTR != NULL ) ? &trackedHeadOrientation : NULL ); -#else TDREND_Update_listener_orientation( hBinRendererTd, Opt_Headrotation, ( Quaternions != NULL ) ? &Quaternions[subframe_idx] : NULL ); -#endif if ( ( hRenderConfig != NULL ) && ( hRenderConfig->roomAcoustics.late_reverb_on ) ) { @@ -661,10 +643,6 @@ ivas_error ivas_td_binaural_renderer_ext( ( headRotData != NULL ) ? headRotData->headPositions : NULL, output, output_frame -#ifdef FIX_I109_ORIENTATION_TRACKING - , - headRotData->hOrientationTracker -#endif ); pop_wmops(); diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 70a14b1797..9a8aba83f7 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -444,10 +444,10 @@ ivas_error ivas_orient_trk_SetAbsoluteOrientation( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( - ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ - const IVAS_QUATERNION *pAbsRot, /* i : absolute head rotation */ - float updateRate, /* i : rotation update rate [Hz] */ - IVAS_QUATERNION *pTrkRot ) /* o : tracked rotation */ + 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 */ { float normalizedOrientation; float relativeOrientationRate; @@ -467,34 +467,34 @@ ivas_error ivas_orient_trk_Process( switch ( pOTR->trackingType ) { case OTR_TRACKING_NONE: - *pTrkRot = *pAbsRot; + *pTrkRot = absRot; break; case OTR_TRACKING_REF_ORIENT: /* Reset average orientation */ - pOTR->absAvgRot = *pAbsRot; + pOTR->absAvgRot = absRot; /* Reset adaptation filter - start adaptation at center rate */ pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ QuaternionInverse( pOTR->refRot, pTrkRot ); - QuaternionProduct( *pTrkRot, *pAbsRot, pTrkRot ); + QuaternionProduct( *pTrkRot, absRot, pTrkRot ); break; case OTR_TRACKING_AVG_ORIENT: /* Compute average (low-pass filtered) absolute orientation */ - QuaternionSlerp( pOTR->absAvgRot, *pAbsRot, alpha, &pOTR->absAvgRot ); + QuaternionSlerp( pOTR->absAvgRot, absRot, alpha, &pOTR->absAvgRot ); /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ QuaternionInverse( pOTR->absAvgRot, pTrkRot ); - QuaternionProduct( *pTrkRot, *pAbsRot, pTrkRot ); + QuaternionProduct( *pTrkRot, absRot, pTrkRot ); /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = QuaternionAngle( *pAbsRot, *pTrkRot ); + ang = QuaternionAngle( absRot, *pTrkRot ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 4712ccbf67..88da5dd674 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -234,10 +234,6 @@ void ivas_td_binaural_renderer_unwrap( const IVAS_QUATERNION *Quaternions, /* i : Head tracking data per subframe */ float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ -#ifdef FIX_I109_ORIENTATION_TRACKING - , - ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ -#endif ); ivas_error ivas_td_binaural_renderer_ext( @@ -913,7 +909,7 @@ ivas_error ivas_orient_trk_GetTrackedRotation( #ifdef FIX_I109_ORIENTATION_TRACKING ivas_error ivas_orient_trk_Process( ivas_orient_trk_state_t *pOTR, /* i/o : orientation tracker handle */ - const IVAS_QUATERNION *pAbsRot, /* i : absolute head rotation */ + IVAS_QUATERNION absRot, /* i : absolute head rotation */ float updateRate, /* i : rotation update rate [Hz] */ IVAS_QUATERNION *pTrkRot /* o : tracked rotation */ ); diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 90354497a0..71133994d5 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -283,9 +283,6 @@ void rotateFrame_shd( float SHrotmat_prev[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM]; float SHrotmat[HEADROT_SHMAT_DIM][HEADROT_SHMAT_DIM]; float cross_fade[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif shd_rot_max_order = hTransSetup.ambisonics_order; @@ -303,15 +300,7 @@ void rotateFrame_shd( } /* get next quaternion */ -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, - &hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], - FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, - &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); -#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); -#endif /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( SHrotmat_prev, hHeadTrackData->Rmat_prev, shd_rot_max_order ); @@ -400,9 +389,6 @@ void rotateFrame_sd( float gains_prev[MAX_CICP_CHANNELS][MAX_CICP_CHANNELS]; float output_tmp[MAX_CICP_CHANNELS][L_FRAME48k]; float cross_fade[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif push_wmops( "rotateFrame_sd" ); @@ -416,15 +402,7 @@ void rotateFrame_sd( } /* Get next quaternion and calculate rotation matrix */ -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, - &hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], - FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, - &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, hHeadTrackData->Rmat ); -#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); -#endif for ( ch_in = 0; ch_in < nchan; ch_in++ ) { @@ -639,9 +617,6 @@ void rotateFrame_sd_cldfb( float *p_real, *p_imag; int16_t nInChannels; int16_t isPlanar; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif push_wmops( "rotateFrame_sd_cldfb" ); @@ -657,15 +632,7 @@ void rotateFrame_sd_cldfb( } /* Get next quaternion and calculate rotation matrix */ -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, - &hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], - FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, - &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, Rmat ); -#else QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], Rmat ); -#endif /* rotation of Euler angles */ for ( n = 0; n < nInChannels; n++ ) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7c784c545a..0145f1163c 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3924,7 +3924,11 @@ ivas_error IVAS_REND_SetHeadRotation( hIvasRend->headRotData.headRotEnabled = 1; for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + ivas_orient_trk_Process( hIvasRend->headRotData.hOrientationTracker, headRot[i], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hIvasRend->headRotData.headPositions[i] ); +#else hIvasRend->headRotData.headPositions[i] = headRot[i]; +#endif } } @@ -4123,9 +4127,6 @@ static ivas_error rotateFrameMc( rotation_matrix Rmat; rotation_gains gains; float tmp_gains[MAX_INPUT_CHANNELS]; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif push_wmops( "rotateFrameMc" ); @@ -4152,15 +4153,7 @@ static ivas_error rotateFrameMc( for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) { /* Get next quaternion and calculate rotation matrix */ -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( headRotData->hOrientationTracker, - &headRotData->headPositions[subframe_idx], - (float) ( FRAMES_PER_SEC * RENDERER_HEAD_POSITIONS_PER_FRAME ), - &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, Rmat ); -#else QuatToRotMat( headRotData->headPositions[subframe_idx], Rmat ); -#endif for ( ch_in = 0; ch_in < nchan; ch_in++ ) { @@ -4242,9 +4235,6 @@ static ivas_error rotateFrameSba( rotation_matrix Rmat; float tmpRot[2 * HEADROT_ORDER + 1]; rotation_gains gains; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif push_wmops( "rotateFrameSba" ); @@ -4261,15 +4251,7 @@ static ivas_error rotateFrameSba( } /* Get next quaternion and calculate rotation matrix */ -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( headRotData->hOrientationTracker, - &headRotData->headPositions[subframe_idx], - (float) ( FRAMES_PER_SEC * RENDERER_HEAD_POSITIONS_PER_FRAME ), - &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, Rmat ); -#else QuatToRotMat( headRotData->headPositions[subframe_idx], Rmat ); -#endif /* calculate ambisonics rotation matrices for the previous and current frames */ SHrotmatgen( gains, Rmat, shd_rot_max_order ); @@ -4375,18 +4357,12 @@ static ivas_error renderIsmToBinauralRoom( int16_t tmp; rotation_matrix Rmat; float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; -#ifndef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION quat; -#endif ivas_error error; pan_vector currentPanGains; pan_vector previousPanGains; IVAS_REND_AudioBuffer tmpMcBuffer; IVAS_REND_AudioObjectPosition rotatedPos; const IVAS_REND_HeadRotData *headRotData; -#ifdef FIX_I109_ORIENTATION_TRACKING - IVAS_QUATERNION trackedHeadOrientation; -#endif push_wmops( "renderIsmToBinauralRoom" ); @@ -4399,20 +4375,7 @@ static ivas_error renderIsmToBinauralRoom( // for ( subframe_idx = 0; subframe_idx < RENDERER_HEAD_POSITIONS_PER_FRAME; subframe_idx++ ) for ( subframe_idx = 0; subframe_idx < 1; subframe_idx++ ) { -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( headRotData->hOrientationTracker, - &headRotData->headPositions[subframe_idx], - (float) ( FRAMES_PER_SEC ), - &trackedHeadOrientation ); - QuatToRotMat( trackedHeadOrientation, Rmat ); -#else - quat.w = headRotData->headPositions[subframe_idx].w; - quat.x = headRotData->headPositions[subframe_idx].x; - quat.y = headRotData->headPositions[subframe_idx].y; - quat.z = headRotData->headPositions[subframe_idx].z; - - QuatToRotMat( quat, Rmat ); -#endif + QuatToRotMat( headRotData->headPositions[subframe_idx], Rmat ); } (void) subframe_len; // avoid warning } -- GitLab From 125196112c8e10968d720358f8d0028ce363fea7 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 1 Mar 2023 12:38:31 +0100 Subject: [PATCH 087/140] Orientation tracking refactoring --- lib_dec/lib_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index cd19fe9d52..29f1ff2a8c 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -912,7 +912,7 @@ ivas_error IVAS_DEC_FeedHeadTrackData( for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation[i], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, hHeadTrackData->Quaternions ); + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation[i], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[i] ); #else hHeadTrackData->Quaternions[i].w = orientation[i].w; hHeadTrackData->Quaternions[i].x = orientation[i].x; -- GitLab From b22db8975660f20b88318f0e1c77d7a94586063a Mon Sep 17 00:00:00 2001 From: hsd Date: Wed, 1 Mar 2023 18:18:49 +0100 Subject: [PATCH 088/140] [cleanup] comments where missed when renaming the OTR *REF_POS tracking modes to *REF_VEC [ci-skip] --- lib_rend/ivas_orient_trk.c | 2 +- lib_rend/lib_rend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 9f478c627a..5fe3398687 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -723,7 +723,7 @@ ivas_error ivas_orient_trk_Process( case OTR_TRACKING_REF_VEC: case OTR_TRACKING_REF_VEC_LEV: { - /* This processing step of the OTR_TRACKING_REF_POS/OTR_TRACKING_REF_POS_LEVEL is identical */ + /* This processing step of the OTR_TRACKING_REF_VEC/OTR_TRACKING_REF_VEC_LEVEL is identical */ QuaternionProduct( pOTR->refRot, *pAbsRot, &refRot_absRot_product ); pTrkRot->w = refRot_absRot_product.w; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index aaa24c60dd..bfa38a71a5 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4024,7 +4024,7 @@ ivas_error IVAS_REND_GetTrackedRotation( * IVAS_REND_SetReferenceVector( ) * * Sets a reference vector spanning from listenerPos to refPos. Only - * available in OTR_TRACKING_REF_POS and OTR_TRACKING_REF_POS_LEV modes. + * available in OTR_TRACKING_REF_VEC and OTR_TRACKING_REF_VEC_LEV modes. *---------------------------------------------------------------------*/ ivas_error IVAS_REND_SetReferenceVector( -- GitLab From bba691bd7818f5853a2b8b4166fd7e4fe6355ff8 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 3 Mar 2023 00:19:17 +0100 Subject: [PATCH 089/140] typo --- apps/renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/renderer.c b/apps/renderer.c index fa3a3d21ee..2485c5a057 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -909,7 +909,7 @@ int main( if ( !args.quietModeEnabled ) { - fprintf( stdout, "\n------ Running the rondoror ------\n\n" ); + fprintf( stdout, "\n------ Running the renderer ------\n\n" ); fprintf( stdout, "Frames processed: " ); } else -- GitLab From e96871af3e0032fb1b8f8f66966c65174fe65852 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 3 Mar 2023 01:16:54 +0100 Subject: [PATCH 090/140] remove Quat2Euler from header definition file --- lib_rend/ivas_orient_trk.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 70a14b1797..e9718b937c 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -462,6 +462,14 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + /* check for Euler angle signaling */ + //if ( pOTR->refRot.w == -3.0f ) + //{ + // // convert to quaternion + // // port https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles + + //} + result = IVAS_ERR_OK; switch ( pOTR->trackingType ) -- GitLab From 8e0894b5e6a6643f95f7f3cf7cf18486142319b7 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 3 Mar 2023 01:49:50 +0100 Subject: [PATCH 091/140] function prototype for Euler2Quat --- lib_rend/ivas_orient_trk.c | 22 +++++++++++++++------- lib_rend/ivas_prot_rend.h | 11 +++++++++++ lib_rend/ivas_rotation.c | 24 ++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 7 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index e9718b937c..5ef7ded17d 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -30,6 +30,7 @@ *******************************************************************************************************/ +#include "common_api_types.h" #include #include "options.h" #include "ivas_prot.h" @@ -456,19 +457,26 @@ ivas_error ivas_orient_trk_Process( float alpha = pOTR->alpha; float ang; ivas_error result; + IVAS_QUATERNION quat; if ( pOTR == NULL || pTrkRot == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + quat.w = 0.0f; + quat.x = 0.0f; + quat.y = 0.0f; + quat.z = 0.0f; /* check for Euler angle signaling */ - //if ( pOTR->refRot.w == -3.0f ) - //{ - // // convert to quaternion - // // port https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles - - //} + if ( pOTR->refRot.w == -3.0f ) + { + Euler2Quat(pOTR->refRot.x, pOTR->refRot.y, pOTR->refRot.z, &quat); + } + else + { + quat = pOTR->refRot; + } result = IVAS_ERR_OK; @@ -486,7 +494,7 @@ ivas_error ivas_orient_trk_Process( pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ - QuaternionInverse( pOTR->refRot, pTrkRot ); + QuaternionInverse( quat, pTrkRot ); QuaternionProduct( *pTrkRot, *pAbsRot, pTrkRot ); break; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 4712ccbf67..ccf929a359 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -796,12 +796,23 @@ void ivas_headTrack_close( ); #endif +#ifndef FIX_I109_ORIENTATION_TRACKING void Quat2Euler( const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ float *yaw, /* o : yaw */ float *pitch, /* o : pitch */ float *roll /* o : roll */ ); +#endif + +#ifdef FIX_I109_ORIENTATION_TRACKING +void Euler2Quat( + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const float roll, /* i : roll */ + IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ +); +#endif void QuatToRotMat( const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 90354497a0..15b4f66421 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -213,6 +213,30 @@ void Quat2Euler( } #endif +#ifdef FIX_I109_ORIENTATION_TRACKING +/*------------------------------------------------------------------------- + * Euler2Quat() + * + * Quaternion handling: calculate corresponding Euler angles + *------------------------------------------------------------------------*/ + +void Euler2Quat( + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const float roll, /* i : roll */ + IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ +) +{ + // @TODO implementation here + quat->w = -3.0f; + quat->x = yaw; + quat->y = pitch; + quat->z = roll; + + return; +} +#endif + /*------------------------------------------------------------------------- * rotateAziEle() -- GitLab From 17e2c2ad708b505fe2329df8e6c54472c9f45597 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 3 Mar 2023 01:59:34 +0100 Subject: [PATCH 092/140] implementation of Euler2Quat --- lib_rend/ivas_rotation.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 15b4f66421..8ff48c1104 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -227,11 +227,17 @@ void Euler2Quat( IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ) { - // @TODO implementation here - quat->w = -3.0f; - quat->x = yaw; - quat->y = pitch; - quat->z = roll; + float cr = cos( roll * 0.5f ); + float sr = sin( roll * 0.5f ); + float cp = cos( pitch * 0.5f ); + float sp = sin( pitch * 0.5f ); + float cy = cos( yaw * 0.5f ); + float sy = sin( yaw * 0.5f ); + + quat->w = cr * cp * cy + sr * sp * sy; + quat->x = sr * cp * cy - cr * sp * sy; + quat->y = cr * sp * cy + sr * cp * sy; + quat->z = cr * cp * sy - sr * sp * cy; return; } -- GitLab From 642e358a7aa7599f1ca9be8585543465b87591d0 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Fri, 3 Mar 2023 02:06:19 +0100 Subject: [PATCH 093/140] cosmetics --- lib_rend/ivas_prot_rend.h | 8 ++++---- lib_rend/ivas_rotation.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index ccf929a359..000d1c905b 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -807,10 +807,10 @@ void Quat2Euler( #ifdef FIX_I109_ORIENTATION_TRACKING void Euler2Quat( - const float yaw, /* i : yaw */ - const float pitch, /* i : pitch */ - const float roll, /* i : roll */ - IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const float roll, /* i : roll */ + IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ); #endif diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 8ff48c1104..ddcb059bfc 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -217,14 +217,14 @@ void Quat2Euler( /*------------------------------------------------------------------------- * Euler2Quat() * - * Quaternion handling: calculate corresponding Euler angles + * Calculate corresponding Quaternion from Euler angles *------------------------------------------------------------------------*/ void Euler2Quat( - const float yaw, /* i : yaw */ - const float pitch, /* i : pitch */ - const float roll, /* i : roll */ - IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const float roll, /* i : roll */ + IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ) { float cr = cos( roll * 0.5f ); -- GitLab From 325eaa1278900b8f4152dbd9cf82591da2b6c058 Mon Sep 17 00:00:00 2001 From: hsd Date: Mon, 6 Mar 2023 12:47:19 +0100 Subject: [PATCH 094/140] [remove] TD_REND_FIX_DIV_BY_ZERO. Once/If UBSAN builds will be added, this will show up again and can be fixed by the experts. --- lib_com/options.h | 1 - lib_rend/ivas_objectRenderer_sfx.c | 7 ------- 2 files changed, 8 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 70a48b1ed2..1546c4087f 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -170,7 +170,6 @@ #ifdef FIX_I109_ORIENTATION_TRACKING #define OTR_REFERENCE_VECTOR_TRACKING /* FhG: enables the reference position orientation tracking mode */ #endif -#define TD_REND_FIX_DIV_BY_ZERO /* FhG: avoid division by zero in sincResample fn */ #define TD_TDREND_FIX_NULLPTR_ACCESS /* FhG: avoid nullptr access in ivas_rend_TDObjRendOpen */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_rend/ivas_objectRenderer_sfx.c b/lib_rend/ivas_objectRenderer_sfx.c index e66ce89167..10f5ef91f0 100644 --- a/lib_rend/ivas_objectRenderer_sfx.c +++ b/lib_rend/ivas_objectRenderer_sfx.c @@ -182,13 +182,6 @@ static void sincResample( const float *p_sinc_forward; const float *p_sinc_backward; -#ifdef TD_REND_FIX_DIV_BY_ZERO - /* avoid division by 0 */ - if ( 0 == length_out ) - { - return; - } -#endif /* TD_REND_FIX_DIV_BY_ZERO */ /* Compute fractional time step */ t_step = (float) ( length_in ) / (float) ( length_out ); -- GitLab From 27270f5b41064ca752b7eb2fd454388e024a205a Mon Sep 17 00:00:00 2001 From: hsd Date: Mon, 6 Mar 2023 12:48:13 +0100 Subject: [PATCH 095/140] [remove] TD_TDREND_FIX_NULLPTR_ACCESS. Once/If UBSAN builds will be added, this will show up again and can be fixed by the experts. --- lib_com/options.h | 1 - lib_rend/ivas_objectRenderer.c | 8 -------- 2 files changed, 9 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 1546c4087f..31bf264760 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -170,7 +170,6 @@ #ifdef FIX_I109_ORIENTATION_TRACKING #define OTR_REFERENCE_VECTOR_TRACKING /* FhG: enables the reference position orientation tracking mode */ #endif -#define TD_TDREND_FIX_NULLPTR_ACCESS /* FhG: avoid nullptr access in ivas_rend_TDObjRendOpen */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index ce1ff2bd6c..7fcae1c0cc 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -575,16 +575,8 @@ ivas_error ivas_td_binaural_open_ext( transport_config = rendAudioConfigToIvasAudioConfig( inConfig ); #endif ivas_format = ( getAudioConfigType( inConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) ? MC_FORMAT : ISM_FORMAT; -#ifdef TD_TDREND_FIX_NULLPTR_ACCESS - if ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) - { - hTransSetup.ls_azimuth = customLsInput->ls_azimuth; - hTransSetup.ls_elevation = customLsInput->ls_elevation; - } -#else hTransSetup.ls_azimuth = customLsInput->ls_azimuth; hTransSetup.ls_elevation = customLsInput->ls_elevation; -#endif /* TD_TDREND_FIX_NULLPTR_ACCESS */ return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); } -- GitLab From f73558f1fbd7780fd2792fee4db3c65e6a19fa6a Mon Sep 17 00:00:00 2001 From: hsd Date: Mon, 6 Mar 2023 14:18:02 +0100 Subject: [PATCH 096/140] [fix] call SetReferenceRotation before SetHeadRotation. Ohterwise the reference rotation gets applied one frame too late --- apps/decoder.c | 54 ++++++++++++++++++++++++++++++++----------------- apps/renderer.c | 36 ++++++++++++++++----------------- 2 files changed, 54 insertions(+), 36 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 40ac02238e..dcd5cf62e8 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1509,6 +1509,42 @@ static ivas_error decodeG192( goto cleanup; } +#ifdef FIX_I109_ORIENTATION_TRACKING + /* Reference rotation */ + if ( arg.enableReferenceRotation ) + { + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } +#endif +#ifdef FIX_I109_ORIENTATION_TRACKING + /* Reference rotation */ + if ( arg.enableReferenceRotation ) + { + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } +#endif /* Head-tracking input simulation */ if ( arg.enableHeadRotation ) { @@ -1538,24 +1574,6 @@ static ivas_error decodeG192( } } -#ifdef FIX_I109_ORIENTATION_TRACKING - /* Reference rotation */ - if ( arg.enableReferenceRotation ) - { - IVAS_QUATERNION quaternion; - if ( ( error = HeadRotationFileReading( refRotReader, &quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); - goto cleanup; - } - - if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } -#endif /* Run decoder for one frame (get rendered output) */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) { diff --git a/apps/renderer.c b/apps/renderer.c index fa3a3d21ee..fef1e65eba 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -942,6 +942,24 @@ int main( ObjectPositionBuffer mtdBuffer; IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); +#ifdef FIX_I109_ORIENTATION_TRACKING + /* Read from reference rotation trajectory file if specified */ + if ( referenceRotReader != NULL ) + { + IVAS_QUATERNION quaternion; + if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error in Head Rotation File Reading.\r\n" ); + exit( -1 ); + } + if ( IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error setting Reference Rotation.\r\n" ); + exit( -1 ); + } + } +#endif + /* Read from head rotation trajectory file if specified */ if ( headRotReader != NULL ) { @@ -973,24 +991,6 @@ int main( } } -#ifdef FIX_I109_ORIENTATION_TRACKING - /* Read from reference rotation trajectory file if specified */ - if ( referenceRotReader != NULL ) - { - IVAS_QUATERNION quaternion; - if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error in Head Rotation File Reading.\r\n" ); - exit( -1 ); - } - if ( IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error setting Reference Rotation.\r\n" ); - exit( -1 ); - } - } -#endif - for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) { if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, mcIds[i], &numChannels ) ) != IVAS_ERR_OK ) -- GitLab From 826f05f83310afa425c8d70f548c65f8985c3bcb Mon Sep 17 00:00:00 2001 From: hsd Date: Tue, 7 Mar 2023 10:00:07 +0100 Subject: [PATCH 097/140] [fix] removed duplicated HeadRotationFileReading block, thx2szczerba --- apps/decoder.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index dcd5cf62e8..0612c9b2a5 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1509,24 +1509,6 @@ static ivas_error decodeG192( goto cleanup; } -#ifdef FIX_I109_ORIENTATION_TRACKING - /* Reference rotation */ - if ( arg.enableReferenceRotation ) - { - IVAS_QUATERNION quaternion; - if ( ( error = HeadRotationFileReading( refRotReader, &quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); - goto cleanup; - } - - if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } -#endif #ifdef FIX_I109_ORIENTATION_TRACKING /* Reference rotation */ if ( arg.enableReferenceRotation ) -- GitLab From 9be23381048a10fbc2ba0a68c1a86b343fc6a7f8 Mon Sep 17 00:00:00 2001 From: szczerba Date: Tue, 7 Mar 2023 10:49:22 +0100 Subject: [PATCH 098/140] Cleanup --- apps/decoder.c | 32 +++++++++++++------------- lib_dec/ivas_objectRenderer_internal.c | 8 +------ lib_rend/ivas_objectRenderer.c | 3 +-- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 0612c9b2a5..671d702b84 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1510,22 +1510,22 @@ static ivas_error decodeG192( } #ifdef FIX_I109_ORIENTATION_TRACKING - /* Reference rotation */ - if ( arg.enableReferenceRotation ) - { - IVAS_QUATERNION quaternion; - if ( ( error = HeadRotationFileReading( refRotReader, &quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); - goto cleanup; - } - - if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } + /* Reference rotation */ + if ( arg.enableReferenceRotation ) + { + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } #endif /* Head-tracking input simulation */ if ( arg.enableHeadRotation ) diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index b9fade9290..921c56e6e6 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -71,11 +71,6 @@ void ivas_td_binaural_renderer( const int16_t output_frame /* i : output frame length */ ) { -#ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_state_t *pOtr = NULL; - if ( st_ivas->hHeadTrackData != NULL ) - pOtr = st_ivas->hHeadTrackData->OrientationTracker; -#endif ivas_td_binaural_renderer_unwrap( st_ivas->hRenderConfig, st_ivas->ini_frame, #ifdef FIX_197_CREND_INTERFACE st_ivas->hCrendWrapper, @@ -92,6 +87,5 @@ void ivas_td_binaural_renderer( st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Quaternions : NULL, output, - output_frame - ); + output_frame ); } diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index b0f5295ded..4276568519 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -642,8 +642,7 @@ ivas_error ivas_td_binaural_renderer_ext( headRotData->headRotEnabled, ( headRotData != NULL ) ? headRotData->headPositions : NULL, output, - output_frame - ); + output_frame ); pop_wmops(); -- GitLab From e1c2ab7d0ce47a750d96cfa4f1b4e327b7f4b01e Mon Sep 17 00:00:00 2001 From: hsd Date: Tue, 7 Mar 2023 13:59:44 +0100 Subject: [PATCH 099/140] [remove] commented-out self-test configs, since they still got executed --- scripts/config/self_test.prm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 5385df27a7..223ac0352c 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -476,14 +476,6 @@ ../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.wav bit ../IVAS_dec -t testv/headrot.csv BINAURAL_ROOM 32 bit testv/stv3OA32c.wav_SBA_48000_32-32_BinauralRoom_Headrot.tst -// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, reference vector tracking -//../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit -//../IVAS_dec -t trajectories/full-circle-4s.csv -rvf trajectories/full-circle-4s-Vector3.csv -otr ref_vec BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrRefPos.tst - -// SBA at 48 kbps, 32kHz in, 32kHz out, BINAURAL ROOM out, Headrotation, reference vector tracking in level mode -//../IVAS_cod -sba 3 48000 32 testv/stv3OA32c.pcm bit -//../IVAS_dec -t trajectories/full-circle-with-up-and-down-4s.csv -rvf trajectories/full-circle-with-up-and-down-4s-Vector3.csv -otr ref_vec_lev BINAURAL_ROOM 32 bit testv/stv3OA32c.pcm_SBA_48000_32-32_BinauralRoom_Headrot_OtrRefPosLev.tst - // SBA at 48 kbps, 32kHz in, 32kHz out, DTX on, BINAURAL out, random FEC at 5% ../IVAS_cod -sba 3 -dtx 48000 32 testv/stv3OA32c.wav bit ../IVAS_dec -fec 5 BINAURAL 32 bit testv/stv3OA32c.wav_SBA_48000_32-32_DTX_Binaural_FEC5.tst -- GitLab From 0d67d76c7e7f9c2cb3ef6744a358f9619671a2c3 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Tue, 7 Mar 2023 18:26:15 +0100 Subject: [PATCH 100/140] re-enable and fix quat2euler --- lib_rend/ivas_orient_trk.c | 52 ++++++++++++++++++++++++++++---------- lib_rend/ivas_prot_rend.h | 2 -- lib_rend/ivas_rotation.c | 24 ++++++++++-------- 3 files changed, 53 insertions(+), 25 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 5ef7ded17d..b0865c9322 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -457,25 +457,40 @@ ivas_error ivas_orient_trk_Process( float alpha = pOTR->alpha; float ang; ivas_error result; - IVAS_QUATERNION quat; + IVAS_QUATERNION refQuat, trkQuat; + IVAS_QUATERNION trkEuler; if ( pOTR == NULL || pTrkRot == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - quat.w = 0.0f; - quat.x = 0.0f; - quat.y = 0.0f; - quat.z = 0.0f; + refQuat.w = 0.0f; + refQuat.x = 0.0f; + refQuat.y = 0.0f; + refQuat.z = 0.0f; /* check for Euler angle signaling */ if ( pOTR->refRot.w == -3.0f ) { - Euler2Quat(pOTR->refRot.x, pOTR->refRot.y, pOTR->refRot.z, &quat); + Euler2Quat(pOTR->refRot.x, pOTR->refRot.y, pOTR->refRot.z, &refQuat); } else { - quat = pOTR->refRot; + refQuat = pOTR->refRot; + } + + trkQuat.w = 0.0f; + trkQuat.x = 0.0f; + trkQuat.y = 0.0f; + trkQuat.z = 0.0f; + /* check for Euler angle signaling */ + if ( pTrkRot->w == -3.0f ) + { + Euler2Quat(pTrkRot->x, pTrkRot->y, pTrkRot->z, &trkQuat); + } + else + { + trkQuat = *pTrkRot; } result = IVAS_ERR_OK; @@ -483,7 +498,7 @@ ivas_error ivas_orient_trk_Process( switch ( pOTR->trackingType ) { case OTR_TRACKING_NONE: - *pTrkRot = *pAbsRot; + trkQuat = *pAbsRot; break; case OTR_TRACKING_REF_ORIENT: @@ -494,8 +509,8 @@ ivas_error ivas_orient_trk_Process( pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ - QuaternionInverse( quat, pTrkRot ); - QuaternionProduct( *pTrkRot, *pAbsRot, pTrkRot ); + QuaternionInverse( refQuat, &trkQuat ); + QuaternionProduct( trkQuat, *pAbsRot, &trkQuat ); break; case OTR_TRACKING_AVG_ORIENT: @@ -503,8 +518,8 @@ ivas_error ivas_orient_trk_Process( QuaternionSlerp( pOTR->absAvgRot, *pAbsRot, alpha, &pOTR->absAvgRot ); /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ - QuaternionInverse( pOTR->absAvgRot, pTrkRot ); - QuaternionProduct( *pTrkRot, *pAbsRot, pTrkRot ); + QuaternionInverse( pOTR->absAvgRot, &trkQuat ); + QuaternionProduct( trkQuat, *pAbsRot, &trkQuat ); /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) @@ -542,7 +557,18 @@ ivas_error ivas_orient_trk_Process( if ( result == IVAS_ERR_OK ) { - pOTR->trkRot = *pTrkRot; + pOTR->trkRot = trkQuat; + + if ( pTrkRot->w == -3.0f ) + { + Quat2Euler(trkQuat, &trkEuler.x, &trkEuler.y, &trkEuler.z); + trkEuler.w = -3.0f; + *pTrkRot = trkEuler; + } + else + { + *pTrkRot = trkQuat; + } } return result; diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 000d1c905b..d22977452b 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -796,14 +796,12 @@ void ivas_headTrack_close( ); #endif -#ifndef FIX_I109_ORIENTATION_TRACKING void Quat2Euler( const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ float *yaw, /* o : yaw */ float *pitch, /* o : pitch */ float *roll /* o : roll */ ); -#endif #ifdef FIX_I109_ORIENTATION_TRACKING void Euler2Quat( diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index ddcb059bfc..d98138126b 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -176,7 +176,6 @@ void QuatToRotMat( return; } -#ifndef FIX_I109_ORIENTATION_TRACKING /*------------------------------------------------------------------------- * Quat2Euler() * @@ -204,14 +203,19 @@ void Quat2Euler( * pitch: rotate scene in the median plane, increase elevation with positive values * roll: rotate scene from the right ear to the top */ - *yaw = quat.z; +#ifdef FIX_I109_ORIENTATION_TRACKING + *yaw = quat.x; + *pitch = quat.y; + *roll = quat.z; +#else + *yaw = quat.z; *pitch = quat.y; - *roll = quat.x; + *roll = quat.x; +#endif } return; } -#endif #ifdef FIX_I109_ORIENTATION_TRACKING /*------------------------------------------------------------------------- @@ -227,12 +231,12 @@ void Euler2Quat( IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ) { - float cr = cos( roll * 0.5f ); - float sr = sin( roll * 0.5f ); - float cp = cos( pitch * 0.5f ); - float sp = sin( pitch * 0.5f ); - float cy = cos( yaw * 0.5f ); - float sy = sin( yaw * 0.5f ); + float cr = cosf( roll * 0.5f ); + float sr = sinf( roll * 0.5f ); + float cp = cosf( pitch * 0.5f ); + float sp = sinf( pitch * 0.5f ); + float cy = cosf( yaw * 0.5f ); + float sy = sinf( yaw * 0.5f ); quat->w = cr * cp * cy + sr * sp * sy; quat->x = sr * cp * cy - cr * sp * sy; -- GitLab From 0ea486611c209693e0050f56c9dd5fe084760938 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Tue, 7 Mar 2023 22:39:09 +0100 Subject: [PATCH 101/140] Euler processing correct in degrees - all internal processign in ivas_orient_trk_Process() now done in Quat - output in Eulers in quasi-quaternion format when necessary - Euler angles assumed in degrees, conversion to and from radians added --- lib_rend/ivas_orient_trk.c | 40 ++++++++++++++++++++-------- lib_rend/ivas_prot_rend.h | 4 +++ lib_rend/ivas_rotation.c | 53 ++++++++++++++++++++++++++++---------- 3 files changed, 72 insertions(+), 25 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index b0865c9322..2b8d332d93 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -457,7 +457,7 @@ ivas_error ivas_orient_trk_Process( float alpha = pOTR->alpha; float ang; ivas_error result; - IVAS_QUATERNION refQuat, trkQuat; + IVAS_QUATERNION refQuat, absQuat, trkQuat; IVAS_QUATERNION trkEuler; if ( pOTR == NULL || pTrkRot == NULL ) @@ -472,13 +472,27 @@ ivas_error ivas_orient_trk_Process( /* check for Euler angle signaling */ if ( pOTR->refRot.w == -3.0f ) { - Euler2Quat(pOTR->refRot.x, pOTR->refRot.y, pOTR->refRot.z, &refQuat); + Euler2Quat(deg2rad( pOTR->refRot.x ), deg2rad( pOTR->refRot.y ), deg2rad( pOTR->refRot.z ), &refQuat); } else { refQuat = pOTR->refRot; } + absQuat.w = 0.0f; + absQuat.x = 0.0f; + absQuat.y = 0.0f; + absQuat.z = 0.0f; + /* check for Euler angle signaling */ + if ( pAbsRot->w == -3.0f ) + { + Euler2Quat(deg2rad( pAbsRot->x ), deg2rad( pAbsRot->y ), deg2rad( pAbsRot->z ), &absQuat); + } + else + { + absQuat = *pAbsRot; + } + trkQuat.w = 0.0f; trkQuat.x = 0.0f; trkQuat.y = 0.0f; @@ -486,7 +500,7 @@ ivas_error ivas_orient_trk_Process( /* check for Euler angle signaling */ if ( pTrkRot->w == -3.0f ) { - Euler2Quat(pTrkRot->x, pTrkRot->y, pTrkRot->z, &trkQuat); + Euler2Quat(deg2rad( pTrkRot->x ), deg2rad( pTrkRot->y ), deg2rad( pTrkRot->z ), &trkQuat); } else { @@ -498,34 +512,34 @@ ivas_error ivas_orient_trk_Process( switch ( pOTR->trackingType ) { case OTR_TRACKING_NONE: - trkQuat = *pAbsRot; + trkQuat = absQuat; break; case OTR_TRACKING_REF_ORIENT: /* Reset average orientation */ - pOTR->absAvgRot = *pAbsRot; + pOTR->absAvgRot = absQuat; /* Reset adaptation filter - start adaptation at center rate */ pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ QuaternionInverse( refQuat, &trkQuat ); - QuaternionProduct( trkQuat, *pAbsRot, &trkQuat ); + QuaternionProduct( trkQuat, absQuat, &trkQuat ); break; case OTR_TRACKING_AVG_ORIENT: /* Compute average (low-pass filtered) absolute orientation */ - QuaternionSlerp( pOTR->absAvgRot, *pAbsRot, alpha, &pOTR->absAvgRot ); + QuaternionSlerp( pOTR->absAvgRot, absQuat, alpha, &pOTR->absAvgRot ); /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ QuaternionInverse( pOTR->absAvgRot, &trkQuat ); - QuaternionProduct( trkQuat, *pAbsRot, &trkQuat ); + QuaternionProduct( trkQuat, absQuat, &trkQuat ); /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = QuaternionAngle( *pAbsRot, *pTrkRot ); + ang = QuaternionAngle( absQuat, *pTrkRot ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; @@ -558,10 +572,14 @@ ivas_error ivas_orient_trk_Process( if ( result == IVAS_ERR_OK ) { pOTR->trkRot = trkQuat; + pOTR->refRot = refQuat; - if ( pTrkRot->w == -3.0f ) + if ( ( pTrkRot->w == -3.0f) || ( pAbsRot->w == -3.0f ) ) { - Quat2Euler(trkQuat, &trkEuler.x, &trkEuler.y, &trkEuler.z); + Quat2Euler( trkQuat, &trkEuler.z, &trkEuler.y, &trkEuler.x ); + trkEuler.x = rad2deg( trkEuler.x ); + trkEuler.y = rad2deg( trkEuler.y ); + trkEuler.z = rad2deg( trkEuler.z ); trkEuler.w = -3.0f; *pTrkRot = trkEuler; } diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index d22977452b..73c3025b0c 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -810,6 +810,10 @@ void Euler2Quat( const float roll, /* i : roll */ IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ); + +float deg2rad( float degrees ); + +float rad2deg( float radians ); #endif void QuatToRotMat( diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index d98138126b..d6f1f5fe09 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -127,7 +127,11 @@ void QuatToRotMat( * Euler angles instead of quaternions. In this case, all the w values must * be set to -3.0 in the trajectory file to signal switching to Euler angles. * The x,y, and z components of the quaternion are then interpreted as +#ifdef FIX_I109_ORIENTATION_TRACKING * yaw-pitch-roll. +#else // see below: "Euler angles in R_X(roll)*R_Y(pitch)*R_Z(yaw) convention" + * roll-pitch-yaw. +#endif */ if ( quat.w != -3.0 ) { @@ -179,21 +183,27 @@ void QuatToRotMat( /*------------------------------------------------------------------------- * Quat2Euler() * - * Quaternion handling: calculate corresponding Euler angles + * Quaternion handling: calculate corresponding Euler angles in radians *------------------------------------------------------------------------*/ void Quat2Euler( const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ - float *yaw, /* o : yaw */ - float *pitch, /* o : pitch */ - float *roll /* o : roll */ + float *yaw, /* o : yaw (z) */ + float *pitch, /* o : pitch (y) */ + float *roll /* o : roll (x) */ ) { if ( quat.w != -3.0 ) { +#ifdef FIX_I109_ORIENTATION_TRACKING + *roll = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); + *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); + *yaw = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); +#else // bug: x and z swapped *yaw = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); *roll = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); +#endif } else { @@ -203,15 +213,9 @@ void Quat2Euler( * pitch: rotate scene in the median plane, increase elevation with positive values * roll: rotate scene from the right ear to the top */ -#ifdef FIX_I109_ORIENTATION_TRACKING - *yaw = quat.x; - *pitch = quat.y; - *roll = quat.z; -#else *yaw = quat.z; *pitch = quat.y; *roll = quat.x; -#endif } return; @@ -221,13 +225,13 @@ void Quat2Euler( /*------------------------------------------------------------------------- * Euler2Quat() * - * Calculate corresponding Quaternion from Euler angles + * Calculate corresponding Quaternion from Euler angles in radians *------------------------------------------------------------------------*/ void Euler2Quat( - const float yaw, /* i : yaw */ - const float pitch, /* i : pitch */ - const float roll, /* i : roll */ + const float roll, /* i : roll (x) */ + const float pitch, /* i : pitch (y) */ + const float yaw, /* i : yaw (z) */ IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ) { @@ -245,6 +249,27 @@ void Euler2Quat( return; } + +/*------------------------------------------------------------------------- + * rad2deg() + * + * Return angle in radians from degrees + *------------------------------------------------------------------------*/ +float deg2rad( float degrees ) +{ + return PI2 * degrees / 360.0f; +} + +/*------------------------------------------------------------------------- + * deg2rad() + * + * Return angle in degrees from radians + *------------------------------------------------------------------------*/ +float rad2deg( float radians ) +{ + return 360.0f * radians / PI2; +} + #endif -- GitLab From 1771b40dc6d5b981813b568d05a8d41f8d54976e Mon Sep 17 00:00:00 2001 From: hsd Date: Wed, 8 Mar 2023 07:49:22 +0100 Subject: [PATCH 102/140] [fix] adapt OTR_TRACKING_REF_VEC* mode to use ne w refQuat, absQuat, trkQuat variables (otherwise the results get overwritten in the result == IVAS_ERR_OK block) --- lib_rend/ivas_orient_trk.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index ebf5ed4a4c..a7e47f422a 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -657,9 +657,6 @@ ivas_error ivas_orient_trk_Process( ivas_error result; IVAS_QUATERNION refQuat, absQuat, trkQuat; IVAS_QUATERNION trkEuler; -#ifdef OTR_REFERENCE_VECTOR_TRACKING - IVAS_QUATERNION refRot_absRot_product; -#endif /* OTR_REFERENCE_VECTOR_TRACKING */ if ( pOTR == NULL || pTrkRot == NULL ) { @@ -769,12 +766,7 @@ ivas_error ivas_orient_trk_Process( case OTR_TRACKING_REF_VEC_LEV: { /* This processing step of the OTR_TRACKING_REF_VEC/OTR_TRACKING_REF_VEC_LEVEL is identical */ - QuaternionProduct( pOTR->refRot, *pAbsRot, &refRot_absRot_product ); - - pTrkRot->w = refRot_absRot_product.w; - pTrkRot->x = refRot_absRot_product.x; - pTrkRot->y = refRot_absRot_product.y; - pTrkRot->z = refRot_absRot_product.z; + QuaternionProduct( refQuat, absQuat, &trkQuat ); break; } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ -- GitLab From e7d9b5795327b38bffc5a63857202a569acd8eda Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 8 Mar 2023 09:53:36 +0100 Subject: [PATCH 103/140] Avoiding clang complaints --- lib_rend/lib_rend.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index b74cd297e1..a2820214b3 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4539,12 +4539,12 @@ static ivas_error renderIsmToBinauralRoom( &trackedHeadOrientation ); QuatToRotMat( trackedHeadOrientation, Rmat ); #else - quat.w = headRotData->headPositions[subframe_idx].w; - quat.x = headRotData->headPositions[subframe_idx].x; - quat.y = headRotData->headPositions[subframe_idx].y; - quat.z = headRotData->headPositions[subframe_idx].z; + quat.w = headRotData->headPositions[subframe_idx].w; + quat.x = headRotData->headPositions[subframe_idx].x; + quat.y = headRotData->headPositions[subframe_idx].y; + quat.z = headRotData->headPositions[subframe_idx].z; - QuatToRotMat( quat, Rmat ); + QuatToRotMat( quat, Rmat ); #endif } (void) subframe_len; // avoid warning -- GitLab From 3ee1c2154730f065be0e550c668afaee6c911d62 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 11:23:29 +0100 Subject: [PATCH 104/140] harmonize euler2quat declaration and function --- lib_rend/ivas_prot_rend.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 561af30aff..49dadd271d 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -806,18 +806,18 @@ void ivas_headTrack_close( #endif void Quat2Euler( - const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ - float *yaw, /* o : yaw */ - float *pitch, /* o : pitch */ - float *roll /* o : roll */ + const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ + float *yaw, /* o : yaw (z) */ + float *pitch, /* o : pitch (y) */ + float *roll /* o : roll (x) */ ); #ifdef FIX_I109_ORIENTATION_TRACKING void Euler2Quat( - const float yaw, /* i : yaw */ - const float pitch, /* i : pitch */ - const float roll, /* i : roll */ - IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ + const float roll, /* i : roll (x) */ + const float pitch, /* i : pitch (y) */ + const float yaw, /* i : yaw (z) */ + IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ); float deg2rad( float degrees ); -- GitLab From 1f352872529d8323aa75d2039eb258bd296b5d19 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 11:56:32 +0100 Subject: [PATCH 105/140] simplify decision logic --- lib_rend/ivas_orient_trk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index a7e47f422a..a6d0dd61a5 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -780,7 +780,7 @@ ivas_error ivas_orient_trk_Process( pOTR->trkRot = trkQuat; pOTR->refRot = refQuat; - if ( ( pTrkRot->w == -3.0f) || ( pAbsRot->w == -3.0f ) ) + if ( pAbsRot->w == -3.0f ) { Quat2Euler( trkQuat, &trkEuler.z, &trkEuler.y, &trkEuler.x ); trkEuler.x = rad2deg( trkEuler.x ); -- GitLab From 7830d38b3f8934de43bd8ee251dc3e10cba7e673 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 12:07:48 +0100 Subject: [PATCH 106/140] convert reference rotation in ivas_orient_trk_init --- lib_rend/ivas_orient_trk.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index a6d0dd61a5..5a72d317ff 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -509,7 +509,17 @@ ivas_error ivas_orient_trk_SetReferenceRotation( { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - pOTR->refRot = refRot; + + /* check for Euler angle signaling */ + if ( refRot.w == -3.0f ) + { + Euler2Quat(deg2rad( refRot.x ), deg2rad( refRot.y ), deg2rad( refRot.z ), &pOTR->refRot ); + } + else + { + pOTR->refRot = refRot; + } + return IVAS_ERR_OK; } @@ -655,7 +665,7 @@ ivas_error ivas_orient_trk_Process( float alpha = pOTR->alpha; float ang; ivas_error result; - IVAS_QUATERNION refQuat, absQuat, trkQuat; + IVAS_QUATERNION absQuat, trkQuat; IVAS_QUATERNION trkEuler; if ( pOTR == NULL || pTrkRot == NULL ) @@ -663,20 +673,6 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - refQuat.w = 0.0f; - refQuat.x = 0.0f; - refQuat.y = 0.0f; - refQuat.z = 0.0f; - /* check for Euler angle signaling */ - if ( pOTR->refRot.w == -3.0f ) - { - Euler2Quat(deg2rad( pOTR->refRot.x ), deg2rad( pOTR->refRot.y ), deg2rad( pOTR->refRot.z ), &refQuat); - } - else - { - refQuat = pOTR->refRot; - } - absQuat.w = 0.0f; absQuat.x = 0.0f; absQuat.y = 0.0f; @@ -721,7 +717,7 @@ ivas_error ivas_orient_trk_Process( pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ - QuaternionInverse( refQuat, &trkQuat ); + QuaternionInverse( pOTR->refRot, &trkQuat ); QuaternionProduct( trkQuat, absQuat, &trkQuat ); break; @@ -737,7 +733,7 @@ ivas_error ivas_orient_trk_Process( - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = QuaternionAngle( absQuat, *pTrkRot ); + ang = QuaternionAngle( absQuat, trkQuat ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; @@ -766,7 +762,7 @@ ivas_error ivas_orient_trk_Process( case OTR_TRACKING_REF_VEC_LEV: { /* This processing step of the OTR_TRACKING_REF_VEC/OTR_TRACKING_REF_VEC_LEVEL is identical */ - QuaternionProduct( refQuat, absQuat, &trkQuat ); + QuaternionProduct( pOTR->refRot, absQuat, &trkQuat ); break; } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ @@ -778,7 +774,6 @@ ivas_error ivas_orient_trk_Process( if ( result == IVAS_ERR_OK ) { pOTR->trkRot = trkQuat; - pOTR->refRot = refQuat; if ( pAbsRot->w == -3.0f ) { -- GitLab From 6fee008f4a9f540e108e6ee509a896e96de38da6 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 12:07:48 +0100 Subject: [PATCH 107/140] convert reference rotation in ivas_orient_trk_SetReferenceRotation --- lib_rend/ivas_orient_trk.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index a6d0dd61a5..5a72d317ff 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -509,7 +509,17 @@ ivas_error ivas_orient_trk_SetReferenceRotation( { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - pOTR->refRot = refRot; + + /* check for Euler angle signaling */ + if ( refRot.w == -3.0f ) + { + Euler2Quat(deg2rad( refRot.x ), deg2rad( refRot.y ), deg2rad( refRot.z ), &pOTR->refRot ); + } + else + { + pOTR->refRot = refRot; + } + return IVAS_ERR_OK; } @@ -655,7 +665,7 @@ ivas_error ivas_orient_trk_Process( float alpha = pOTR->alpha; float ang; ivas_error result; - IVAS_QUATERNION refQuat, absQuat, trkQuat; + IVAS_QUATERNION absQuat, trkQuat; IVAS_QUATERNION trkEuler; if ( pOTR == NULL || pTrkRot == NULL ) @@ -663,20 +673,6 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - refQuat.w = 0.0f; - refQuat.x = 0.0f; - refQuat.y = 0.0f; - refQuat.z = 0.0f; - /* check for Euler angle signaling */ - if ( pOTR->refRot.w == -3.0f ) - { - Euler2Quat(deg2rad( pOTR->refRot.x ), deg2rad( pOTR->refRot.y ), deg2rad( pOTR->refRot.z ), &refQuat); - } - else - { - refQuat = pOTR->refRot; - } - absQuat.w = 0.0f; absQuat.x = 0.0f; absQuat.y = 0.0f; @@ -721,7 +717,7 @@ ivas_error ivas_orient_trk_Process( pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ - QuaternionInverse( refQuat, &trkQuat ); + QuaternionInverse( pOTR->refRot, &trkQuat ); QuaternionProduct( trkQuat, absQuat, &trkQuat ); break; @@ -737,7 +733,7 @@ ivas_error ivas_orient_trk_Process( - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = QuaternionAngle( absQuat, *pTrkRot ); + ang = QuaternionAngle( absQuat, trkQuat ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; @@ -766,7 +762,7 @@ ivas_error ivas_orient_trk_Process( case OTR_TRACKING_REF_VEC_LEV: { /* This processing step of the OTR_TRACKING_REF_VEC/OTR_TRACKING_REF_VEC_LEVEL is identical */ - QuaternionProduct( refQuat, absQuat, &trkQuat ); + QuaternionProduct( pOTR->refRot, absQuat, &trkQuat ); break; } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ @@ -778,7 +774,6 @@ ivas_error ivas_orient_trk_Process( if ( result == IVAS_ERR_OK ) { pOTR->trkRot = trkQuat; - pOTR->refRot = refQuat; if ( pAbsRot->w == -3.0f ) { -- GitLab From 1c005b6909c234870c7a3e4a4c66665d8bc6b91c Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 12:51:57 +0100 Subject: [PATCH 108/140] see if CI will let us get away without quat inits --- lib_rend/ivas_orient_trk.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 5a72d317ff..5eaff413d9 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -673,10 +673,6 @@ ivas_error ivas_orient_trk_Process( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - absQuat.w = 0.0f; - absQuat.x = 0.0f; - absQuat.y = 0.0f; - absQuat.z = 0.0f; /* check for Euler angle signaling */ if ( pAbsRot->w == -3.0f ) { @@ -687,10 +683,6 @@ ivas_error ivas_orient_trk_Process( absQuat = *pAbsRot; } - trkQuat.w = 0.0f; - trkQuat.x = 0.0f; - trkQuat.y = 0.0f; - trkQuat.z = 0.0f; /* check for Euler angle signaling */ if ( pTrkRot->w == -3.0f ) { -- GitLab From 2c6fdebfc4fa870a08e30305845fdacb2aacd73a Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 14:13:06 +0100 Subject: [PATCH 109/140] remove unnecessary conversion of pTrkRot --- lib_rend/ivas_orient_trk.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 5eaff413d9..d63decba09 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -683,16 +683,6 @@ ivas_error ivas_orient_trk_Process( absQuat = *pAbsRot; } - /* check for Euler angle signaling */ - if ( pTrkRot->w == -3.0f ) - { - Euler2Quat(deg2rad( pTrkRot->x ), deg2rad( pTrkRot->y ), deg2rad( pTrkRot->z ), &trkQuat); - } - else - { - trkQuat = *pTrkRot; - } - result = IVAS_ERR_OK; switch ( pOTR->trackingType ) -- GitLab From 6d9fcc64ec3e1960c01021a582560740336b2642 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 14:23:54 +0100 Subject: [PATCH 110/140] using constants in deg2rad / rad2deg --- lib_rend/ivas_rotation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index d6f1f5fe09..409626de0b 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -30,6 +30,7 @@ *******************************************************************************************************/ +#include "ivas_cnst.h" #include #include #include "options.h" @@ -257,7 +258,7 @@ void Euler2Quat( *------------------------------------------------------------------------*/ float deg2rad( float degrees ) { - return PI2 * degrees / 360.0f; + return PI_OVER_180 * degrees; } /*------------------------------------------------------------------------- @@ -267,7 +268,7 @@ float deg2rad( float degrees ) *------------------------------------------------------------------------*/ float rad2deg( float radians ) { - return 360.0f * radians / PI2; + return _180_OVER_PI * radians; } #endif -- GitLab From 89d2564b8637ec5dd92dd3802b57bc38f7015d7a Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 14:49:37 +0100 Subject: [PATCH 111/140] CLANG appeasal --- lib_rend/ivas_orient_trk.c | 6 +++--- lib_rend/ivas_rotation.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index d63decba09..cf5a4b3028 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -513,13 +513,13 @@ ivas_error ivas_orient_trk_SetReferenceRotation( /* check for Euler angle signaling */ if ( refRot.w == -3.0f ) { - Euler2Quat(deg2rad( refRot.x ), deg2rad( refRot.y ), deg2rad( refRot.z ), &pOTR->refRot ); + Euler2Quat( deg2rad( refRot.x ), deg2rad( refRot.y ), deg2rad( refRot.z ), &pOTR->refRot ); } else { pOTR->refRot = refRot; } - + return IVAS_ERR_OK; } @@ -676,7 +676,7 @@ ivas_error ivas_orient_trk_Process( /* check for Euler angle signaling */ if ( pAbsRot->w == -3.0f ) { - Euler2Quat(deg2rad( pAbsRot->x ), deg2rad( pAbsRot->y ), deg2rad( pAbsRot->z ), &absQuat); + Euler2Quat( deg2rad( pAbsRot->x ), deg2rad( pAbsRot->y ), deg2rad( pAbsRot->z ), &absQuat ); } else { diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 409626de0b..7735fa3f59 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -214,9 +214,9 @@ void Quat2Euler( * pitch: rotate scene in the median plane, increase elevation with positive values * roll: rotate scene from the right ear to the top */ - *yaw = quat.z; + *yaw = quat.z; *pitch = quat.y; - *roll = quat.x; + *roll = quat.x; } return; @@ -230,10 +230,10 @@ void Quat2Euler( *------------------------------------------------------------------------*/ void Euler2Quat( - const float roll, /* i : roll (x) */ - const float pitch, /* i : pitch (y) */ - const float yaw, /* i : yaw (z) */ - IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ + const float roll, /* i : roll (x) */ + const float pitch, /* i : pitch (y) */ + const float yaw, /* i : yaw (z) */ + IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ) { float cr = cosf( roll * 0.5f ); -- GitLab From 7c7349d15a1ab40b4f830248190e03b2d852650f Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 15:14:56 +0100 Subject: [PATCH 112/140] revert Quat2Euler x-z swap --- lib_rend/ivas_rotation.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 7735fa3f59..3c8f7ece46 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -196,15 +196,9 @@ void Quat2Euler( { if ( quat.w != -3.0 ) { -#ifdef FIX_I109_ORIENTATION_TRACKING *roll = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); *yaw = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); -#else // bug: x and z swapped - *yaw = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); - *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); - *roll = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); -#endif } else { -- GitLab From 8a2144d9c1ea9eda8f55e139940122c7b9ed8a12 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 15:46:46 +0100 Subject: [PATCH 113/140] sync to main --- lib_rend/ivas_rotation.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 3c8f7ece46..7735fa3f59 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -196,9 +196,15 @@ void Quat2Euler( { if ( quat.w != -3.0 ) { +#ifdef FIX_I109_ORIENTATION_TRACKING *roll = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); *yaw = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); +#else // bug: x and z swapped + *yaw = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); + *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); + *roll = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); +#endif } else { -- GitLab From 39ef324fb0208f46526a0eef345d02104631a18f Mon Sep 17 00:00:00 2001 From: hsd Date: Wed, 8 Mar 2023 17:50:50 +0100 Subject: [PATCH 114/140] [fix] set reference vector/rot before set headrotation gets called, otherwise there's one frame of delay in the processing which lets the bit exactness tests fails --- apps/renderer.c | 50 ++++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 7206d14585..9437204ee6 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -980,6 +980,22 @@ int main( IsmPositionProvider_getNextFrame( positionProvider, &mtdBuffer ); #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + if ( referenceVectorReader != NULL ) + { + IVAS_VECTOR3 listenerPos, refPos; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); + exit( -1 ); + } + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ /* Read from reference rotation trajectory file if specified */ if ( referenceRotReader != NULL ) { @@ -1028,40 +1044,6 @@ int main( } } -#ifdef FIX_I109_ORIENTATION_TRACKING -#ifdef OTR_REFERENCE_VECTOR_TRACKING - if ( referenceVectorReader != NULL ) - { - IVAS_VECTOR3 listenerPos, refPos; - if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPos, &refPos ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - if ( ( error = IVAS_REND_SetReferenceVector( hIvasRend, listenerPos, refPos ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) ); - exit( -1 ); - } - } -#endif /* OTR_REFERENCE_VECTOR_TRACKING */ - /* Read from reference rotation trajectory file if specified */ - if ( referenceRotReader != NULL ) - { - IVAS_QUATERNION quaternion; - if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error in Head Rotation File Reading.\r\n" ); - exit( -1 ); - } - if ( IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error setting Reference Rotation.\r\n" ); - exit( -1 ); - } - } -#endif - for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) { if ( ( error = IVAS_REND_GetInputNumChannels( hIvasRend, mcIds[i], &numChannels ) ) != IVAS_ERR_OK ) -- GitLab From f30e323c2015252305920e66cbe094e94c5c7648 Mon Sep 17 00:00:00 2001 From: hsd Date: Wed, 8 Mar 2023 19:18:37 +0100 Subject: [PATCH 115/140] [fix] set reference vector/rot before set headrotation gets called, otherwise there's one frame of delay in the processing --- apps/decoder.c | 56 ++++++++++++++++---------------------------------- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index ce81d3a904..6788953ee8 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1585,6 +1585,24 @@ static ivas_error decodeG192( } #ifdef FIX_I109_ORIENTATION_TRACKING +#ifdef OTR_REFERENCE_VECTOR_TRACKING + /* reference vector */ + if ( arg.enableReferenceVectorTracking ) + { + IVAS_VECTOR3 listenerPosition, referencePosition; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ /* Reference rotation */ if ( arg.enableReferenceRotation ) { @@ -1630,44 +1648,6 @@ static ivas_error decodeG192( goto cleanup; } } - -#ifdef FIX_I109_ORIENTATION_TRACKING - /* Reference rotation */ - if ( arg.enableReferenceRotation ) - { - IVAS_QUATERNION quaternion; - if ( ( error = HeadRotationFileReading( refRotReader, &quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); - goto cleanup; - } - - if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } -#ifdef OTR_REFERENCE_VECTOR_TRACKING - /* reference vector */ - if ( arg.enableReferenceVectorTracking ) - { - IVAS_VECTOR3 listenerPosition, referencePosition; - if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); - goto cleanup; - } - - if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } -#endif /* OTR_REFERENCE_VECTOR_TRACKING */ -#endif - /* Run decoder for one frame (get rendered output) */ if ( ( error = IVAS_DEC_GetSamples( hIvasDec, pcmBuf, &nOutSamples ) ) != IVAS_ERR_OK ) { -- GitLab From 87e89954c845eefa2f6caa31302aa050a912a887 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 20:58:32 +0100 Subject: [PATCH 116/140] wrapped angles for deg/rad vv. conversion --- lib_rend/ivas_orient_trk.c | 13 +++++++------ lib_rend/ivas_rotation.c | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index cf5a4b3028..a5a1e95268 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -759,12 +759,13 @@ ivas_error ivas_orient_trk_Process( if ( pAbsRot->w == -3.0f ) { - Quat2Euler( trkQuat, &trkEuler.z, &trkEuler.y, &trkEuler.x ); - trkEuler.x = rad2deg( trkEuler.x ); - trkEuler.y = rad2deg( trkEuler.y ); - trkEuler.z = rad2deg( trkEuler.z ); - trkEuler.w = -3.0f; - *pTrkRot = trkEuler; + //Quat2Euler( trkQuat, &trkEuler.z, &trkEuler.y, &trkEuler.x ); + //trkEuler.x = rad2deg( trkEuler.x ); + //trkEuler.y = rad2deg( trkEuler.y ); + //trkEuler.z = rad2deg( trkEuler.z ); + //trkEuler.w = -3.0f; + //*pTrkRot = trkEuler; + *pTrkRot = trkQuat; } else { diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 7735fa3f59..44b58909fb 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -258,6 +258,15 @@ void Euler2Quat( *------------------------------------------------------------------------*/ float deg2rad( float degrees ) { + if ( degrees > 180.0f ) + { + degrees = degrees - 360.0f; + } + if ( degrees < -180.0f ) + { + degrees = degrees + 360.0f; + } + return PI_OVER_180 * degrees; } @@ -268,6 +277,15 @@ float deg2rad( float degrees ) *------------------------------------------------------------------------*/ float rad2deg( float radians ) { + if ( radians > EVS_PI ) + { + radians = radians - PI2; + } + if ( radians < -EVS_PI ) + { + radians = radians + PI2; + } + return _180_OVER_PI * radians; } -- GitLab From 3cfeb247688487474f8ea2565c96a241852666b1 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 21:30:43 +0100 Subject: [PATCH 117/140] clang to the rescue --- lib_rend/ivas_orient_trk.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index a5a1e95268..cf5a4b3028 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -759,13 +759,12 @@ ivas_error ivas_orient_trk_Process( if ( pAbsRot->w == -3.0f ) { - //Quat2Euler( trkQuat, &trkEuler.z, &trkEuler.y, &trkEuler.x ); - //trkEuler.x = rad2deg( trkEuler.x ); - //trkEuler.y = rad2deg( trkEuler.y ); - //trkEuler.z = rad2deg( trkEuler.z ); - //trkEuler.w = -3.0f; - //*pTrkRot = trkEuler; - *pTrkRot = trkQuat; + Quat2Euler( trkQuat, &trkEuler.z, &trkEuler.y, &trkEuler.x ); + trkEuler.x = rad2deg( trkEuler.x ); + trkEuler.y = rad2deg( trkEuler.y ); + trkEuler.z = rad2deg( trkEuler.z ); + trkEuler.w = -3.0f; + *pTrkRot = trkEuler; } else { -- GitLab From 3a83b608f7f520a958a175bdb135b92e16f7962b Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 21:32:38 +0100 Subject: [PATCH 118/140] forgot to check in file --- lib_rend/ivas_rotation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 44b58909fb..3ede2e3500 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -258,11 +258,11 @@ void Euler2Quat( *------------------------------------------------------------------------*/ float deg2rad( float degrees ) { - if ( degrees > 180.0f ) + if ( degrees >= 180.0f ) { degrees = degrees - 360.0f; } - if ( degrees < -180.0f ) + if ( degrees <= -180.0f ) { degrees = degrees + 360.0f; } @@ -277,11 +277,11 @@ float deg2rad( float degrees ) *------------------------------------------------------------------------*/ float rad2deg( float radians ) { - if ( radians > EVS_PI ) + if ( radians >= EVS_PI ) { radians = radians - PI2; } - if ( radians < -EVS_PI ) + if ( radians <= -EVS_PI ) { radians = radians + PI2; } -- GitLab From afe79562e230fdc4a899df14e2fb7bbff5c67ee0 Mon Sep 17 00:00:00 2001 From: szczerba Date: Wed, 8 Mar 2023 21:59:33 +0100 Subject: [PATCH 119/140] Conversion back to Euler angles removed from orientation tracker, no Euler input anymore for QuatToRotMat function --- lib_rend/ivas_orient_trk.c | 38 +++++++------------------- lib_rend/ivas_prot_rend.h | 18 ++++++------- lib_rend/ivas_rotation.c | 55 +++++++++++++++++++------------------- 3 files changed, 44 insertions(+), 67 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 994fbe822a..bc685c704a 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -367,7 +367,7 @@ void VectorRotationToQuaternion( r->x = cross_product.x; r->y = cross_product.y; r->z = cross_product.z; - r->w = 1.0 + dot_product; + r->w = 1.0f + dot_product; } QuaternionNormalize( *r, r ); } @@ -665,8 +665,7 @@ ivas_error ivas_orient_trk_Process( float alpha = pOTR->alpha; float ang; ivas_error result; - IVAS_QUATERNION absQuat, trkQuat; - IVAS_QUATERNION trkEuler; + IVAS_QUATERNION absQuat; if ( pOTR == NULL || pTrkRot == NULL ) { @@ -688,7 +687,7 @@ ivas_error ivas_orient_trk_Process( switch ( pOTR->trackingType ) { case OTR_TRACKING_NONE: - trkQuat = absQuat; + pOTR->trkRot = absQuat; break; case OTR_TRACKING_REF_ORIENT: @@ -699,8 +698,8 @@ ivas_error ivas_orient_trk_Process( pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ - QuaternionInverse( pOTR->refRot, &trkQuat ); - QuaternionProduct( trkQuat, absQuat, &trkQuat ); + QuaternionInverse( pOTR->refRot, &pOTR->trkRot ); + QuaternionProduct( pOTR->trkRot, absQuat, &pOTR->trkRot ); break; case OTR_TRACKING_AVG_ORIENT: @@ -708,14 +707,14 @@ ivas_error ivas_orient_trk_Process( QuaternionSlerp( pOTR->absAvgRot, absQuat, alpha, &pOTR->absAvgRot ); /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ - QuaternionInverse( pOTR->absAvgRot, &trkQuat ); - QuaternionProduct( trkQuat, absQuat, &trkQuat ); + QuaternionInverse( pOTR->absAvgRot, &pOTR->trkRot ); + QuaternionProduct( pOTR->trkRot, absQuat, &pOTR->trkRot ); /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = QuaternionAngle( absQuat, trkQuat ); + ang = QuaternionAngle( absQuat, pOTR->trkRot ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; @@ -744,7 +743,7 @@ ivas_error ivas_orient_trk_Process( case OTR_TRACKING_REF_VEC_LEV: { /* This processing step of the OTR_TRACKING_REF_VEC/OTR_TRACKING_REF_VEC_LEVEL is identical */ - QuaternionProduct( pOTR->refRot, absQuat, &trkQuat ); + QuaternionProduct( pOTR->refRot, absQuat, &pOTR->trkRot ); break; } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ @@ -753,25 +752,6 @@ ivas_error ivas_orient_trk_Process( break; } - if ( result == IVAS_ERR_OK ) - { - pOTR->trkRot = trkQuat; - - if ( absRot.w == -3.0f ) - { - Quat2Euler( trkQuat, &trkEuler.z, &trkEuler.y, &trkEuler.x ); - trkEuler.x = rad2deg( trkEuler.x ); - trkEuler.y = rad2deg( trkEuler.y ); - trkEuler.z = rad2deg( trkEuler.z ); - trkEuler.w = -3.0f; - *pTrkRot = trkEuler; - } - else - { - *pTrkRot = trkQuat; - } - } - return result; } #else diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index dcf78e7984..25dfa078cc 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -799,16 +799,7 @@ ivas_error ivas_headTrack_open( void ivas_headTrack_close( HEAD_TRACK_DATA_HANDLE *hHeadTrackData /* i/o: head track handle */ ); -#endif -void Quat2Euler( - const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ - float *yaw, /* o : yaw (z) */ - float *pitch, /* o : pitch (y) */ - float *roll /* o : roll (x) */ -); - -#ifdef FIX_I109_ORIENTATION_TRACKING void Euler2Quat( const float roll, /* i : roll (x) */ const float pitch, /* i : pitch (y) */ @@ -818,9 +809,16 @@ void Euler2Quat( float deg2rad( float degrees ); -float rad2deg( float radians ); +#else +void Quat2Euler( + const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ + float *yaw, /* o : yaw (z) */ + float *pitch, /* o : pitch (y) */ + float *roll /* o : roll (x) */ +); #endif + void QuatToRotMat( const IVAS_QUATERNION quat, /* i : quaternion describing the rotation */ float Rmat[3][3] /* o : real-space rotation matrix for this rotation */ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 3e30b7952e..e946654a07 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -120,6 +120,29 @@ void QuatToRotMat( ) { float s1, s2, s3, c1, c2, c3; + +#ifdef FIX_I109_ORIENTATION_TRACKING + c1 = cosf( quat.z / _180_OVER_PI ); + c2 = cosf( quat.y / _180_OVER_PI ); + c3 = cosf( quat.x / _180_OVER_PI ); + + s1 = sinf( quat.z / _180_OVER_PI ); + s2 = sinf( -quat.y / _180_OVER_PI ); + s3 = sinf( quat.x / _180_OVER_PI ); + + Rmat[0][0] = c2 * c3; + Rmat[0][1] = -c2 * s3; + Rmat[0][2] = s2; + + Rmat[1][0] = c1 * s3 + c3 * s1 * s2; + Rmat[1][1] = c1 * c3 - s1 * s2 * s3; + Rmat[1][2] = -c2 * s1; + + Rmat[2][0] = s1 * s3 - c1 * c3 * s2; + Rmat[2][1] = c3 * s1 + c1 * s2 * s3; + Rmat[2][2] = c1 * c2; +#else + #ifdef DEBUGGING /* PrintQuat( quat ); */ #endif @@ -177,10 +200,12 @@ void QuatToRotMat( Rmat[2][1] = c3 * s1 + c1 * s2 * s3; Rmat[2][2] = c1 * c2; } +#endif return; } +#ifndef FIX_I109_ORIENTATION_TRACKING /*------------------------------------------------------------------------- * Quat2Euler() * @@ -196,15 +221,9 @@ void Quat2Euler( { if ( quat.w != -3.0 ) { -#ifdef FIX_I109_ORIENTATION_TRACKING - *roll = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); - *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); - *yaw = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); -#else // bug: x and z swapped *yaw = atan2f( 2 * ( quat.w * quat.x + quat.y * quat.z ), 1 - 2 * ( quat.x * quat.x + quat.y * quat.y ) ); *pitch = asinf( 2 * ( quat.w * quat.y - quat.z * quat.x ) ); *roll = atan2f( 2 * ( quat.w * quat.z + quat.x * quat.y ), 1 - 2 * ( quat.y * quat.y + quat.z * quat.z ) ); -#endif } else { @@ -221,6 +240,7 @@ void Quat2Euler( return; } +#endif #ifdef FIX_I109_ORIENTATION_TRACKING /*------------------------------------------------------------------------- @@ -252,7 +272,7 @@ void Euler2Quat( } /*------------------------------------------------------------------------- - * rad2deg() + * deg2rad() * * Return angle in radians from degrees *------------------------------------------------------------------------*/ @@ -269,29 +289,8 @@ float deg2rad( float degrees ) return PI_OVER_180 * degrees; } - -/*------------------------------------------------------------------------- - * deg2rad() - * - * Return angle in degrees from radians - *------------------------------------------------------------------------*/ -float rad2deg( float radians ) -{ - if ( radians >= EVS_PI ) - { - radians = radians - PI2; - } - if ( radians <= -EVS_PI ) - { - radians = radians + PI2; - } - - return _180_OVER_PI * radians; -} - #endif - /*------------------------------------------------------------------------- * rotateAziEle() * -- GitLab From c1604c895b3ec950e7d94282e2a3d44cbf9a64a7 Mon Sep 17 00:00:00 2001 From: Remco Stoutjesdijk Date: Wed, 8 Mar 2023 22:11:35 +0100 Subject: [PATCH 120/140] while instead of if --- lib_rend/ivas_rotation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 3ede2e3500..d3f6bec381 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -258,11 +258,11 @@ void Euler2Quat( *------------------------------------------------------------------------*/ float deg2rad( float degrees ) { - if ( degrees >= 180.0f ) + while ( degrees >= 180.0f ) { degrees = degrees - 360.0f; } - if ( degrees <= -180.0f ) + while ( degrees <= -180.0f ) { degrees = degrees + 360.0f; } @@ -277,11 +277,11 @@ float deg2rad( float degrees ) *------------------------------------------------------------------------*/ float rad2deg( float radians ) { - if ( radians >= EVS_PI ) + while ( radians >= EVS_PI ) { radians = radians - PI2; } - if ( radians <= -EVS_PI ) + while ( radians <= -EVS_PI ) { radians = radians + PI2; } -- GitLab From ea81af1c30ca0555b4ee8b8861e4ee715861d4e1 Mon Sep 17 00:00:00 2001 From: hsd Date: Wed, 8 Mar 2023 22:58:40 +0100 Subject: [PATCH 121/140] [mod] unified processing of the reference vector modes with OTR_TRACKING_REF_ORIENT --- lib_rend/ivas_orient_trk.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index cf5a4b3028..918b47f232 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -537,20 +537,16 @@ ivas_error ivas_orient_trk_GetMainOrientation( case OTR_TRACKING_NONE: *pOrientation = IdentityQuaternion(); break; +#ifdef OTR_REFERENCE_VECTOR_TRACKING + case OTR_TRACKING_REF_VEC: + case OTR_TRACKING_REF_VEC_LEV: +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ case OTR_TRACKING_REF_ORIENT: *pOrientation = pOTR->refRot; break; case OTR_TRACKING_AVG_ORIENT: *pOrientation = pOTR->absAvgRot; break; -#ifdef OTR_REFERENCE_VECTOR_TRACKING - case OTR_TRACKING_REF_VEC: - *pOrientation = pOTR->refRot; - break; - case OTR_TRACKING_REF_VEC_LEV: - *pOrientation = pOTR->refRot; - break; -#endif /* OTR_REFERENCE_VECTOR_TRACKING */ } return IVAS_ERR_OK; } @@ -587,10 +583,9 @@ ivas_error ivas_orient_trk_SetReferenceVector( switch ( pOTR->trackingType ) { + case OTR_TRACKING_NONE: case OTR_TRACKING_REF_ORIENT: case OTR_TRACKING_AVG_ORIENT: - return IVAS_ERR_WRONG_MODE; - case OTR_TRACKING_NONE: case OTR_TRACKING_REF_VEC: acousticFrontVector = VectorSubtract( listenerPos, refPos ); break; @@ -617,8 +612,7 @@ ivas_error ivas_orient_trk_SetReferenceVector( ivasForwardVector.x = -1.0f; ivasForwardVector.y = 0.0f; ivasForwardVector.z = 0.0f; - VectorRotationToQuaternion( acousticFrontVector, ivasForwardVector, &pOTR->refRot ); - + VectorRotationToQuaternion( ivasForwardVector, acousticFrontVector, &pOTR->refRot ); return IVAS_ERR_OK; } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ @@ -690,7 +684,10 @@ ivas_error ivas_orient_trk_Process( case OTR_TRACKING_NONE: trkQuat = absQuat; break; - +#ifdef OTR_REFERENCE_VECTOR_TRACKING + case OTR_TRACKING_REF_VEC: + case OTR_TRACKING_REF_VEC_LEV: +#endif /* OTR_REFERENCE_VECTOR_TRACKING */ case OTR_TRACKING_REF_ORIENT: /* Reset average orientation */ pOTR->absAvgRot = absQuat; @@ -739,15 +736,6 @@ ivas_error ivas_orient_trk_Process( /* Compute filter coefficient corresponding to desired cutoff frequency */ pOTR->alpha = sinf( 2.0f * EVS_PI * cutoffFrequency / updateRate ); break; -#ifdef OTR_REFERENCE_VECTOR_TRACKING - case OTR_TRACKING_REF_VEC: - case OTR_TRACKING_REF_VEC_LEV: - { - /* This processing step of the OTR_TRACKING_REF_VEC/OTR_TRACKING_REF_VEC_LEVEL is identical */ - QuaternionProduct( pOTR->refRot, absQuat, &trkQuat ); - break; - } -#endif /* OTR_REFERENCE_VECTOR_TRACKING */ default: result = IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Non-supported orientation tracking adaptation type" ); break; -- GitLab From a39e0f1f7e2642ae675d492d62904d18553b3c3c Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 9 Mar 2023 10:54:10 +0100 Subject: [PATCH 122/140] QuatToRotMat update correction (wrong input mode) --- lib_rend/ivas_rotation.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 52858fdb80..8f236a64c8 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -122,25 +122,17 @@ void QuatToRotMat( float s1, s2, s3, c1, c2, c3; #ifdef FIX_I109_ORIENTATION_TRACKING - c1 = cosf( quat.z / _180_OVER_PI ); - c2 = cosf( quat.y / _180_OVER_PI ); - c3 = cosf( quat.x / _180_OVER_PI ); + Rmat[0][0] = quat.w * quat.w + quat.x * quat.x - quat.y * quat.y - quat.z * quat.z; + Rmat[0][1] = 2.0f * ( quat.x * quat.y - quat.w * quat.z ); + Rmat[0][2] = 2.0f * ( quat.x * quat.z + quat.w * quat.y ); - s1 = sinf( quat.z / _180_OVER_PI ); - s2 = sinf( -quat.y / _180_OVER_PI ); - s3 = sinf( quat.x / _180_OVER_PI ); + Rmat[1][0] = 2.0f * ( quat.x * quat.y + quat.w * quat.z ); + Rmat[1][1] = quat.w * quat.w - quat.x * quat.x + quat.y * quat.y - quat.z * quat.z; + Rmat[1][2] = 2.0f * ( quat.y * quat.z - quat.w * quat.x ); - Rmat[0][0] = c2 * c3; - Rmat[0][1] = -c2 * s3; - Rmat[0][2] = s2; - - Rmat[1][0] = c1 * s3 + c3 * s1 * s2; - Rmat[1][1] = c1 * c3 - s1 * s2 * s3; - Rmat[1][2] = -c2 * s1; - - Rmat[2][0] = s1 * s3 - c1 * c3 * s2; - Rmat[2][1] = c3 * s1 + c1 * s2 * s3; - Rmat[2][2] = c1 * c2; + Rmat[2][0] = 2.0f * ( quat.x * quat.z - quat.w * quat.y ); + Rmat[2][1] = 2.0f * ( quat.y * quat.z + quat.w * quat.x ); + Rmat[2][2] = quat.w * quat.w - quat.x * quat.x - quat.y * quat.y + quat.z * quat.z; #else #ifdef DEBUGGING -- GitLab From 7546d0553cf364f881275a15ccd7e695623ea3e9 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 9 Mar 2023 10:57:20 +0100 Subject: [PATCH 123/140] Unused variables cleanup --- lib_rend/ivas_rotation.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 8f236a64c8..f1bbabdab1 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -119,8 +119,6 @@ void QuatToRotMat( float Rmat[3][3] /* o : real-space rotation matrix for this rotation */ ) { - float s1, s2, s3, c1, c2, c3; - #ifdef FIX_I109_ORIENTATION_TRACKING Rmat[0][0] = quat.w * quat.w + quat.x * quat.x - quat.y * quat.y - quat.z * quat.z; Rmat[0][1] = 2.0f * ( quat.x * quat.y - quat.w * quat.z ); @@ -134,6 +132,7 @@ void QuatToRotMat( Rmat[2][1] = 2.0f * ( quat.y * quat.z + quat.w * quat.x ); Rmat[2][2] = quat.w * quat.w - quat.x * quat.x - quat.y * quat.y + quat.z * quat.z; #else + float s1, s2, s3, c1, c2, c3; #ifdef DEBUGGING /* PrintQuat( quat ); */ -- GitLab From c7cc7d9a5216ce6ee24a431936a028aace6d78e3 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 9 Mar 2023 11:04:45 +0100 Subject: [PATCH 124/140] Missing assignment --- lib_rend/ivas_orient_trk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index bc685c704a..49748ae85b 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -752,6 +752,10 @@ ivas_error ivas_orient_trk_Process( break; } + if ( result == IVAS_ERR_OK ) + { + *pTrkRot = pOTR->trkRot; + } return result; } #else -- GitLab From 718f59c918aade943e9695ff27345edfc4e13479 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 9 Mar 2023 11:23:55 +0100 Subject: [PATCH 125/140] Euler to quaternion conversion moved out of orientation tracking processing --- lib_dec/lib_dec.c | 10 ++++++++++ lib_rend/ivas_orient_trk.c | 25 +++++++------------------ lib_rend/lib_rend.c | 19 ++++++++++++++++--- 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index ab81c62206..faf2ddc204 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -906,7 +906,11 @@ ivas_error IVAS_DEC_FeedHeadTrackData( HEAD_TRACK_DATA_HANDLE hHeadTrackData; int16_t i; +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || orientation == NULL ) +#else if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) +#endif { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } @@ -922,6 +926,12 @@ ivas_error IVAS_DEC_FeedHeadTrackData( for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) { #ifdef FIX_I109_ORIENTATION_TRACKING + /* check for Euler angle signaling */ + if ( orientation[i].w == -3.0f ) + { + Euler2Quat( deg2rad( orientation[i].x ), deg2rad( orientation[i].y ), deg2rad( orientation[i].z ), &orientation[i] ); + } + ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation[i], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[i] ); #else hHeadTrackData->Quaternions[i].w = orientation[i].w; diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 49748ae85b..f8eaca2e23 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -665,56 +665,45 @@ ivas_error ivas_orient_trk_Process( float alpha = pOTR->alpha; float ang; ivas_error result; - IVAS_QUATERNION absQuat; if ( pOTR == NULL || pTrkRot == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - /* check for Euler angle signaling */ - if ( absRot.w == -3.0f ) - { - Euler2Quat( deg2rad( absRot.x ), deg2rad( absRot.y ), deg2rad( absRot.z ), &absQuat ); - } - else - { - absQuat = absRot; - } - result = IVAS_ERR_OK; switch ( pOTR->trackingType ) { case OTR_TRACKING_NONE: - pOTR->trkRot = absQuat; + pOTR->trkRot = absRot; break; case OTR_TRACKING_REF_ORIENT: /* Reset average orientation */ - pOTR->absAvgRot = absQuat; + pOTR->absAvgRot = absRot; /* Reset adaptation filter - start adaptation at center rate */ pOTR->alpha = sinf( 2.0f * EVS_PI * pOTR->centerAdaptationRate / updateRate ); /* Compute relative orientation = (absolute orientation) - (reference orientation) */ QuaternionInverse( pOTR->refRot, &pOTR->trkRot ); - QuaternionProduct( pOTR->trkRot, absQuat, &pOTR->trkRot ); + QuaternionProduct( pOTR->trkRot, absRot, &pOTR->trkRot ); break; case OTR_TRACKING_AVG_ORIENT: /* Compute average (low-pass filtered) absolute orientation */ - QuaternionSlerp( pOTR->absAvgRot, absQuat, alpha, &pOTR->absAvgRot ); + QuaternionSlerp( pOTR->absAvgRot, absRot, alpha, &pOTR->absAvgRot ); /* Compute relative orientation = (absolute orientation) - (average absolute orientation) */ QuaternionInverse( pOTR->absAvgRot, &pOTR->trkRot ); - QuaternionProduct( pOTR->trkRot, absQuat, &pOTR->trkRot ); + QuaternionProduct( pOTR->trkRot, absRot, &pOTR->trkRot ); /* Adapt LPF constant based on orientation excursion relative to current mean: - low cutoff (slow adaptation) for small excursions (around center) - high cutoff (fast adaptation) for large excursions (off-center) */ - ang = QuaternionAngle( absQuat, pOTR->trkRot ); + ang = QuaternionAngle( absRot, pOTR->trkRot ); normalizedOrientation = ang * ang; relativeOrientationRate = sqrtf( normalizedOrientation ) / pOTR->adaptationAngle; @@ -743,7 +732,7 @@ ivas_error ivas_orient_trk_Process( case OTR_TRACKING_REF_VEC_LEV: { /* This processing step of the OTR_TRACKING_REF_VEC/OTR_TRACKING_REF_VEC_LEVEL is identical */ - QuaternionProduct( pOTR->refRot, absQuat, &pOTR->trkRot ); + QuaternionProduct( pOTR->refRot, absRot, &pOTR->trkRot ); break; } #endif /* OTR_REFERENCE_VECTOR_TRACKING */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7e0b2997bc..dc8fe6f510 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3017,7 +3017,7 @@ static IVAS_REND_InputId makeInputId( /* Put config type in second byte (from LSB), put index + 1 in first byte * * Index is incremented here so that a valid ID can never be 0. */ - return (IVAS_REND_InputId) ( ( ( (uint32_t) getAudioConfigType( config ) ) << 8 ) | ( inputIndex + 1 ) ); + return ( IVAS_REND_InputId )( ( ( (uint32_t) getAudioConfigType( config ) ) << 8 ) | ( inputIndex + 1 ) ); } static ivas_error getInputById( @@ -3642,7 +3642,7 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { - latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); + latency_ns = NS2SA( hIvasRend->sampleRateOut, ( int32_t )( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); max_latency_ns = max( max_latency_ns, latency_ns ); } } @@ -3967,6 +3967,9 @@ ivas_error IVAS_REND_SetHeadRotation( ) { int16_t i; +#ifdef FIX_I109_ORIENTATION_TRACKING + IVAS_QUATERNION rotQuat; +#endif /*-----------------------------------------------------------------* * Validate function arguments @@ -3993,7 +3996,17 @@ ivas_error IVAS_REND_SetHeadRotation( for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; ++i ) { #ifdef FIX_I109_ORIENTATION_TRACKING - ivas_orient_trk_Process( hIvasRend->headRotData.hOrientationTracker, headRot[i], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hIvasRend->headRotData.headPositions[i] ); + /* check for Euler angle signaling */ + if ( headRot[i].w == -3.0f ) + { + Euler2Quat( deg2rad( headRot[i].x ), deg2rad( headRot[i].y ), deg2rad( headRot[i].z ), &rotQuat ); + } + else + { + rotQuat = headRot[i]; + } + + ivas_orient_trk_Process( hIvasRend->headRotData.hOrientationTracker, rotQuat, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hIvasRend->headRotData.headPositions[i] ); #else hIvasRend->headRotData.headPositions[i] = headRot[i]; #endif -- GitLab From d5acb9ae3f17e63ebc0ca27ca025f055a3c8edd5 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 16 Mar 2023 12:22:49 +0100 Subject: [PATCH 126/140] Fix for a merge glitch --- lib_rend/ivas_orient_trk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index df8f117a44..a408cf284a 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -478,9 +478,9 @@ void ivas_orient_trk_Init( pOTR->trkYaw = 0.0f; pOTR->trkPitch = 0.0f; pOTR->trkRoll = 0.0f; -#endif return; +#endif } -- GitLab From 7a222b8e257c7e1cc30f56a8191a1951de892cf6 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 16 Mar 2023 13:27:02 +0100 Subject: [PATCH 127/140] Cleanup --- lib_rend/ivas_crend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 9520928d36..c109c56072 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1976,7 +1976,9 @@ ivas_error ivas_rend_openCrend( const AUDIO_CONFIG outConfig, RENDER_CONFIG_DATA *hRendCfg, #ifdef FIX_197_CREND_INTERFACE +#ifndef FIX_I109_ORIENTATION_TRACKING int16_t Opt_Headrotation, +#endif #endif HRTFS_CREND_HANDLE hSetOfHRTF, const int32_t output_Fs ) -- GitLab From 16398292c377537f0079eedb4ff4ff6ded4e15a0 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 16 Mar 2023 16:19:33 +0100 Subject: [PATCH 128/140] Restoring unused openCrend function parameter --- lib_rend/ivas_crend.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index c109c56072..9520928d36 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1976,9 +1976,7 @@ ivas_error ivas_rend_openCrend( const AUDIO_CONFIG outConfig, RENDER_CONFIG_DATA *hRendCfg, #ifdef FIX_197_CREND_INTERFACE -#ifndef FIX_I109_ORIENTATION_TRACKING int16_t Opt_Headrotation, -#endif #endif HRTFS_CREND_HANDLE hSetOfHRTF, const int32_t output_Fs ) -- GitLab From 05addaab89543ec5e84fbccd79742324f81dc701 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 16 Mar 2023 16:25:08 +0100 Subject: [PATCH 129/140] To suppress unused parameter warning --- lib_rend/ivas_crend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 9520928d36..84f3fb87ea 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -2142,6 +2142,7 @@ ivas_error ivas_rend_openCrend( #ifndef FIX_I109_ORIENTATION_TRACKING if ( Opt_Headrotation ) #else + (void) Opt_Headrotation; if ( false ) /* TODO tmu : check renderer headrotation flag */ #endif { -- GitLab From 530f5975d73d35b44f0a83d34d905e56671cb8cf Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 16 Mar 2023 17:04:13 +0100 Subject: [PATCH 130/140] cleanup: formatting update (clang) --- lib_rend/ivas_rotation.c | 3 +-- lib_rend/lib_rend.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index ab69b24530..0c991c79e7 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -268,8 +268,7 @@ void Euler2Quat( * Converts degrees to normalized radians *------------------------------------------------------------------------*/ float deg2rad( - float degrees -) + float degrees ) { while ( degrees >= 180.0f ) { diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 025acc1860..89e25285af 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3102,7 +3102,7 @@ static IVAS_REND_InputId makeInputId( /* Put config type in second byte (from LSB), put index + 1 in first byte * * Index is incremented here so that a valid ID can never be 0. */ - return ( IVAS_REND_InputId )( ( ( (uint32_t) getAudioConfigType( config ) ) << 8 ) | ( inputIndex + 1 ) ); + return (IVAS_REND_InputId) ( ( ( (uint32_t) getAudioConfigType( config ) ) << 8 ) | ( inputIndex + 1 ) ); } static ivas_error getInputById( @@ -3730,7 +3730,7 @@ ivas_error IVAS_REND_GetDelay( { if ( hIvasRend->inputsMasa[i].base.inConfig != IVAS_REND_AUDIO_CONFIG_UNKNOWN ) { - latency_ns = NS2SA( hIvasRend->sampleRateOut, ( int32_t )( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); + latency_ns = NS2SA( hIvasRend->sampleRateOut, (int32_t) ( (float) IVAS_FB_DEC_DELAY_NS + 0.5f ) ); max_latency_ns = max( max_latency_ns, latency_ns ); } } -- GitLab From 4e377afd6b369de8231c5459d2d1f5b91ee70de7 Mon Sep 17 00:00:00 2001 From: szczerba Date: Thu, 16 Mar 2023 17:19:10 +0100 Subject: [PATCH 131/140] cleanup: formatting update (clang) --- lib_rend/ivas_objectRenderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 7ec5e4aa52..61c78083a9 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -689,13 +689,13 @@ ivas_error ivas_td_binaural_renderer_ext( #endif #ifdef FIX_330_ENABLE_TD_RENDERER_REVERB_REND if ( ( error = ivas_td_binaural_renderer_unwrap( reverb, transport_config, pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, headRotData->headRotEnabled, - ( headRotData != NULL ) ? headRotData->headPositions : NULL, output, output_frame ) ) != IVAS_ERR_OK ) + ( headRotData != NULL ) ? headRotData->headPositions : NULL, output, output_frame ) ) != IVAS_ERR_OK ) { return error; } #else if ( ( error = ivas_td_binaural_renderer_unwrap( NULL, 1, NULL, transport_config, output_Fs, pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, headRotData->headRotEnabled, - ( headRotData != NULL ) ? headRotData->headPositions : NULL, output, output_frame ) ) != IVAS_ERR_OK ) + ( headRotData != NULL ) ? headRotData->headPositions : NULL, output, output_frame ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From 4818c7da1e85bcb1d190a199ee6007230a9b7144 Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 17 Mar 2023 12:12:19 +0100 Subject: [PATCH 132/140] Null position pointer handling --- lib_util/head_rotation_file_reader.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib_util/head_rotation_file_reader.c b/lib_util/head_rotation_file_reader.c index 3dab8a5b01..98a89ef3bb 100644 --- a/lib_util/head_rotation_file_reader.c +++ b/lib_util/head_rotation_file_reader.c @@ -132,11 +132,6 @@ ivas_error HeadRotationFileReading( return IVAS_ERR_FAILED_FILE_PARSE; } - if ( read_values == 7 && pPos == NULL ) - { - return IVAS_ERR_UNEXPECTED_NULL_POINTER; - } - ( headRotReader->frameCounter )++; pQuaternion->w = w; @@ -144,9 +139,12 @@ ivas_error HeadRotationFileReading( pQuaternion->y = y; pQuaternion->z = z; #ifdef TD5 - pPos->x = posx; - pPos->y = posy; - pPos->z = posz; + if ( pPos != NULL ) + { + pPos->x = posx; + pPos->y = posy; + pPos->z = posz; + } #endif return IVAS_ERR_OK; -- GitLab From e32c5f1b80cf2e922fe76b4bb955b35542bdaee0 Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 17 Mar 2023 13:14:08 +0100 Subject: [PATCH 133/140] Fix for the botched merge --- apps/renderer.c | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/apps/renderer.c b/apps/renderer.c index 833ac7cd4d..46102c54b6 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -716,49 +716,49 @@ int main( if ( ( error = IVAS_REND_InitConfig( hIvasRend, ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) || ( args.outConfig.audioConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_REND_InitConfig( hIvasRend, strlen( args.renderConfigFilePath ) != 0 ) ) != IVAS_ERR_OK ) +#endif { fprintf( stderr, "Error in Renderer Config Init\n" ); exit( -1 ); } -#endif - if ( args.renderConfigFilePath[0] != '\0' ) - { - IVAS_RENDER_CONFIG_DATA renderConfig; + if ( args.renderConfigFilePath[0] != '\0' ) + { + IVAS_RENDER_CONFIG_DATA renderConfig; - /* sanity check */ + /* sanity check */ #ifdef TD5 - if ( ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) && ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) + if ( ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) && ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL ) ) #else if ( args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) #endif - { + { #ifdef TD5 - fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL or BINAURAL_ROOM is used as output. Exiting. \n" ); + fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL or BINAURAL_ROOM is used as output. Exiting. \n" ); #else fprintf( stderr, "\nExternal Renderer Config is supported only when BINAURAL_ROOM is used as output. Exiting. \n" ); #endif - exit( -1 ); - } + exit( -1 ); + } - if ( ( error = IVAS_REND_GetRenderConfig( hIvasRend, &renderConfig ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_GetRenderConfig failed\n" ); - exit( -1 ); - } + if ( ( error = IVAS_REND_GetRenderConfig( hIvasRend, &renderConfig ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_GetRenderConfig failed\n" ); + exit( -1 ); + } - if ( RenderConfigReader_read( renderConfigReader, &renderConfig ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Failed to read renderer configuration from file %s\n", args.renderConfigFilePath ); - exit( -1 ); - } + if ( RenderConfigReader_read( renderConfigReader, &renderConfig ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Failed to read renderer configuration from file %s\n", args.renderConfigFilePath ); + exit( -1 ); + } - if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed\n" ); - exit( -1 ); - } + if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed\n" ); + exit( -1 ); } + } #ifdef FIX_I109_ORIENTATION_TRACKING if ( IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientationTracking ) ) -- GitLab From 565736146b5d71659c787edef2a77bf1d957ce82 Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 17 Mar 2023 13:54:48 +0100 Subject: [PATCH 134/140] Fix for the botched merge --- lib_rend/ivas_objectRenderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 2d1901288a..4a72b76384 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -455,11 +455,12 @@ void TDREND_Update_object_positions( Dir[1] = 0.0f; Dir[2] = 0.0f; +#endif /* Source directivity info */ DirAtten_p->ConeInnerAngle = 360.0f; DirAtten_p->ConeOuterAngle = 360.0f; DirAtten_p->ConeOuterGain = 1.0f; -#endif + TDREND_MIX_SRC_SetPos( hBinRendererTd, nS, Pos ); TDREND_MIX_SRC_SetDirAtten( hBinRendererTd, nS, DirAtten_p ); TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING ); -- GitLab From ebf161d450908dba93a242fa61172d0125b9eb9c Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 17 Mar 2023 13:57:58 +0100 Subject: [PATCH 135/140] cleanup: formatting update (clang) --- lib_util/head_rotation_file_reader.c | 6 +++--- lib_util/head_rotation_file_reader.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_util/head_rotation_file_reader.c b/lib_util/head_rotation_file_reader.c index 98a89ef3bb..a7ef6b04ea 100644 --- a/lib_util/head_rotation_file_reader.c +++ b/lib_util/head_rotation_file_reader.c @@ -95,10 +95,10 @@ ivas_error HeadRotationFileReader_open( ivas_error HeadRotationFileReading( HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ #ifdef TD5 - IVAS_QUATERNION *pQuaternion, /* o : head-tracking data */ - IVAS_POSITION *pPos /* o : listener position */ + IVAS_QUATERNION *pQuaternion, /* o : head-tracking data */ + IVAS_POSITION *pPos /* o : listener position */ #else - IVAS_QUATERNION *pQuaternion /* o : head-tracking data */ + IVAS_QUATERNION *pQuaternion /* o : head-tracking data */ #endif ) { diff --git a/lib_util/head_rotation_file_reader.h b/lib_util/head_rotation_file_reader.h index 127dd3a9fc..2a995f15f6 100644 --- a/lib_util/head_rotation_file_reader.h +++ b/lib_util/head_rotation_file_reader.h @@ -61,10 +61,10 @@ ivas_error HeadRotationFileReader_open( ivas_error HeadRotationFileReading( HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ #ifdef TD5 - IVAS_QUATERNION *pQuaternion, /* o : head-tracking data */ - IVAS_POSITION *pPos /* o : listener position */ + IVAS_QUATERNION *pQuaternion, /* o : head-tracking data */ + IVAS_POSITION *pPos /* o : listener position */ #else - IVAS_QUATERNION *pQuaternion /* o : head-tracking data */ + IVAS_QUATERNION *pQuaternion /* o : head-tracking data */ #endif ); #else -- GitLab From 0d5596b59f5e1a67b3c3974c277ec1157e22b0f8 Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 17 Mar 2023 14:25:30 +0100 Subject: [PATCH 136/140] [add] TD5_FIX_INVALID_MEMORY_ACCESS flag. Resolves segfault in case IVAS_REND_InitConfig gets initialized with rendererConfigEnabled:=false && ISM are being rendered. --- lib_com/options.h | 1 + lib_rend/ivas_objectRenderer.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index a33ea2f8d7..73615a0257 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,6 +150,7 @@ #define FIX_372_LIB_REND_VALIDATE_IO /* FhG: Issue 372: IVAS_rend segfaults with unsupported I/O configs - add validation checks of I/O config */ #define FIX_376_SBA_ROTATE /*DLB: Fix for issue 376*/ #define TD5 /* Eri: Contribution 17: Extended metadata for 6 DoF rendering in TD renderer */ +#define TD5_FIX_INVALID_MEMORY_ACCESS /* FhG: Resolves segfault in case IVAS_REND_InitConfig gets initialized with rendererConfigEnabled:=false && ISM are being rendered */ #ifdef FIX_I109_ORIENTATION_TRACKING #define OTR_REFERENCE_VECTOR_TRACKING /* FhG: enables the reference position orientation tracking mode */ diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 4a72b76384..d18d3c5f47 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -201,9 +201,24 @@ ivas_error ivas_td_binaural_open_unwrap( if ( ivas_format == ISM_FORMAT ) { DirAtten_p = pBinRendTd->DirAtten_p; +#ifdef TD5_FIX_INVALID_MEMORY_ACCESS + if(NULL == directivity) + { + DirAtten_p->ConeInnerAngle = 360.0f; /* Front cone */ + DirAtten_p->ConeOuterAngle = 360.0f; /* Back cone */ + DirAtten_p->ConeOuterGain = 1.0f; /* Back attenuation */ + } + else + { + DirAtten_p->ConeInnerAngle = directivity[0]; + DirAtten_p->ConeOuterAngle = directivity[1]; + DirAtten_p->ConeOuterGain = directivity[2]; + } +#else DirAtten_p->ConeInnerAngle = directivity[0]; DirAtten_p->ConeOuterAngle = directivity[1]; DirAtten_p->ConeOuterGain = directivity[2]; +#endif for ( nS = 0; nS < nchan_rend; nS++ ) { @@ -575,6 +590,9 @@ ivas_error ivas_td_binaural_open_ext( IVAS_FORMAT ivas_format; IVAS_OUTPUT_SETUP hTransSetup; ivas_error error; +#ifdef TD5_FIX_INVALID_MEMORY_ACCESS + float* directivity = NULL; +#endif if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { @@ -594,7 +612,13 @@ ivas_error ivas_td_binaural_open_ext( hTransSetup.ls_elevation = customLsInput->ls_elevation; #ifdef TD5 +#ifdef TD5_FIX_INVALID_MEMORY_ACCESS + if(NULL != hRendCfg) + directivity = hRendCfg->directivity; + return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, directivity, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); +#else return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hRendCfg->directivity, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); +#endif #else return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); #endif -- GitLab From 40372f79bb7f5f6fd3e5f1830e03c5607b68d4d4 Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 17 Mar 2023 14:27:05 +0100 Subject: [PATCH 137/140] [cleanup] clang-format --- lib_util/head_rotation_file_reader.c | 2 +- lib_util/head_rotation_file_reader.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_util/head_rotation_file_reader.c b/lib_util/head_rotation_file_reader.c index a7ef6b04ea..500fdd2b7a 100644 --- a/lib_util/head_rotation_file_reader.c +++ b/lib_util/head_rotation_file_reader.c @@ -155,7 +155,7 @@ ivas_error HeadRotationFileReading( HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ IVAS_QUATERNION *Quaternions, /* o : head-tracking data, listener orientation */ #ifdef TD5 - IVAS_POSITION *Pos /* o : listener position */ + IVAS_POSITION *Pos /* o : listener position */ #else const int32_t frame_dec /* i : decoded frame number */ #endif diff --git a/lib_util/head_rotation_file_reader.h b/lib_util/head_rotation_file_reader.h index 2a995f15f6..d735423e2c 100644 --- a/lib_util/head_rotation_file_reader.h +++ b/lib_util/head_rotation_file_reader.h @@ -72,7 +72,7 @@ ivas_error HeadRotationFileReading( HeadRotFileReader *headRotReader, /* i/o: HeadRotFileReader handle */ IVAS_QUATERNION *Quaternions, /* o : head-tracking data */ #ifdef TD5 - IVAS_POSITION *Pos /* o : listener position */ + IVAS_POSITION *Pos /* o : listener position */ #else const int32_t frame_dec /* i : decoded frame number */ #endif -- GitLab From da1228bb10560c47dbc62f140663db983f4e785e Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 17 Mar 2023 14:34:51 +0100 Subject: [PATCH 138/140] [cleanup] clang-format --- lib_rend/ivas_objectRenderer.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index d18d3c5f47..270da74b5c 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -202,17 +202,17 @@ ivas_error ivas_td_binaural_open_unwrap( { DirAtten_p = pBinRendTd->DirAtten_p; #ifdef TD5_FIX_INVALID_MEMORY_ACCESS - if(NULL == directivity) + if ( NULL == directivity ) { - DirAtten_p->ConeInnerAngle = 360.0f; /* Front cone */ - DirAtten_p->ConeOuterAngle = 360.0f; /* Back cone */ - DirAtten_p->ConeOuterGain = 1.0f; /* Back attenuation */ + DirAtten_p->ConeInnerAngle = 360.0f; /* Front cone */ + DirAtten_p->ConeOuterAngle = 360.0f; /* Back cone */ + DirAtten_p->ConeOuterGain = 1.0f; /* Back attenuation */ } else { - DirAtten_p->ConeInnerAngle = directivity[0]; - DirAtten_p->ConeOuterAngle = directivity[1]; - DirAtten_p->ConeOuterGain = directivity[2]; + DirAtten_p->ConeInnerAngle = directivity[0]; + DirAtten_p->ConeOuterAngle = directivity[1]; + DirAtten_p->ConeOuterGain = directivity[2]; } #else DirAtten_p->ConeInnerAngle = directivity[0]; @@ -591,7 +591,7 @@ ivas_error ivas_td_binaural_open_ext( IVAS_OUTPUT_SETUP hTransSetup; ivas_error error; #ifdef TD5_FIX_INVALID_MEMORY_ACCESS - float* directivity = NULL; + float *directivity = NULL; #endif if ( inConfig != IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) @@ -613,8 +613,8 @@ ivas_error ivas_td_binaural_open_ext( #ifdef TD5 #ifdef TD5_FIX_INVALID_MEMORY_ACCESS - if(NULL != hRendCfg) - directivity = hRendCfg->directivity; + if ( NULL != hRendCfg ) + directivity = hRendCfg->directivity; return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, directivity, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); #else return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, hRendCfg->directivity, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns ); -- GitLab From 0df79b886eb4af5649ccad04811f26fc41b99f76 Mon Sep 17 00:00:00 2001 From: szczerba Date: Fri, 17 Mar 2023 14:51:06 +0100 Subject: [PATCH 139/140] [Cleanup] removal of unused parameter from ivas_rend_openCrend function --- lib_dec/ivas_init_dec.c | 5 +++++ lib_dec/ivas_ism_dec.c | 2 ++ lib_dec/ivas_mct_dec.c | 5 ++++- lib_rend/ivas_crend.c | 2 ++ lib_rend/ivas_prot_rend.h | 2 ++ lib_rend/lib_rend.c | 8 ++++++++ 6 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 244060fb6d..a3a48030a9 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1278,8 +1278,13 @@ ivas_error ivas_init_decoder( } } +#ifdef FIX_I109_ORIENTATION_TRACKING + if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, + st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) +#endif { return error; } diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index 28a36d36d4..5fd1c879f1 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -155,7 +155,9 @@ static ivas_error ivas_ism_bitrate_switching( st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hRenderConfig, +#ifndef FIX_I109_ORIENTATION_TRACKING st_ivas->hDecoderConfig->Opt_Headrotation, +#endif st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 1e34ef397a..96a535f427 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1145,7 +1145,10 @@ static ivas_error ivas_mc_dec_reconfig( if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, - st_ivas->hRenderConfig, st_ivas->hDecoderConfig->Opt_Headrotation, + st_ivas->hRenderConfig, +#ifndef FIX_I109_ORIENTATION_TRACKING + st_ivas->hDecoderConfig->Opt_Headrotation, +#endif st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 6fa03ba7dd..f9673656f1 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -733,7 +733,9 @@ ivas_error ivas_rend_openCrend( const AUDIO_CONFIG inConfig, const AUDIO_CONFIG outConfig, RENDER_CONFIG_DATA *hRendCfg, +#ifndef FIX_I109_ORIENTATION_TRACKING int16_t Opt_Headrotation, +#endif HRTFS_CREND_HANDLE hSetOfHRTF, const int32_t output_Fs ) { diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index a01d9ccbcc..2b0e67e5f4 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -493,7 +493,9 @@ ivas_error ivas_rend_openCrend( const AUDIO_CONFIG inConfig, const AUDIO_CONFIG outConfig, RENDER_CONFIG_DATA *hRendCfg, +#ifndef FIX_I109_ORIENTATION_TRACKING int16_t Opt_Headrotation, +#endif HRTFS_CREND_HANDLE hSetOfHRTF, const int32_t output_Fs ); diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 1c84149ef1..a69393e10e 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1137,7 +1137,9 @@ static ivas_error setRendInputActiveIsm( if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), hRendCfg, +#ifndef FIX_I109_ORIENTATION_TRACKING 0, +#endif NULL, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK ) { return error; @@ -1862,7 +1864,9 @@ static ivas_error initMcBinauralRendering( if ( ( error = ivas_rend_openCrend( &inputMc->crendWrapper, ( inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) ? AUDIO_CONFIG_7_1_4 : getIvasAudioConfigFromRendAudioConfig( inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), hRendCfg, +#ifndef FIX_I109_ORIENTATION_TRACKING 0, +#endif NULL, outSampleRate ) ) != IVAS_ERR_OK ) { return error; @@ -2137,7 +2141,9 @@ static ivas_error updateSbaPanGains( getIvasAudioConfigFromRendAudioConfig( inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), hRendCfg, +#ifndef FIX_I109_ORIENTATION_TRACKING 0, +#endif NULL, *rendCtx.pOutSampleRate ); break; @@ -2151,7 +2157,9 @@ static ivas_error updateSbaPanGains( AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), hRendCfg, +#ifndef FIX_I109_ORIENTATION_TRACKING 0, +#endif NULL, *rendCtx.pOutSampleRate ); break; -- GitLab From a927622ace85f1f604b6b8acc39d75646a9872fe Mon Sep 17 00:00:00 2001 From: hsd Date: Fri, 17 Mar 2023 15:14:47 +0100 Subject: [PATCH 140/140] [add] Vector3Pair trajectory file to ensure that a constant positional offset between listener and reference (10, in all axis) gets correctly compensated in REF_VEC otr mode --- ...p-and-down-4s-fixed-pos-offset-Vector3.csv | 200 ++++++++++++++++++ tests/renderer/test_renderer.py | 23 ++ 2 files changed, 223 insertions(+) create mode 100644 scripts/trajectories/full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv diff --git a/scripts/trajectories/full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv b/scripts/trajectories/full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv new file mode 100644 index 0000000000..c858131d94 --- /dev/null +++ b/scripts/trajectories/full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv @@ -0,0 +1,200 @@ +10.0000,10.0000,10.0000,10.7012,9.9780,9.2874 +10.0000,10.0000,10.0000,10.7057,9.9556,9.2929 +10.0000,10.0000,10.0000,10.7095,9.9329,9.2985 +10.0000,10.0000,10.0000,10.7125,9.9100,9.3041 +10.0000,10.0000,10.0000,10.7147,9.8868,9.3097 +10.0000,10.0000,10.0000,10.7161,9.8634,9.3155 +10.0000,10.0000,10.0000,10.7166,9.8398,9.3212 +10.0000,10.0000,10.0000,10.7164,9.8161,9.3270 +10.0000,10.0000,10.0000,10.7153,9.7922,9.3328 +10.0000,10.0000,10.0000,10.7134,9.7682,9.3387 +10.0000,10.0000,10.0000,10.7106,9.7442,9.3446 +10.0000,10.0000,10.0000,10.7070,9.7201,9.3506 +10.0000,10.0000,10.0000,10.7025,9.6960,9.3565 +10.0000,10.0000,10.0000,10.6972,9.6719,9.3626 +10.0000,10.0000,10.0000,10.6910,9.6479,9.3686 +10.0000,10.0000,10.0000,10.6839,9.6240,9.3748 +10.0000,10.0000,10.0000,10.6760,9.6002,9.3809 +10.0000,10.0000,10.0000,10.6671,9.5766,9.3871 +10.0000,10.0000,10.0000,10.6575,9.5532,9.3933 +10.0000,10.0000,10.0000,10.6470,9.5300,9.3996 +10.0000,10.0000,10.0000,10.6356,9.5070,9.4059 +10.0000,10.0000,10.0000,10.6234,9.4843,9.4122 +10.0000,10.0000,10.0000,10.6103,9.4620,9.4186 +10.0000,10.0000,10.0000,10.5964,9.4399,9.4250 +10.0000,10.0000,10.0000,10.5817,9.4183,9.4314 +10.0000,10.0000,10.0000,10.5662,9.3971,9.4379 +10.0000,10.0000,10.0000,10.5499,9.3763,9.4444 +10.0000,10.0000,10.0000,10.5328,9.3560,9.4510 +10.0000,10.0000,10.0000,10.5149,9.3362,9.4576 +10.0000,10.0000,10.0000,10.4963,9.3169,9.4642 +10.0000,10.0000,10.0000,10.4769,9.2982,9.4708 +10.0000,10.0000,10.0000,10.4569,9.2801,9.4775 +10.0000,10.0000,10.0000,10.4361,9.2626,9.4842 +10.0000,10.0000,10.0000,10.4147,9.2457,9.4910 +10.0000,10.0000,10.0000,10.3926,9.2295,9.4977 +10.0000,10.0000,10.0000,10.3698,9.2140,9.5045 +10.0000,10.0000,10.0000,10.3465,9.1993,9.5114 +10.0000,10.0000,10.0000,10.3226,9.1852,9.5182 +10.0000,10.0000,10.0000,10.2981,9.1720,9.5251 +10.0000,10.0000,10.0000,10.2731,9.1595,9.5321 +10.0000,10.0000,10.0000,10.2476,9.1478,9.5390 +10.0000,10.0000,10.0000,10.2216,9.1370,9.5460 +10.0000,10.0000,10.0000,10.1951,9.1270,9.5530 +10.0000,10.0000,10.0000,10.1683,9.1179,9.5601 +10.0000,10.0000,10.0000,10.1410,9.1096,9.5671 +10.0000,10.0000,10.0000,10.1134,9.1023,9.5742 +10.0000,10.0000,10.0000,10.0855,9.0959,9.5813 +10.0000,10.0000,10.0000,10.0572,9.0904,9.5885 +10.0000,10.0000,10.0000,10.0287,9.0858,9.5957 +10.0000,10.0000,10.0000,10.0000,9.0822,9.6029 +10.0000,10.0000,10.0000,9.9711,9.0796,9.6101 +10.0000,10.0000,10.0000,9.9420,9.0779,9.6173 +10.0000,10.0000,10.0000,9.9128,9.0773,9.6246 +10.0000,10.0000,10.0000,9.8835,9.0776,9.6319 +10.0000,10.0000,10.0000,9.8541,9.0788,9.6392 +10.0000,10.0000,10.0000,9.8247,9.0811,9.6465 +10.0000,10.0000,10.0000,9.7953,9.0844,9.6539 +10.0000,10.0000,10.0000,9.7660,9.0887,9.6613 +10.0000,10.0000,10.0000,9.7368,9.0940,9.6687 +10.0000,10.0000,10.0000,9.7076,9.1002,9.6761 +10.0000,10.0000,10.0000,9.6787,9.1075,9.6835 +10.0000,10.0000,10.0000,9.6499,9.1157,9.6910 +10.0000,10.0000,10.0000,9.6213,9.1250,9.6985 +10.0000,10.0000,10.0000,9.5930,9.1352,9.7060 +10.0000,10.0000,10.0000,9.5650,9.1464,9.7135 +10.0000,10.0000,10.0000,9.5374,9.1585,9.7210 +10.0000,10.0000,10.0000,9.5101,9.1716,9.7286 +10.0000,10.0000,10.0000,9.4832,9.1856,9.7361 +10.0000,10.0000,10.0000,9.4567,9.2005,9.7437 +10.0000,10.0000,10.0000,9.4307,9.2164,9.7513 +10.0000,10.0000,10.0000,9.4052,9.2331,9.7589 +10.0000,10.0000,10.0000,9.3802,9.2508,9.7666 +10.0000,10.0000,10.0000,9.3558,9.2693,9.7742 +10.0000,10.0000,10.0000,9.3319,9.2886,9.7819 +10.0000,10.0000,10.0000,9.3087,9.3087,9.7895 +10.0000,10.0000,10.0000,9.2862,9.3297,9.7972 +10.0000,10.0000,10.0000,9.2643,9.3514,9.8049 +10.0000,10.0000,10.0000,9.2431,9.3739,9.8126 +10.0000,10.0000,10.0000,9.2227,9.3971,9.8203 +10.0000,10.0000,10.0000,9.2030,9.4210,9.8281 +10.0000,10.0000,10.0000,9.1841,9.4455,9.8358 +10.0000,10.0000,10.0000,9.1661,9.4708,9.8436 +10.0000,10.0000,10.0000,9.1488,9.4966,9.8513 +10.0000,10.0000,10.0000,9.1324,9.5231,9.8591 +10.0000,10.0000,10.0000,9.1169,9.5501,9.8669 +10.0000,10.0000,10.0000,9.1023,9.5776,9.8747 +10.0000,10.0000,10.0000,9.0886,9.6056,9.8825 +10.0000,10.0000,10.0000,9.0758,9.6341,9.8903 +10.0000,10.0000,10.0000,9.0640,9.6630,9.8981 +10.0000,10.0000,10.0000,9.0532,9.6924,9.9059 +10.0000,10.0000,10.0000,9.0433,9.7221,9.9137 +10.0000,10.0000,10.0000,9.0344,9.7521,9.9215 +10.0000,10.0000,10.0000,9.0265,9.7824,9.9294 +10.0000,10.0000,10.0000,9.0197,9.8130,9.9372 +10.0000,10.0000,10.0000,9.0138,9.8438,9.9451 +10.0000,10.0000,10.0000,9.0090,9.8748,9.9529 +10.0000,10.0000,10.0000,9.0052,9.9060,9.9607 +10.0000,10.0000,10.0000,9.0025,9.9372,9.9686 +10.0000,10.0000,10.0000,9.0008,9.9686,9.9764 +10.0000,10.0000,10.0000,9.0001,10.0000,9.9843 +10.0000,10.0000,10.0000,9.0005,10.0314,9.9921 +10.0000,10.0000,10.0000,9.0020,10.0628,10.0000 +10.0000,10.0000,10.0000,9.0045,10.0941,10.0079 +10.0000,10.0000,10.0000,9.0080,10.1253,10.0157 +10.0000,10.0000,10.0000,9.0126,10.1564,10.0236 +10.0000,10.0000,10.0000,9.0182,10.1873,10.0314 +10.0000,10.0000,10.0000,9.0248,10.2180,10.0393 +10.0000,10.0000,10.0000,9.0325,10.2484,10.0471 +10.0000,10.0000,10.0000,9.0412,10.2786,10.0550 +10.0000,10.0000,10.0000,9.0508,10.3084,10.0628 +10.0000,10.0000,10.0000,9.0615,10.3379,10.0706 +10.0000,10.0000,10.0000,9.0731,10.3670,10.0785 +10.0000,10.0000,10.0000,9.0857,10.3957,10.0863 +10.0000,10.0000,10.0000,9.0992,10.4239,10.0941 +10.0000,10.0000,10.0000,9.1136,10.4516,10.1019 +10.0000,10.0000,10.0000,9.1290,10.4788,10.1097 +10.0000,10.0000,10.0000,9.1452,10.5055,10.1175 +10.0000,10.0000,10.0000,9.1623,10.5316,10.1253 +10.0000,10.0000,10.0000,9.1803,10.5571,10.1331 +10.0000,10.0000,10.0000,9.1991,10.5819,10.1409 +10.0000,10.0000,10.0000,9.2186,10.6061,10.1487 +10.0000,10.0000,10.0000,9.2390,10.6296,10.1564 +10.0000,10.0000,10.0000,9.2601,10.6523,10.1642 +10.0000,10.0000,10.0000,9.2819,10.6744,10.1719 +10.0000,10.0000,10.0000,9.3044,10.6956,10.1797 +10.0000,10.0000,10.0000,9.3276,10.7161,10.1874 +10.0000,10.0000,10.0000,9.3514,10.7357,10.1951 +10.0000,10.0000,10.0000,9.3758,10.7545,10.2028 +10.0000,10.0000,10.0000,9.4008,10.7725,10.2105 +10.0000,10.0000,10.0000,9.4264,10.7895,10.2181 +10.0000,10.0000,10.0000,9.4524,10.8057,10.2258 +10.0000,10.0000,10.0000,9.4790,10.8210,10.2334 +10.0000,10.0000,10.0000,9.5060,10.8354,10.2411 +10.0000,10.0000,10.0000,9.5334,10.8488,10.2487 +10.0000,10.0000,10.0000,9.5612,10.8612,10.2563 +10.0000,10.0000,10.0000,9.5893,10.8728,10.2639 +10.0000,10.0000,10.0000,9.6178,10.8833,10.2714 +10.0000,10.0000,10.0000,9.6465,10.8929,10.2790 +10.0000,10.0000,10.0000,9.6755,10.9014,10.2865 +10.0000,10.0000,10.0000,9.7046,10.9090,10.2940 +10.0000,10.0000,10.0000,9.7340,10.9156,10.3015 +10.0000,10.0000,10.0000,9.7635,10.9212,10.3090 +10.0000,10.0000,10.0000,9.7931,10.9258,10.3165 +10.0000,10.0000,10.0000,9.8227,10.9293,10.3239 +10.0000,10.0000,10.0000,9.8524,10.9319,10.3313 +10.0000,10.0000,10.0000,9.8821,10.9335,10.3387 +10.0000,10.0000,10.0000,9.9117,10.9340,10.3461 +10.0000,10.0000,10.0000,9.9413,10.9336,10.3535 +10.0000,10.0000,10.0000,9.9707,10.9322,10.3608 +10.0000,10.0000,10.0000,10.0000,10.9298,10.3681 +10.0000,10.0000,10.0000,10.0291,10.9264,10.3754 +10.0000,10.0000,10.0000,10.0580,10.9221,10.3827 +10.0000,10.0000,10.0000,10.0867,10.9168,10.3899 +10.0000,10.0000,10.0000,10.1150,10.9105,10.3971 +10.0000,10.0000,10.0000,10.1431,10.9033,10.4043 +10.0000,10.0000,10.0000,10.1708,10.8953,10.4115 +10.0000,10.0000,10.0000,10.1981,10.8863,10.4187 +10.0000,10.0000,10.0000,10.2250,10.8764,10.4258 +10.0000,10.0000,10.0000,10.2515,10.8657,10.4329 +10.0000,10.0000,10.0000,10.2775,10.8541,10.4399 +10.0000,10.0000,10.0000,10.3030,10.8417,10.4470 +10.0000,10.0000,10.0000,10.3280,10.8284,10.4540 +10.0000,10.0000,10.0000,10.3524,10.8144,10.4610 +10.0000,10.0000,10.0000,10.3763,10.7997,10.4679 +10.0000,10.0000,10.0000,10.3995,10.7841,10.4749 +10.0000,10.0000,10.0000,10.4222,10.7679,10.4818 +10.0000,10.0000,10.0000,10.4441,10.7510,10.4886 +10.0000,10.0000,10.0000,10.4654,10.7334,10.4955 +10.0000,10.0000,10.0000,10.4860,10.7152,10.5023 +10.0000,10.0000,10.0000,10.5059,10.6964,10.5090 +10.0000,10.0000,10.0000,10.5251,10.6769,10.5158 +10.0000,10.0000,10.0000,10.5435,10.6570,10.5225 +10.0000,10.0000,10.0000,10.5611,10.6365,10.5292 +10.0000,10.0000,10.0000,10.5780,10.6155,10.5358 +10.0000,10.0000,10.0000,10.5940,10.5940,10.5424 +10.0000,10.0000,10.0000,10.6093,10.5721,10.5490 +10.0000,10.0000,10.0000,10.6237,10.5499,10.5556 +10.0000,10.0000,10.0000,10.6373,10.5272,10.5621 +10.0000,10.0000,10.0000,10.6500,10.5042,10.5686 +10.0000,10.0000,10.0000,10.6619,10.4809,10.5750 +10.0000,10.0000,10.0000,10.6729,10.4573,10.5814 +10.0000,10.0000,10.0000,10.6831,10.4335,10.5878 +10.0000,10.0000,10.0000,10.6924,10.4095,10.5941 +10.0000,10.0000,10.0000,10.7008,10.3852,10.6004 +10.0000,10.0000,10.0000,10.7083,10.3609,10.6067 +10.0000,10.0000,10.0000,10.7150,10.3364,10.6129 +10.0000,10.0000,10.0000,10.7207,10.3119,10.6191 +10.0000,10.0000,10.0000,10.7256,10.2873,10.6252 +10.0000,10.0000,10.0000,10.7296,10.2627,10.6314 +10.0000,10.0000,10.0000,10.7328,10.2381,10.6374 +10.0000,10.0000,10.0000,10.7351,10.2136,10.6435 +10.0000,10.0000,10.0000,10.7365,10.1891,10.6494 +10.0000,10.0000,10.0000,10.7371,10.1648,10.6554 +10.0000,10.0000,10.0000,10.7368,10.1406,10.6613 +10.0000,10.0000,10.0000,10.7357,10.1165,10.6672 +10.0000,10.0000,10.0000,10.7338,10.0927,10.6730 +10.0000,10.0000,10.0000,10.7311,10.0691,10.6788 +10.0000,10.0000,10.0000,10.7275,10.0458,10.6845 +10.0000,10.0000,10.0000,10.7232,10.0227,10.6903 +10.0000,10.0000,10.0000,10.7181,10.0000,10.6959 diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index 2a09faa9f5..690f495c7f 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -159,6 +159,29 @@ def test_ambisonics_binaural_headrotation_refvec_rotating(test_info, in_fmt, out } ) +# This test compares rendering with: +# ref: a head rotation trajectory with elevation (OTR=NONE) +# cut: a static head rotation and a reference position trajectory which moves +# in a way that produces the same acoustic output as the ref head rot trajectory (OTR=REF_VEC) +# which also contains a fixed position offset between listener and reference position (which +# gets compensated in the REF_VEV OTR modes) +@pytest.mark.parametrize("out_fmt", OUTPUT_FORMATS_BINAURAL) +@pytest.mark.parametrize("in_fmt", INPUT_FORMATS_AMBI) +def test_ambisonics_binaural_headrotation_refvec_rotating_fixed_pos_offset(test_info, in_fmt, out_fmt): + compare_renderer_args( + test_info, + in_fmt, + out_fmt, + ref_kwargs={ + "name_extension": "refvec_rotating", + "trj_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-ccw.csv"), + }, + cut_kwargs={ + "trj_file": HR_TRAJECTORY_DIR.joinpath("const000.csv"), + "refvec_file": HR_TRAJECTORY_DIR.joinpath("full-circle-with-up-and-down-4s-fixed-pos-offset-Vector3.csv") + } + ) + # This test compares rendering with: # ref: a reference position trajectory with elevation and REF_VEC_LEV OTR mode (OTR=REF_VEC_LEV) # cut: a reference position trajectory without the elevation and REF_VEC OTR mode (OTR=REF_VEC) -- GitLab