[packages] libsrtp:
[openwrt/svn-archive/archive.git] / libs / libsrtp / patches / 1003_fix_mips_namespace_collision.patch
1 Description: Fix MIPS namespace collision
2 Author: Thiemo Seufer <ths@networkno.de>
3 Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=24;bug=439976
4 Bug-Debian: http://bugs.debian.org/439976
5 Last-Update: 2010-02-28
6 --- a/test/srtp_driver.c
7 +++ b/test/srtp_driver.c
8 @@ -314,7 +314,7 @@ main (int argc, char *argv[]) {
9 if (do_codec_timing) {
10 srtp_policy_t policy;
11 int ignore;
12 - double mips = mips_estimate(1000000000, &ignore);
13 + double mips_est = mips_estimate(1000000000, &ignore);
14
15 crypto_policy_set_rtp_default(&policy.rtp);
16 crypto_policy_set_rtcp_default(&policy.rtcp);
17 @@ -323,33 +323,33 @@ main (int argc, char *argv[]) {
18 policy.key = test_key;
19 policy.next = NULL;
20
21 - printf("mips estimate: %e\n", mips);
22 + printf("mips estimate: %e\n", mips_est);
23
24 printf("testing srtp processing time for voice codecs:\n");
25 printf("codec\t\tlength (octets)\t\tsrtp instructions/second\n");
26 printf("G.711\t\t%d\t\t\t%e\n", 80,
27 - (double) mips * (80 * 8) /
28 + (double) mips_est * (80 * 8) /
29 srtp_bits_per_second(80, &policy) / .01 );
30 printf("G.711\t\t%d\t\t\t%e\n", 160,
31 - (double) mips * (160 * 8) /
32 + (double) mips_est * (160 * 8) /
33 srtp_bits_per_second(160, &policy) / .02);
34 printf("G.726-32\t%d\t\t\t%e\n", 40,
35 - (double) mips * (40 * 8) /
36 + (double) mips_est * (40 * 8) /
37 srtp_bits_per_second(40, &policy) / .01 );
38 printf("G.726-32\t%d\t\t\t%e\n", 80,
39 - (double) mips * (80 * 8) /
40 + (double) mips_est * (80 * 8) /
41 srtp_bits_per_second(80, &policy) / .02);
42 printf("G.729\t\t%d\t\t\t%e\n", 10,
43 - (double) mips * (10 * 8) /
44 + (double) mips_est * (10 * 8) /
45 srtp_bits_per_second(10, &policy) / .01 );
46 printf("G.729\t\t%d\t\t\t%e\n", 20,
47 - (double) mips * (20 * 8) /
48 + (double) mips_est * (20 * 8) /
49 srtp_bits_per_second(20, &policy) / .02 );
50 printf("Wideband\t%d\t\t\t%e\n", 320,
51 - (double) mips * (320 * 8) /
52 + (double) mips_est * (320 * 8) /
53 srtp_bits_per_second(320, &policy) / .01 );
54 printf("Wideband\t%d\t\t\t%e\n", 640,
55 - (double) mips * (640 * 8) /
56 + (double) mips_est * (640 * 8) /
57 srtp_bits_per_second(640, &policy) / .02 );
58 }
59