Commit f2d2780d authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

align ivas-float-update 312fc774 to float-main 4fb9f6517

parent 312fc774
Loading
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -381,6 +381,7 @@ ivas_error acelp_core_enc(
        /*-----------------------------------------------------------------*
         * After inactive period, use the most up-to-date ISPs
         *-----------------------------------------------------------------*/

        if ( st->hDtxEnc != NULL && ( st->last_core_brate == FRAME_NO_DATA || st->last_core_brate == SID_2k40 ) )
        {
            mvr2r( st->hDtxEnc->lspCNG, st->lsp_old, M );
@@ -694,12 +695,7 @@ ivas_error acelp_core_enc(
        if ( !st->Opt_SC_VBR && ( st->idchan == 0 || st->element_mode != IVAS_CPE_TD || ( st->idchan == 1 && st->element_mode == IVAS_CPE_TD && st->tdm_LRTD_flag ) ) )
        {
            /* Apply a non linearity to the SHB excitation */
            non_linearity( bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame
#ifdef NONBE_1328_FIX_NON_LINEARITY
                           ,
                           st->element_mode
#endif
            );
            non_linearity( bwe_exc, bwe_exc_extended, st->hBWE_TD->old_bwe_exc_extended, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale, st->coder_type, voice_factors, st->L_frame, st->element_mode );
        }

        if ( st->core_brate == SID_2k40 || st->core_brate == FRAME_NO_DATA )
+21 −0
Original line number Diff line number Diff line
@@ -123,11 +123,32 @@ void acelp_core_switch_enc(
        }
    }

#ifdef FIX_I4_OL_PITCH
    if ( st->last_codec_mode == MODE1 )
    {
        /* in MODE1 T_op is at 12.8 kHz */
        if ( st->last_L_frame != L_FRAME ) /* ACELP@16k core -> convert T_op to 16 kHz */
        {
            T_op[0] = (short) ( 1.25f * T_op[0] + 0.5f );
            T_op[1] = (short) ( 1.25f * T_op[1] + 0.5f );
        }
    }
    else
    {
        /* in MODE2 T_op is at 16 kHz */
        if ( st->last_L_frame == L_FRAME ) /* ACELP@12.8k core -> convert T_op to 12.8 kHz */
        {
            T_op[0] = (short) ( 0.8f * T_op[0] + 0.5f );
            T_op[1] = (short) ( 0.8f * T_op[1] + 0.5f );
        }
    }
#else
    if ( st->last_L_frame != L_FRAME ) /* ACELP@16k core */
    {
        T_op[0] = (short) ( 1.25f * T_op[0] + 0.5f );
        T_op[1] = (short) ( 1.25f * T_op[1] + 0.5f );
    }
#endif
    /*----------------------------------------------------------------*
     * Excitation encoding
     *----------------------------------------------------------------*/
+0 −4
Original line number Diff line number Diff line
@@ -108,8 +108,6 @@ void amr_wb_enc(

    LPD_state_HANDLE hLPDmem = st->hLPDmem;

    push_wmops( "amr_wb_enc" );

    /*------------------------------------------------------------------*
     * Initialization
     *------------------------------------------------------------------*/
@@ -552,8 +550,6 @@ void amr_wb_enc(
    dbgwrite( snr_[0], sizeof( float ), 320, 1, "res/snr" );
#endif

    pop_wmops();

    return;
}

+0 −2
Original line number Diff line number Diff line
@@ -332,7 +332,6 @@ void TNSAnalysisStereo(

                                        pFilter[0]->order = pFilter[1]->order = maxOrder;
                                    }
#ifdef FIX_1349_TNS_CRASH
                                    else
                                    {
                                        pFilter[0]->filterType = TNS_FILTER_OFF;
@@ -340,7 +339,6 @@ void TNSAnalysisStereo(
                                        sts[0]->hTcxEnc->tnsData[k].nFilters = 0;
                                        sts[1]->hTcxEnc->tnsData[k].nFilters = 0;
                                    }
#endif
                                }
                            }
                        }
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,6 @@ void dtx(
             last_br_cng_flag )
        {
            st->total_brate = st->last_total_brate_cng;

            if ( !( st->total_brate == ACELP_7k20 && st->Opt_SC_VBR ) )
            {
                st->Opt_SC_VBR = 0;
@@ -158,6 +157,7 @@ void dtx(
             last_br_flag )
        {
            st->total_brate = st->last_total_brate;

            if ( !( st->total_brate == ACELP_7k20 && st->Opt_SC_VBR ) )
            {
                st->Opt_SC_VBR = 0;
Loading