From 96d0f3f079f982be294f694590c49b8e9fed2420 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Sat, 18 Apr 2009 15:15:34 +0000 Subject: More ticket #774: compilation error for VS8 and make build system due to last modifications in libg7221codec and pjmedia_test git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2617 74dad513-b988-da41-8d7b-12977e46ad98 --- third_party/build/g7221/Makefile | 2 +- third_party/build/g7221/libg7221codec.vcproj | 262 +++++++++++--------------- third_party/g7221/common/stl-files/count.h | 267 ++------------------------- 3 files changed, 121 insertions(+), 410 deletions(-) (limited to 'third_party') diff --git a/third_party/build/g7221/Makefile b/third_party/build/g7221/Makefile index 16758171..12529699 100644 --- a/third_party/build/g7221/Makefile +++ b/third_party/build/g7221/Makefile @@ -21,7 +21,7 @@ export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ export G7221_CODEC_SRCDIR = ../../g7221 export G7221_CODEC_OBJS = common/common.o common/huff_tab.o common/tables.o \ - common/stl-files/basop32.o common/stl-files/count.o \ + common/stl-files/basop32.o \ decode/coef2sam.o decode/dct4_s.o decode/decoder.o \ encode/dct4_a.o encode/sam2coef.o encode/encoder.o diff --git a/third_party/build/g7221/libg7221codec.vcproj b/third_party/build/g7221/libg7221codec.vcproj index 20939d9f..881f8963 100644 --- a/third_party/build/g7221/libg7221codec.vcproj +++ b/third_party/build/g7221/libg7221codec.vcproj @@ -19,7 +19,7 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - wc[currCounter][funcid[currCounter]]) - wc[currCounter][funcid[currCounter]] = tot; - - funcid[currCounter]++; - - return (tot); -#else - return 0; /* Dummy */ -#endif -} - -/* - * worst worst case counter. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * This function calculates the worst possible case that can be reached. - * - * This is done by calling this function for each subpart of the calculations - * for a frame. This function then stores the maximum wMOPS for each part. - * - * 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 -} - - -/* - * The functions above increases the corresponding operation counter for - * the current counter group. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -typedef struct -{ - Word32 add; /* Complexity Weight of 1 */ - Word32 sub; - Word32 abs_s; - Word32 shl; - Word32 shr; - Word32 extract_h; - Word32 extract_l; - Word32 mult; - Word32 L_mult; - Word32 negate; - Word32 round; - Word32 L_mac; - Word32 L_msu; - Word32 L_macNs; - Word32 L_msuNs; - Word32 L_add; /* Complexity Weight of 2 */ - Word32 L_sub; - Word32 L_add_c; - Word32 L_sub_c; - Word32 L_negate; - Word32 L_shl; - Word32 L_shr; - Word32 mult_r; - Word32 shr_r; - Word32 shift_r; - Word32 mac_r; - Word32 msu_r; - Word32 L_deposit_h; - Word32 L_deposit_l; - Word32 L_shr_r; /* Complexity Weight of 3 */ - Word32 L_shift_r; - Word32 L_abs; - Word32 L_sat; /* Complexity Weight of 4 */ - Word32 norm_s; /* Complexity Weight of 15 */ - Word32 div_s; /* Complexity Weight of 18 */ - Word32 norm_l; /* Complexity Weight of 30 */ - Word32 DataMove16; /* Complexity Weight of 1 */ - Word32 DataMove32; /* Complexity Weight of 2 */ - Word32 Logic16; /* Complexity Weight of 1 */ - Word32 Logic32; /* Complexity Weight of 2 */ - Word32 Test; /* Complexity Weight of 2 */ - /* Counters for G.723.1 basic operators*/ - Word32 L_mls; /* Complexity Weight of 1 */ - Word32 div_l; /* Complexity Weight of 1 */ - Word32 i_mult; /* Complexity Weight of 1 */ - Word32 L_mult0; /* Complexity Weight of 1 */ - Word32 L_mac0; /* Complexity Weight of 1 */ - Word32 L_msu0; /* Complexity Weight of 1 */ - /* Counters for G.722.1 basic operators*/ - Word32 LU_shl; /* Complexity Weight of 1 */ - Word32 LU_shr; /* Complexity Weight of 1 */ -} -BASIC_OP; - -#ifdef THISISANEXAMPLE_0123456789 -/* - ----------------------------------------------------------------------- - Example of how count.h could be used. - - In the example below it is assumed that the init_OBJECT functions - does not use any calls to counter.h or basic_op.h. If this is the - case a call to the function Reset_WMOPS_counter() must be done after - each call to init_OBJECT if these operations is not to be included - in the statistics. - ----------------------------------------------------------------------- -*/ - -int main() -{ - int spe1Id,spe2Id,cheId; - - /* initiate counters and objects */ - spe1Id=getCounterId("Spe 5k8"); - setCounter(spe1Id); - Init_WMOPS_counter (); - init_spe1(...); - - spe2Id=getCounterId("Spe 12k2"); - setCounter(spe2Id); - Init_WMOPS_counter (); - init_spe2(...); - - cheId=getCounterId("Channel encoder"); - setCounter(cheId); - Init_WMOPS_counter (); - init_che(...); - ... - - while(data) - { - test(); /* Note this call to test(); */ - if(useSpe1) - setCounter(spe1Id); - else - setCounter(spe2Id); - Reset_WMOPS_counter(); - speEncode(...); - WMOPS_output(0); /* Normal routine for displaying WMOPS info */ - - setCounter(cheId); - Reset_WMOPS_counter(); - preChannelInter(...); fwc(); /* Note the call to fwc() for each part */ - convolve(...); fwc(); /* of the channel encoder. */ - interleave(...); fwc(); - WMOPS_output(0); /* Normal routine for displaying WMOPS info */ - } -} -#endif /* Example */ - -#endif /* COUNT_H */ -#else +#ifndef COUNT_H +#define COUNT_H #define move16() #define move32() -- cgit v1.2.3