From ef3df4be3f1f17353c87392dc0e55428eb9d2230 Mon Sep 17 00:00:00 2001 From: Simon Plain Date: Tue, 17 Oct 2023 13:22:32 +0200 Subject: [PATCH 1/3] Remove superfluous ivas_mc2sba call --- lib_com/options.h | 1 + lib_dec/ivas_dec.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 89f4a28754..e72c3a09ae 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -185,6 +185,7 @@ #define NONBE_FIX_840_PARAMMC_RS /* FhG: Issue #840: Resolve "MC RS ParamMC hoa encoder wrongly set to zero" */ #define NONBE_FIX_826_JBM_MASA_CNA_CNG /* FhG: issue #826: Resolve "JBM MASA: CNA and CNG not in sync with non-JBM decoding" */ #define NONBE_FIX_835_JBM_PARAMUPMIX_HEADROT /* FhG: issue #835: Resolve "JBM: ParamUpmix head rotation broken" */ +#define NONBE_FIX_836_PARAMUPMIX_HEADROT /* Dlb: issue #836: Resolve "ParamUpmix MC to SBA conversion done on the already binaurlized output" */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 8f928cdc29..2703da921b 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -872,13 +872,19 @@ ivas_error ivas_dec( ivas_mc_paramupmix_dec( st_ivas, p_output ); +#ifndef NONBE_FIX_836_PARAMUPMIX_HEADROT if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) ) { ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); } +#endif /* Rendering */ +#ifdef NONBE_FIX_836_PARAMUPMIX_HEADROT + if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && !st_ivas->hDecoderConfig->Opt_Headrotation ) +#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) +#endif { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) -- GitLab From e15ad00158fbe4ebbb02eea483544649a80ef38c Mon Sep 17 00:00:00 2001 From: plains Date: Mon, 23 Oct 2023 12:35:56 +0200 Subject: [PATCH 2/3] Add to JBM path, account for ambisonics --- lib_dec/ivas_dec.c | 8 ++++++-- lib_dec/ivas_jbm_dec.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 3fceaa0eb3..7ba45259f6 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -868,12 +868,16 @@ ivas_error ivas_dec( ivas_mc_paramupmix_dec( st_ivas, p_output ); -#ifndef NONBE_FIX_836_PARAMUPMIX_HEADROT +#ifdef NONBE_FIX_836_PARAMUPMIX_HEADROT + if ( st_ivas->transport_config != st_ivas->intern_config && + ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) && + ( output_config == IVAS_AUDIO_CONFIG_FOA || output_config == IVAS_AUDIO_CONFIG_HOA2 || output_config == IVAS_AUDIO_CONFIG_HOA3 ) ) +#else if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) ) +#endif { ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); } -#endif /* Rendering */ #ifdef NONBE_FIX_836_PARAMUPMIX_HEADROT diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 3e91dce044..b7ee780cb9 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1352,14 +1352,23 @@ ivas_error ivas_jbm_dec_render( { ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_tc, p_output ); - +#ifdef NONBE_FIX_836_PARAMUPMIX_HEADROT + if ( st_ivas->transport_config != st_ivas->intern_config && + ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) && + ( output_config == IVAS_AUDIO_CONFIG_FOA || output_config == IVAS_AUDIO_CONFIG_HOA2 || output_config == IVAS_AUDIO_CONFIG_HOA3 ) ) +#else if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) ) +#endif { ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); } /* Rendering */ +#ifdef NONBE_FIX_836_PARAMUPMIX_HEADROT + if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && !st_ivas->hDecoderConfig->Opt_Headrotation ) +#else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) +#endif { #ifdef SPLIT_REND_WITH_HEAD_ROT /*handled in CLDFB domain already*/ -- GitLab From 5b05995b0e898583771c68bb209ee0a628280144 Mon Sep 17 00:00:00 2001 From: plains Date: Tue, 24 Oct 2023 08:08:55 +0200 Subject: [PATCH 3/3] Remove check for SBA on JBM path --- lib_dec/ivas_jbm_dec.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index b7ee780cb9..6243d4d579 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1352,16 +1352,12 @@ ivas_error ivas_jbm_dec_render( { ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_tc, p_output ); -#ifdef NONBE_FIX_836_PARAMUPMIX_HEADROT - if ( st_ivas->transport_config != st_ivas->intern_config && - ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) && - ( output_config == IVAS_AUDIO_CONFIG_FOA || output_config == IVAS_AUDIO_CONFIG_HOA2 || output_config == IVAS_AUDIO_CONFIG_HOA3 ) ) -#else +#ifndef NONBE_FIX_836_PARAMUPMIX_HEADROT if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == IVAS_AUDIO_CONFIG_FOA || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA2 || st_ivas->intern_config == IVAS_AUDIO_CONFIG_HOA3 ) ) -#endif { ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); } +#endif /* Rendering */ #ifdef NONBE_FIX_836_PARAMUPMIX_HEADROT -- GitLab