Commit aea09445 authored by multrus's avatar multrus
Browse files

move function declaration of BASOP_Util_Divide3232_Scale_FhG to...

move function declaration of BASOP_Util_Divide3232_Scale_FhG to lib_com/basop_util.h, use FOR instead of for
parent ae27f321
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1038,7 +1038,6 @@ Word32 div_w( Word32 L_num, Word32 L_den )
    }
}

Word32 BASOP_Util_Divide3232_Scale_FhG( Word32 x, Word32 y, Word16 *s, Word16 bits );
Word32 BASOP_Util_Divide3232_Scale_FhG( Word32 x, Word32 y, Word16 *s, Word16 bits )
{
    Word32 z;
@@ -1086,7 +1085,7 @@ Word32 BASOP_Util_Divide3232_Scale_FhG( Word32 x, Word32 y, Word16 *s, Word16 bi

    z = L_sub( x, x ); // z = 0

    for ( iteration = (Word16) 0; iteration < (Word16) bits; iteration++ )
    FOR ( iteration = (Word16) 0; iteration < (Word16) bits; iteration++ )
    {
        if ( L_add( x, y ) >= 0 )
        {
@@ -1100,6 +1099,7 @@ Word32 BASOP_Util_Divide3232_Scale_FhG( Word32 x, Word32 y, Word16 *s, Word16 bi
    {
        z = L_negate( z );
    }

    return L_shl( z, sub( 31, bits ) );
}

+6 −0
Original line number Diff line number Diff line
@@ -328,6 +328,12 @@ Word16 BASOP_Util_Divide3232_Scale( Word32 x, /*!< i : Numerator*/
                                    Word32 y,    /*!< i  : Denominator*/
                                    Word16 *s ); /*!< o  : Additional scalefactor difference*/


Word32 BASOP_Util_Divide3232_Scale_FhG( Word32 x,      /*!< i  : Numerator*/
                                        Word32 y,      /*!< i  : Denominator*/
                                        Word16 *s,     /*!< o  : Additional scalefactor difference*/
                                        Word16 bits ); /*!< i  : number of mantissa bits of result*/

Word32 BASOP_Util_Divide3232_Scale_cadence( Word32 x,    /*!< i  : Numerator*/
                                            Word32 y,    /*!< i  : Denominator*/
                                            Word16 *s ); /*!< o  : Additional scalefactor difference*/