Commit 45bf8fe1 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Precision improvements in shoebox, apa_exec float cleanup, SBA PLC high MLD fixes

parent b96b632d
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2749,6 +2749,7 @@ enum
#define LG10                                  24660       /*  10*log10(2)  in Q13                 */
#define LG10_s3_0                             16440       /* 10*log10(2)/1.55 = 1.00343331 in Q14              */
#define LOG2_10                               27213      /* log base 2 of 10 in Q12 */
#define LOG2_10_Q29                           1783446566      /* log base 2 of 10 in Q12 */
#define LOG10_2_Q31                           646456993      /* inverse log base 10 of 2 in Q31 */
#define MU_MA_FX                              10923     /* original prediction factor for the AMR WB tables (Q15) */

+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ void sns_compute_scf_fx(
    {
        Word16 e_tmp = norm_l( xs[i] );
        Word16 f_tmp = Log2_norm_lc( L_shl( xs[i], e_tmp ) );
        e_tmp = sub( sub( 30, e_tmp ), q );
        e_tmp = sub( sub( 34, e_tmp ), q );
        /* Note: Mpy_32_16 is used temporarily for this computation, It needs to be replaced with appropriate BASOP. */
        xl[i] = Mpy_32_16( e_tmp, f_tmp, 16384 ); /* Q16 */
        move32();
+2 −0
Original line number Diff line number Diff line
@@ -2143,6 +2143,8 @@ void con_tcx_ivas_fx(
    move16();

    /* update memory for low band */
    st->Q_syn = 0;
    move16();
    Scale_sig( hTcxDec->old_syn_Overl, shr( st->L_frame, 1 ), sub( -1, Q_syn ) );
    lerp( hTcxDec->syn_OverlFB, hTcxDec->syn_Overl, shr( st->L_frame, 1 ), shr( L_frame, 1 ) );
    lerp( hTcxDec->syn_Overl_TDACFB, hTcxDec->syn_Overl_TDAC, shr( st->L_frame, 1 ), shr( L_frame, 1 ) );
+5 −6
Original line number Diff line number Diff line
@@ -2130,6 +2130,10 @@ void ivas_mdct_core_reconstruct_fx(
            Scale_sig( st->hTcxDec->syn_Overl, L_FRAME32k / 2, sub( st->Q_syn, q_win ) );
            Scale_sig( st->hHQ_core->old_out_LB_fx, L_FRAME32k, sub( st->Q_syn, q_win ) );
            Scale_sig( st->hHQ_core->old_out_fx, L_FRAME48k, sub( st->Q_syn, q_win ) );
            st->hHQ_core->Q_old_wtda = st->Q_syn;
            move16();
            st->hHQ_core->Q_old_wtda_LB = st->Q_syn;
            move16();
        }
        ELSE /*ACELP core for ACELP-PLC */
        {
@@ -2137,7 +2141,6 @@ void ivas_mdct_core_reconstruct_fx(
            Scale_sig( synth_buf_fx, add( add( st->hTcxDec->old_synth_len, L_FRAME_PLUS ), M ), negate( q_syn ) );
            Scale_sig( synth_bufFB_fx, add( add( st->hTcxDec->old_synth_lenFB, L_FRAME_PLUS ), M ), negate( q_syn ) );
            q_syn = 0;
            st->Q_syn = 0;
            move16();
            move16();
            /* PLC: [TCX: TD PLC] */
@@ -2181,10 +2184,6 @@ void ivas_mdct_core_reconstruct_fx(
            Scale_sig( st->mem_syn2_fx, M, st->Q_syn );
            Scale_sig( st->mem_syn_r, M, st->Q_syn );
        }
        st->hHQ_core->Q_old_wtda = st->Q_syn;
        move16();
        st->hHQ_core->Q_old_wtda_LB = st->Q_syn;
        move16();
        /*--------------------------------------------------------------------------------*
         * Updates
         *--------------------------------------------------------------------------------*/
@@ -2568,7 +2567,7 @@ void ivas_mdct_core_tns_ns_fx(

                        FOR( Word16 i = 0; i < st->hTonalMDCTConc->nScaleFactors; i++ )
                        {
                            sns_int_scf_fx[i] = Madd_32_16( Mpy_32_16_1( L_shl( scf_last_m[i], add( 1, scf_last_e[i] ) ), fade_out ), L_shl( scf_bg[i], 1 ), fade_in );
                            sns_int_scf_fx[i] = Madd_32_16( Mpy_32_16_1( L_shl( scf_last_m[i], add( 1, scf_last_e[i] ) ), fade_out ), scf_bg[i], fade_in );
                            move32();
                        }
                    }
+19 −1187

File changed.

Preview size limit exceeded, changes collapsed.

Loading