From ea62efc24ccf3a383d138b8088a454ee66b86a4f Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Fri, 4 Jul 2008 23:43:10 +0000 Subject: Updated mips_test.c after running on ARM git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2102 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/src/test/mips_test.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/pjmedia/src/test/mips_test.c b/pjmedia/src/test/mips_test.c index 176460b3..3e1d7573 100644 --- a/pjmedia/src/test/mips_test.c +++ b/pjmedia/src/test/mips_test.c @@ -1,4 +1,4 @@ -/* $Id:$ */ +/* $Id$ */ /* * Copyright (C) 2003-2008 Benny Prijono * @@ -21,7 +21,7 @@ /* Define your CPU MIPS here!! */ -#ifndef CPU_MIPS +#ifndef CPU_IPS /* For complete table see: http://en.wikipedia.org/wiki/Million_instructions_per_second @@ -51,11 +51,14 @@ ARMv7-M Cortex-M3 1.250 MIPS/MHz */ -# define CPU_MHZ (2666.666) -# define CPU_MIPS (CPU_MHZ * MEGA * 3.039) /* P4 2.6GHz */ +//# define CPU_MHZ (2666) +//# define CPU_IPS (CPU_MHZ * MEGA * 3.039) /* P4 2.6GHz */ -//# define CPU_MHZ 700 -//# define CPU_MIPS (700 * MEGA * 2.708) /* P3 700Mhz */ +# define CPU_MHZ 700 +# define CPU_IPS (700 * MEGA * 2.708) /* P3 700Mhz */ + +//# define CPU_MHZ 180 +//# define CPU_IPS (CPU_MHZ * MEGA * 1.1) /* ARM926EJ-S */ #endif @@ -1764,10 +1767,20 @@ static pj_timestamp run_entry(unsigned clock_rate, struct test_entry *e) pool = pj_pool_create(mem, "pool", 1024, 1024, NULL); port = e->init(pool, clock_rate, 1, samples_per_frame, 0, e); - pj_assert(port != NULL); + if (port == NULL) { + t0.u64 = 0; + pj_pool_release(pool); + PJ_LOG(1,(THIS_FILE, " init error")); + return t0; + } + gen_port = create_gen_port(pool, clock_rate, 1, samples_per_frame, 100); - pj_assert(gen_port != NULL); + if (gen_port == NULL) { + t0.u64 = 0; + pj_pool_release(pool); + return t0; + } pj_get_timestamp(&t0); for (j=0; jtitle, usec, cpu_pct, mips)); } -- cgit v1.2.3