diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index cdd290ce67c2add010bd06203b411bd29483d097..4441f3342bba7ceee66369f996acdc90c7736048 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -2328,6 +2328,14 @@ const UWord16 ivas_param_mc_sym_freq_ild_delta_combined_48_16bits[2 * PARAM_MC_S * MASA ROM tables *----------------------------------------------------------------------------------*/ + +#ifdef FIX_1121_MASA_DESCRIPTOR +const UWord8 ivasmasaFormatDescriptor[8] = +{ + 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 /* "IVASMASA" */ +}; + +#endif const Word64 diffuseness_reconstructions_hr_fx[HR_MASA_ER_LEVELS] = { /* Q62 */ 0, 65865144550293504, diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h index 4a227befb250beb6a852c09ec2df9c850b507cde..51529369318c99f16bcf41e2afbd7774ed905d78 100644 --- a/lib_com/ivas_rom_com.h +++ b/lib_com/ivas_rom_com.h @@ -225,6 +225,10 @@ extern const UWord16 ivas_param_mc_sym_freq_icc_delta_combined_48_16bits[2 * PAR * MASA ROM tables *----------------------------------------------------------------------------------*/ +#ifdef FIX_1121_MASA_DESCRIPTOR +extern const UWord8 ivasmasaFormatDescriptor[8]; /* "IVASMASA" */ + +#endif extern const Word16 bits_direction_masa[DIRAC_DIFFUSE_LEVELS]; extern const Word16 no_theta_masa[NO_SPHERICAL_GRIDS - 2]; extern const Word16 no_phi_masa[NO_SPHERICAL_GRIDS][MAX_NO_THETA]; diff --git a/lib_com/options.h b/lib_com/options.h index 6d60d5ccc1ec07709d510c92670fb737f6560424..420ff36a168a40b3d7e239343bc70df0d7c7bab5 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -118,6 +118,8 @@ #define NONBE_FIX_1052_SBA_EXT_FIX /* VA: SBA external output support fix - do not overwrite "output_config" parameter */ #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: do not scale OSBA inputs by 0.5 any more */ #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_fx.c b/lib_dec/ivas_masa_dec_fx.c index 669a5da2fb302d71f2337b6eb6f22cfd313e7704..3be3f46019eaa9258e46beda3c1c1a9fbc5ac657 100644 --- a/lib_dec/ivas_masa_dec_fx.c +++ b/lib_dec/ivas_masa_dec_fx.c @@ -2698,13 +2698,16 @@ static void create_masa_ext_out_meta_fx( IVAS_QMETADATA_HANDLE hQMetaData, const Word16 nchan_transport ) { +#ifndef FIX_1121_MASA_DESCRIPTOR const UWord8 ivasmasaFormatDescriptor[8] = { 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 }; /* "IVASMASA" */ +#endif Word16 i, sf, b_old, b_new, dir; MASA_DECRIPTIVE_META *descMeta; Word16 *bandMap; UWord8 numCodingBands; UWord8 numDirections; MASA_DECODER_EXT_OUT_META *extOutMeta; +#ifndef FIX_1121_MASA_DESCRIPTOR move16(); /*ivasmasaFormatDescriptor*/ move16(); move16(); @@ -2713,6 +2716,7 @@ static void create_masa_ext_out_meta_fx( move16(); move16(); move16(); +#endif numDirections = hMasa->config.numberOfDirections; move16(); diff --git a/lib_rend/ivas_mcmasa_ana_fx.c b/lib_rend/ivas_mcmasa_ana_fx.c index cf86608b29f89e2ebcabdf14622286ae63f6c9ec..4d41d73a581d6e031b307ac14f49f47d672e2905 100644 --- a/lib_rend/ivas_mcmasa_ana_fx.c +++ b/lib_rend/ivas_mcmasa_ana_fx.c @@ -1620,11 +1620,11 @@ void ivas_create_masa_out_meta_fx( Word32 surroundingCoherence[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS], /* i : Estimated surround coherence */ Word16 energyRatio_q, Word16 spreadCoherence_q, - Word16 surroundingCoherence_q - -) + Word16 surroundingCoherence_q ) { +#ifndef FIX_1121_MASA_DESCRIPTOR const UWord8 ivasmasaFormatDescriptor[8] = { 0x49, 0x56, 0x41, 0x53, 0x4D, 0x41, 0x53, 0x41 }; /* "IVASMASA" */ +#endif Word16 i, sf, band; UWord8 numFrequencyBands; UWord8 numDirections; diff --git a/lib_util/masa_file_reader.c b/lib_util/masa_file_reader.c index efab80b79547db87abeb0a4f44e1e72dbc1a3637..2bbc1bec6999a4f9d40afcd9c0963d8d7eae68f7 100644 --- a/lib_util/masa_file_reader.c +++ b/lib_util/masa_file_reader.c @@ -35,6 +35,9 @@ #include #include #include "ivas_prot_fx.h" +#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;