From a28631755b07b7107182d1c065f15e5fa54f62b0 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Mon, 8 Jul 2024 13:42:36 +0200 Subject: [PATCH 1/2] Add an error check for the unsupported combination of VoIP and split rendering --- lib_com/options.h | 1 + lib_dec/lib_dec.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6b1a8d303a..eedb7ea910 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,6 +163,7 @@ //#define FIX_CREND_SIMPLIFY_CODE /* Ora : simplify line code in crend */ #define FLOAT_FIX_POINT_HRTF_FILE_FORMAT /* allows reading floation or fix point hrtf binary file format */ #define FIX_745_FIX_DATA_TYPE_CONVERSION /* VA: issue 745: implicit data type conversion when calling IVAS_DEC_Configure() */ +#define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 7cca9fc39b..a200499e67 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -407,7 +407,7 @@ ivas_error IVAS_DEC_Configure( #ifdef FIX_745_FIX_DATA_TYPE_CONVERSION const bool tsmEnabled, /* i : enable TSM */ #else - const int16_t tsmEnabled, /* i : enable time scale modification */ + const int16_t tsmEnabled, /* i : enable time scale modification */ #endif const IVAS_RENDER_FRAMESIZE renderFramesize, /* i : rendering frame size */ #ifdef FIX_745_FIX_DATA_TYPE_CONVERSION @@ -426,20 +426,20 @@ ivas_error IVAS_DEC_Configure( const bool renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ #else - const int16_t renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ - const int16_t Opt_non_diegetic_pan, /* i : diegetic or not */ + const int16_t renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ + const int16_t Opt_non_diegetic_pan, /* i : diegetic or not */ #endif const float non_diegetic_pan_gain, /* i : non diegetic panning gain */ #ifdef FIX_745_FIX_DATA_TYPE_CONVERSION const bool dpidEnabled, /* i : enable directivity pattern option */ #else - const int16_t Opt_dpid_on, /* i : enable directivity pattern option */ + const int16_t Opt_dpid_on, /* i : enable directivity pattern option */ #endif const uint16_t acousticEnvironmentId, /* i : Acoustic environment ID */ #ifdef FIX_745_FIX_DATA_TYPE_CONVERSION const bool delayCompensationEnabled /* i : enable delay compensation */ #else - const int16_t delayCompensationEnabled /* i : enable delay compensation */ + const int16_t delayCompensationEnabled /* i : enable delay compensation */ #endif ) { @@ -2626,6 +2626,14 @@ ivas_error IVAS_DEC_VoIP_GetSamples( return IVAS_ERR_WRONG_PARAMS; } +#ifdef TMP_FIX_1119_SPLIT_RENDERING_VOIP + if ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || + hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) + { + return IVAS_ERROR( IVAS_ERR_NOT_IMPLEMENTED, "Split rendering is not integrated with VoIP mode" ); + } +#endif + /* make sure that the FIFO after decoder/scaler contains at least one sound card frame (i.e. 20ms) */ while ( nSamplesRendered < nSamplesPerChannel ) { -- GitLab From 64cc2843b3904daba194fa990dbda76adbde651a Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Mon, 8 Jul 2024 13:59:52 +0200 Subject: [PATCH 2/2] Fix formatting --- lib_dec/lib_dec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index a200499e67..62b7bbfe3d 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -407,7 +407,7 @@ ivas_error IVAS_DEC_Configure( #ifdef FIX_745_FIX_DATA_TYPE_CONVERSION const bool tsmEnabled, /* i : enable TSM */ #else - const int16_t tsmEnabled, /* i : enable time scale modification */ + const int16_t tsmEnabled, /* i : enable time scale modification */ #endif const IVAS_RENDER_FRAMESIZE renderFramesize, /* i : rendering frame size */ #ifdef FIX_745_FIX_DATA_TYPE_CONVERSION @@ -426,20 +426,20 @@ ivas_error IVAS_DEC_Configure( const bool renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ #else - const int16_t renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ - const int16_t Opt_non_diegetic_pan, /* i : diegetic or not */ + const int16_t renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ + const int16_t Opt_non_diegetic_pan, /* i : diegetic or not */ #endif const float non_diegetic_pan_gain, /* i : non diegetic panning gain */ #ifdef FIX_745_FIX_DATA_TYPE_CONVERSION const bool dpidEnabled, /* i : enable directivity pattern option */ #else - const int16_t Opt_dpid_on, /* i : enable directivity pattern option */ + const int16_t Opt_dpid_on, /* i : enable directivity pattern option */ #endif const uint16_t acousticEnvironmentId, /* i : Acoustic environment ID */ #ifdef FIX_745_FIX_DATA_TYPE_CONVERSION const bool delayCompensationEnabled /* i : enable delay compensation */ #else - const int16_t delayCompensationEnabled /* i : enable delay compensation */ + const int16_t delayCompensationEnabled /* i : enable delay compensation */ #endif ) { -- GitLab