Changeset 2731 for pjproject/trunk/third_party/g7221/common/basic_op.h
- Timestamp:
- Jun 1, 2009 4:43:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/g7221/common/basic_op.h
r2660 r2731 1 1 #ifndef __BASIC_OP_H__ 2 2 #define __BASIC_OP_H__ 3 4 #include "config.h" 3 5 4 6 /*___________________________________________________________________________ 5 7 | | 6 8 | Constants and Globals | 7 | |8 | $Id $9 9 |___________________________________________________________________________| 10 10 */ … … 28 28 PJ_INLINE(Word16) sub (Word16 var1, Word16 var2); /* Short sub, 1 */ 29 29 PJ_INLINE(Word16) abs_s (Word16 var1); /* Short abs, 1 */ 30 Word16shl (Word16 var1, Word16 var2); /* Short shift left, 1 */30 LIBG7221_DECL(Word16) shl (Word16 var1, Word16 var2); /* Short shift left, 1 */ 31 31 PJ_INLINE(Word16) shl_nocheck(Word16 var1, Word16 var2); 32 Word16shr (Word16 var1, Word16 var2); /* Short shift right, 1 */32 LIBG7221_DECL(Word16) shr (Word16 var1, Word16 var2); /* Short shift right, 1 */ 33 33 PJ_INLINE(Word16) shr_nocheck(Word16 var1, Word16 var2); 34 Word16mult (Word16 var1, Word16 var2); /* Short mult, 1 */34 LIBG7221_DECL(Word16) mult (Word16 var1, Word16 var2); /* Short mult, 1 */ 35 35 PJ_INLINE(Word32) L_mult (Word16 var1, Word16 var2); /* Long mult, 1 */ 36 36 PJ_INLINE(Word16) negate (Word16 var1); /* Short negate, 1 */ … … 39 39 PJ_INLINE(Word16) itu_round (Word32 L_var1); /* Round, 1 */ 40 40 PJ_INLINE(Word32) L_mac (Word32 L_var3, Word16 var1, Word16 var2); /* Mac, 1 */ 41 Word32L_msu (Word32 L_var3, Word16 var1, Word16 var2); /* Msu, 1 */42 Word32L_macNs (Word32 L_var3, Word16 var1, Word16 var2); /* Mac without43 44 Word32L_msuNs (Word32 L_var3, Word16 var1, Word16 var2); /* Msu without45 41 LIBG7221_DECL(Word32) L_msu (Word32 L_var3, Word16 var1, Word16 var2); /* Msu, 1 */ 42 LIBG7221_DECL(Word32) L_macNs (Word32 L_var3, Word16 var1, Word16 var2); /* Mac without 43 sat, 1 */ 44 LIBG7221_DECL(Word32) L_msuNs (Word32 L_var3, Word16 var1, Word16 var2); /* Msu without 45 sat, 1 */ 46 46 //PJ_INLINE(Word32) L_add (Word32 L_var1, Word32 L_var2); /* Long add, 2 */ 47 47 PJ_INLINE(Word32) L_sub (Word32 L_var1, Word32 L_var2); /* Long sub, 2 */ 48 Word32L_add_c (Word32 L_var1, Word32 L_var2); /* Long add with c, 2 */49 Word32L_sub_c (Word32 L_var1, Word32 L_var2); /* Long sub with c, 2 */50 Word32L_negate (Word32 L_var1); /* Long negate, 2 */51 Word16mult_r (Word16 var1, Word16 var2); /* Mult with round, 2 */48 LIBG7221_DECL(Word32) L_add_c (Word32 L_var1, Word32 L_var2); /* Long add with c, 2 */ 49 LIBG7221_DECL(Word32) L_sub_c (Word32 L_var1, Word32 L_var2); /* Long sub with c, 2 */ 50 LIBG7221_DECL(Word32) L_negate (Word32 L_var1); /* Long negate, 2 */ 51 LIBG7221_DECL(Word16) mult_r (Word16 var1, Word16 var2); /* Mult with round, 2 */ 52 52 PJ_INLINE(Word32) L_shl (Word32 L_var1, Word16 var2); /* Long shift left, 2 */ 53 53 PJ_INLINE(Word32) L_shr (Word32 L_var1, Word16 var2); /* Long shift right, 2*/ 54 Word16shr_r (Word16 var1, Word16 var2); /* Shift right with55 56 Word16mac_r (Word32 L_var3, Word16 var1, Word16 var2); /* Mac with54 LIBG7221_DECL(Word16) shr_r (Word16 var1, Word16 var2); /* Shift right with 55 round, 2 */ 56 LIBG7221_DECL(Word16) mac_r (Word32 L_var3, Word16 var1, Word16 var2); /* Mac with 57 57 rounding,2 */ 58 Word16msu_r (Word32 L_var3, Word16 var1, Word16 var2); /* Msu with58 LIBG7221_DECL(Word16) msu_r (Word32 L_var3, Word16 var1, Word16 var2); /* Msu with 59 59 rounding,2 */ 60 Word32L_deposit_h (Word16 var1); /* 16 bit var1 -> MSB, 2 */61 Word32L_deposit_l (Word16 var1); /* 16 bit var1 -> LSB, 2 */60 LIBG7221_DECL(Word32) L_deposit_h (Word16 var1); /* 16 bit var1 -> MSB, 2 */ 61 LIBG7221_DECL(Word32) L_deposit_l (Word16 var1); /* 16 bit var1 -> LSB, 2 */ 62 62 63 Word32L_shr_r (Word32 L_var1, Word16 var2); /* Long shift right with64 65 Word32L_abs (Word32 L_var1); /* Long abs, 3 */66 Word32L_sat (Word32 L_var1); /* Long saturation, 4 */67 Word16norm_s (Word16 var1); /* Short norm, 15 */68 Word16div_s (Word16 var1, Word16 var2); /* Short division, 18 */69 Word16norm_l (Word32 L_var1); /* Long norm, 30 */63 LIBG7221_DECL(Word32) L_shr_r (Word32 L_var1, Word16 var2); /* Long shift right with 64 round, 3 */ 65 LIBG7221_DECL(Word32) L_abs (Word32 L_var1); /* Long abs, 3 */ 66 LIBG7221_DECL(Word32) L_sat (Word32 L_var1); /* Long saturation, 4 */ 67 LIBG7221_DECL(Word16) norm_s (Word16 var1); /* Short norm, 15 */ 68 LIBG7221_DECL(Word16) div_s (Word16 var1, Word16 var2); /* Short division, 18 */ 69 LIBG7221_DECL(Word16) norm_l (Word32 L_var1); /* Long norm, 30 */ 70 70 71 71 /* 72 72 Additional G.723.1 operators 73 73 */ 74 Word32L_mls( Word32, Word16 ) ; /* Weight FFS; currently assigned 1 */75 Word16div_l( Word32, Word16 ) ; /* Weight FFS; currently assigned 1 */76 Word16i_mult(Word16 a, Word16 b); /* Weight FFS; currently assigned 1 */74 LIBG7221_DECL(Word32) L_mls( Word32, Word16 ) ; /* Weight FFS; currently assigned 1 */ 75 LIBG7221_DECL(Word16) div_l( Word32, Word16 ) ; /* Weight FFS; currently assigned 1 */ 76 LIBG7221_DECL(Word16) i_mult(Word16 a, Word16 b); /* Weight FFS; currently assigned 1 */ 77 77 78 78 /* 79 79 New shiftless operators, not used in G.729/G.723.1 80 80 */ 81 Word32L_mult0(Word16 v1, Word16 v2); /* 32-bit Multiply w/o shift 1 */82 Word32L_mac0(Word32 L_v3, Word16 v1, Word16 v2); /* 32-bit Mac w/o shift 1 */83 Word32L_msu0(Word32 L_v3, Word16 v1, Word16 v2); /* 32-bit Msu w/o shift 1 */81 LIBG7221_DECL(Word32) L_mult0(Word16 v1, Word16 v2); /* 32-bit Multiply w/o shift 1 */ 82 LIBG7221_DECL(Word32) L_mac0(Word32 L_v3, Word16 v1, Word16 v2); /* 32-bit Mac w/o shift 1 */ 83 LIBG7221_DECL(Word32) L_msu0(Word32 L_v3, Word16 v1, Word16 v2); /* 32-bit Msu w/o shift 1 */ 84 84 85 85 /* 86 86 Additional G.722.1 operators 87 87 */ 88 UWord32LU_shl (UWord32 L_var1, Word16 var2);89 UWord32LU_shr (UWord32 L_var1, Word16 var2);88 LIBG7221_DECL(UWord32) LU_shl (UWord32 L_var1, Word16 var2); 89 LIBG7221_DECL(UWord32) LU_shr (UWord32 L_var1, Word16 var2); 90 90 91 91 #define INCLUDE_UNSAFE 0 … … 109 109 #include "basic_op_i.h" 110 110 111 111 #if PJMEDIA_LIBG7221_FUNCS_INLINED 112 # include "basic_op.c" 113 #endif 112 114 113 115 #endif /* __BASIC_OP_H__ */
Note: See TracChangeset
for help on using the changeset viewer.