Commit 42a44c46 authored by Nishant S Kulgod's avatar Nishant S Kulgod
Browse files

commit 1

parent d8a06435
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -95,14 +95,14 @@ static void calc_rc0_h(


/*----------------------------------------------------------------------------
 * calc_st_filt()
 * calc_st_filt_fx()
 *
 * computes impulse response of A(gamma2) / A(gamma1)
 * controls gain : computation of energy impulse response as
 *                 SUMn  (abs (h[n])) and computes parcor0
 *---------------------------------------------------------------------------- */

void calc_st_filt(
void calc_st_filt_fx(
    const float *apond2,   /* i  : coefficients of numerator               */
    const float *apond1,   /* i  : coefficients of denominator             */
    float *parcor0,        /* o  : 1st parcor calcul. on composed filter   */
+8 −8
Original line number Diff line number Diff line
@@ -6162,12 +6162,12 @@ void TonalMDCTConceal_Apply(
 );

 //dec_post_fx
 void Init_post_filter(
 void Init_post_filter_fx(
   PFSTAT_HANDLE hPFstat    /* i : core decoder parameters */
 ); /* (i)   : core decoder parameters */


 void nb_post_filt(
 void nb_post_filt_fx(
   const Word16 L_frame,       /* i  : frame length                            */
   PFSTAT_HANDLE hPFstat,      /* i : core decoder parameters */
   Word16* psf_lp_noise,       /* i  : Long term noise                   Q8    */
@@ -6180,7 +6180,7 @@ void TonalMDCTConceal_Apply(
   const Word16 disable_hpf    /* i  : flag to diabled HPF                     */
 );

 void formant_post_filt(
 void formant_post_filt_fx(
   PFSTAT_HANDLE hPFstat,   /* i : core decoder parameters */
   Word16 *synth_in,        /* i  : 12k8 synthesis                    */
   Word16 *Aq,              /* i  : LP filter coefficient             */
@@ -6192,7 +6192,7 @@ void TonalMDCTConceal_Apply(
 );

#ifdef IVAS_FLOAT_FIXED
 void formant_post_filt_fx(
 void formant_post_filt_ivas_fx(
     PFSTAT_HANDLE hPFstat,   /* i : core decoder parameters */
     Word16 *synth_in,        /* i  : 12k8 synthesis                    */
     Word16 *Aq,              /* i  : LP filter coefficient             */
@@ -6203,7 +6203,7 @@ void TonalMDCTConceal_Apply(
     const Word16 off_flag    /* i  : off flag                        */
 );
#endif
 void Filt_mu(
 void Filt_mu_fx(
   Word16 * sig_in,        /* i  : signal (beginning at sample -1)     */
   Word16 * sig_out,       /* o  : signal with tilt                    */
   Word16 parcor0,         /* i  : parcor0 (mu = parcor0 * gamma3)     */
@@ -6211,7 +6211,7 @@ void TonalMDCTConceal_Apply(
 );

#ifdef IVAS_FLOAT_FIXED
 void Filt_mu_fx(
 void Filt_mu_ivas_fx(
     Word16 * sig_in,        /* i  : signal (beginning at sample -1)     */
     Word16 * sig_out,       /* o  : signal with tilt                    */
     Word16 parcor0,         /* i  : parcor0 (mu = parcor0 * gamma3)     */
@@ -6219,14 +6219,14 @@ void TonalMDCTConceal_Apply(
     const Word16 extl
 );
#endif
 void scale_st(
 void scale_st_fx(
   const Word16 * sig_in,    /* i  : postfilter i signal             */
   Word16 * sig_out,   /* i/o: postfilter o signal             */
   Word16 * gain_prec, /* i/o: last value of gain for subframe */
   Word16 L_subfr
 );

 void blend_subfr2(
 void blend_subfr2_fx(
   Word16 *sigIn1,      /* i  : i   signal for fade-out */
   Word16 *sigIn2,      /* i  : i   signal for fade-in  */
   Word16 *sigOut       /* o  : output signal             */
+1 −1
Original line number Diff line number Diff line
@@ -743,7 +743,7 @@ void PostShortTerm(
    sig_ltp[0] = *ptr_mem_stp;

    /* Control short term pst filter gain and compute parcor0   */
    calc_st_filt( apond2, apond1, &parcor0, sig_ltp + 1, mem_zero, L_SUBFR16k, SWB_TBE );
    calc_st_filt_fx( apond2, apond1, &parcor0, sig_ltp + 1, mem_zero, L_SUBFR16k, SWB_TBE );

    /* 1/A(gamma1) filtering, mem_stp is updated */
    syn_filt( apond1, LPC_SHB_ORDER, sig_ltp + 1, sig_ltp + 1, L_SUBFR16k, mem_stp, 1 );
+5 −5
Original line number Diff line number Diff line
@@ -1333,13 +1333,13 @@ ivas_error acelp_core_dec_fx(
        {
            st_fx->hPFstat->on = 1;
            move16();
            nb_post_filt( st_fx->L_frame, st_fx->hPFstat, &st_fx->psf_lp_noise_fx, tmp_noise_fx, syn_fx, Aq_fx, pitch_buf_tmp, st_fx->coder_type, st_fx->BER_detect, 0 );
            nb_post_filt_fx( st_fx->L_frame, st_fx->hPFstat, &st_fx->psf_lp_noise_fx, tmp_noise_fx, syn_fx, Aq_fx, pitch_buf_tmp, st_fx->coder_type, st_fx->BER_detect, 0 );
        }
        ELSE
        {
            st_fx->hPFstat->on = 0;
            move16();
            nb_post_filt( st_fx->L_frame, st_fx->hPFstat, &st_fx->psf_lp_noise_fx, tmp_noise_fx, syn_fx, Aq_fx, pitch_buf_tmp, AUDIO, st_fx->BER_detect, 0 );
            nb_post_filt_fx( st_fx->L_frame, st_fx->hPFstat, &st_fx->psf_lp_noise_fx, tmp_noise_fx, syn_fx, Aq_fx, pitch_buf_tmp, AUDIO, st_fx->BER_detect, 0 );
        }
    }
    ELSE
@@ -1376,7 +1376,7 @@ ivas_error acelp_core_dec_fx(
        Copy( syn_fx, temp_buf + L_SYN_MEM, L_FRAME16k );
        st_fx->hPFstat->on = 1;
        move16();
        formant_post_filt( st_fx->hPFstat, temp_buf + L_SYN_MEM, Aq_fx, syn_fx, L_FRAME16k, st_fx->lp_noise, st_fx->total_brate, 0);
        formant_post_filt_fx( st_fx->hPFstat, temp_buf + L_SYN_MEM, Aq_fx, syn_fx, L_FRAME16k, st_fx->lp_noise, st_fx->total_brate, 0);
    }
    ELSE IF( GE_16(st_fx->last_bwidth,WB))
    {
@@ -1386,9 +1386,9 @@ ivas_error acelp_core_dec_fx(
            Copy( syn_fx, temp_buf + M, L_SUBFR );
            Residu3_fx ( Aq_fx, temp_buf + M, temp_buf+M+L_SUBFR, L_SUBFR, 1 );
            E_UTIL_synthesis ( 1, Aq_fx, temp_buf+M+L_SUBFR, temp_buf, L_SUBFR, st_fx->hPFstat->mem_stp+L_SYN_MEM-M, 0, M );
            scale_st ( syn_fx, temp_buf, &st_fx->hPFstat->gain_prec, L_SUBFR );
            scale_st_fx ( syn_fx, temp_buf, &st_fx->hPFstat->gain_prec, L_SUBFR );
            Copy( temp_buf, syn_fx, L_SUBFR/2 );
            blend_subfr2( temp_buf + L_SUBFR/2, syn_fx + L_SUBFR/2, syn_fx + L_SUBFR/2 );
            blend_subfr2_fx( temp_buf + L_SUBFR/2, syn_fx + L_SUBFR/2, syn_fx + L_SUBFR/2 );
        }
        st_fx->hPFstat->on = 0;
        move16();
+5 −5
Original line number Diff line number Diff line
@@ -1502,7 +1502,7 @@ ivas_error acelp_core_dec_ivas_fx(
            st->hPFstat->on = 1;
#ifdef IVAS_FLOAT_FIXED
            move16();
            nb_post_filt(st->L_frame, st->hPFstat, &st->psf_lp_noise_fx, tmp_noise_fx, psyn_fx, Aq_fx, pitch_buf_tmp, st->coder_type, st->BER_detect, 0);
            nb_post_filt_fx(st->L_frame, st->hPFstat, &st->psf_lp_noise_fx, tmp_noise_fx, psyn_fx, Aq_fx, pitch_buf_tmp, st->coder_type, st->BER_detect, 0);

#else
            nb_post_filt_ivas(st->L_frame, L_SUBFR, st->hPFstat, &st->psf_lp_noise, tmp_noise, syn, Aq, pitch_buf, st->coder_type, st->BER_detect, 0);
@@ -1512,7 +1512,7 @@ ivas_error acelp_core_dec_ivas_fx(
        {
            st->hPFstat->on = 0;
#ifdef IVAS_FLOAT_FIXED
            nb_post_filt(st->L_frame, st->hPFstat, &st->psf_lp_noise_fx, tmp_noise_fx, psyn_fx, Aq_fx, pitch_buf_tmp, AUDIO, st->BER_detect, 0);
            nb_post_filt_fx(st->L_frame, st->hPFstat, &st->psf_lp_noise_fx, tmp_noise_fx, psyn_fx, Aq_fx, pitch_buf_tmp, AUDIO, st->BER_detect, 0);

#else
            nb_post_filt_ivas(st->L_frame, L_SUBFR, st->hPFstat, &st->psf_lp_noise, tmp_noise, syn, Aq, pitch_buf, AUDIO, st->BER_detect, 0);
@@ -1620,7 +1620,7 @@ ivas_error acelp_core_dec_ivas_fx(

        set16_fx(st->hPFstat->mem_zero, 0, M);

        formant_post_filt_fx(st->hPFstat, temp_buf_fx + L_SYN_MEM, Aq_fx, psyn_fx, st->L_frame, st->lp_noise, st->total_brate, 0);
        formant_post_filt_ivas_fx(st->hPFstat, temp_buf_fx + L_SYN_MEM, Aq_fx, psyn_fx, st->L_frame, st->lp_noise, st->total_brate, 0);

#else
        mvr2r(syn, temp_buf + L_SYN_MEM, L_FRAME16k);
@@ -1638,9 +1638,9 @@ ivas_error acelp_core_dec_ivas_fx(

            Residu3_fx(Aq_fx, temp_buf_fx + M, temp_buf_fx + M + L_SUBFR, L_SUBFR, 1);
            E_UTIL_synthesis(1, Aq_fx, temp_buf_fx + M + L_SUBFR, temp_buf_fx, L_SUBFR, st->hPFstat->mem_stp + L_SYN_MEM - M, 0, M);
            scale_st(psyn_fx, temp_buf_fx, &st->hPFstat->gain_prec, L_SUBFR);
            scale_st_fx(psyn_fx, temp_buf_fx, &st->hPFstat->gain_prec, L_SUBFR);
            Copy(temp_buf_fx, psyn_fx, L_SUBFR / 2);
            blend_subfr2(temp_buf_fx + L_SUBFR / 2, psyn_fx + L_SUBFR / 2, psyn_fx + L_SUBFR / 2);
            blend_subfr2_fx(temp_buf_fx + L_SUBFR / 2, psyn_fx + L_SUBFR / 2, psyn_fx + L_SUBFR / 2);

#else
            mvr2r(st->hPFstat->mem_pf_in_flt + L_SYN_MEM - M, temp_buf, M);
Loading