Commit ae505b0e authored by PLAINSI's avatar PLAINSI
Browse files

Move HighPass filtering to before ParamUpmix

parent 09b3105f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -200,6 +200,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 */


/* ##################### End NON-BE switches ########################### */
+11 −3
Original line number Diff line number Diff line
@@ -875,9 +875,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 )
            {
@@ -889,7 +897,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 );
+22 −1
Original line number Diff line number Diff line
@@ -462,6 +462,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 )
            {
@@ -478,6 +497,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 )
        {
@@ -1043,6 +1063,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*/
@@ -1057,7 +1078,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 );