diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8aa6a8af57496bc1fa7953e45c51584bb8250b86..cc2153f897a6c72149e05eb1c6b6102b3fda71ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,7 @@ variables: INSTR_DIR: "scripts/c-code_instrument" BUILD_WITH_DEBUG_MODE_INFO: "" ENCODER_TEST: "" + SKIP_REGRESSION_CHECK: "" MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'pytest-compare' to run comparison test against reference float codec." value: 'default' diff --git a/lib_com/options.h b/lib_com/options.h index 24f21262eff5924a8a7128128e3a2aeaec84b19f..cfc24032325db60dc4987fc44b2b450e90b9c376 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -150,4 +150,5 @@ #define FIX_ISSUE_1237 /* VA: replacement of Copy_Scale_sig_16_32_DEPREC() that are doing 16 bits left shift by Copy_Scale_sig_16_32_no_sat() */ #define FIX_ISSUE_1237_KEEP_EVS_BE /* VA: Fix to keep EVS bitexactness to 26.444 */ #define FIX_ISSUE_1214 /* Ittiam: Fix for issue 1214: Energy leakage in IGF tiles for MDCT-stereo @64kbps SWB*/ +#define FIX_881_HILBERT_FILTER /* VA: improve the precision of the Hilbert filter to remove 2kHz unwanted tone */ #endif diff --git a/lib_com/swb_tbe_com.c b/lib_com/swb_tbe_com.c index 9b20512a24e17ca91b7c39668a07e128894cf01f..bc5538aebbfff469a11ccf5a281a8115c9d87395 100644 --- a/lib_com/swb_tbe_com.c +++ b/lib_com/swb_tbe_com.c @@ -69,7 +69,44 @@ void GenSHBSynth_fx_32( Word32 speech_buf_32k[L_FRAME32k]; Word16 i; +#ifdef FIX_881_HILBERT_FILTER + Word16 shift = 0; + Word32 maxm32, input_synspeech_temp[L_FRAME16k]; + + /* find the maximum value and derive the shift to improve precision of the Hilbert filter */ + maxm32 = L_deposit_l( 0 ); + FOR( i = 0; i < L_FRAME16k; i++ ) + { + maxm32 = L_max( maxm32, L_abs( input_synspeech[i] ) ); + } + + FOR( i = 0; i < 2 * ALLPASSSECTIONS_STEEP; i++ ) + { + maxm32 = L_max( maxm32, L_abs( state_lsyn_filt_shb_local[i] ) ); + } + + FOR( i = 0; i < HILBERT_MEM_SIZE; i++ ) + { + maxm32 = L_max( maxm32, L_abs( Hilbert_Mem[i] ) ); + } + + IF( maxm32 != 0 ) + { + shift = sub( norm_l( maxm32 ), 3 ); + + Copy_Scale_sig32( input_synspeech, input_synspeech_temp, L_FRAME16k, shift ); + Scale_sig32( state_lsyn_filt_shb_local, 2 * ALLPASSSECTIONS_STEEP, shift ); + Scale_sig32( Hilbert_Mem, HILBERT_MEM_SIZE, shift ); + } + else + { + Copy32( input_synspeech, input_synspeech_temp, L_FRAME16k ); + } + + Interpolate_allpass_steep_32( input_synspeech_temp, state_lsyn_filt_shb_local, L_FRAME16k, speech_buf_32k ); +#else Interpolate_allpass_steep_32( input_synspeech, state_lsyn_filt_shb_local, L_FRAME16k, speech_buf_32k ); +#endif IF( EQ_16( L_frame, L_FRAME ) ) { @@ -92,6 +129,15 @@ void GenSHBSynth_fx_32( } } +#ifdef FIX_881_HILBERT_FILTER + IF( maxm32 != 0 ) + { + Scale_sig32( shb_syn_speech_32k, L_FRAME32k, -shift ); + Scale_sig32( state_lsyn_filt_shb_local, 2 * ALLPASSSECTIONS_STEEP, -shift ); + Scale_sig32( Hilbert_Mem, HILBERT_MEM_SIZE, -shift ); + } +#endif + return; } void ScaleShapedSHB_32(