diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index d7f8d3d8155496a288003b3dec4335fa5aad7a3b..48c54cbad2584ddf8deb0ca5c01b893d9b43f01c 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5861,12 +5861,14 @@ ivas_error ivas_td_binaural_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); +#ifndef FIX_910_REMOVE_DUPLICATION_TD_REND ivas_error ivas_td_binaural_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* i/o: SCE channels / Binaural synthesis */ const int16_t output_frame /* i : output frame length */ ); +#endif ivas_error ivas_td_binaural_renderer_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output[], /* i/o: SCE channels / Binaural synthesis */ diff --git a/lib_com/options.h b/lib_com/options.h index f4c5324d6324b8d28f4a4127abb38650bd57ae0e..8a96dabd0486fb6c90db0304fb94c9ca28bef50e 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -155,6 +155,7 @@ #define FIX_923_EXTERNAL_REND_COMMAND_LINE /* VA: issue 923: enable external renderer command-line options in UPPER case letters */ #define FIX_921_OMASA_DELAY_PRINTOUT /* VA: issue 921: correct OMASA decoder delay printout */ #define FIX_929_RENDERER_CMDL /* Nokia: issue #929: renderer command line option */ +#define FIX_910_REMOVE_DUPLICATION_TD_REND /* VA: issue 910: remove duplication of function ivas_td_binaural_renderer() */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index a7e492817b71267313ae2caed255e1690fdc3b0b..6352df9df5d8fbce8ae640adf37eeb62da4a0415 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1364,6 +1364,7 @@ ivas_error ivas_jbm_dec_render( { ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); } +#ifndef FIX_910_REMOVE_DUPLICATION_TD_REND else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { #ifdef SPLIT_REND_WITH_HEAD_ROT @@ -1387,6 +1388,7 @@ ivas_error ivas_jbm_dec_render( } #endif } +#endif } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index 10e2a47deaf1bc88c4de334bce00ea2b8bdfdcfd..09148ce42a76e33c17224f264a9b7196d30d046a 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -65,7 +65,7 @@ ivas_error ivas_td_binaural_open( st_ivas->transport_config, st_ivas->hRenderConfig->directivity, st_ivas->hTransSetup, &st_ivas->hBinRendererTd, &st_ivas->binaural_latency_ns ); } - +#ifndef FIX_910_REMOVE_DUPLICATION_TD_REND /*---------------------------------------------------------------------* * ivas_td_binaural_renderer() * @@ -100,7 +100,7 @@ ivas_error ivas_td_binaural_renderer( return ivas_td_binaural_renderer_unwrap( st_ivas->hReverb, st_ivas->transport_config, st_ivas->hBinRendererTd, nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, st_ivas->hCombinedOrientationData, ism_md_subframe_update, output, output_frame, MAX_PARAM_SPATIAL_SUBFRAMES ); } - +#endif /*---------------------------------------------------------------------* * ivas_td_binaural_renderer_sf() diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index 15d185efa0d572c1409ac77d140a0c1591efdff8..b9adc3ed57e331271768bb425c7bad5bf3218c59 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -230,9 +230,17 @@ void ivas_renderer_select( #endif { #ifdef DEBUGGING +#ifdef FIX_910_REMOVE_DUPLICATION_TD_REND + if ( ( ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && st_ivas->mc_mode == MC_MODE_MCT && st_ivas->hDecoderConfig->force_rend != FORCE_CLDFB_RENDERER ) +#else if ( ( ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) +#endif +#else +#ifdef FIX_910_REMOVE_DUPLICATION_TD_REND + if ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) && st_ivas->mc_mode == MC_MODE_MCT ) #else if ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) +#endif #endif { *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 9ae6a872fe79eeb3fda3cae104b478ea1ed6ba59..3bed6c7a06aadd78429246a133cc91bd343c03b6 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -862,7 +862,11 @@ ivas_error ObjRenderIvasFrame_splitBinaural( /* Render */ if ( pos_idx == 0 ) { +#ifdef FIX_910_REMOVE_DUPLICATION_TD_REND + if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_tmpProcessing, output_frame ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_td_binaural_renderer( st_ivas, p_tmpProcessing, output_frame ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -873,7 +877,11 @@ ivas_error ObjRenderIvasFrame_splitBinaural( tmpTdRendHandle = st_ivas->hBinRendererTd; st_ivas->hBinRendererTd = st_ivas->hSplitBinRend.splitrend.hTdRendHandles[pos_idx - 1]; +#ifdef FIX_910_REMOVE_DUPLICATION_TD_REND + if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_tmpProcessing, output_frame ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_td_binaural_renderer( st_ivas, p_tmpProcessing, output_frame ) ) != IVAS_ERR_OK ) +#endif { return error; }