Head tracking API causes extra 15ms of delay
The API (and how head tracking is used) in the IVAS decoder would cause an extra waiting time of 15ms for recent head tracker data due to the fact that the head tracking data of all sub frames shall be known. Background is the necessity to load the orientation for all MAX_PARAM_SPATIAL_SUBFRAMES into the decoder, but then later on only 5ms sub frames are rendered individually, see e.g. the function in lib_dec.c :
ivas_error IVAS_DEC_FeedHeadTrackData(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
IVAS_QUATERNION *orientation, /* i : head-tracking data, listener orientation */
IVAS_VECTOR3 *Pos /* i : listener position */
)
{
...
/* Move head-tracking data to the decoder handle */
for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ )
{
...
ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation[i], FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[i] );
...
}
The current approach leads to extra 15ms end-to-end latency (thus algorithmic delay). This could be compensated by a shift of the head tracker data by 15ms, i.e. use always head tracker data that is already outdated by 15ms (which increases m2s latency by 15ms), which is also not desirable.
Thus the proposal is to modify the API to only consume head tracker data for one sub frame and then render that sub frame, followed by head tracker for the next sub frame, etc. Please also have a look at #406 (comment 13668) where this was already identified.