diff --git a/Workspace_msvc/lib_rend.vcxproj.filters b/Workspace_msvc/lib_rend.vcxproj.filters
index f290958973e373f377ef6d8c71668ec1155027ad..d4f023f7cd9d99689cf5f211d49d266703f092a1 100644
--- a/Workspace_msvc/lib_rend.vcxproj.filters
+++ b/Workspace_msvc/lib_rend.vcxproj.filters
@@ -122,6 +122,9 @@
rend_c
+
+ rend_c
+
diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h
index 3201fd15bdb53daef1a7643fb2d9a0f98dbe5814..7095a48cb867dfbd7a1b21310512e9ec4ed01216 100755
--- a/lib_com/ivas_prot.h
+++ b/lib_com/ivas_prot.h
@@ -1049,7 +1049,11 @@ ivas_error ivas_ism_metadata_dec(
const int16_t bfi, /* i : bfi flag */
int16_t nb_bits_metadata[], /* o : number of metadata bits */
ISM_MODE ism_mode, /* i : ISM mode */
+#ifdef FIX_1547_ISMDTX_HANDLE
+ ISM_DTX_DATA_DEC *hISMDTX, /* i/o: ISM DTX handle */
+#else
ISM_DTX_DATA_DEC hISMDTX, /* i/o: ISM DTX structure */
+#endif
const PARAM_ISM_CONFIG_HANDLE hParamIsm, /* i : Param ISM Config Handle */
int16_t *ism_extended_metadata_flag, /* i/o: Extended metadata active in renderer */
int16_t *ism_extmeta_cnt, /* i/o: Number of change frames observed */
diff --git a/lib_com/options.h b/lib_com/options.h
index bbea3aa1534059d14c1f9b80304d8ebe81ea7d42..2ab2f5e968d0218e3731b1ee66d7bb4976fd444b 100644
--- a/lib_com/options.h
+++ b/lib_com/options.h
@@ -162,14 +162,13 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */
-
/* #################### End BE switches ################################## */
/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt. TS 26.258 V3.0 */
#define FIX_1543_MID_LSF_BITS /* VA: float issue 1543: Resolve "MSAN: use-of-uninitialized-value in lib_enc/lsf_enc.c:262:5 for EVS encoder" */
-
+#define FIX_1547_ISMDTX_HANDLE /* VA: float issue 1547: fix use of 'hISMDTX' handle */
/* ##################### End NON-BE switches ########################### */
diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c
index b99c5f70d6afd5496efc3626f134b70b56630aca..0735c992918be2d115aa5a8bb243d3f9c8f488c6 100644
--- a/lib_dec/ivas_dec.c
+++ b/lib_dec/ivas_dec.c
@@ -126,7 +126,11 @@ ivas_error ivas_dec(
}
else if ( st_ivas->ism_mode == ISM_MODE_PARAM )
{
+#ifdef FIX_1547_ISMDTX_HANDLE
+ if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, &( st_ivas->hISMDTX ), st_ivas->hParamIsmDec->hParamIsm, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt, st_ivas->hSCE[0]->hCoreCoder[0] ) ) != IVAS_ERR_OK )
+#else
if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hISMDTX, st_ivas->hParamIsmDec->hParamIsm, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt, st_ivas->hSCE[0]->hCoreCoder[0] ) ) != IVAS_ERR_OK )
+#endif
{
return error;
}
@@ -135,7 +139,11 @@ ivas_error ivas_dec(
}
else /* ISM_MODE_DISC */
{
+#ifdef FIX_1547_ISMDTX_HANDLE
+ if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, &( st_ivas->hISMDTX ), NULL, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt, st_ivas->hSCE[0]->hCoreCoder[0] ) ) != IVAS_ERR_OK )
+#else
if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hISMDTX, NULL, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt, st_ivas->hSCE[0]->hCoreCoder[0] ) ) != IVAS_ERR_OK )
+#endif
{
return error;
}
diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c
index a5eb1fc18a71a6a8536b30397d73919103a8e8a7..d3f0c6c7dcd664dddd14fba26f2e5fbec94e57ff 100644
--- a/lib_dec/ivas_ism_metadata_dec.c
+++ b/lib_dec/ivas_ism_metadata_dec.c
@@ -140,15 +140,19 @@ static void ism_metadata_smooth(
*-------------------------------------------------------------------------*/
ivas_error ivas_ism_metadata_dec(
- const int32_t ism_total_brate, /* i : ISM total bitrate */
- const int16_t nchan_ism, /* i : number of ISM channels */
- int16_t *nchan_transport, /* o : number of transport channels */
- ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */
- SCE_DEC_HANDLE hSCE[], /* i/o: SCE decoder handles */
- const int16_t bfi, /* i : bfi flag */
- int16_t nb_bits_metadata[], /* o : number of metadata bits */
- ISM_MODE ism_mode, /* i : ISM mode */
- ISM_DTX_DATA_DEC hISMDTX, /* i/o: ISM DTX structure */
+ const int32_t ism_total_brate, /* i : ISM total bitrate */
+ const int16_t nchan_ism, /* i : number of ISM channels */
+ int16_t *nchan_transport, /* o : number of transport channels */
+ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */
+ SCE_DEC_HANDLE hSCE[], /* i/o: SCE decoder handles */
+ const int16_t bfi, /* i : bfi flag */
+ int16_t nb_bits_metadata[], /* o : number of metadata bits */
+ ISM_MODE ism_mode, /* i : ISM mode */
+#ifdef FIX_1547_ISMDTX_HANDLE
+ ISM_DTX_DATA_DEC *hISMDTX, /* i/o: ISM DTX handle */
+#else
+ ISM_DTX_DATA_DEC hISMDTX, /* i/o: ISM DTX structure */
+#endif
const PARAM_ISM_CONFIG_HANDLE hParamIsm, /* i : Param ISM Config Handle */
int16_t *ism_extmeta_active, /* i/o: Extended metadata active in renderer */
int16_t *ism_extmeta_cnt, /* i/o: Number of change frames observed */
@@ -529,11 +533,19 @@ ivas_error ivas_ism_metadata_dec(
}
}
+#ifdef FIX_1547_ISMDTX_HANDLE
+ if ( hISMDTX->ism_dtx_hangover_cnt < IVAS_ISM_DTX_HO_MAX )
+ {
+ ism_metadata_smooth( hIsmMeta, ism_total_brate, nchan_ism );
+ hISMDTX->ism_dtx_hangover_cnt += 1;
+ }
+#else
if ( hISMDTX.ism_dtx_hangover_cnt < IVAS_ISM_DTX_HO_MAX )
{
ism_metadata_smooth( hIsmMeta, ism_total_brate, nchan_ism );
hISMDTX.ism_dtx_hangover_cnt += 1;
}
+#endif
if ( ism_mode == ISM_SBA_MODE_DISC )
{
diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c
index abc05ccb51bbeea1d366120a8d0b953384ca0c4d..95efa387650c747e4717f038794e143ba750d31a 100644
--- a/lib_dec/ivas_ism_param_dec.c
+++ b/lib_dec/ivas_ism_param_dec.c
@@ -199,7 +199,11 @@ static void ivas_param_ism_collect_slot(
static void ivas_param_ism_compute_mixing_matrix(
const int16_t nchan_ism, /* i : number of ISM channels */
PARAM_ISM_DEC_HANDLE hParamIsmDec, /* i/o: decoder ParamISM handle */
- ISM_DTX_DATA_DEC hISMDTX, /* i : ISM DTX handle */
+#ifdef FIX_1547_ISMDTX_HANDLE
+ const ISM_DTX_DATA_DEC *hISMDTX, /* i : ISM DTX handle */
+#else
+ ISM_DTX_DATA_DEC hISMDTX, /* i : ISM DTX handle */
+#endif
float direct_response[MAX_NUM_OBJECTS][PARAM_ISM_MAX_CHAN],
const int16_t nchan_transport,
const int16_t nchan_out_woLFE,
@@ -223,7 +227,11 @@ static void ivas_param_ism_compute_mixing_matrix(
assert( ( nchan_ism == 3 ) || ( nchan_ism == 4 ) );
assert( nchan_transport == 2 );
+#ifdef FIX_1547_ISMDTX_HANDLE
+ if ( hParamIsmDec->hParamIsm->flag_noisy_speech || hISMDTX->dtx_flag )
+#else
if ( hParamIsmDec->hParamIsm->flag_noisy_speech || hISMDTX.dtx_flag )
+#endif
{
num_wave = nchan_ism;
}
@@ -244,7 +252,11 @@ static void ivas_param_ism_compute_mixing_matrix(
{
set_zero( cy_diag_tmp[w], nchan_out_woLFE );
+#ifdef FIX_1547_ISMDTX_HANDLE
+ if ( hParamIsmDec->hParamIsm->flag_noisy_speech || hISMDTX->dtx_flag )
+#else
if ( hParamIsmDec->hParamIsm->flag_noisy_speech || hISMDTX.dtx_flag )
+#endif
{
dir_res_ptr = direct_response[w];
}
@@ -264,7 +276,11 @@ static void ivas_param_ism_compute_mixing_matrix(
set_zero( cy_diag, nchan_out_woLFE );
for ( w = 0; w < num_wave; w++ )
{
+#ifdef FIX_1547_ISMDTX_HANDLE
+ if ( hParamIsmDec->hParamIsm->flag_noisy_speech || hISMDTX->dtx_flag )
+#else
if ( hParamIsmDec->hParamIsm->flag_noisy_speech || hISMDTX.dtx_flag )
+#endif
{
direct_power[w] = ( 1.0f / nchan_ism ) * ref_power[bin_idx];
}
@@ -990,7 +1006,11 @@ void ivas_param_ism_dec_prepare_renderer(
}
/* Compute mixing matrix */
+#ifdef FIX_1547_ISMDTX_HANDLE
+ ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hParamIsmDec, &( st_ivas->hISMDTX ), direct_response, nchan_transport, nchan_out_woLFE, cx_diag, ref_power, hParamIsmDec->hParamIsmRendering->mixing_matrix_lin );
+#else
ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hParamIsmDec, st_ivas->hISMDTX, direct_response, nchan_transport, nchan_out_woLFE, cx_diag, ref_power, hParamIsmDec->hParamIsmRendering->mixing_matrix_lin );
+#endif
return;
}
diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c
index 7226f379e2cec149506843a05710541bf6dff350..55e9addd5721fc71bd1435dcfe1afd52282fd73a 100644
--- a/lib_dec/ivas_omasa_dec.c
+++ b/lib_dec/ivas_omasa_dec.c
@@ -597,8 +597,13 @@ ivas_error ivas_omasa_ism_metadata_dec(
if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC || st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ )
{
/* decode ISM metadata */
+#ifdef FIX_1547_ISMDTX_HANDLE
+ if ( ( error = ivas_ism_metadata_dec( ism_total_brate, *nchan_ism, nchan_transport_ism, st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi,
+ nb_bits_metadata, st_ivas->ism_mode, &( st_ivas->hISMDTX ), NULL, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt, st_ivas->hSCE[0]->hCoreCoder[0] ) ) != IVAS_ERR_OK )
+#else
if ( ( error = ivas_ism_metadata_dec( ism_total_brate, *nchan_ism, nchan_transport_ism, st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi,
nb_bits_metadata, st_ivas->ism_mode, st_ivas->hISMDTX, NULL, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt, st_ivas->hSCE[0]->hCoreCoder[0] ) ) != IVAS_ERR_OK )
+#endif
{
return error;
}
diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c
index 6eac059ed136b2e5f1b1bd4263d8c0bf9d0fcf1c..7ab3c7d84604be5e4bbbce7cad316550ceb423b1 100644
--- a/lib_dec/ivas_osba_dec.c
+++ b/lib_dec/ivas_osba_dec.c
@@ -228,8 +228,13 @@ ivas_error ivas_osba_ism_metadata_dec(
*nchan_ism = st_ivas->nchan_ism;
/* decode ISM metadata */
+#ifdef FIX_1547_ISMDTX_HANDLE
+ if ( ( error = ivas_ism_metadata_dec( ism_total_brate, *nchan_ism, &nchan_transport_ism, st_ivas->hIsmMetaData, NULL, st_ivas->bfi,
+ nb_bits_metadata, st_ivas->ism_mode, &( st_ivas->hISMDTX ), NULL, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt, st_ivas->hCPE[0]->hCoreCoder[0] ) ) != IVAS_ERR_OK )
+#else
if ( ( error = ivas_ism_metadata_dec( ism_total_brate, *nchan_ism, &nchan_transport_ism, st_ivas->hIsmMetaData, NULL, st_ivas->bfi,
nb_bits_metadata, st_ivas->ism_mode, st_ivas->hISMDTX, NULL, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt, st_ivas->hCPE[0]->hCoreCoder[0] ) ) != IVAS_ERR_OK )
+#endif
{
return error;
}