Loading lib_com/swb_tbe_com.c +6 −5 Original line number Diff line number Diff line Loading @@ -72,8 +72,9 @@ void GenSHBSynth_fx_32( #ifdef FIX_881_HILBERT_FILTER Word16 shift = 0; Word32 maxm32, input_synspeech_temp[L_FRAME16k]; move16(); /* find the maximum value and derive the shift to improve precision of the Hilbert filter */ /* find the maximum value and derive the shift to improve precision of the Hilber filter */ maxm32 = L_deposit_l( 0 ); FOR( i = 0; i < L_FRAME16k; i++ ) { Loading @@ -98,7 +99,7 @@ void GenSHBSynth_fx_32( Scale_sig32( state_lsyn_filt_shb_local, 2 * ALLPASSSECTIONS_STEEP, shift ); Scale_sig32( Hilbert_Mem, HILBERT_MEM_SIZE, shift ); } else ELSE { Copy32( input_synspeech, input_synspeech_temp, L_FRAME16k ); } Loading Loading @@ -132,9 +133,9 @@ 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 ); Scale_sig32( shb_syn_speech_32k, L_FRAME32k, negate( shift ) ); Scale_sig32( state_lsyn_filt_shb_local, 2 * ALLPASSSECTIONS_STEEP, negate( shift ) ); Scale_sig32( Hilbert_Mem, HILBERT_MEM_SIZE, negate( shift ) ); } #endif Loading lib_com/swb_tbe_com_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -3480,6 +3480,9 @@ void GenShapedSHBExcitation_ivas_enc_fx( { // g = 1.0f; g = MAX16B; /* Q15 */ move16(); g_e = 0; move16(); } // else if ( g < shl( delta, ( 15 - g_e ) - 14 ) ) ELSE IF( BASOP_Util_Cmp_Mant32Exp( g, add( 16, g_e ), delta, 17 ) < 0 ) Loading @@ -3487,8 +3490,12 @@ void GenShapedSHBExcitation_ivas_enc_fx( /* prevent low gains to be quantized to 0 as this is reserved for plosives */ // g = delta; g = shl( delta, 1 ); /* Q15 */ g_e = 0; move16(); } g = shl_sat( g, g_e ); /* Q15 */ *vf_ind = usquant_fx( g, &mix_factor, 0, delta, cbsize ); move16(); } Loading Loading
lib_com/swb_tbe_com.c +6 −5 Original line number Diff line number Diff line Loading @@ -72,8 +72,9 @@ void GenSHBSynth_fx_32( #ifdef FIX_881_HILBERT_FILTER Word16 shift = 0; Word32 maxm32, input_synspeech_temp[L_FRAME16k]; move16(); /* find the maximum value and derive the shift to improve precision of the Hilbert filter */ /* find the maximum value and derive the shift to improve precision of the Hilber filter */ maxm32 = L_deposit_l( 0 ); FOR( i = 0; i < L_FRAME16k; i++ ) { Loading @@ -98,7 +99,7 @@ void GenSHBSynth_fx_32( Scale_sig32( state_lsyn_filt_shb_local, 2 * ALLPASSSECTIONS_STEEP, shift ); Scale_sig32( Hilbert_Mem, HILBERT_MEM_SIZE, shift ); } else ELSE { Copy32( input_synspeech, input_synspeech_temp, L_FRAME16k ); } Loading Loading @@ -132,9 +133,9 @@ 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 ); Scale_sig32( shb_syn_speech_32k, L_FRAME32k, negate( shift ) ); Scale_sig32( state_lsyn_filt_shb_local, 2 * ALLPASSSECTIONS_STEEP, negate( shift ) ); Scale_sig32( Hilbert_Mem, HILBERT_MEM_SIZE, negate( shift ) ); } #endif Loading
lib_com/swb_tbe_com_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -3480,6 +3480,9 @@ void GenShapedSHBExcitation_ivas_enc_fx( { // g = 1.0f; g = MAX16B; /* Q15 */ move16(); g_e = 0; move16(); } // else if ( g < shl( delta, ( 15 - g_e ) - 14 ) ) ELSE IF( BASOP_Util_Cmp_Mant32Exp( g, add( 16, g_e ), delta, 17 ) < 0 ) Loading @@ -3487,8 +3490,12 @@ void GenShapedSHBExcitation_ivas_enc_fx( /* prevent low gains to be quantized to 0 as this is reserved for plosives */ // g = delta; g = shl( delta, 1 ); /* Q15 */ g_e = 0; move16(); } g = shl_sat( g, g_e ); /* Q15 */ *vf_ind = usquant_fx( g, &mix_factor, 0, delta, cbsize ); move16(); } Loading