Commit 2f6e379b authored by multrus's avatar multrus
Browse files

[cleanup] accept HARMONIZE_TBE

parent ea061b27
Loading
Loading
Loading
Loading
+0 −47
Original line number Diff line number Diff line
@@ -1595,23 +1595,6 @@ void ivas_hq_core_dec_fx(
#endif
);

#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*/
    Word32 *normq_fx,                                           /*Q14*/
    Word16 *ynrm,
    Word16 *Num_bands_p,
    Word16 is_transient,
    Word16 hqswb_clas,
    Word16 c_switching_flag,
    Word16 nb_sfm,
    Word16 num_Sb,
    Word16 *mean_en_high_fx,                                    /*Q5*/
    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                 */
@@ -1861,36 +1844,6 @@ 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                             */
    Word32 *bwe_exc_extended,                                   /* i  : bandwidth extended exciatation   2*Q_exc*/
    const Word16 Q_exc,
    const Word16 voice_factors[],                               /* i  : voicing factors                         */
    Word16 *synth,                                              /* o  : WB synthesis/final synthesis            */
    Word16 *Q_synth 
);

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,
    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 
);
#endif
#ifndef HARM_FD_BWE
/* o : Q_syn_hb*/
Word16 ivas_wb_bwe_dec_fx(
+0 −1
Original line number Diff line number Diff line
@@ -83,7 +83,6 @@
#define FIX_1990_SANITIZER_IN_REVERB_LOAD               /* Nokia: Fix issue part of issue 1990 by introducing missing free of structure - keep until #2059 is addressed */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define HARMONIZE_TBE                                   /* VA: harmonize core-coder TBE function duplications */
#define FIX_2405_HARM_SMC_INIT                          /* VA, basop 2405, harmonisation of SMC init */
#define FIX_2280_REDUCTION_UNNECESSARY_SCALING          /* VA: reduction of unnecessary scaling */
#define FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE    /* VA: reduction of unnecessary scaling, non-BE part */
+0 −31
Original line number Diff line number Diff line
@@ -2717,12 +2717,6 @@ 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 */
@@ -5584,36 +5578,11 @@ 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                 */
    Word32 extl_brate,        /* i  : extensiuon layer bitrate             */
    Word16 *Q_lsf,            /* o  : SHB LSF from de-quantization        Q15*/
    Word16 *Q_subgain,        /* o  : SHB subframe gains from de-quantization  Q15*/
    Word32 *Q_framegrain,     /* o  : SHB frame gain from de-quantization      Q18*/
    Word16 *uv_flag,          /* o  : unvoiced flag*/
    Word32 *Q_shb_ener_sf,    /* o  : Q15                                         */
    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,
    Word16 *hb_synth, /* o  : high-band synthesis                     */
    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,
+0 −51
Original line number Diff line number Diff line
@@ -723,11 +723,7 @@ void Calc_rc0_h(
    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 */
)
@@ -870,49 +866,6 @@ static void Calc_st_filt_tbe_ivas_enc_fx(
    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           */
    Word16 *parcor0,     /* o  : 1st parcor calcul. on composed filter */
    Word16 *sig_ltp_ptr, /* i/o: i  of 1/A(gamma1) : scaled by 1/g0    */
    Word16 *mem_zero     /* i  : All zero memory                       */
)
{
    Word32 L_g0;

    Word16 h[LONG_H_ST];

    Word16 g0, temp;
    Word16 i;
    temp = sub( 2, norm_s( apond2[0] ) );
    /* compute i.r. of composed filter apond2 / apond1 */
    Syn_filt_s( temp, apond1, LPC_SHB_ORDER, apond2, h, LONG_H_ST, mem_zero, 0 );
    /* compute 1st parcor */
    Calc_rc0_h( h, parcor0 );

    /* compute g0 */
    L_g0 = L_mult0( 1, abs_s( h[0] ) );
    FOR( i = 1; i < LONG_H_ST; i++ )
    {
        L_g0 = L_mac0( L_g0, 1, abs_s( h[i] ) );
    }
    g0 = extract_h( L_shl( L_g0, 14 ) );

    /* Scale signal i  of 1/A(gamma1) */
    IF( GT_16( g0, 1024 ) )
    {
        temp = div_s( 1024, g0 ); /* temp = 2**15 / gain0 */
        FOR( i = 0; i < L_SUBFR16k; i++ )
        {
            sig_ltp_ptr[i] = mult_r( sig_ltp_ptr[i], temp );
            move16();
        }
    }

    return;
}
#endif
static void filt_mu_fx(
    const Word16 *sig_in, /* i  : signal (beginning at sample -1) */
    Word16 *sig_out,      /* o  : output signal                   */
@@ -1235,11 +1188,7 @@ 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 */

+0 −8
Original line number Diff line number Diff line
@@ -412,11 +412,7 @@ ivas_error evs_dec_fx(
            test();
            IF( EQ_16( output_frame, L_FRAME48k ) && EQ_16( st_fx->extl, FB_TBE ) )
            {
#ifdef HARMONIZE_TBE
                fb_tbe_dec_fx( st_fx, fb_exc_fx, Q_fb_exc, hb_synth_fx, NULL, hb_synth_fx_exp, NULL, -1, output_frame );
#else
                fb_tbe_dec_fx( st_fx, fb_exc_fx, Q_fb_exc, hb_synth_fx, hb_synth_fx_exp );
#endif
            }
        }
        ELSE IF( EQ_16( st_fx->extl, SWB_BWE ) || EQ_16( st_fx->extl, FB_BWE ) ||
@@ -851,11 +847,7 @@ ivas_error evs_dec_fx(
                        test();
                        IF( EQ_16( st_fx->extl, FB_TBE ) && EQ_16( output_frame, L_FRAME48k ) )
                        {
#ifdef HARMONIZE_TBE
                            fb_tbe_dec_fx( st_fx, fb_exc_fx, Q_fb_exc, hb_synth_fx, NULL, hb_synth_fx_exp, NULL, -1, output_frame );
#else
                            fb_tbe_dec_fx( st_fx, fb_exc_fx, Q_fb_exc, hb_synth_fx, hb_synth_fx_exp );
#endif
                        }
                    }
                    Copy( hb_synth_fx, hBWE_TD->old_hb_synth_fx, output_frame ); /*Q15 - hb_synth_fx_exp*/
Loading