Index: /pjproject/trunk/pjmedia/src/test/mips_test.c
===================================================================
--- /pjproject/trunk/pjmedia/src/test/mips_test.c	(revision 2604)
+++ /pjproject/trunk/pjmedia/src/test/mips_test.c	(revision 2605)
@@ -379,4 +379,5 @@
     K8	= 1,
     K16	= 2,
+    K32	= 4,
 };
 
@@ -678,5 +679,5 @@
     pj_status_t	   (*codec_deinit)();
     pj_uint8_t	     pkt[640];
-    pj_uint16_t	     pcm[320];
+    pj_uint16_t	     pcm[32000 * PTIME / 1000];
 };
 
@@ -878,4 +879,34 @@
     return codec_encode_decode(pool, "g722", &pjmedia_codec_g722_init, 
 			       &pjmedia_codec_g722_deinit, 
+			       clock_rate, channel_count,
+			       samples_per_frame, flags, te);
+}
+
+/* G.722.1 benchmark benchmark */
+static pjmedia_port* g7221_encode_decode(pj_pool_t *pool,
+					 unsigned clock_rate,
+					 unsigned channel_count,
+					 unsigned samples_per_frame,
+					 unsigned flags,
+					 struct test_entry *te)
+{
+    return codec_encode_decode(pool, "g7221/16000", 
+			       &pjmedia_codec_g7221_init,
+			       &pjmedia_codec_g7221_deinit,
+			       clock_rate, channel_count,
+			       samples_per_frame, flags, te);
+}
+
+/* G.722.1 Annex C benchmark benchmark */
+static pjmedia_port* g7221c_encode_decode(pj_pool_t *pool,
+					  unsigned clock_rate,
+					  unsigned channel_count,
+					  unsigned samples_per_frame,
+					  unsigned flags,
+					  struct test_entry *te)
+{
+    return codec_encode_decode(pool, "g7221/32000", 
+			       &pjmedia_codec_g7221_init,
+			       &pjmedia_codec_g7221_deinit,
 			       clock_rate, channel_count,
 			       samples_per_frame, flags, te);
@@ -1908,4 +1939,33 @@
 }
 
+/* G722.1 stream */
+static pjmedia_port* create_stream_g7221( pj_pool_t *pool,
+					  unsigned clock_rate,
+					  unsigned channel_count,
+					  unsigned samples_per_frame,
+					  unsigned flags,
+					  struct test_entry *te)
+{
+    return create_stream(pool, "g7221/16000", &pjmedia_codec_g7221_init, 
+			 &pjmedia_codec_g7221_deinit, 
+			 PJ_FALSE, PJ_FALSE, PJ_FALSE,
+			 clock_rate, channel_count,
+			 samples_per_frame, flags, te);
+}
+
+/* G722.1 Annex C stream */
+static pjmedia_port* create_stream_g7221c( pj_pool_t *pool,
+					   unsigned clock_rate,
+					   unsigned channel_count,
+					   unsigned samples_per_frame,
+					   unsigned flags,
+					   struct test_entry *te)
+{
+    return create_stream(pool, "g7221/32000", &pjmedia_codec_g7221_init,
+			 &pjmedia_codec_g7221_deinit, 
+			 PJ_FALSE, PJ_FALSE, PJ_FALSE,
+			 clock_rate, channel_count,
+			 samples_per_frame, flags, te);
+}
 
 /***************************************************************************/
@@ -2138,5 +2198,5 @@
     pj_timestamp t0, t1;
     unsigned j, samples_per_frame;
-    pj_int16_t pcm[16000 * PTIME / 1000];
+    pj_int16_t pcm[32000 * PTIME / 1000];
     pjmedia_port *gen_port;
     pj_status_t status;
@@ -2276,14 +2336,29 @@
 	{ "tone generator with single freq", OP_GET, K8|K16, &create_tonegen1},
 	{ "tone generator with dual freq", OP_GET, K8|K16, &create_tonegen2},
