Commit ca94741b authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into...

Merge branch 'main' into float-1493-improve-stability-of-decisions-in-masa-metadata-reduction-in-encoder
parents e0def48e ae3fc3c5
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3031,9 +3031,15 @@ void acelp_fast_fx(
    BSTR_ENC_HANDLE hBstr,                                      /* i/o: encoder bitstream handle                */
    const Word16 cdk_index,                                     /* i  : codebook index                          */
    const Word16 dn_orig[L_SUBFR],                              /* i  : corr. between target and h[].      Q_dn */
#ifdef OPT_2416_ACELP_FAST                                      
    const Word16 Q_dncn,                                        /* i  : scaling factor of dn and cn             */  
#else
    Word16 Q_dn,
#endif
    const Word16 cn[L_SUBFR],                                   /* i  : residual after long term prediction q_cn*/
#ifndef OPT_2416_ACELP_FAST
    const Word16 q_cn,
#endif
    const Word16 H[L_SUBFR],                                    /* i  : impulse response of weighted synthesis filter  e(norm_s(H[0])+1) */
    Word16 code[L_SUBFR],                                       /* o  : algebraic (fixed) codebook excitation   */
    Word16 y[],                                                 /* o  : filtered fixed codebook excitation      */
+2 −0
Original line number Diff line number Diff line
@@ -95,8 +95,10 @@
#define HARMONIZE_ACELP_ENC                             /* VA: basop issue 2400: Remove duplicated main ACELP encoder function */
#define FIX_2392_MSAN_DESTROY_DEC                       /* VA: basop issue 2392: fix MSAN in ivas_destroy_dec_fx() */
#define FIX_FLOAT_1522_LTV_MSAN_QMETADATA_ENC_EC3       /* Nokia: float issue 1522: fix uninit MSAN in EC3 of qmetadata encoding */
#define OPT_2416_ACELP_FAST                             /* VA: basop issue 2426, optimisation of acelp_fast_fx ( reduc. compl. by 0.35 wmops ) */
#define FIX_2410_HARM_MODIF_FS                          /* VA: basop issue 2410: Remove duplicated modif_Fs */
#define HARM_LEV_DURBIN                                 /* VA: basop issue 2423: harmonize levinson-Durbin algorithm */
#define HARMONIZE_TBE2                                  /* VA: basop issue 2399: Remove duplicated code: TBE, step 2 */

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

+16 −6
Original line number Diff line number Diff line
@@ -2891,6 +2891,7 @@ void flip_spectrum_and_decimby4_fx(
);
void GenShapedWBExcitation_fx(
#ifndef HARMONIZE_TBE2
    Word16 *excSHB,                   /* o   : synthesized shaped shb exctiation      */
    const Word16 *lpc_shb,            /* i   : lpc coefficients                       */
    Word16 *exc4kWhtnd,               /* o   : whitened synthesized shb excitation    */
@@ -2908,8 +2909,8 @@ void GenShapedWBExcitation_fx(
    const Word16 signal_type,
    const Word16 igf_flag );
#ifdef HARMONIZE_TBE
void GenShapedWBExcitation_ivas_fx(
#endif
    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*/
@@ -2928,7 +2929,6 @@ void GenShapedWBExcitation_ivas_fx(
    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                */
@@ -2967,7 +2967,12 @@ void GenShapedSHBExcitation_fx(
    const Word32 bitrate,
    const Word16 prev_bfi );
#ifdef HARMONIZE_TBE2
void GenShapedSHBExcitation_ivas_fx(
    const Word16 enc_dec, /* i  : encoder/decoder flag */
#else
void GenShapedSHBExcitation_ivas_enc_fx(
#endif
    Word16 *excSHB,                      /* o  : synthesized shaped shb excitation Q_bwe_exc*/
    const Word16 *lpc_shb,               /* i  : lpc coefficients Q12*/
    Word16 *White_exc16k_FB,             /* o  : white excitation for the Fullband extension Q_bwe_exc_fb */
@@ -3012,6 +3017,7 @@ void GenShapedSHBExcitation_ivas_enc_fx(
    Word16 Env_error_part[]       /* o  : per-segment error in SHB residual envelope modelling */
);
#ifndef HARMONIZE_TBE2
void GenShapedSHBExcitation_ivas_dec_fx(
    Word16 *excSHB,                      /* o : synthesized shaped shb excitation Q_bwe_exc*/
    const Word16 *lpc_shb,               /* i : lpc coefficients Q12*/
@@ -3053,7 +3059,7 @@ void GenShapedSHBExcitation_ivas_dec_fx(
    Word16 *Env_error,            /* o  : error in SHB residual envelope modelling*/
    Word16 Env_error_part[]       /* o  : per-segment error in SHB residual envelope modelling */
);
#endif
void GenSHBSynth_fx(
    const Word16 *shb_target_speech,  /* i  : i   synthesized speech                */
    Word16 *shb_syn_speech_32k,       /* o  : output highband component               */
@@ -10091,7 +10097,7 @@ void v_sub32_fx(
    const Word16 N     /* i  : Vector length                                    */
);
void ivas_swb_tbe_dec_fx(
void swb_tbe_dec_ivas_fx(
    Decoder_State *st,                    /* i/o: decoder state structure                           */
    STEREO_ICBWE_DEC_HANDLE hStereoICBWE, /* i/o: IC-BWE state structure                            */
    const Word32 *bwe_exc_extended_fx,    /* i  : bandwidth extended excitation : Q_exc             */
@@ -10257,6 +10263,7 @@ void Copy_Scale_sig32(
    const Word16 exp0 /* i  : exponent: x = round(x << exp)   Qx ?exp  */
);
#ifndef HARMONIZE_TBE2
void swb_pre_proc_ivas_fx(
    Encoder_State *st,                                          /* i/o: encoder state structure                  */
    Word16 *new_swb_speech,                                     /* o  : original input signal at 32kHz - Q0      */
@@ -10264,9 +10271,12 @@ void swb_pre_proc_ivas_fx(
    Word32 realBuffer[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i  : real buffer Q - q_reImbuffer             */
    Word32 imagBuffer[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i  : imag buffer Q - q_reImbuffer             */
    Word16 q_reImBuffer,                                        /* i  : scale data of real and imag CLDFB buffers*/
#ifdef HARMONIZE_TBE2
    const CLDFB_SCALE_FACTOR *cldfbScale, /* i : scale data of real and imag CLDFB buffers */
#endif
    CPE_ENC_HANDLE hCPE /* i/o: CPE encoder structure                    */
);
#endif
/* o  : Q(2x - 31 - gb)                      */
Word32 sum2_f_32_fx(
    const Word32 *vec, /* i  : input vector, Qx                     */
+518 −139

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -1118,7 +1118,7 @@ ivas_error ivas_core_dec_fx(
        IF( flaf_swb_tbe )
        {
            /* SWB TBE decoder */
            ivas_swb_tbe_dec_fx( st, hStereoICBWE, bwe_exc_extended_fx[n], st->Q_exc, voice_factors_fx[n], old_syn_12k8_16k_fx[n], tmp_buffer_fx /*fb_exc*/, hb_synth_32_fx[n], pitch_buf_fx[n], &Q_white_exc );
            swb_tbe_dec_ivas_fx( st, hStereoICBWE, bwe_exc_extended_fx[n], st->Q_exc, voice_factors_fx[n], old_syn_12k8_16k_fx[n], tmp_buffer_fx /*fb_exc*/, hb_synth_32_fx[n], pitch_buf_fx[n], &Q_white_exc );

            Copy_Scale_sig_16_32_no_sat( hBWE_TD->syn_overlap_fx, hBWE_TD->syn_overlap_fx_32, L_SHB_LAHEAD, sub( Q11, hBWE_TD->prev_Q_bwe_syn2 ) ); // Q11
            Copy_Scale_sig_32_16( hBWE_TD->old_tbe_synth_fx_32, hBWE_TD->old_tbe_synth_fx, L_SHB_TRANSITION_LENGTH, sub( hBWE_TD->prev_Qx, Q11 ) ); // prev_Qx
Loading