Commit 511fc8a1 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

take lib_com/w* files from main

parent bedcd9fc
Loading
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -7,13 +7,6 @@
#include "prot_fx.h"
#include <assert.h>


#ifndef ISSUE_1836_FILEACTIVE_weight_a_fx_c
#ifdef ISSUE_1836_replace_overflow_libcom
#undef ISSUE_1836_replace_overflow_libcom
#endif

#endif
/*------------------------------------------------------------------
 * weight_a_subfr()
 *
@@ -107,12 +100,10 @@ void weight_a_fx(
    Word16 i, fac;
    Word32 Amax;
    Word16 shift;
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow;
    Overflow = 0;
    move32();
#endif
#endif

    fac = gamma; /* Q15 */
@@ -131,11 +122,7 @@ void weight_a_fx(
    move16();
    FOR( i = 1; i < m; i++ )
    {
#ifdef ISSUE_1836_replace_overflow_libcom
        ap[i] = round_fx_sat( L_shl( L_mult0( a[i], fac ), shift ) ); /* Q11 + shift */ //??sat
#else
        ap[i] = round_fx_o( L_shl( L_mult0( a[i], fac ), shift ), &Overflow ); /* Q11 + shift */
#endif
        move16();
        fac = mult_r( fac, gamma ); /* Q15 */
    }
+41 −383

File changed.

Preview size limit exceeded, changes collapsed.

+3 −15
Original line number Diff line number Diff line
@@ -21,12 +21,6 @@
#include "prot_fx.h"


#ifndef ISSUE_1836_FILEACTIVE_window_fx_c
#ifdef ISSUE_1836_replace_overflow_libcom
#undef ISSUE_1836_replace_overflow_libcom
#endif
#endif

void ham_cos_window(
    Word16 *fh,      /* o: 0Q15 */
    const Word16 n1, /* i:      */
@@ -35,12 +29,10 @@ void ham_cos_window(
{
    Word16 i;
    Word32 cte, cc;
#ifndef ISSUE_1836_replace_overflow_libcom
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move16();
#endif
#endif


    assert( n1 >= 102 ); /* if n1 is too low -> overflow in div_l */
@@ -54,11 +46,7 @@ void ham_cos_window(
    {
        /* fh_f[i] = 0.54f - 0.46f * (Float32)cos(cc);	*/
        BASOP_SATURATE_WARNING_OFF_EVS
#ifdef ISSUE_1836_replace_overflow_libcom
        fh[i] = sub_sat( P54_0Q15, mult_r( getCosWord16( round_fx_sat( L_shl_sat( cc, 9 ) ) ), P92_0Q15 ) ); /*0Q15*/ //??sat //??sat //??sat
#else
        fh[i] = sub_o( P54_0Q15, mult_r( getCosWord16( round_fx_o( L_shl_o( cc, 9, &Overflow ), &Overflow ) ), P92_0Q15 ), &Overflow ); /*0Q15*/
#endif
        move16();
        BASOP_SATURATE_WARNING_ON_EVS
        cc = L_add( cc, cte ); /*0Q15*/
@@ -75,8 +63,8 @@ void ham_cos_window(
    FOR( i = n1; i < n1 + n2; i++ )
    {
        /* fh_f[i] = (Float32)cos(cc);		*/
#ifdef ISSUE_1836_replace_overflow_libcom
        fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/ //??sat
#ifdef ISSUE_1796_replace_shl_o
        fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/
#else
        fh[i] = shl_o( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1, &Overflow ); /*0Q15*/
#endif