From 2680f7c31cb56ddbd7a1aa3f2b0b69fdc985e8e3 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 22 Sep 2023 09:13:22 +0200 Subject: [PATCH 1/2] unifiy behaviour of external target interpolation (addresses #809) --- lib_com/options.h | 2 +- lib_rend/ivas_rotation.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index db4ab9dcdd..6f8cf2cd6d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -210,7 +210,7 @@ #define NONBE_FIX_778_TNS_UNFIED_STEREO_MSAN /* FhG: Issue 778: MSAN error due to uninitialized TNS configuration */ #define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ /* VA: issue 797: fix of crash when the separated object is inactive and the MASA metadata is using very few bits */ #define NONBE_FIX_798_OSBA_MC_DEC_CRASH - +#define NONBE_FIX_809_EXTERNAL_TARGET_INTERPOLATION /* FhG: issue 809: unify external target interpolation inter and intra frame behaviour */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index b6a81bca91..c72b46b4b9 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1362,7 +1362,19 @@ static void external_target_interpolation( { if ( i > 0 ) { - hCombinedOrientationData->Quaternions_ext_interpolation_start = hExtOrientationData->Quaternions[i - 1]; +#ifdef NONBE_FIX_809_EXTERNAL_TARGET_INTERPOLATION + if ( hExtOrientationData->enableExternalOrientation[i - 1] != 1 ) + { + IVAS_QUATERNION identity; + identity.w = 1.0f; + identity.x = identity.y = identity.z = 0.0f; + hCombinedOrientationData->Quaternions_ext_interpolation_start = identity; + } + else +#endif + { + hCombinedOrientationData->Quaternions_ext_interpolation_start = hExtOrientationData->Quaternions[i - 1]; + } } else { -- GitLab From 48fdfdf46e9395ede879936abe7cc0bda1a8bf28 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Fri, 22 Sep 2023 15:58:34 +0200 Subject: [PATCH 2/2] also take frozen ext into account --- lib_rend/ivas_rotation.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index c72b46b4b9..5263bd5fda 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1363,13 +1363,17 @@ static void external_target_interpolation( if ( i > 0 ) { #ifdef NONBE_FIX_809_EXTERNAL_TARGET_INTERPOLATION - if ( hExtOrientationData->enableExternalOrientation[i - 1] != 1 ) + if ( hExtOrientationData->enableExternalOrientation[i - 1] == 0 ) { IVAS_QUATERNION identity; identity.w = 1.0f; identity.x = identity.y = identity.z = 0.0f; hCombinedOrientationData->Quaternions_ext_interpolation_start = identity; } + else if ( hExtOrientationData->enableExternalOrientation[i - 1] == 2 ) + { + hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_frozen_ext; + } else #endif { -- GitLab