Commit 8e9f2907 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh Committed by Fabian Bauer
Browse files

Bug fix in acelp and stereo tcx core enc

parent 6477524c
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -766,7 +766,7 @@ void enc_pit_exc_ivas_fx(
        Copy( &res[i_subfr], &exc[i_subfr], L_subfr );
        /* condition on target (compared to float) has been put outside the loop */

        find_targets_ivas_fx( speech, hLPDmem->mem_syn, i_subfr, &hLPDmem->mem_w0, p_Aq,
        find_targets_ivas_fx( speech, hGSCEnc->mem_syn_tmp_fx, i_subfr, &hGSCEnc->mem_w0_tmp_fx, p_Aq,
                              res, L_subfr, p_Aw, st_fx->preemph_fac, xn, cn, h1 );

        Copy_Scale_sig( h1, h2, L_subfr, -2 );
@@ -897,7 +897,7 @@ void enc_pit_exc_ivas_fx(
            Ltmp = L_mac_o( Ltmp, xn[L_subfr - 1], 16384, &Overflow );    // Q_new-1+15+shift
            Ltmp = L_msu_o( Ltmp, y1[L_subfr - 1], gain_pit, &Overflow ); // Q_new-1+15+shift
            Ltmp = L_shl_o( Ltmp, sub( 1, shift ), &Overflow );           // Q_new+15
            hLPDmem->mem_w0 = round_fx_o( Ltmp, &Overflow );              /*Q_new-1         */
            hGSCEnc->mem_w0_tmp_fx = round_fx_o( Ltmp, &Overflow );       /*Q_new-1         */
#else
            Ltmp = L_mult( gcode16, y2[L_subfr - 1] );
            Ltmp = L_shl( Ltmp, add( 5, shift ) );
@@ -905,7 +905,7 @@ void enc_pit_exc_ivas_fx(
            Ltmp = L_mac( Ltmp, xn[L_subfr - 1], 16384 );
            Ltmp = L_msu( Ltmp, y1[L_subfr - 1], gain_pit );
            Ltmp = L_shl( Ltmp, sub( 1, shift ) );
            hLPDmem->mem_w0 = round_fx( Ltmp ); /*Q_new-1         */
            hGSCEnc->mem_w0_tmp_fx = round_fx( Ltmp ); /*Q_new-1         */
#endif
        }
        ELSE
@@ -914,11 +914,11 @@ void enc_pit_exc_ivas_fx(
#ifdef BASOP_NOGLOB
            Ltmp = L_msu_sat( Ltmp, y1[L_subfr - 1], gain_pit ); // Q_new-1+15+shift
            Ltmp = L_shl_sat( Ltmp, sub( 1, shift ) );           // Q_new+15
            hLPDmem->mem_w0 = round_fx_sat( Ltmp );              /*Q_new-1         */
            hGSCEnc->mem_w0_tmp_fx = round_fx_sat( Ltmp );       /*Q_new-1         */
#else
            Ltmp = L_msu( Ltmp, y1[L_subfr - 1], gain_pit );
            Ltmp = L_shl( Ltmp, sub( 1, shift ) );
            hLPDmem->mem_w0 = round_fx( Ltmp ); /*Q_new-1         */
            hGSCEnc->mem_w0_tmp_fx = round_fx( Ltmp ); /*Q_new-1         */
#endif
        }

+1 −1
Original line number Diff line number Diff line
@@ -712,7 +712,7 @@ void stereo_tcx_core_enc(
    move16();
    Scale_sig( st->hLPDmem->mem_syn1_fx, M, sub( s_min( curr_q_syn, st->hLPDmem->q_mem_syn ), st->hLPDmem->q_mem_syn ) );
    Scale_sig( st->hLPDmem->mem_syn3, M, sub( s_min( curr_q_syn, st->hLPDmem->q_mem_syn ), st->hLPDmem->q_mem_syn ) );
    st->hLPDmem->q_mem_syn = sub( Q_new, 1 );
    st->hLPDmem->q_mem_syn = s_min( curr_q_syn, st->hLPDmem->q_mem_syn );
    move16();
    st->hLPDmem->q_lpd_syn = Q_new;
    move16();
+1 −0
Original line number Diff line number Diff line
@@ -2581,6 +2581,7 @@ void tcx_encoder_memory_update_ivas_fx(
    Copy( synth + sub( L_frame_glob, M ), LPDmem->mem_syn, M );
    Copy( synth + sub( L_frame_glob, M ), LPDmem->mem_syn2, M );
    Copy( synth + sub( L_frame_glob, L_SYN_MEM ), LPDmem->mem_syn_r, L_SYN_MEM );
    LPDmem->q_mem_syn = sub( shl( Q_new, 1 ), 1 ); // resultant q of synth after E_UTIL_f_preemph2

    test();
    IF( st->tcxonly == 0 || LE_16( L_frame_glob, L_FRAME16k ) )