Commit 54ac62a3 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'main' of ssh://forge.3gpp.org:29419/sa4/audio/ivas-basop into...

Merge branch 'main' of ssh://forge.3gpp.org:29419/sa4/audio/ivas-basop into basop-2397-clang18-msan-use-of-uninitialized-value-in-lib_dec-ivas_stereo_mdct_core_dec_fx-c-392-9
parents a5f9279d 7098a0f8
Loading
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
@@ -1601,6 +1601,7 @@ void ivas_hq_core_dec_fx(
    Word16 *Q_output 
);

#ifndef HARMONIZE_TBE
void ivas_HQ_FEC_Mem_update_fx(
    Decoder_State *st_fx,                                       /* i/o: decoder state structure                 */
    Word32 *t_audio_q_fx,                                       /*Q12*/
@@ -1616,6 +1617,7 @@ void ivas_HQ_FEC_Mem_update_fx(
    Word16 hq_core_type,                                        /* i : normal or low-rate MDCT(HQ) core         */
    Word16 output_frame 
);
#endif
/* o  : Consumed bits  Q0 */
Word16 ivas_hq_classifier_dec_fx(                          
    Decoder_State *st_fx,                                       /* i/o: decoder state structure                 */
@@ -1865,6 +1867,7 @@ void stereoFdCngCoherence_fx(
    Word16 fft_exp 
);

#ifndef HARMONIZE_TBE
void ivas_wb_tbe_dec_fx(
    Decoder_State *st_fx,                                       /* i/o: decoder state structure                 */
    const Word16 coder_type,                                    /* i  : coding type                             */
@@ -1893,7 +1896,7 @@ void GenShapedWBExcitation_ivas_fx(
    const Word16 uv_flag,                                       /* i : unvoiced flag                            */
    const Word16 igf_flag 
);

#endif
/* o : Q_syn_hb*/
Word16 ivas_wb_bwe_dec_fx(
    Decoder_State *st_fx,                                       /* i/o: decoder state structure                 */
@@ -2060,19 +2063,37 @@ UWord32 ivas_syn_output_fx(
    Word16 *synth_out                                           /* o  : integer 16 bits synthesis signal            */
);

#ifdef FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER
void ivas_buffer_interleaved_to_deinterleaved_fx(
    Word32 *audio_in,                                           /* i  : interleaved audio buffer                                */
    Word32 *audio_out[],                                        /* o  : pointers to each channel of deinterleaved audio buffer  */
    const Word16 n_channels,                                    /* i  : number of channels                                      */
    const Word16 frame_length                                   /* i  : frame length (one channel)                              */
);
#else
void ivas_buffer_interleaved_to_deinterleaved_fx(
    Word32 *audio,                                              /* i/o: audio buffer                                */
    const Word16 n_channels,                                    /* i  : number of channels                          */
    const Word16 frame_length,                                  /* i  : frame length (one channel)                  */
    const Word16 n_samp_full                                    /* i  : full frame length (one channel)             */
);
#endif

#ifdef FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER
void ivas_buffer_deinterleaved_to_interleaved_fx(
    Word32 *audio_in[],                                         /* i  : pointers to each channel of deinterleaved audio buffer  */
    Word32 *audio_out,                                          /* o  : interleaved audio buffer                                */
    const Word16 n_channels,                                    /* i  : number of channels                                      */
    const Word16 frame_length                                   /* i  : frame length (one channel)                              */
);
#else
void ivas_buffer_deinterleaved_to_interleaved_fx(
    Word32 *audio[],                                            /* i  : deinterleaved audio buffer                  */
    const Word16 n_channels,                                    /* i  : number of channels                          */
    const Word16 frame_length,                                  /* i  : frame length (one channel)                  */
    Word32 *audio_out                                           /* o  : interleaved audio buffer                    */
);
#endif

void stereo_tcx_core_dec_fx(
    Decoder_State *st,                                          /* i/o: decoder state structure                     */
+66 −0
Original line number Diff line number Diff line
@@ -160,6 +160,38 @@ UWord32 ivas_syn_output_fx(
 * Convert an interleaved buffer of audio channels to deinterleaved one
 *-------------------------------------------------------------------*/

#ifdef FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER
void ivas_buffer_interleaved_to_deinterleaved_fx(
    Word32 *audio_in,         /* i  : interleaved audio buffer                                */
    Word32 *audio_out[],      /* o  : pointers to each channel of deinterleaved audio buffer  */
    const Word16 n_channels,  /* i  : number of channels                                      */
    const Word16 frame_length /* i  : frame length (one channel)                              */
)
{
    Word16 ch, s;
    Word32 buffer[MAX_TRANSPORT_CHANNELS][MAX_JBM_L_FRAME48k]; /* temp buffer needed when "*audio_in" and "*audio_out[]" point to the same memory */

    FOR( ch = 0; ch < n_channels; ch++ )
    {
        FOR( s = 0; s < frame_length; s++ )
        {
            buffer[ch][s] = audio_in[s * n_channels + ch];
            move32();
        }
    }

    FOR( ch = 0; ch < n_channels; ch++ )
    {
        FOR( s = 0; s < frame_length; s++ )
        {
            audio_out[ch][s] = buffer[ch][s];
            move32();
        }
    }

    return;
}
#else
void ivas_buffer_interleaved_to_deinterleaved_fx(
    Word32 *audio,             /* i/o: audio buffer                    */
    const Word16 n_channels,   /* i  : number of channels              */
@@ -189,6 +221,7 @@ void ivas_buffer_interleaved_to_deinterleaved_fx(

    return;
}
#endif


/*-------------------------------------------------------------------*
@@ -197,6 +230,38 @@ void ivas_buffer_interleaved_to_deinterleaved_fx(
 * Convert a deinterleaved buffer of audio channels to interleaved one
 *-------------------------------------------------------------------*/

#ifdef FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER
void ivas_buffer_deinterleaved_to_interleaved_fx(
    Word32 *audio_in[],       /* i  : pointers to each channel of deinterleaved audio buffer  */
    Word32 *audio_out,        /* o  : interleaved audio buffer                                */
    const Word16 n_channels,  /* i  : number of channels                                      */
    const Word16 frame_length /* i  : frame length (one channel)                              */
)
{
    Word16 ch, s;
    Word32 buffer[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k]; /* temp buffer needed when "*audio_in[]" and "*audio_out" point to the same memory */

    FOR( ch = 0; ch < n_channels; ch++ )
    {
        FOR( s = 0; s < frame_length; s++ )
        {
            buffer[ch][s] = audio_in[ch][s];
            move32();
        }
    }

    FOR( ch = 0; ch < n_channels; ch++ )
    {
        FOR( s = 0; s < frame_length; s++ )
        {
            audio_out[s * n_channels + ch] = buffer[ch][s];
            move32();
        }
    }

    return;
}
#else
void ivas_buffer_deinterleaved_to_interleaved_fx(
    Word32 *audio[],           /* i/o: deinterleaved audio buffer      */
    const Word16 n_channels,   /* i  : number of channels              */
@@ -224,6 +289,7 @@ void ivas_buffer_deinterleaved_to_interleaved_fx(

    return;
}
#endif


/*-------------------------------------------------------------------*
+2 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@
#define FIX_2382_COPY_AQ_IN_MCT                         /* FhG: basop issue 2382: 2nd instance of prevent copying uninitialized values from Aq_fx[][] to Aq_fx_32[][] in TCX */
#define FIX_2391_INIT_HQ_GENERIC_OFFSET                 /* FhG/Eri: basop issue 2391: make sure hq_generic_offset is initialized inside hq_hr_dec_fx() */
#define FIX_2397_COPY_AQ_MDCT_CORE_BFI                  /* FhG: prevent copying of uninit memory in MDCT stereo core if bfi is set */
#define HARMONIZE_TBE                                   /* VA: harmonize core-coder TBE function duplications */

/* #################### End BE switches ################################## */

@@ -119,6 +120,7 @@
#define FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG       /* Eri: Basop issue 2317: Uninitialized value read in case of DTX and BW switching   */
#define FIX_1283_STEREO_DFT_COLLAPSE                    /* FhG: float issue 1283: fix for critical issue with DFT stereo core coder */
#define FIX_2379_REMOVE_previoussynth_fx_32             /* VA: basop issue 2379: remove duplicated buffer st->previoussynth_fx_32[] */
#define FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER           /* FhG/VA: basop issue 2396: keep TC channel pointers in one constant place during decoding and rendering */

/* ##################### End NON-BE switches ########################### */

+75 −47
Original line number Diff line number Diff line
@@ -2856,11 +2856,12 @@ void Calc_rc0_h(
    Word16 *rc0 /* o  : 1st parcor */
);
#ifndef HARMONIZE_TBE
void Calc_rc0_h_ivas_enc_fx(
    Word16 *h,  /* i  : impulse response of composed filter */
    Word16 *rc0 /* o  : 1st parcor */
);
#endif
void PostShortTerm_fx(
    Word16 *sig_in,             /* i  : i   signal (pointer to current subframe */
    Word16 *lpccoeff,           /* i  : LPC coefficients for current subframe */
@@ -2915,12 +2916,33 @@ void GenShapedWBExcitation_fx(
    const Word16 coder_type,          /* i   : coding type                            */
    const Word16 element_mode,        /* i   : element mode                           */
    const Word16 *bwe_exc_extended,   /* i   : bandwidth extended exciatation         */
    const Word16 Q_bwe_exc,
    const Word16 Q_bwe_exc,           /* i   : Q for memories                         */
    Word16 bwe_seed[],                /* i/o : random number generator seed           */
    const Word16 voice_factors[],     /* i   : voicing factor                         */
    const Word16 signal_type,
    const Word16 igf_flag );
#ifdef HARMONIZE_TBE
void GenShapedWBExcitation_ivas_fx(
    Word16 *excSHB,                   /* o  : synthesized shaped shb exctiation   Q_bwe_exc*/
    const Word16 *lpc_shb,            /* i  : lpc coefficients Q12                         */
    Word16 *exc4kWhtnd,               /* o  : whitened synthesized shb excitation Q_bwe_exc*/
    Word32 *mem_csfilt,               /* i/o: memory                           Q_bwe_exc+16*/
    Word16 *mem_genSHBexc_filt_down1, /* i/o: memory                              Q_bwe_exc*/
    Word16 *mem_genSHBexc_filt_down2, /* i/o: memory                              Q_bwe_exc*/
    Word16 *mem_genSHBexc_filt_down3, /* i/o: memory                              Q_bwe_exc*/
    Word16 *state_lpc_syn,            /* i/o: memory                              Q_bwe_exc*/
    const Word16 coder_type,          /* i  : coding type                                  */
    const Word16 element_mode,        /* i  : element mode                                 */
    const Word16 *bwe_exc_extended,   /* i  : bwidth extended exciatation         Q_bwe_exc*/
    const Word16 Q_bwe_exc,           /* i  : Q for memories                               */
    Word16 bwe_seed[],                /* i/o: random number generator seed                 */
    const Word16 voice_factors[],     /* i  : voicing factor                            Q15*/
    const Word16 uv_flag,             /* i  : unvoiced flag                                */
    const Word16 igf_flag             /* i  : IGF flag                                     */
);
#endif
void GenWBSynth_fx(
    const Word16 *input_synspeech, /* i  : i   synthesized speech                  */
    Word16 *shb_syn_speech_16k,    /* o  : output highband compnent                */
@@ -3094,7 +3116,7 @@ void ScaleShapedWB_fx(
    const Word32 frame_gain, /* i  : frame gain                                                  */
    const Word16 *win,       /* i  : window                                                      */
    const Word16 *subwin,    /* i  : subframes window                                            */
    const Word16 Q_bwe_exc,
    const Word16 Q_bwe_exc,  /* i  : Q for memories                                              */
    Word16 L_frame,          /* i  : Frame length - determines whether 12.8 or 16kHz core in-use */
    Word16 dynQ,             /* i  : indicate whether output is dynamic Q, or Q0                 */
    Word16 *Qx,              /* o  : newly computed Q factor for  synSHB                         */
@@ -5775,6 +5797,7 @@ void swb_tbe_dec_fx(
    Word16 *Q_synth,
    Word16 *pitch_buf );
#ifndef HARMONIZE_TBE
void ivas_dequantizeSHBparams_fx_9_1(
    Decoder_State *st_fx,
    const Word16 extl,        /* i  : extension layer                 */
@@ -5787,8 +5810,9 @@ void ivas_dequantizeSHBparams_fx_9_1(
    Word16 *Q_shb_res_gshape, /* o  : Q14                                         */
    Word16 *Q_mixFactors,     /* o  : Q15                                         */
    Word16 *MSFlag );
#endif
void fb_tbe_dec_fx(
#ifndef HARMONIZE_TBE
    Decoder_State *st,     /* i/o: encoder state structure                 */
    const Word16 fb_exc[], /* i  : FB excitation from the SWB part         */
    Word16 Q_fb_exc,
@@ -5796,9 +5820,13 @@ void fb_tbe_dec_fx(
    Word16 hb_synth_exp );
void fb_tbe_dec_ivas_fx(
#endif
    Decoder_State *st,     /* i/o: encoder state structure                 */
    const Word16 fb_exc[], /* i  : FB excitation from the SWB part         */
    Word16 Q_fb_exc,
#ifdef HARMONIZE_TBE
    Word16 *hb_synth16, /* o  : high-band synthesis                    Q(15 - hb_synth_exp) */
#endif
    Word32 *hb_synth, /* o  : high-band synthesis                     */
    Word16 hb_synth_exp,
    Word16 *fb_synth_ref,
+73 −56
Original line number Diff line number Diff line
@@ -8,30 +8,29 @@
#include "rom_com.h" /* Static table prototypes                */
#include "prot_fx.h"
#include "basop_util.h"
#include "ivas_prot_fx.h"


/*-----------------------------------------------------------------*
 * Local constants
 *-----------------------------------------------------------------*/

#define POW_EXC16k_WHTND                    1.14e11f   /* power of random excitation, length 320 samples, uniform distribution */
#define POW_EXC16k_WHTND_FX_INV_SQRT        6360       // Q31
#define POW_EXC16k_WHTND_FX_INV_SQRT        6360       // 1.14e11f in Q31 power of random excitation, length 320 samples, uniform distribution
#define POW_EXC16k_WHTND_FX_INV_SQRT_IN_Q49 1667313793 // Q49
#define POW_EXC16k_WHTND_FX                 178125000  // Q-6
#define THR_ENV_ERROR_PLOSIVE               200.0f     /* threshold for envelope error used in plosive detection */
#define THR_ENV_ERROR_PLOSIVE_FX            200        /* threshold for envelope error used in plosive detection Q0 */


/*-----------------------------------------------------------------*
 * Local function prototypes
 *-----------------------------------------------------------------*/

static void create_random_vector_fx( Word16 output[], const Word16 length, Word16 seed[], Word16 element_mode );
static void flip_spectrum_fx( const Word16 input[], Word16 output[], const Word16 length );
static void Calc_st_filt_tbe( Word16 *apond2, Word16 *apond1, Word16 *parcor0, Word16 *sig_ltp_ptr, Word16 *mem_zero );
static void Calc_st_filt_tbe_fx( Word16 *apond2, Word16 *apond1, Word16 *parcor0, Word16 *sig_ltp_ptr, Word16 *mem_zero );
static void Hilbert_transform_fx( Word32 tmp_R[], Word32 tmp_I[], Word32 *tmpi_R, Word32 *tmpi_I, const Word16 length, const Word16 HB_stage_id );
static void Hilbert_transform_sp_fx( Word16 tmp_R[], Word16 tmp_I[], Word32 *tmpi_R, Word32 *tmpi_I, const Word16 length, const Word16 HB_stage_id );
void Estimate_mix_factors_fx( const Word16 *shb_res, const Word16 Q_shb, const Word16 *exc16kWhtnd, const Word16 Q_bwe_exc, const Word16 *White_exc16k_frac, const Word16 Q_frac, const Word32 pow1, const Word16 Q_pow1, const Word32 pow22, const Word16 Q_pow22, Word16 *vf_modified, Word16 *vf_ind );
static void Estimate_mix_factors_fx( const Word16 *shb_res, const Word16 Q_shb, const Word16 *exc16kWhtnd, const Word16 Q_bwe_exc, const Word16 *White_exc16k_frac, const Word16 Q_frac, const Word32 pow1, const Word16 Q_pow1, const Word32 pow22, const Word16 Q_pow22, Word16 *vf_modified, Word16 *vf_ind );


/*-------------------------------------------------------------------*
 * swb_tbe_reset()
@@ -720,9 +719,15 @@ void Calc_rc0_h(
        *rc0 = negate( *rc0 );
        move16();
    }

    return;
}

#ifdef HARMONIZE_TBE
static void Calc_rc0_h_ivas_enc_fx(
#else
void Calc_rc0_h_ivas_enc_fx(
#endif
    Word16 *h,  /* i  : impulse response of composed filter */
    Word16 *rc0 /* o  : 1st parcor */
)
@@ -781,7 +786,7 @@ void Calc_rc0_h_ivas_enc_fx(
    }
}

static void Calc_st_filt_tbe(
static void Calc_st_filt_tbe_fx(
    Word16 *apond2,      /* i  : coefficients of numerator             */
    Word16 *apond1,      /* i  : coefficients of denominator           */
    Word16 *parcor0,     /* o  : 1st parcor calcul. on composed filter */
@@ -819,6 +824,8 @@ static void Calc_st_filt_tbe(
            move16();
        }
    }

    return;
}

static void Calc_st_filt_tbe_ivas_enc_fx(
@@ -859,8 +866,11 @@ static void Calc_st_filt_tbe_ivas_enc_fx(
            move16();
        }
    }

    return;
}

#ifndef HARMONIZE_TBE
static void Calc_st_filt_tbe_ivas_dec_fx(
    Word16 *apond2,      /* i  : coefficients of numerator             */
    Word16 *apond1,      /* i  : coefficients of denominator           */
@@ -899,8 +909,10 @@ static void Calc_st_filt_tbe_ivas_dec_fx(
            move16();
        }
    }
}

    return;
}
#endif
static void filt_mu_fx(
    const Word16 *sig_in, /* i  : signal (beginning at sample -1) */
    Word16 *sig_out,      /* o  : output signal                   */
@@ -1103,7 +1115,7 @@ void PostShortTerm_fx(
    move16();

    /* Control short term pst filter gain and compute parcor0   */
    Calc_st_filt_tbe( apond2_fx, apond1_fx, &parcor0_fx, sig_ltp_fx + 1, mem_zero );
    Calc_st_filt_tbe_fx( apond2_fx, apond1_fx, &parcor0_fx, sig_ltp_fx + 1, mem_zero );
    /* o: parcor0 in Q15 */
    /* i/o: sig_ltp_fx in Q_bwe_exc */

@@ -1223,7 +1235,11 @@ void PostShortTerm_ivas_dec_fx(
    move16();

    /* Control short term pst filter gain and compute parcor0   */
#ifdef HARMONIZE_TBE
    Calc_st_filt_tbe_fx( apond2_fx, apond1_fx, &parcor0_fx, sig_ltp_fx + 1, mem_zero );
#else
    Calc_st_filt_tbe_ivas_dec_fx( apond2_fx, apond1_fx, &parcor0_fx, sig_ltp_fx + 1, mem_zero );
#endif
    /* o: parcor0 in Q15 */
    /* i/o: sig_ltp_fx in Q_bwe_exc */

@@ -1240,6 +1256,13 @@ void PostShortTerm_ivas_dec_fx(
    return;
}


/*-------------------------------------------------------------------*
 * flip_spectrum_and_decimby4()
 *
 *
 *-------------------------------------------------------------------*/

void flip_spectrum_and_decimby4_fx(
    const Word16 input[],  /* i : input spectrum Q_inp     */
    Word16 output[],       /* o : output spectrum Q_inp    */
@@ -1330,11 +1353,12 @@ void GenShapedWBExcitation_ivas_fx(
    const Word16 coder_type,          /* i  : coding type                                  */
    const Word16 element_mode,        /* i  : element mode                                 */
    const Word16 *bwe_exc_extended,   /* i  : bwidth extended exciatation         Q_bwe_exc*/
    const Word16 Q_bwe_exc,
    const Word16 Q_bwe_exc,           /* i : Q for memories                                */
    Word16 bwe_seed[],                /* i/o: random number generator seed                 */
    const Word16 voice_factors[],     /* i  : voicing factor                            Q15*/
    const Word16 uv_flag,             /* i  : unvoiced flag                                */
    const Word16 igf_flag )
    const Word16 igf_flag             /* i  : IGF flag                                     */
)
{
    Word16 i, j, k;
    Word16 wht_fil_mem[LPC_WHTN_ORDER_WB];
@@ -4868,7 +4892,6 @@ void ScaleShapedSHB_fx(
        }
    }


    Q_gFr_norm = norm_l( frame_gain );
    if ( frame_gain == 0 )
    {
@@ -5113,7 +5136,7 @@ void ScaleShapedWB_fx(
    const Word32 frame_gain, /* i  : frame gain                         Q18*/
    const Word16 *win,       /* i  : window                             Q15*/
    const Word16 *subwin,    /* i  : subframes window                   Q15*/
    const Word16 Q_bwe_exc,
    const Word16 Q_bwe_exc,  /* i  : Q for memories                        */
    Word16 L_frame,          /* i  : Frame length - determines whether 12.8 or 16kHz core in-use */
    Word16 dynQ,             /* i  : indicate whether output is dynamic Q, or Q0 */
    Word16 *Qx,              /* o  : newly computed Q factor for  synSHB   */
@@ -5128,6 +5151,7 @@ void ScaleShapedWB_fx(
    Word16 sum_gain;
    Word32 L_tmp;
    Word16 max_val, abs_sig, sc1, sc2, shift, max_headroom, min_shift, max_shift, max_shift2;

    /* Init */
    set32_fx( mod_syn, 0, L_FRAME16k + L_SHB_LAHEAD );

@@ -5225,7 +5249,6 @@ void ScaleShapedWB_fx(
        }
    }


    max_val = 0;
    move16();
    FOR( i = 0; i < l_frame + l_shb_lahead; i++ )
@@ -5997,6 +6020,7 @@ void interp_code_5over2_fx(
    Ltemp = L_mult( inp_code_fx[kk], factor_j_fx[1] ); /*Q(16+x) */
    interp_code_fx[i + 1] = round_fx( Ltemp );         /*Qx */
    move16();

    return;
}

@@ -6224,7 +6248,6 @@ void elliptic_bpf_48k_generic_fx(

    } /*IsUpsampled3*/


    memory_fx2[0][0] = input_fx[L_FRAME48k - 4];
    memory_fx2[0][1] = input_fx[L_FRAME48k - 3];
    memory_fx2[0][2] = input_fx[L_FRAME48k - 2];
@@ -6272,7 +6295,6 @@ void elliptic_bpf_48k_generic_fx(
        }
    }


    Q_temp = norm_l( L_tmpMax );
    Q_temp = sub( Q_temp, 4 );
    Scale_sig32( L_tmp2, 960, Q_temp );
@@ -6334,7 +6356,6 @@ void elliptic_bpf_48k_generic_fx(
        }
    }


    memory_fx2[2][0] = L_tmp2[L_FRAME48k - 4];
    memory_fx2[2][1] = L_tmp2[L_FRAME48k - 3];
    memory_fx2[2][2] = L_tmp2[L_FRAME48k - 2];
@@ -6372,6 +6393,8 @@ void elliptic_bpf_48k_generic_fx(

    return;
}


/*-------------------------------------------------------------------*
 * synthesise_fb_high_band()
 *
@@ -6428,20 +6451,12 @@ void synthesise_fb_high_band_fx(
    IF( EQ_16( L_frame, L_FRAME16k ) )
    {
        /* for 16kHz ACELP core */
        elliptic_bpf_48k_generic_fx(
            element_mode,
            1, // IsUpsampled3
            excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_3_fx

        );
        elliptic_bpf_48k_generic_fx( element_mode, 1, /* IsUpsampled3 */ excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_3_fx );
    }
    ELSE
    {
        /* for 12.8kHz ACELP core */
        elliptic_bpf_48k_generic_fx(
            element_mode,
            1, // IsUpsampled3
            excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx );
        elliptic_bpf_48k_generic_fx( element_mode, 1, /* IsUpsampled3 */ excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx );
    }
    /* temp1 = sum2_f( tmp, L_FRAME48k ) + 0.001f */
    temp1 = sum2_fx_mod( tmp, L_FRAME48k );
@@ -6524,15 +6539,18 @@ void synthesise_fb_high_band_fx(
            move16();
        }
    }

    return;
}


/*-------------------------------------------------------------------*
 * Estimate_mix_factors_fx()                                         *
 *                                                                   *
 * Estimate mix factors for SHB excitation generation                *
 *-------------------------------------------------------------------*/
void Estimate_mix_factors_fx(

static void Estimate_mix_factors_fx(
    const Word16 *shb_res, /* i  : SHB LP residual in Q = Q_shb */
    const Word16 Q_shb,
    const Word16 *exc16kWhtnd, /* i  : SHB transformed low band excitation Q_bwe_exc */
@@ -6596,7 +6614,6 @@ void Estimate_mix_factors_fx(
        /* (Q_bwe_exc) */
    }


    length = L_FRAME16k;
    move16();
    temp_p1_p2 = Dot_product( temp_numer1, temp_numer2, length ); /* 2*(Q_bwe_exc)+1 */
@@ -6672,6 +6689,7 @@ void Estimate_mix_factors_fx(
    return;
}


/*======================================================================================*/
/* FUNCTION : prep_tbe_exc_fx() */
/*--------------------------------------------------------------------------------------*/
@@ -6721,7 +6739,6 @@ void prep_tbe_exc_fx(
    const Word16 idchan,         /* i  : channel ID                             */
    const Word16 flag_TD_BWE,    /* i  : flag indicating whether hTD_BWE exists */
    const Word16 tdm_LRTD_flag   /* i  : LRTD stereo mode flag                  */

)
{
    Word16 i;
Loading