Commit 038e80ec authored by Nishant S Kulgod's avatar Nishant S Kulgod
Browse files

commit 3

parent 42f49a95
Loading
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -322,20 +322,19 @@ static void house_refl_fx(
        Word32 rcp_fx = L_deposit_h( tmp ); // rcp_q
        Word16 rcp_q = sub( Q31, exp );

        rcp_fx = L_shr( rcp_fx, sub( rcp_q, Q31 ) ); // making rcp_fx in Q31
        FOR( i = 0; i < sizex; i++ )
        {
            norm = norm_l( pu_fx[i] );
            L_tmp = L_shl( pu_fx[i], norm );
            pu_fx[i] = Mpy_32_32( L_tmp, rcp_fx ); // px_q + Q31 - Q31 -> px_q
            pu_e[i] = sub( 31, add( px_q, norm ) );
            pu_fx[i] = Mpy_32_32( L_tmp, rcp_fx ); // ( px_q + norm ) + rcp_q - 31  -> exp: 31 + 31 - (px_q + norm + rcp_q)
            pu_e[i] = sub( 62, add( add( px_q, norm ), rcp_q ) );
            move32();
            move16();
        }

        IF( pu_fx[0] >= 0 )
        {
            pu_fx[0] = L_add( pu_fx[0], L_shl( 1, sub( 31, pu_e[0] ) ) );
            pu_fx[0] = BASOP_Util_Add_Mant32Exp( pu_fx[0], pu_e[0], ONE_IN_Q30, 1, &pu_e[0] );
            ( *normu_fx ) = L_negate( *normu_fx );

            move32();
@@ -343,7 +342,7 @@ static void house_refl_fx(
        }
        ELSE
        {
            pu_fx[0] = L_sub( pu_fx[0], L_shl( 1, sub( 31, pu_e[0] ) ) );
            pu_fx[0] = BASOP_Util_Add_Mant32Exp( pu_fx[0], pu_e[0], -ONE_IN_Q30, 1, &pu_e[0] );
            move32();
        }

@@ -357,8 +356,8 @@ static void house_refl_fx(
        FOR( i = 0; i < sizex; i++ )
        {
            pu_fx[i] = Mpy_32_32( pu_fx[i], rcp_fx ); // pu_e[i] + exp2
            pu_fx[i] = L_shl( pu_fx[i], exp2 );       // pu_e[i] + exp2
            move32();
            pu_e[i] = add( pu_e[i], exp2 );
            move32();
        }

@@ -489,6 +488,7 @@ static void house_qr_fx(
    Word32 U_fx[FOA_CHANNELS * FOA_CHANNELS];
    Word16 U_e[FOA_CHANNELS * FOA_CHANNELS];
    Word32 pu_fx[FOA_CHANNELS];
    Word16 tmp_pu_e[FOA_CHANNELS];
    Word16 pv_exp[FOA_CHANNELS];
    Word32 pa_fx[FOA_CHANNELS];
    Word16 tmp_e;
@@ -573,8 +573,10 @@ static void house_qr_fx(
    {
        FOR( i = 0; i < n_rows; i++ )
        {
            pu_fx[i] = L_shr( U_fx[i * n + k], sub( sub( 31, U_e[i * n + k] ), pu_fx_q ) ); // pu_fx_q
            pu_fx[i] = U_fx[i * n + k];
            move32();
            tmp_pu_e[i] = U_e[i * n + k];
            move16();
        }

        FOR( s = k; s < n_rows; s++ )
@@ -586,8 +588,8 @@ static void house_qr_fx(
            }


            pv_fx[s - k] = dotp_fixed( &pu_fx[k], &pa_fx[k], sub( n_rows, k ) ); // pu_fx_q + Q31 - Q31
            pv_exp[s - k] = sub( 31, pu_fx_q );
            pv_fx[s - k] = dotp_fixed( &pu_fx[k], &pa_fx[k], sub( n_rows, k ) ); // exp: tmp_pu_e[k]
            pv_exp[s - k] = tmp_pu_e[k];
            move32();
            move16();
        }
+4 −0
Original line number Diff line number Diff line
@@ -779,6 +779,10 @@ void destroy_core_enc_fx(
    ENC_CORE_HANDLE hCoreCoder /* i/o: core encoder structure                  */
);

void destroy_evs_core_enc_fx(
    ENC_CORE_HANDLE hCoreCoder /* i/o: core encoder structure      */
);

ivas_error ivas_sce_dec_fx(
    Decoder_Struct *st_ivas,      /* i/o: IVAS decoder structure              */
    const Word16 sce_id,          /* i  : SCE # identifier                    */
+8 −0
Original line number Diff line number Diff line
@@ -785,7 +785,11 @@ ivas_error acelp_core_enc(
        IF( st->element_mode > EVS_MONO && st->hTcxEnc != NULL )
        {
            Copy( syn1_fx + shr( st->L_frame, 1 ), st->hTcxEnc->Txnq, shr( st->L_frame, 1 ) );
#ifdef MSAN_FIX
            Scale_sig( st->hTcxEnc->Txnq + shr( st->L_frame, 1 ), sub( L_FRAME32k / 2 + 64, shr( st->L_frame, 1 ) ), sub( st->Q_syn, st->hTcxEnc->q_Txnq ) );
#else
            Scale_sig( st->hTcxEnc->Txnq + shr( st->L_frame, 1 ), sub( L_FRAME32k / 2 + 64, shr( st->L_frame, 2 ) ), sub( st->Q_syn, st->hTcxEnc->q_Txnq ) );
#endif
            st->hTcxEnc->q_Txnq = st->Q_syn;
            move16();
        }
@@ -810,7 +814,11 @@ ivas_error acelp_core_enc(
         *-----------------------------------------------------------------*/

        Scale_sig( syn_fx, L_FRAME, sub( s_min( st->Q_syn, Q_new ), st->Q_syn ) );
#ifdef MSAN_FIX
        Scale_sig( res_fx, st->L_frame, sub( s_min( st->Q_syn, Q_new ), Q_new ) );
#else
        Scale_sig( res_fx, L_FRAME16k, sub( s_min( st->Q_syn, Q_new ), Q_new ) );
#endif
        FEC_encode_ivas_fx( hBstr, st->acelp_cfg, syn_fx, st->coder_type, st->clas, pitch_buf, res_fx, &st->Last_pulse_pos, st->L_frame, st->total_brate, s_min( st->Q_syn, Q_new ) );
        IF( st->hBWE_TD != NULL )
        {
+1 −6
Original line number Diff line number Diff line
@@ -545,9 +545,6 @@ void init_coder_ace_plus(
    init_modes_ivas_fx( st, last_total_brate );
#endif
    /* Adaptive BPF */
    set_zero( st->mem_bpf, 2 * L_FILT16k );
    set_zero( st->mem_error_bpf, 2 * L_FILT16k );

    if ( st->total_brate >= HQ_48k )
    {
        st->enablePlcWaveadjust = 1;
@@ -1009,9 +1006,7 @@ static void init_sig_buffers_ivas_fx( Encoder_State *st, const Word16 L_frame_ol
            st->mem_preemph_enc = st->buf_speech_enc[st->encoderPastSamples_enc + st->encoderLookahead_enc - 1];
            move16();
            st->exp_mem_preemph_enc = st->exp_buf_speech_enc;
            // To Be Checked
            // st->mem_wsp_enc = shr( st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1], sub( Q16, st->exp_buf_wspeech_enc ) ); // Q-1
            st->mem_wsp_enc = shr_sat( st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1], sub( Q16, st->exp_buf_wspeech_enc ) ); // Q-1
            st->mem_wsp_enc = shr( st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1], sub( Q16, st->exp_buf_wspeech_enc ) ); // Q-1
            move16();
        }
        /*coming from TCXonly modes*/
+0 −5
Original line number Diff line number Diff line
@@ -207,13 +207,8 @@ void core_coder_mode_switch_ivas_fx(
        move32();

        /* Initialize Signal Buffers */
        f2me_buf_16( st->old_wsp, st->old_wsp_fx, &st->exp_old_wsp, L_WSP_MEM );
        f2me_buf_16( st->old_inp_12k8, st->old_inp_12k8_fx, &st->exp_old_inp_12k8, L_INP_MEM );
        f2me_buf_16( st->old_inp_16k, st->old_inp_16k_fx, &st->exp_old_inp_16k, L_INP_MEM );

        /* Adaptive BPF */
        set_zero( st->mem_bpf, 2 * L_FILT16k );
        set_zero( st->mem_error_bpf, 2 * L_FILT16k );
#endif
        init_coder_ace_plus_ivas_fx( st, last_total_brate, MCT_flag );
        IF( st->hLPDmem != NULL )
Loading