Commit 8d7e1f5f authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '854-frequency-peak-at-around-2-khz' into 'main'

Fix proposal for #854

Closes #854

See merge request !546
parents 1d7a054a 4c875363
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -167,6 +167,8 @@
#define FIX851_RANGE_DEC_PRECISION              /* VA : 851 Proposed fix to keep precision during UL_div*/
#define FX_834_OVFL_JBM_CROSSCORR               /* FhG: Proposed fix to 834, allow overflows in calculation */


#define FIX_854_HILBERT_SCALING                 /* VA: reduce lost of precision due to unnecessary scaling, reduce a lot the 2 kHz tone */
/* ################## End DEVELOPMENT switches ######################### */

/* clang-format on */
+4 −0
Original line number Diff line number Diff line
@@ -1218,7 +1218,9 @@ ivas_error ivas_core_dec_fx(
            Copy_Scale_sig_32_16( synth_32_fx[n], synth_fxl, L_FRAME48k, negate( add( Q11, q ) ) );
#endif
            Scale_sig( st->hBWE_TD->state_lpc_syn_fx, LPC_SHB_ORDER, sub( Q8, st->prev_Q_bwe_syn ) );
#ifndef FIX_854_HILBERT_SCALING
            Scale_sig32( st->hBWE_TD->genSHBsynth_Hilbert_Mem_fx, HILBERT_MEM_SIZE, sub( st->prev_Q_bwe_syn2, Q11 ) );
#endif
            Copy_Scale_sig_32_16( st->hBWE_TD->genSHBsynth_state_lsyn_filt_shb_local_fx_32, st->hBWE_TD->genSHBsynth_state_lsyn_filt_shb_local_fx, imult1616( 2, ALLPASSSECTIONS_STEEP ), sub( st->prev_Q_bwe_syn2, Q11 ) );

            swb_CNG_dec_ivas_fx( st, synth_fxl, hb_synth_16_fx[n], sid_bw[n], negate( q ) );
@@ -1233,7 +1235,9 @@ ivas_error ivas_core_dec_fx(
            Copy_Scale_sig_16_32( synth_fxl, synth_32_fx[n], L_FRAME48k, ( Q11 + q ) );
#endif
            Scale_sig( st->hBWE_TD->state_lpc_syn_fx, LPC_SHB_ORDER, -( Q8 - st->prev_Q_bwe_syn ) );
#ifndef FIX_854_HILBERT_SCALING
            Scale_sig32( st->hBWE_TD->genSHBsynth_Hilbert_Mem_fx, HILBERT_MEM_SIZE, -( st->prev_Q_bwe_syn2 - Q11 ) );
#endif
            Copy_Scale_sig_16_32_no_sat( st->hBWE_TD->genSHBsynth_state_lsyn_filt_shb_local_fx, st->hBWE_TD->genSHBsynth_state_lsyn_filt_shb_local_fx_32, 2 * ALLPASSSECTIONS_STEEP, -( st->prev_Q_bwe_syn2 - Q11 ) );
        }