Commit 7d63fe2d authored by Fabian Bauer's avatar Fabian Bauer
Browse files

replace old macros with '__remmnant' macros

parent bbc3749e
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -100,10 +100,12 @@ void weight_a_fx(
    Word16 i, fac;
    Word32 Amax;
    Word16 shift;
#ifndef ISSUE_1836_replace_overflow_libcom__remnant
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow;
    Overflow = 0;
    move32();
#endif
#endif

    fac = gamma; /* Q15 */
@@ -122,7 +124,11 @@ void weight_a_fx(
    move16();
    FOR( i = 1; i < m; i++ )
    {
#ifdef ISSUE_1836_replace_overflow_libcom__remnant
        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 */
    }
+377 −41

File changed.

Preview size limit exceeded, changes collapsed.

+9 −4
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
#include "rom_basop_util.h"
#include "prot_fx.h"


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


    assert( n1 >= 102 ); /* if n1 is too low -> overflow in div_l */
@@ -46,7 +47,11 @@ 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__remnant
        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*/
@@ -63,8 +68,8 @@ void ham_cos_window(
    FOR( i = n1; i < n1 + n2; i++ )
    {
        /* fh_f[i] = (Float32)cos(cc);		*/
#ifdef ISSUE_1796_replace_shl_o
        fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/
#ifdef ISSUE_1836_replace_overflow_libcom__remnant
        fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/ //??sat
#else
        fh[i] = shl_o( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1, &Overflow );                                                     /*0Q15*/
#endif