Commit 94867874 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

increase cldfb buffer precision

parent c4f46c08
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@
#define FIX_2003_CON_TCX_OVERFLOW                            /* FhG: Use a dynamic scaling factor for the synth buffer at the output of con_tcx_ivas_fx() */
#define OPT_TCXLTP_FILTER_LOOP                               /* FhG: optimize loop in tcx_ltp_synth_filter */
#define FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE                  /* Dolby/FhG: fix for issue 2026: Saturation in SWB TBE re-scaling function preventing StereoDownmix complexity job to complete */
#define FIX_2021_BANDWIDTH_EXTENSION_PROBLEM                 /* FhG: increase cldfb buffer precision*/

/* #################### Start BASOP porting switches ############################ */

+15 −1
Original line number Diff line number Diff line
@@ -698,7 +698,21 @@ ivas_error ivas_core_enc_fx(
            /* Common pre-processing for SWB(FB) TBE and SWB(FB) BWE */
            /* Scaling cldfb_state_fx */
            scale_sig32( st->cldfbSynTd->cldfb_state_fx, st->cldfbSynTd->p_filter_length, sub( q_re_im_buf[n], st->cldfbSynTd->Q_cldfb_state ) ); // st->cldfbSynTd->Q_cldfb_state -> q_realImagBuffer

#ifdef FIX_2021_BANDWIDTH_EXTENSION_PROBLEM
            Word16 scf_min = 31;
            move16();
            FOR( int i = 0; i < CLDFB_NO_COL_MAX; i++ )
            {
                scf_min = s_min( scf_min, getScaleFactor32( realBuffer_fx[n][i], CLDFB_NO_CHANNELS_MAX ) );
                scf_min = s_min( scf_min, getScaleFactor32( imagBuffer_fx[n][i], CLDFB_NO_CHANNELS_MAX ) );
            }
            FOR( int i = 0; i < CLDFB_NO_COL_MAX; i++ )
            {
                scale_sig32( realBuffer_fx[n][i], CLDFB_NO_CHANNELS_MAX, scf_min );
                scale_sig32( imagBuffer_fx[n][i], CLDFB_NO_CHANNELS_MAX, scf_min );
            }
            q_re_im_buf[n] = add( q_re_im_buf[n], scf_min );
#endif
            swb_pre_proc_ivas_fx( st, new_swb_speech_fx_16, new_swb_speech_fx, shb_speech_fx, &Q_shb_spch, realBuffer_fx[n], imagBuffer_fx[n], q_re_im_buf[n], hCPE );

            /* Re-scaling cldfb_state_fx */