+#if PJMEDIA_HAS_G711_CODEC
 	{ "codec encode/decode - G.711", OP_PUT, K8, &g711_encode_decode},
+#endif
+#if PJMEDIA_HAS_G722_CODEC
 	{ "codec encode/decode - G.722", OP_PUT, K16, &g722_encode_decode},
+#endif
+#if PJMEDIA_HAS_GSM_CODEC
 	{ "codec encode/decode - GSM", OP_PUT, K8, &gsm_encode_decode},
+#endif
+#if PJMEDIA_HAS_ILBC_CODEC
 	{ "codec encode/decode - iLBC", OP_PUT, K8, &ilbc_encode_decode},
+#endif
+#if PJMEDIA_HAS_SPEEX_CODEC
 	{ "codec encode/decode - Speex 8Khz", OP_PUT, K8, &speex8_encode_decode},
 	{ "codec encode/decode - Speex 16Khz", OP_PUT, K16, &speex16_encode_decode},
-#if defined(PJMEDIA_HAS_L16_CODEC) && PJMEDIA_HAS_L16_CODEC!=0
+#endif
+#if PJMEDIA_HAS_G7221_CODEC
+	{ "codec encode/decode - G.722.1", OP_PUT, K16, &g7221_encode_decode},
+	{ "codec encode/decode - G.722.1c", OP_PUT, K32, &g7221c_encode_decode},
+#endif
+#if PJMEDIA_HAS_L16_CODEC
 	{ "codec encode/decode - L16/8000/1", OP_PUT, K8, &l16_8_encode_decode},
 	{ "codec encode/decode - L16/16000/1", OP_PUT, K16, &l16_16_encode_decode},
 #endif
+#if PJMEDIA_HAS_G711_CODEC
 	{ "stream TX/RX - G.711", OP_PUT_GET, K8, &create_stream_pcmu},
 	{ "stream TX/RX - G.711 SRTP 32bit", OP_PUT_GET, K8, &create_stream_pcmu_srtp32_no_auth},
@@ -2291,5 +2366,9 @@
 	{ "stream TX/RX - G.711 SRTP 80bit", OP_PUT_GET, K8, &create_stream_pcmu_srtp80_no_auth},
 	{ "stream TX/RX - G.711 SRTP 80bit +auth", OP_PUT_GET, K8, &create_stream_pcmu_srtp80_with_auth},
+#endif
+#if PJMEDIA_HAS_G722_CODEC
 	{ "stream TX/RX - G.722", OP_PUT_GET, K16, &create_stream_g722},
+#endif
+#if PJMEDIA_HAS_GSM_CODEC
 	{ "stream TX/RX - GSM", OP_PUT_GET, K8, &create_stream_gsm},
 	{ "stream TX/RX - GSM SRTP 32bit", OP_PUT_GET, K8, &create_stream_gsm_srtp32_no_auth},
@@ -2297,6 +2376,12 @@
 	{ "stream TX/RX - GSM SRTP 80bit", OP_PUT_GET, K8, &create_stream_gsm_srtp80_no_auth},
 	{ "stream TX/RX - GSM SRTP 80bit + auth", OP_PUT_GET, K8, &create_stream_gsm_srtp80_with_auth},
+#endif
+#if PJMEDIA_HAS_G7221_CODEC
+	{ "stream TX/RX - G.722.1", OP_PUT_GET, K16, &create_stream_g7221},
+	{ "stream TX/RX - G.722.1c", OP_PUT_GET, K32, &create_stream_g7221c},
+#endif
     };
-    unsigned i, c, k[2] = {K8, K16}, clock_rates[2] = {8000, 16000};
+
+    unsigned i, c, k[3] = {K8, K16, K32}, clock_rates[3] = {8000, 16000, 32000};
 
     PJ_LOG(3,(THIS_FILE, "MIPS test, with CPU=%dMhz, %6.1f MIPS", CPU_MHZ, CPU_IPS / 1000000));
