Loading lib_dec/lib_dec.c +6 −1 Original line number Diff line number Diff line Loading @@ -3610,7 +3610,12 @@ static ivas_error evs_dec_main( #ifdef API_5MS if ( !st_ivas->hDecoderConfig->Opt_tsm ) if ( !st_ivas->hDecoderConfig->Opt_tsm #ifdef API_5MS_BASELINE && st_ivas->hDecoderConfig->Opt_5ms #endif ) { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } Loading lib_rend/ivas_rotation.c +52 −17 Original line number Diff line number Diff line Loading @@ -923,8 +923,10 @@ ivas_error ivas_combined_orientation_open( #ifdef API_5MS ( *hCombinedOrientationData )->enableCombinedOrientation = 0; ( *hCombinedOrientationData )->Quaternion = identity; #ifndef FIX_570_SF_EXT_ORIENTATION ( *hCombinedOrientationData )->Quaternion_prev_headRot = identity; ( *hCombinedOrientationData )->Quaternion_prev_extOrientation = identity; #endif ( *hCombinedOrientationData )->listenerPos = origo; for ( j = 0; j < 3; j++ ) Loading Loading @@ -1264,6 +1266,23 @@ ivas_error combine_external_and_head_orientations( /* External orientations */ #ifdef API_5MS #ifdef FIX_570_SF_EXT_ORIENTATION /* Check for frozen external orientation */ if ( hExtOrientationData->enableExternalOrientation == 2 ) { if ( hCombinedOrientationData->isExtOrientationFrozen != 1 ) { hCombinedOrientationData->Quaternion_frozen_ext = hExtOrientationData->Quaternion; hCombinedOrientationData->isExtOrientationFrozen = 1; } } else { hCombinedOrientationData->Quaternion_frozen_ext = identity; hCombinedOrientationData->isExtOrientationFrozen = 0; } #endif if ( hExtOrientationData->enableRotationInterpolation == 1 && hExtOrientationData->enableExternalOrientation > 0 ) { if ( hCombinedOrientationData->isInterpolationOngoing == TRUE && hCombinedOrientationData->interpolationCoefficient <= 1.0f && are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == true ) Loading Loading @@ -1293,7 +1312,11 @@ ivas_error combine_external_and_head_orientations( /* Use the freezed external orientation */ else if ( hExtOrientationData->enableExternalOrientation == 2 ) { #ifdef FIX_570_SF_EXT_ORIENTATION hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_frozen_ext; #else hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_extOrientation; #endif } } #else Loading Loading @@ -1364,25 +1387,34 @@ ivas_error combine_external_and_head_orientations( { /* Combine head and external orientations */ #ifdef API_5MS #ifdef FIX_570_SF_EXT_ORIENTATION /* Check for frozen head rotation */ if ( hExtOrientationData->enableHeadRotation == 2 ) { if ( hCombinedOrientationData->isHeadRotationFrozen != 1 ) { hCombinedOrientationData->Quaternion_frozen_head = *headRotQuaternion; hCombinedOrientationData->isHeadRotationFrozen = 1; } } else { hCombinedOrientationData->Quaternion_frozen_head = identity; hCombinedOrientationData->isHeadRotationFrozen = 0; } #endif /* Use the most recent head rotation */ if ( hExtOrientationData->enableHeadRotation == 1 ) { if ( hExtOrientationData->enableExternalOrientation > 0 ) { #ifdef API_5MS QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternion, &hCombinedOrientationData->Quaternion ); #else QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); #endif } else { #ifdef API_5MS hCombinedOrientationData->Quaternion = *headRotQuaternion; #else hCombinedOrientationData->Quaternion = *headRotQuaternions; #endif } } /* Use the freezed head rotation */ Loading @@ -1390,11 +1422,19 @@ ivas_error combine_external_and_head_orientations( { if ( hExtOrientationData->enableExternalOrientation > 0 ) { #ifdef FIX_570_SF_EXT_ORIENTATION QuaternionProduct( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Quaternion_frozen_head, &hCombinedOrientationData->Quaternion ); #else QuaternionProduct( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Quaternion_prev_headRot, &hCombinedOrientationData->Quaternion ); #endif } else { #ifdef FIX_570_SF_EXT_ORIENTATION hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_frozen_head; #else hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_headRot; #endif } } Loading Loading @@ -1494,7 +1534,7 @@ ivas_error combine_external_and_head_orientations( { hCombinedOrientationData->Quaternion_prev_extOrientation = identity; } #elif defined FIX_570_SF_EXT_ORIENTATION /* ToDo: ensure FIX_570_SF_EXT_ORIENTATION is correctly included in API_5MS */ #elif defined FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData->enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES - 1] > 0 ) { hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES - 1]; Loading Loading @@ -1524,15 +1564,12 @@ ivas_error combine_external_and_head_orientations( #endif { #ifdef API_5MS #ifndef FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData != NULL ) { if ( hExtOrientationData->enableHeadRotation > 0 ) { #ifdef API_5MS hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; #else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; #endif } else { Loading @@ -1541,12 +1578,10 @@ ivas_error combine_external_and_head_orientations( } else { #ifdef API_5MS hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; #else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; #endif } #endif hCombinedOrientationData->listenerPos = *listenerPos; #else Loading lib_rend/ivas_stat_rend.h +2 −0 Original line number Diff line number Diff line Loading @@ -905,7 +905,9 @@ typedef struct ivas_combined_orientation_struct bool isInterpolationOngoing; #ifdef API_5MS IVAS_QUATERNION Quaternion; #ifndef FIX_570_SF_EXT_ORIENTATION IVAS_QUATERNION Quaternion_prev_headRot; #endif IVAS_QUATERNION Quaternion_prev_extOrientation; #else IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; Loading Loading
lib_dec/lib_dec.c +6 −1 Original line number Diff line number Diff line Loading @@ -3610,7 +3610,12 @@ static ivas_error evs_dec_main( #ifdef API_5MS if ( !st_ivas->hDecoderConfig->Opt_tsm ) if ( !st_ivas->hDecoderConfig->Opt_tsm #ifdef API_5MS_BASELINE && st_ivas->hDecoderConfig->Opt_5ms #endif ) { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } Loading
lib_rend/ivas_rotation.c +52 −17 Original line number Diff line number Diff line Loading @@ -923,8 +923,10 @@ ivas_error ivas_combined_orientation_open( #ifdef API_5MS ( *hCombinedOrientationData )->enableCombinedOrientation = 0; ( *hCombinedOrientationData )->Quaternion = identity; #ifndef FIX_570_SF_EXT_ORIENTATION ( *hCombinedOrientationData )->Quaternion_prev_headRot = identity; ( *hCombinedOrientationData )->Quaternion_prev_extOrientation = identity; #endif ( *hCombinedOrientationData )->listenerPos = origo; for ( j = 0; j < 3; j++ ) Loading Loading @@ -1264,6 +1266,23 @@ ivas_error combine_external_and_head_orientations( /* External orientations */ #ifdef API_5MS #ifdef FIX_570_SF_EXT_ORIENTATION /* Check for frozen external orientation */ if ( hExtOrientationData->enableExternalOrientation == 2 ) { if ( hCombinedOrientationData->isExtOrientationFrozen != 1 ) { hCombinedOrientationData->Quaternion_frozen_ext = hExtOrientationData->Quaternion; hCombinedOrientationData->isExtOrientationFrozen = 1; } } else { hCombinedOrientationData->Quaternion_frozen_ext = identity; hCombinedOrientationData->isExtOrientationFrozen = 0; } #endif if ( hExtOrientationData->enableRotationInterpolation == 1 && hExtOrientationData->enableExternalOrientation > 0 ) { if ( hCombinedOrientationData->isInterpolationOngoing == TRUE && hCombinedOrientationData->interpolationCoefficient <= 1.0f && are_orientations_same( &hCombinedOrientationData->Quaternions_ext_interpolation_target, &hExtOrientationData->Quaternion ) == true ) Loading Loading @@ -1293,7 +1312,11 @@ ivas_error combine_external_and_head_orientations( /* Use the freezed external orientation */ else if ( hExtOrientationData->enableExternalOrientation == 2 ) { #ifdef FIX_570_SF_EXT_ORIENTATION hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_frozen_ext; #else hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_extOrientation; #endif } } #else Loading Loading @@ -1364,25 +1387,34 @@ ivas_error combine_external_and_head_orientations( { /* Combine head and external orientations */ #ifdef API_5MS #ifdef FIX_570_SF_EXT_ORIENTATION /* Check for frozen head rotation */ if ( hExtOrientationData->enableHeadRotation == 2 ) { if ( hCombinedOrientationData->isHeadRotationFrozen != 1 ) { hCombinedOrientationData->Quaternion_frozen_head = *headRotQuaternion; hCombinedOrientationData->isHeadRotationFrozen = 1; } } else { hCombinedOrientationData->Quaternion_frozen_head = identity; hCombinedOrientationData->isHeadRotationFrozen = 0; } #endif /* Use the most recent head rotation */ if ( hExtOrientationData->enableHeadRotation == 1 ) { if ( hExtOrientationData->enableExternalOrientation > 0 ) { #ifdef API_5MS QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternion, &hCombinedOrientationData->Quaternion ); #else QuaternionProduct( hCombinedOrientationData->Quaternion, *headRotQuaternions, &hCombinedOrientationData->Quaternion ); #endif } else { #ifdef API_5MS hCombinedOrientationData->Quaternion = *headRotQuaternion; #else hCombinedOrientationData->Quaternion = *headRotQuaternions; #endif } } /* Use the freezed head rotation */ Loading @@ -1390,11 +1422,19 @@ ivas_error combine_external_and_head_orientations( { if ( hExtOrientationData->enableExternalOrientation > 0 ) { #ifdef FIX_570_SF_EXT_ORIENTATION QuaternionProduct( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Quaternion_frozen_head, &hCombinedOrientationData->Quaternion ); #else QuaternionProduct( hCombinedOrientationData->Quaternion, hCombinedOrientationData->Quaternion_prev_headRot, &hCombinedOrientationData->Quaternion ); #endif } else { #ifdef FIX_570_SF_EXT_ORIENTATION hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_frozen_head; #else hCombinedOrientationData->Quaternion = hCombinedOrientationData->Quaternion_prev_headRot; #endif } } Loading Loading @@ -1494,7 +1534,7 @@ ivas_error combine_external_and_head_orientations( { hCombinedOrientationData->Quaternion_prev_extOrientation = identity; } #elif defined FIX_570_SF_EXT_ORIENTATION /* ToDo: ensure FIX_570_SF_EXT_ORIENTATION is correctly included in API_5MS */ #elif defined FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData->enableExternalOrientation[MAX_PARAM_SPATIAL_SUBFRAMES - 1] > 0 ) { hCombinedOrientationData->Quaternion_prev_extOrientation = hExtOrientationData->Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES - 1]; Loading Loading @@ -1524,15 +1564,12 @@ ivas_error combine_external_and_head_orientations( #endif { #ifdef API_5MS #ifndef FIX_570_SF_EXT_ORIENTATION if ( hExtOrientationData != NULL ) { if ( hExtOrientationData->enableHeadRotation > 0 ) { #ifdef API_5MS hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; #else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; #endif } else { Loading @@ -1541,12 +1578,10 @@ ivas_error combine_external_and_head_orientations( } else { #ifdef API_5MS hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternion; #else hCombinedOrientationData->Quaternion_prev_headRot = *headRotQuaternions; #endif } #endif hCombinedOrientationData->listenerPos = *listenerPos; #else Loading
lib_rend/ivas_stat_rend.h +2 −0 Original line number Diff line number Diff line Loading @@ -905,7 +905,9 @@ typedef struct ivas_combined_orientation_struct bool isInterpolationOngoing; #ifdef API_5MS IVAS_QUATERNION Quaternion; #ifndef FIX_570_SF_EXT_ORIENTATION IVAS_QUATERNION Quaternion_prev_headRot; #endif IVAS_QUATERNION Quaternion_prev_extOrientation; #else IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; Loading