diff --git a/lib_com/options.h b/lib_com/options.h index 9de0874dbbe35d2eb19e0e7c99157904c3058bcf..edf8550b687ec2a27f1b6df9a036dabb1ab47a51 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,6 +168,7 @@ #define BE_FIX_867_PARAMC_RECONFIG /* FhG: issue #867: fix ParamMC CLDFB buffer dealloc when reconfiguring */ #define NONBE_FIX_850_MASA_HBR_META_RATIO_DECODING /* Nokia: issue #850: Fixes rare non-valid diffuseness and energy ratio values in 2dir MASA. */ #define NONBE_FIX_MDCT_STEREO_DTX_MONO_OUT /* FhG: fix clicks in DTX -> active transition frames in MDCT-Stereo with mono output */ +#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 bef9fa9b8d1e6c9cab28094495c99689638599e3..7ba45259f60606384a2cac5a9d359d093f0fd5e9 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -868,13 +868,23 @@ ivas_error ivas_dec( ivas_mc_paramupmix_dec( st_ivas, 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, output_frame, 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 if ( output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && output_config != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 3e91dce0444914a0246ea4d3973b53cd38dfceea..6243d4d579603a7918acb829915ba09e282c9a17 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1352,14 +1352,19 @@ ivas_error ivas_jbm_dec_render( { ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_tc, 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, *nSamplesRendered, 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 /*handled in CLDFB domain already*/