From c230fe6c2b31cfbce670d2e7e81a577dee74af83 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Wed, 30 Aug 2023 16:28:31 +0200 Subject: [PATCH 1/2] Add fix for non-diegetic panning flag encoding when extended metadata is not enabled --- lib_com/options.h | 1 + lib_enc/ivas_ism_metadata_enc.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index be3261f808..f0e0f32a28 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -167,6 +167,7 @@ #define FIX_718_JBM_MD_UDPATE /* Fhg: fix issue #718, wrong setting of the update flag in the TD obj renderer in the JBM path */ #define FIX_719_CRASH_IN_CLEANUP /* VA: issue 719: fix Decoder crash after call to goto to cleanup */ +#define FIX_746_NONDIEGETIC_MD /* Eri: Issue 746: The non-diegetic panning flag affects the encoder bitstream even if extended metadata is not enabled. Crashes the decoder.*/ /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_enc/ivas_ism_metadata_enc.c b/lib_enc/ivas_ism_metadata_enc.c index 1dabd090fc..830b73bd8b 100644 --- a/lib_enc/ivas_ism_metadata_enc.c +++ b/lib_enc/ivas_ism_metadata_enc.c @@ -415,7 +415,11 @@ ivas_error ivas_ism_metadata_enc( push_indice( hBstr, IND_ISM_NDP_FLAG, hIsmMeta[ch]->non_diegetic_flag, ISM_METADATA_IS_NDP_BITS ); } +#ifdef FIX_746_NONDIEGETIC_MD + if ( hIsmMeta[ch]->non_diegetic_flag && ism_extended_metadata_flag ) +#else if ( hIsmMeta[ch]->non_diegetic_flag ) +#endif { /* Map azimuth to panning range [-90:90] */ if ( hIsmMetaData->azimuth > 90.0f ) -- GitLab From 09895bc8bcba99147451efe635ccd25bafaf6a29 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 31 Aug 2023 12:56:53 +0200 Subject: [PATCH 2/2] Rename switch with NONBE_ prefix and restructure options.h --- lib_com/options.h | 17 ++++++++--------- lib_enc/ivas_ism_metadata_enc.c | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index b50b0ad075..15bbe7d34d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -145,8 +145,8 @@ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ -/* ################# Start BE DEVELOPMENT switches ######################## */ -/* only BE switches wrt operation points tested in selection */ +/* ################### Start BE switches ################################# */ +/* only BE switches wrt selection floating point code */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ @@ -158,18 +158,17 @@ #define OSBA_SPLIT_RENDERING #endif +/* #################### End BE switches ################################## */ -/* ################## End BE DEVELOPMENT switches ######################### */ +/* #################### Start NON-BE switches ############################ */ +/* any switch which is non-be wrt selection floating point code */ +/* all switches in this category should start with "NONBE_" */ -#define FIX_746_NONDIEGETIC_MD /* Eri: Issue 746: The non-diegetic panning flag affects the encoder bitstream even if extended metadata is not enabled. Crashes the decoder.*/ +#define NONBE_FIX_746_NONDIEGETIC_MD /* Eri: Issue 746: The non-diegetic panning flag affects the encoder bitstream even if extended metadata is not enabled. Crashes the decoder.*/ -/* #################### Start NON-BE CR switches ########################## */ -/* any switch which is non-be wrt operation points tested in selection */ -/* all switches in this category should start with "CR_" */ - -/* ##################### End NON-BE CR switches ########################### */ +/* ##################### End NON-BE switches ############################# */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_enc/ivas_ism_metadata_enc.c b/lib_enc/ivas_ism_metadata_enc.c index 830b73bd8b..de999ddc39 100644 --- a/lib_enc/ivas_ism_metadata_enc.c +++ b/lib_enc/ivas_ism_metadata_enc.c @@ -415,7 +415,7 @@ ivas_error ivas_ism_metadata_enc( push_indice( hBstr, IND_ISM_NDP_FLAG, hIsmMeta[ch]->non_diegetic_flag, ISM_METADATA_IS_NDP_BITS ); } -#ifdef FIX_746_NONDIEGETIC_MD +#ifdef NONBE_FIX_746_NONDIEGETIC_MD if ( hIsmMeta[ch]->non_diegetic_flag && ism_extended_metadata_flag ) #else if ( hIsmMeta[ch]->non_diegetic_flag ) -- GitLab