From d18c5af5ff3c7f5ff824d94a9c6310aedd2a4b7d Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 24 Aug 2023 09:28:47 +0200 Subject: [PATCH 1/3] #CR_FIX_735_SBA_HP20_BRATE_SWITCHING --- lib_com/options.h | 2 ++ lib_enc/ivas_enc.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index be3261f808..12474e08ce 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -180,6 +180,8 @@ #define CR_FIX_586_BPF_DFT_MEM /* FhG: issue 586: set input memory of DFT analysis of BPF signal to zero for HQ core to fix issue with PLC and bitrate switching */ #define CR_FIX_ISM_DTX_INFINITE_CNG_ON_TRAILING_SILENCE /* FhG: fix for cng in ISM DTX on sudden silence periods */ #define CR_FIX_698_SBA_MSAN /* Dlb: issue 698: Uninitialized memory read in SBA init */ +#define CR_FIX_735_SBA_HP20_BRATE_SWITCHING /* VA: Resolve "HP20 filtering bug in SBA/OSBA bitrate switching" */ + /* ##################### End NON-BE CR switches ########################### */ diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index 8096199382..3feeeac115 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -127,6 +127,16 @@ ivas_error ivas_enc( dbgwrite( data_f[LFE_CHANNEL], sizeof( float ), n_samples_chan, 1, "./res/lfe_input" ); #endif +#ifdef CR_FIX_735_SBA_HP20_BRATE_SWITCHING + if ( ivas_format == SBA_FORMAT ) + { + if ( ( error = ivas_sba_enc_reconfigure( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif + /*----------------------------------------------------------------* * HP filtering *----------------------------------------------------------------*/ @@ -203,11 +213,12 @@ ivas_error ivas_enc( /* SBA/MASA configuration */ if ( ivas_format == SBA_FORMAT ) { +#ifndef CR_FIX_735_SBA_HP20_BRATE_SWITCHING if ( ( error = ivas_sba_enc_reconfigure( st_ivas ) ) != IVAS_ERR_OK ) { return error; } - +#endif st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; /* Write SBA planar flag */ -- GitLab From e863ef8ad74a500760f0cc32e7d739110fb3ca04 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 30 Aug 2023 12:35:26 +0200 Subject: [PATCH 2/3] extend to OSBA case --- lib_enc/ivas_enc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index 3feeeac115..fe30dbbd80 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -135,6 +135,13 @@ ivas_error ivas_enc( return error; } } + else if ( ivas_format == SBA_ISM_FORMAT ) + { + if ( ( error = ivas_osba_enc_reconfig( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } #endif /*----------------------------------------------------------------* @@ -379,9 +386,9 @@ ivas_error ivas_enc( } else if ( ivas_format == SBA_ISM_FORMAT ) { - +#ifndef CR_FIX_735_SBA_HP20_BRATE_SWITCHING ivas_osba_enc_reconfig( st_ivas ); - +#endif /* Analyze objects and determine needed audio signals */ ivas_osba_enc( st_ivas->hOSba, st_ivas->hIsmMetaData, data_f, input_frame, hEncoderConfig->nchan_ism, st_ivas->ism_mode, st_ivas->sba_analysis_order, hEncoderConfig->input_Fs ); -- GitLab From 37c011dd70344a9115205e396d8e58f5476b2545 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 12 Sep 2023 18:16:13 +0200 Subject: [PATCH 3/3] revert comment change --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 9cb7dde65b..7e314469c2 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -184,7 +184,7 @@ #define NONBE_CR_FIX_735_SBA_HP20_BRATE_SWITCHING /* VA: Issue 735: Resolve "HP20 filtering bug in SBA/OSBA bitrate switching" */ -/* ##################### End NON-BE CR switches ########################### */ +/* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ -- GitLab