Index: pjproject/trunk/third_party/g7221/common/stl-files/basop32.h
===================================================================
--- pjproject/trunk/third_party/g7221/common/stl-files/basop32.h	(revision 2601)
+++ pjproject/trunk/third_party/g7221/common/stl-files/basop32.h	(revision 2616)
@@ -34,5 +34,5 @@
 
 #define MAX_16 (Word16)0x7fff
-#define MIN_16 (Word16)0x8000
+#define MIN_16 ((Word16)0x8000)
 
 #define UMAX_32 (Word32)0xffffffffL
@@ -45,16 +45,18 @@
 */
 
-Word16 add (Word16 var1, Word16 var2);    /* Short add,           1   */
-Word16 sub (Word16 var1, Word16 var2);    /* Short sub,           1   */
-Word16 abs_s (Word16 var1);               /* Short abs,           1   */
+PJ_INLINE(Word16) add (Word16 var1, Word16 var2);    /* Short add,           1   */
+PJ_INLINE(Word16) sub (Word16 var1, Word16 var2);    /* Short sub,           1   */
+PJ_INLINE(Word16) abs_s (Word16 var1);               /* Short abs,           1   */
 Word16 shl (Word16 var1, Word16 var2);    /* Short shift left,    1   */
+PJ_INLINE(Word16) shl_nocheck(Word16 var1, Word16 var2);
 Word16 shr (Word16 var1, Word16 var2);    /* Short shift right,   1   */
+PJ_INLINE(Word16) shr_nocheck(Word16 var1, Word16 var2);
 Word16 mult (Word16 var1, Word16 var2);   /* Short mult,          1   */
-Word32 L_mult (Word16 var1, Word16 var2); /* Long mult,           1   */
-Word16 negate (Word16 var1);              /* Short negate,        1   */
-Word16 extract_h (Word32 L_var1);         /* Extract high,        1   */
-Word16 extract_l (Word32 L_var1);         /* Extract low,         1   */
-Word16 itu_round (Word32 L_var1);         /* Round,               1   */
-Word32 L_mac (Word32 L_var3, Word16 var1, Word16 var2);   /* Mac,  1  */
+PJ_INLINE(Word32) L_mult (Word16 var1, Word16 var2); /* Long mult,           1   */
+PJ_INLINE(Word16) negate (Word16 var1);              /* Short negate,        1   */
+PJ_INLINE(Word16) extract_h (Word32 L_var1);         /* Extract high,        1   */
+PJ_INLINE(Word16) extract_l (Word32 L_var1);         /* Extract low,         1   */
+PJ_INLINE(Word16) itu_round (Word32 L_var1);         /* Round,               1   */
+PJ_INLINE(Word32) L_mac (Word32 L_var3, Word16 var1, Word16 var2);   /* Mac,  1  */
 Word32 L_msu (Word32 L_var3, Word16 var1, Word16 var2);   /* Msu,  1  */
 Word32 L_macNs (Word32 L_var3, Word16 var1, Word16 var2); /* Mac without
@@ -62,12 +64,12 @@
 Word32 L_msuNs (Word32 L_var3, Word16 var1, Word16 var2); /* Msu without
                                                              sat, 1   */
-Word32 L_add (Word32 L_var1, Word32 L_var2);    /* Long add,        2 */
-Word32 L_sub (Word32 L_var1, Word32 L_var2);    /* Long sub,        2 */
+//PJ_INLINE(Word32) L_add (Word32 L_var1, Word32 L_var2);    /* Long add,        2 */
+PJ_INLINE(Word32) L_sub (Word32 L_var1, Word32 L_var2);    /* Long sub,        2 */
 Word32 L_add_c (Word32 L_var1, Word32 L_var2);  /* Long add with c, 2 */
 Word32 L_sub_c (Word32 L_var1, Word32 L_var2);  /* Long sub with c, 2 */
 Word32 L_negate (Word32 L_var1);                /* Long negate,     2 */
 Word16 mult_r (Word16 var1, Word16 var2);       /* Mult with round, 2 */
-Word32 L_shl (Word32 L_var1, Word16 var2);      /* Long shift left, 2 */
-Word32 L_shr (Word32 L_var1, Word16 var2);      /* Long shift right, 2*/
+PJ_INLINE(Word32) L_shl (Word32 L_var1, Word16 var2);      /* Long shift left, 2 */
+PJ_INLINE(Word32) L_shr (Word32 L_var1, Word16 var2);      /* Long shift right, 2*/
 Word16 shr_r (Word16 var1, Word16 var2);        /* Shift right with
                                                    round, 2           */
@@ -106,4 +108,27 @@
 UWord32 LU_shl (UWord32 L_var1, Word16 var2);
 UWord32 LU_shr (UWord32 L_var1, Word16 var2);
+
+#define INCLUDE_UNSAFE	    0
+
+/* Local */
+PJ_INLINE(Word16) saturate (Word32 L_var1);
+
+#if INCLUDE_UNSAFE
+    extern Flag g7221_Overflow;
+    extern Flag g7221_Carry;
+#   define SET_OVERFLOW(n)  g7221_Overflow = n
+#   define SET_CARRY(n)	    g7221_Carry = n
+
+#else
+#   define SET_OVERFLOW(n)
+#   define SET_CARRY(n)
+#   define GET_OVERFLOW()   0
+#   define GET_CARRY()	    0
+#endif
+
+#include "basop32_i.h"
+
+
+
 #endif /* BASOP_H_DEFINED */
 
