diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index ffd5d578de259c6679e12d2c6af3dc5e88102f84..2c4ab2f661fecabd683ebd5b75f04c91fa0e0160 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -2471,6 +2471,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 59830626488ac34efaf94539acae805bc4c1c309..18f2062d7fc0e162d2d16f225efa26f8b4c27462 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 cf9518a4434b97dac4c6df8fc2b58ad03e804d9a..5a4cca34ef78e8a83dcbd12351aea06e3dee3fb9 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,6 +162,7 @@ #define FIX_1101_CLEANING_JBM_CALL /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */ #define FIX_1053_AEID_FILE_TEST /* Philips: Tests for the -aeid file and fix for memory error */ +#define FIX_1121_MASA_DESCRIPTOR /* VA: issue 1121: Define 'ivasmasaFormatDescriptor' at one common place */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 79f3c046a1578e0748d7c50a6c800a28bfe33340..121cb3df43efa88045f2d537a659da633be8db8e 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1835,7 +1835,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 8ca05a11977f2cc1f6e07e145f7b674a33d3ff23..49e7d00eec0465c5c8f11598db7294d59460c1e4 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 f59f514d7fcf884f0a0160e60699d8c345e61d40..bc75b0bdbdd780cca8a86c24cccd7716cc8b00ed 100644 --- a/lib_util/masa_file_reader.c +++ b/lib_util/masa_file_reader.c @@ -33,6 +33,9 @@ #include "masa_file_reader.h" #include "ivas_prot.h" #include "ivas_stat_com.h" +#ifdef FIX_1121_MASA_DESCRIPTOR +#include "ivas_rom_com.h" /* load 'ivasmasaFormatDescriptor[8]' */ +#endif #include #include @@ -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;