diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-04-18 14:29:28 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-04-18 14:29:28 +0000 |
commit | 345cd27b4a25e0c326ed1efc6f7f8372bde4ed6b (patch) | |
tree | 23f45ad5fcde6553d7d0dcfa5065b22c94edc790 /third_party/g7221/common/stl-files/count.h | |
parent | a1af7e95f02cb3744d53b17671ce52cfb5edc7f8 (diff) |
More ticket #774: optimization for siren7/siren14 codecs
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2616 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party/g7221/common/stl-files/count.h')
-rw-r--r-- | third_party/g7221/common/stl-files/count.h | 68 |
1 files changed, 62 insertions, 6 deletions
diff --git a/third_party/g7221/common/stl-files/count.h b/third_party/g7221/common/stl-files/count.h index 5f2227ef..34c04610 100644 --- a/third_party/g7221/common/stl-files/count.h +++ b/third_party/g7221/common/stl-files/count.h @@ -35,6 +35,7 @@ operators L_mult0(), L_mac0(), L_msu0() =========================================================================== */ +#if 0 #ifndef COUNT_H #define COUNT_H "$Id $" @@ -71,7 +72,23 @@ void WMOPS_output (Word16 notPrintWorstWorstCase); * */ -Word32 fwc (void); +PJ_INLINE(Word32) fwc (void) +{ +#if WMOPS + Word32 tot; + + tot = DeltaWeightedOperation (); + if (tot > wc[currCounter][funcid[currCounter]]) + wc[currCounter][funcid[currCounter]] = tot; + + funcid[currCounter]++; + + return (tot); +#else + return 0; /* Dummy */ +#endif +} + /* * worst worst case counter. * @@ -82,12 +99,42 @@ Word32 fwc (void); * * The WMOPS_output function add together all parts and presents the sum. */ +PJ_INLINE(void) move16 (void) +{ +#if WMOPS + multiCounter[currCounter].DataMove16++; +#endif +} + +PJ_INLINE(void) move32 (void) +{ +#if WMOPS + multiCounter[currCounter].DataMove32++; +#endif +} + +PJ_INLINE(void )logic16 (void) +{ +#if WMOPS + multiCounter[currCounter].Logic16++; +#endif +} + +PJ_INLINE(void) logic32 (void) +{ +#if WMOPS + multiCounter[currCounter].Logic32++; +#endif +} + +PJ_INLINE(void) test (void) +{ +#if WMOPS + multiCounter[currCounter].Test++; +#endif +} + -void move16 (void); -void move32 (void); -void logic16 (void); -void logic32 (void); -void test (void); /* * The functions above increases the corresponding operation counter for * the current counter group. @@ -205,3 +252,12 @@ int main() #endif /* Example */ #endif /* COUNT_H */ +#else + +#define move16() +#define move32() +#define logic16() +#define logic32() +#define test() + +#endif |