diff --git a/lib_com/options.h b/lib_com/options.h index 4156782ca3614b8f74f5e8737113ffe6c679af65..7a60330ace8187340d31cb171b63e517b7cd5d26 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -218,6 +218,7 @@ #define MASA_AND_OBJECTS /* Nokia: Combination of MASA and objects */ #define FIX_653_BUG_IN_SKIP_MATRIX /* Dlb: fix for issue #653, bug in the ivas_spar_get_skip_mat function*/ +#define FIX_663_PARAM_ISM_EXT /* FhG: Issue 663: ParamISM EXT output improvement */ /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index b64c52bc7184f1bdba67ee0227351ad1a35cc88d..06283748dcf0735532f007ec4e86daf222629dcc 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -839,6 +839,7 @@ void ivas_param_ism_dec( } } +#ifndef FIX_663_PARAM_ISM_EXT for ( i = 0; i < nchan_transport; i++ ) { for ( j = 0; j < nchan_out_woLFE; j++ ) @@ -853,6 +854,29 @@ void ivas_param_ism_dec( } } } +#else + for ( j = 0; j < nchan_out_woLFE; j++ ) + { + if ( hDirAC->azimuth_values[j] > 0.0f ) + { + hDirAC->hParamIsmRendering->proto_matrix[j] = 1.0f; + hDirAC->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 0.0f; + } + else + { + if ( hDirAC->azimuth_values[j] < 0.0f ) + { + hDirAC->hParamIsmRendering->proto_matrix[j] = 0.0f; + hDirAC->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 1.0f; + } + else /* == 0.0f */ + { + hDirAC->hParamIsmRendering->proto_matrix[j] = 0.5f; + hDirAC->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 0.5f; + } + } + } +#endif } /* Energy Compensation */ @@ -1193,6 +1217,7 @@ void ivas_param_ism_dec_digest_tc( } } +#ifndef FIX_663_PARAM_ISM_EXT for ( i = 0; i < nchan_transport; i++ ) { for ( j = 0; j < nchan_out_woLFE; j++ ) @@ -1207,6 +1232,29 @@ void ivas_param_ism_dec_digest_tc( } } } +#else + for ( j = 0; j < nchan_out_woLFE; j++ ) + { + if ( hDirAC->azimuth_values[j] > 0.0f ) + { + hDirAC->hParamIsmRendering->proto_matrix[j] = 1.0f; + hDirAC->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 0.0f; + } + else + { + if ( hDirAC->azimuth_values[j] < 0.0f ) + { + hDirAC->hParamIsmRendering->proto_matrix[j] = 0.0f; + hDirAC->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 1.0f; + } + else /* == 0.0f */ + { + hDirAC->hParamIsmRendering->proto_matrix[j] = 0.5f; + hDirAC->hParamIsmRendering->proto_matrix[nchan_out_woLFE + j] = 0.5f; + } + } + } +#endif } /* Energy Compensation */