diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index e3559993f4ab8713873e39f1074917205c37c857..357884efd7c8de457712277c04370e2e6c3debdf 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -2473,6 +2473,13 @@ const uint16_t ivas_param_mc_sym_freq_ild_delta_combined_48_16bits[2 * PARAM_MC_ * MASA ROM tables *----------------------------------------------------------------------------------*/ +#ifdef FIX_1121_MASA_DESCRIPTOR +const uint8_t ivasmasaFormatDescriptor[8] = +{ + 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 /* "IVASMASA" */ +}; + +#endif const float diffuseness_reconstructions_hr[HR_MASA_ER_LEVELS] = { 0.00f, diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h index c73fbf38d64592ba153d31bc8c409e6c2b0f34ad..90816bc2c20295ec5d10f92f96276f9b15065baa 100644 --- a/lib_com/ivas_rom_com.h +++ b/lib_com/ivas_rom_com.h @@ -264,6 +264,10 @@ extern const uint16_t ivas_param_mc_sym_freq_icc_delta_combined_48_16bits[2 * PA * MASA ROM tables *----------------------------------------------------------------------------------*/ +#ifdef FIX_1121_MASA_DESCRIPTOR +extern const uint8_t ivasmasaFormatDescriptor[8]; /* "IVASMASA" */ + +#endif extern const int16_t bits_direction_masa[DIRAC_DIFFUSE_LEVELS]; extern const int16_t no_theta_masa[NO_SPHERICAL_GRIDS - 2]; extern const int16_t no_phi_masa[NO_SPHERICAL_GRIDS][MAX_NO_THETA]; diff --git a/lib_com/options.h b/lib_com/options.h index 693b57c1309783b3f3cf91728eab201132b7fe18..6e02c2d22fd851642e6041c46aeabb0fa51d682a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -188,6 +188,7 @@ #define FIX_1113_CLDFB_REND_IN_ISAR /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */ #define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */ #define FIX_1099_JBM_MD_HANDLE_ALLOC /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */ +#define FIX_1121_MASA_DESCRIPTOR /* VA: issue 1121: Define 'ivasmasaFormatDescriptor' at one common place */ #define NONBE_1894_OSBA_SCALING /* FhG: port OSBA scaling MRs (298,355,360) jointly */ #define NONBE_FIX_1141_OSBA_ROOM_RENDERING /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */ #define NONBE_1360_LFE_DELAY /* Dlb: LFE delay alignment when rendering in CLDFB domain*/ diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 0115d0c366dd0f8bfae4a8983e6c38f99180f173..625a15b96322ca992c4d821abe8b9f89e00ad003 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1891,7 +1891,9 @@ static void create_masa_ext_out_meta( IVAS_QMETADATA_HANDLE hQMetaData, const int16_t nchan_transport ) { +#ifndef FIX_1121_MASA_DESCRIPTOR const uint8_t ivasmasaFormatDescriptor[8] = { 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 }; /* "IVASMASA" */ +#endif int16_t i, sf, b_old, b_new, dir; MASA_DECRIPTIVE_META *descMeta; int16_t *bandMap; diff --git a/lib_rend/ivas_mcmasa_ana.c b/lib_rend/ivas_mcmasa_ana.c index 5128eb96983c207b57c4428eb1aa4b4a5dba2876..b3f968ea310fa4d555e9363e3e694c6892276b0e 100644 --- a/lib_rend/ivas_mcmasa_ana.c +++ b/lib_rend/ivas_mcmasa_ana.c @@ -1069,7 +1069,9 @@ void ivas_create_masa_out_meta( float surroundingCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] /* i : Estimated surround coherence */ ) { +#ifndef FIX_1121_MASA_DESCRIPTOR const uint8_t ivasmasaFormatDescriptor[8] = { 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 }; /* "IVASMASA" */ +#endif int16_t i, sf, band; uint8_t numFrequencyBands; uint8_t numDirections; diff --git a/lib_util/masa_file_reader.c b/lib_util/masa_file_reader.c index b4a088d2c5a3827334d9aa1fb7e544da4bc43e07..d5e7f687470c16c78af68a9dc82dca5d44f2b1ee 100644 --- a/lib_util/masa_file_reader.c +++ b/lib_util/masa_file_reader.c @@ -35,6 +35,9 @@ #include "ivas_stat_com.h" #include #include +#ifdef FIX_1121_MASA_DESCRIPTOR +#include "ivas_rom_com.h" /* load 'ivasmasaFormatDescriptor[8]' */ +#endif struct MasaFileReader @@ -111,7 +114,9 @@ ivas_error MasaFileReader_readNextFrame( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } +#ifndef FIX_1121_MASA_DESCRIPTOR const uint8_t ivasmasaFormatDescriptor[8] = { 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 }; /* "IVASMASA" */ +#endif uint16_t twoByteBuffer = 0; int16_t i, j, b; IVAS_MASA_METADATA_HANDLE hMeta;