Commit da3bd7a8 authored by vaillancour's avatar vaillancour
Browse files

Basop fix for Hi-level content FEC

parent f42d02d3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -186,7 +186,11 @@ void pre_echo_att_fx(
    etmp_fx = L_shr(etmp_fx, add(2 + 1 - 4, shl(Q_new, 1)));/*2*Q_new+1 //INV_ATT_SEG_LEN=1/4(=shr(x,2)) -> Q4 */
    etmp1_fx = etmp_fx;
    move32();
#ifdef BASOP_NOGLOB
    *Last_frame_ener_fx = L_shl_sat( *Last_frame_ener_fx, 2 );
#else
    *Last_frame_ener_fx = L_shl( *Last_frame_ener_fx, 2 );
#endif
    move32(); /*2*Q_new+1 */

    /* If the maximum normalized energy > last frame energy + 6dB */
+11 −2
Original line number Diff line number Diff line
@@ -1008,8 +1008,13 @@ static Word16 find_best_delay_fx(
        accB_fx = L_deposit_l(0);
        FOR ( i = 0; i < lin; i += delta )
        {
#ifdef BASOP_NOGLOB
            accA_fx = L_add_sat( accA_fx, L_shr( L_mult_sat( mu_o_fx[d1 + i], mu_o_fx[d1 + i] ), 2 ) );
            accB_fx = L_add_sat(accB_fx, L_shr(L_mult_sat(mu_o_fx[d1+i], in_fx[i]),2));
#else
            accA_fx = L_add( accA_fx, L_shr( L_mult( mu_o_fx[d1 + i], mu_o_fx[d1 + i] ), 2 ) );
            accB_fx = L_add(accB_fx, L_shr(L_mult(mu_o_fx[d1+i], in_fx[i]),2));
#endif
        }

        Rxy_fx[k] = accB_fx;
@@ -1262,7 +1267,11 @@ static Word16 FEC_phase_matching_fx(
        tmp = shl(tmp, sub(sub(exp2, exp1), 1));/*14*/
        FOR (i = N_ZERO_NB; i < 2*L; i++)
        {
#ifdef BASOP_NOGLOB
            ImdctOutWin_fx[i] = shl_sat( mult( ImdctOutWin_fx[i], tmp ), 1 );
#else
            ImdctOutWin_fx[i] = shl( mult( ImdctOutWin_fx[i], tmp ), 1 );
#endif
        }
    }
    Smoothing_vector_NB_fx(OldauOutnoWin_fx, &ImdctOutWin_fx[N_ZERO_NB], SmoothingWin_NB2_fx, auOut_fx, ol_size);