Commit f70c9739 authored by Nishant S Kulgod's avatar Nishant S Kulgod
Browse files

ener fix

parent cd0e07f1
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ ivas_error pre_proc_front_ivas_fx(
    Word16 old_inp_12k8_fx[],                                  /* o  : (Q-1) buffer of old input signal              */
    float old_inp_12k8[],                                      /* o  : buffer of old input signal              */
    float old_inp_16k[],                                       /* o  : buffer of old input signal @16kHz          */
    Word32 *ener_fx,                                              /* o  : residual energy from Levinson-Durbin  Q6  */
    Word32 *ener_fx,                                              /* o  : residual energy from Levinson-Durbin  Q_r  */
    Word16 *relE_fx,                                               /* o  : frame relative energy                  Q8 */
    Word16 A_fx[NB_SUBFR16k * ( M + 1 )],                          /* o  : A(z) unquantized for the 4 subframes    */
    Word16 Aw_fx[NB_SUBFR16k * ( M + 1 )],                         /* o  : weighted A(z) unquantized for subframes */
+1 −1
Original line number Diff line number Diff line
@@ -5844,7 +5844,7 @@ ivas_error ivas_compute_core_buffers_fx(
    const Word16 input_frame,              /* i  : frame length                             */
    const Word16 last_element_mode,        /* i  : last element mode                        */
    const Word32 sr_core,                  /* i  : core-coder sampling rate                 */
    Word32 *ener_fx,                       /* o  : residual energy from Levinson-Durbin  Q6 */
    Word32 *ener_fx,                       /* o  : residual energy from Levinson-Durbin Q_r */
    Word16 A_fx[NB_SUBFR16k * ( M + 1 )],  /* i/o: A(z) unquantized for the 4 subframes     */
    Word16 Aw_fx[NB_SUBFR16k * ( M + 1 )], /* i/o: weighted A(z) unquantized for subframes  */
    Word32 epsP[M + 1],                    /* i/o: LP prediction errors                     */
+1 −3
Original line number Diff line number Diff line
@@ -1136,7 +1136,7 @@ ivas_error ivas_compute_core_buffers_fx(
    const Word16 input_frame,              /* i  : frame length                             */
    const Word16 last_element_mode,        /* i  : last element mode                        */
    const Word32 sr_core,                  /* i  : core-coder sampling rate                 */
    Word32 *ener_fx,                       /* o  : residual energy from Levinson-Durbin  Q6 */
    Word32 *ener_fx,                       /* o  : residual energy from Levinson-Durbin Q_r */
    Word16 A_fx[NB_SUBFR16k * ( M + 1 )],  /* i/o: A(z) unquantized for the 4 subframes     */
    Word16 Aw_fx[NB_SUBFR16k * ( M + 1 )], /* i/o: weighted A(z) unquantized for subframes  */
    Word32 epsP_fx[M + 1],                 /* i/o: LP prediction errors                     */
@@ -1686,8 +1686,6 @@ ivas_error ivas_compute_core_buffers_fx(

        analy_lp_ivas_fx( inp_16k_fx, L_FRAME16k, L_look, ener_fx, A_fx, epsP_h, epsP_l, lsp_new_fx, lsp_mid_fx, st->lspold_enc_fx, st->pitch, st->voicing_fx, INT_FS_16k, 0, Q_new ? *Q_new : 0, Q_r );

        *ener_fx = L_shl(*ener_fx, sub(Q6 - 1, Q_r[0])); // Q_r[0]+1 -> Q6

        /*--------------------------------------------------------------*
         * Compute Weighted Input
         *---------------------------------------------------------------*/
+1 −3
Original line number Diff line number Diff line
@@ -885,7 +885,7 @@ ivas_error pre_proc_front_ivas_fx(
    Word16 old_inp_12k8_fx[],                                      /* o  : (Q-1) buffer of old input signal              */
    float old_inp_12k8[],                                          /* o  : buffer of old input signal              */
    float old_inp_16k[],                                           /* o  : buffer of old input signal @16kHz          */
    Word32 *ener_fx,                                               /* o  : residual energy from Levinson-Durbin   Q6 */
    Word32 *ener_fx,                                               /* o  : residual energy from Levinson-Durbin   Q_r */
    Word16 *relE_fx,                                               /* o  : frame relative energy                  Q8 */
    Word16 A_fx[NB_SUBFR16k * ( M + 1 )],                          /* o  : A(z) unquantized for the 4 subframes    Q12 */
    Word16 Aw_fx[NB_SUBFR16k * ( M + 1 )],                         /* o  : weighted A(z) unquantized for subframes Q12 */
@@ -2060,8 +2060,6 @@ ivas_error pre_proc_front_ivas_fx(
    analy_lp_ivas_fx( inp_12k8_loc_fx, L_FRAME, L_look, ener_fx, A_fx, epsP_h_loc, epsP_l_loc, lsp_new_fx, lsp_mid_fx, st->lsp_old1_fx, alw_pitch_lag_12k8, alw_voicing_fx,
                      INT_FS_12k8, i, Q_new_loc, Q_r );

    *ener_fx = L_shl(*ener_fx, sub(Q6 - 1, Q_r[0])); // Q_r[0]+1 -> Q6

    lsp2lsf_fx( lsp_new_fx, lsf_new_fx, M, INT_FS_12k8 );

    stab_fac_fx = lsf_stab_fx( lsf_new_fx, st->lsf_old1_fx, 0, L_FRAME );