diff --git a/lib_com/options.h b/lib_com/options.h index 942b28011d4fcf2add37060e7a4c30dcae6b78b4..1229cac95b3822eecd4eb2181df3d72c491fcc18 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -207,6 +207,7 @@ #define NONBE_FIX_738_SBA_BR_SW_ASAN /* FhG: issue 738: fixes bug when switching to an MCT bitrate and previous frame was ACELP */ #define NONBE_CR_FIX_735_SBA_HP20_BRATE_SWITCHING /* VA: Issue 735: Resolve "HP20 filtering bug in SBA/OSBA bitrate switching" */ #define NONBE_FIX_588_UPDATE_FASTCONV_SD /* FhG: issue 588: update FastConv SD HRTFs in CLDFB domain with new conversion method */ +#define NONBE_FIX_802_PARAMUPMIX_HIGHPASS /* Dlb: issue 802: Move HighPass filter operation for ParamUpmix */ #define NONBE_FIX_778_TNS_UNFIED_STEREO_MSAN /* FhG: Issue 778: MSAN error due to uninitialized TNS configuration */ #define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ /* VA: issue 797: fix of crash when the separated object is inactive and the MASA metadata is using very few bits */ #define NONBE_FIX_798_OSBA_MC_DEC_CRASH diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 01b7fe6e5e1f79a5757fd1694f0408ef4d99af31..d277d8406df99057d41a371435c3f71c354a01f6 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -879,9 +879,17 @@ ivas_error ivas_dec( { return error; } - +#ifdef NONBE_FIX_802_PARAMUPMIX_HIGHPASS + for ( n = 0; n < st_ivas->nchan_transport; n++ ) + { + if ( n != LFE_CHANNEL ) + { + hp20( p_output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + } +#endif ivas_mc_paramupmix_dec( st_ivas, p_output ); - +#ifndef NONBE_FIX_802_PARAMUPMIX_HIGHPASS /* HP filtering */ if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) { @@ -893,7 +901,7 @@ ivas_error ivas_dec( } } } - +#endif 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 ); diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index a396feb52a4cf497e24311f2203bd59c581ccdbb..3e664b87e8bc9d6ef86c917559642d256f38435f 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -467,6 +467,25 @@ ivas_error ivas_jbm_dec_tc( return error; } +#ifdef NONBE_FIX_802_PARAMUPMIX_HIGHPASS + /* HP filtering */ + for ( n = 0; n < st_ivas->nchan_transport; n++ ) + { + if ( n != LFE_CHANNEL ) + { + hp20( p_output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + } + + /* Rendering */ + if ( ( st_ivas->renderer_type == RENDERER_MC ) && ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) ) + { + if ( output_config == IVAS_AUDIO_CONFIG_MONO || output_config == IVAS_AUDIO_CONFIG_STEREO ) + { + ivas_ls_setup_conversion( st_ivas, audioCfg2channels( IVAS_AUDIO_CONFIG_5_1_2 ), output_frame, p_output, p_output ); + } + } +#else /* Rendering */ if ( st_ivas->renderer_type == RENDERER_MC ) { @@ -483,6 +502,7 @@ ivas_error ivas_jbm_dec_tc( ivas_ls_setup_conversion( st_ivas, audioCfg2channels( IVAS_AUDIO_CONFIG_5_1_2 ), output_frame, p_output, p_output ); } } +#endif } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { @@ -1051,6 +1071,7 @@ ivas_error ivas_jbm_dec_render( { ivas_mc_paramupmix_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_tc, p_output ); +#ifndef NONBE_FIX_802_PARAMUPMIX_HIGHPASS /* HP filtering */ #ifdef SPLIT_REND_WITH_HEAD_ROT /*no HPF when rendering is already done*/ @@ -1065,7 +1086,7 @@ ivas_error ivas_jbm_dec_render( } } } - +#endif 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 );