Commit 16f63032 authored by Nishant S Kulgod's avatar Nishant S Kulgod
Browse files

commit 15

parent 336acadc
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -785,14 +785,14 @@ ivas_error acelp_core_enc(
            st->lsfoldbfi0_fx[idx] = (Word16) ( st->lsfoldbfi0[idx] * 2.56f );
        }
        //Q_old_bwe_exc = Q_factor_arr( old_bwe_exc, 1380 );
        floatToFixed_arr( old_bwe_exc, old_bwe_exc_fx, Q_new, 1380 );
        floatToFixed_arr( old_bwe_exc, old_bwe_exc_fx, Q_new+1, 1380 );
        /*Q_exc = Q_factor_arr( old_exc_flt, st->L_frame );
        hLPDmem->e_old_exc = Q_factor_arr( &hLPDmem->old_exc_flt[-M - 1], L_EXC_MEM + M + 1 ) - 1;
        Q_exc = min(s_min( Q_exc, hLPDmem->e_old_exc ), Q_new);
        hLPDmem->e_old_exc = Q15 - Q_exc;*/
        hLPDmem->e_old_exc = Q15 - (Q_new);
        floatToFixed_arr( &hLPDmem->old_exc_flt[-M - 1], &hLPDmem->old_exc[-M - 1], Q_new , L_EXC_MEM + M + 1 );
        floatToFixed_arr( old_exc_flt, old_exc_fx, Q_new, st->L_frame );
        hLPDmem->e_old_exc = Q15 - (Q_new + 1);
        floatToFixed_arr( &hLPDmem->old_exc_flt[-M - 1], &hLPDmem->old_exc[-M - 1], Q_new + 1, L_EXC_MEM + M + 1 );
        floatToFixed_arr( old_exc_flt, old_exc_fx, Q_new+1, st->L_frame );

        st->preemph_fac = float_to_fix16( st->preemph_fac_flt, Q15 );
        floatToFixed_arr( st->voicing, st->voicing_fx, Q15, 3 );
@@ -976,7 +976,7 @@ ivas_error acelp_core_enc(
        Word16 Q_exc2 = add( Q_new, 1 );
#ifdef IVAS_FLOAT_FIXED_CONVERSIONS
        Word16 shift;
        shift = -3;
        shift = 0;
        move16();
#endif
        IF( tdm_low_rate_mode ) /* tdm stereo low rate mode */
@@ -1163,7 +1163,7 @@ ivas_error acelp_core_enc(
            // So each chunk might have a different Q which is predicted by 1st element.
            fixedToFloat_arr(&Aq_fx[i * (M + 1)], &Aq[i * (M + 1)], 14 - norm_s(Aq_fx[i * (M + 1)]), (M + 1));
        }
        fixedToFloat_arr(old_exc_fx, old_exc_flt, Q15 - hLPDmem->e_old_exc, st->L_frame);
        fixedToFloat_arr(old_exc_fx, old_exc_flt, Q_new + 1, st->L_frame);
        me2f_buf_16(&hLPDmem->old_exc[-M - 1], hLPDmem->e_old_exc, &hLPDmem->old_exc_flt[-M - 1], L_EXC_MEM + M + 1);
        fixedToFloat_arr(old_bwe_exc_fx, old_bwe_exc, Q_new + 1, 1380);
        fixedToFloat_arr(res_fx, res, Q_new + 1, st->L_frame);