Compare commits
1290 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef5a0a0ff3 | ||
|
|
e5cd3e4fd1 | ||
|
|
2bd5b5fd68 | ||
|
|
b8cbfe0b0d | ||
|
|
b23898ee09 | ||
|
|
2cfc86307d | ||
|
|
e4cf4dacd4 | ||
|
|
b41364c709 | ||
|
|
b99c4e3e39 | ||
|
|
6c4df2919c | ||
|
|
73acd1f3a2 | ||
|
|
adda7622f4 | ||
|
|
43aef3ecb0 | ||
|
|
03faff443c | ||
|
|
eebe227a20 | ||
|
|
8fb73a092d | ||
|
|
7c95adc7e6 | ||
|
|
df5c497b5b | ||
|
|
8afdbc1f4d | ||
|
|
8269047c88 | ||
|
|
afb21203b7 | ||
|
|
d0a65f86f5 | ||
|
|
29f4f269fc | ||
|
|
65176c940e | ||
|
|
591ee92e45 | ||
|
|
fa411f5623 | ||
|
|
24360bf5b6 | ||
|
|
9fe1a7c38d | ||
|
|
6de77879db | ||
|
|
adcb29616a | ||
|
|
3bf8052811 | ||
|
|
cdb122d3d1 | ||
|
|
bde6c9092d | ||
|
|
db0b4d43cb | ||
|
|
b07003ae34 | ||
|
|
0a9f28c228 | ||
|
|
946c43940b | ||
|
|
e83827ab75 | ||
|
|
6431773288 | ||
|
|
3319748926 | ||
|
|
2ab0029d49 | ||
|
|
796decdb0f | ||
|
|
64ee669728 | ||
|
|
a8f4dadaf5 | ||
|
|
ec58132b25 | ||
|
|
563f7e6e78 | ||
|
|
e93dcc3991 | ||
|
|
7aac137fb7 | ||
|
|
073be6696b | ||
|
|
54b30c47f5 | ||
|
|
8914c79613 | ||
|
|
785f737244 | ||
|
|
67415a8dcb | ||
|
|
b4e28e219b | ||
|
|
3a5d4e7ebe | ||
|
|
a04e737526 | ||
|
|
3bfb123b33 | ||
|
|
d5bd7bcf5f | ||
|
|
2ef808f406 | ||
|
|
c4f9bc2b5e | ||
|
|
e4e8511b4c | ||
|
|
13328ca0d0 | ||
|
|
6a188248a7 | ||
|
|
5e493c90f8 | ||
|
|
8e735cd66f | ||
|
|
885fc88aad | ||
|
|
69ee4cbc71 | ||
|
|
2790128e9c | ||
|
|
a4f7b78fd0 | ||
|
|
fc5777e904 | ||
|
|
a0beb7f0e0 | ||
|
|
d58f4d1232 | ||
|
|
473e470883 | ||
|
|
4dce79334d | ||
|
|
e914496216 | ||
|
|
9b3457f0b2 | ||
|
|
d21fe517e4 | ||
|
|
8290970d50 | ||
|
|
2e8841c1d6 | ||
|
|
dc1b420fef | ||
|
|
e41f34729e | ||
|
|
4fe6256967 | ||
|
|
d9467ef3c5 | ||
|
|
d5bf1b6137 | ||
|
|
bfe4ad6c34 | ||
|
|
4e8e8978f4 | ||
|
|
7817c7697e | ||
|
|
06f2908d78 | ||
|
|
61386e9ca9 | ||
|
|
4314a4b42b | ||
|
|
945636ac5c | ||
|
|
ba4ebed59b | ||
|
|
7c0bf0c871 | ||
|
|
02c37e815c | ||
|
|
6a99c6c4ac | ||
|
|
a65ade5366 | ||
|
|
332c722f1d | ||
|
|
7aeb4c96ee | ||
|
|
cd085faecd | ||
|
|
1323b49c57 | ||
|
|
9915fa347f | ||
|
|
bcd08956bd | ||
|
|
25da3525fa | ||
|
|
245c0adeea | ||
|
|
0d06e78d25 | ||
|
|
2ce2a0d5c3 | ||
|
|
040f8c81bf | ||
|
|
ce1c6e2372 | ||
|
|
1d8aef1669 | ||
|
|
cca38ddf3f | ||
|
|
ce617fb7cb | ||
|
|
43ebf829ca | ||
|
|
487f8cbb38 | ||
|
|
36426a74c1 | ||
|
|
04f9187c14 | ||
|
|
8efe6e7286 | ||
|
|
745faa12a7 | ||
|
|
0cd4cc67af | ||
|
|
9201d50f05 | ||
|
|
f82a7fee49 | ||
|
|
66578a2c76 | ||
|
|
c4339813e6 | ||
|
|
927aac2c4a | ||
|
|
5a29c61dac | ||
|
|
149ac9f417 | ||
|
|
6c20a4c08b | ||
|
|
8fc690d8e0 | ||
|
|
dd0a952c83 | ||
|
|
ff123943cb | ||
|
|
493bd9be6b | ||
|
|
028a1ab2b0 | ||
|
|
058bcf1f4a | ||
|
|
ae379cd3dd | ||
|
|
f3a4634d30 | ||
|
|
de3106344a | ||
|
|
fecc5e63e8 | ||
|
|
69f5aacd25 | ||
|
|
2a753c7795 | ||
|
|
c17e24250d | ||
|
|
cb60e08da2 | ||
|
|
21f04605c6 | ||
|
|
0c75e652eb | ||
|
|
d3000f384f | ||
|
|
76b0183e0f | ||
|
|
e51e5cdfd4 | ||
|
|
5b1e5b18f9 | ||
|
|
fb9ba8cb8d | ||
|
|
b136fed6f7 | ||
|
|
fb8d6cb538 | ||
|
|
7bec5efe1a | ||
|
|
5c59c3f423 | ||
|
|
181c7dfd85 | ||
|
|
d05097a6fd | ||
|
|
75483299dc | ||
|
|
5333647794 | ||
|
|
e1f9519235 | ||
|
|
7f0b0803bc | ||
|
|
c867316e6a | ||
|
|
b0137c08cb | ||
|
|
534421eb57 | ||
|
|
b97363e407 | ||
|
|
aaf3f70ce5 | ||
|
|
5fd5b1e1ed | ||
|
|
56a3c99289 | ||
|
|
b5b564cfe1 | ||
|
|
0b7b37bf00 | ||
|
|
5b08be8d01 | ||
|
|
8d4f3803df | ||
|
|
56117237b6 | ||
|
|
796940bda5 | ||
|
|
00a18f58a7 | ||
|
|
0ef56fb86d | ||
|
|
381c8820b1 | ||
|
|
a930ec5404 | ||
|
|
e808ae0ddc | ||
|
|
750e25388f | ||
|
|
5757962f95 | ||
|
|
c15d8ebd2e | ||
|
|
09c57f3f44 | ||
|
|
be0ca330f5 | ||
|
|
2941ac0e2c | ||
|
|
d6a061d50f | ||
|
|
59f2446a2b | ||
|
|
60ab71099f | ||
|
|
3f6cdd4133 | ||
|
|
72b9c37ec8 | ||
|
|
5704fad7cc | ||
|
|
849c346a21 | ||
|
|
328a3ff20e | ||
|
|
24bcea393f | ||
|
|
aade4c7af3 | ||
|
|
58406d6b37 | ||
|
|
004a87eba9 | ||
|
|
3fa11d9931 | ||
|
|
cad8ff766a | ||
|
|
5b6f49c993 | ||
|
|
3e798a9863 | ||
|
|
4371708fc4 | ||
|
|
d4887e11be | ||
|
|
d0e852f19f | ||
|
|
8d82033855 | ||
|
|
434ce4f9c9 | ||
|
|
8fd0ea39aa | ||
|
|
08be47c03e | ||
|
|
13bd3c773c | ||
|
|
751fa21f60 | ||
|
|
339d352d6e | ||
|
|
79cb6166d5 | ||
|
|
11a93fabe5 | ||
|
|
05eba8c2f0 | ||
|
|
ac66c41aee | ||
|
|
c70904d7f7 | ||
|
|
bd280ec895 | ||
|
|
02c781eb25 | ||
|
|
50794ba49d | ||
|
|
a086a2471c | ||
|
|
4271732b10 | ||
|
|
79313c8093 | ||
|
|
f80909738d | ||
|
|
15b131d8c2 | ||
|
|
40108d5276 | ||
|
|
ea4def7ea1 | ||
|
|
285bd3de0e | ||
|
|
35bcd30b24 | ||
|
|
3453aadcfd | ||
|
|
758b306527 | ||
|
|
7a0765c1c2 | ||
|
|
f6a5f117b8 | ||
|
|
46def68776 | ||
|
|
f714f5b572 | ||
|
|
a64dba8a7e | ||
|
|
cb3f9a6805 | ||
|
|
c342f0d7e4 | ||
|
|
34b80f91ee | ||
|
|
c258b4c7aa | ||
|
|
474922493f | ||
|
|
a5971da2ad | ||
|
|
8fe5f35b13 | ||
|
|
d70f0f1216 | ||
|
|
a1f46b3aae | ||
|
|
2ce16297ff | ||
|
|
9dc003a753 | ||
|
|
2f568c6400 | ||
|
|
23a2a5e5f3 | ||
|
|
91785e5590 | ||
|
|
5111fe2e95 | ||
|
|
15c6f18750 | ||
|
|
d2f44f6584 | ||
|
|
25e099a309 | ||
|
|
5fd9874ab6 | ||
|
|
4ffb1ea95e | ||
|
|
38d0b5caa8 | ||
|
|
93b82843a7 | ||
|
|
ae97495c47 | ||
|
|
4a3faf9086 | ||
|
|
09e52834a6 | ||
|
|
84fa2d1a34 | ||
|
|
7342d839bc | ||
|
|
450128ed63 | ||
|
|
e4cd2cadf6 | ||
|
|
b960f908dc | ||
|
|
143f786322 | ||
|
|
a0859a71b2 | ||
|
|
399dfb1a98 | ||
|
|
0225db9db5 | ||
|
|
f01cab57c7 | ||
|
|
26f8870344 | ||
|
|
ccbe856ffb | ||
|
|
c041495834 | ||
|
|
c91315c0f1 | ||
|
|
94776c40e1 | ||
|
|
b45e6b6139 | ||
|
|
e0ebe6c858 | ||
|
|
cbfd3af5c2 | ||
|
|
c0a26862f3 | ||
|
|
214629e2db | ||
|
|
77d73fa572 | ||
|
|
a7348f6ae0 | ||
|
|
56ae12a29f | ||
|
|
d071625326 | ||
|
|
ff1f190110 | ||
|
|
cdf982a356 | ||
|
|
c6abb7dc64 | ||
|
|
2eeb7c43da | ||
|
|
7ff8c99055 | ||
|
|
1fd8025cb5 | ||
|
|
003787e4a6 | ||
|
|
0d05a2bf09 | ||
|
|
bd54b1a053 | ||
|
|
3035dc4df9 | ||
|
|
0b20e99cd2 | ||
|
|
5a73884b0b | ||
|
|
e46caa024d | ||
|
|
3bec127020 | ||
|
|
31e20ca87e | ||
|
|
c87012ea69 | ||
|
|
7f59983ce4 | ||
|
|
0402b45480 | ||
|
|
123c7b2119 | ||
|
|
b68691bf05 | ||
|
|
d9a3f5a3b8 | ||
|
|
a0fc948519 | ||
|
|
4044da849e | ||
|
|
7377e6c7da | ||
|
|
cf14b0478d | ||
|
|
ba67f108d4 | ||
|
|
4fb5c6dd9a | ||
|
|
826dc601c1 | ||
|
|
26979b1c62 | ||
|
|
36b7f767b6 | ||
|
|
fdfa15aa4d | ||
|
|
961b9b882f | ||
|
|
d83a3d71bc | ||
|
|
3d4ae60d81 | ||
|
|
ea50714b0a | ||
|
|
92422a939a | ||
|
|
d543c0b36e | ||
|
|
c6e2b5f6c5 | ||
|
|
368f5c8dba | ||
|
|
14f7c2d7a1 | ||
|
|
ffae7a24f7 | ||
|
|
f047df0fe8 | ||
|
|
469c3298cc | ||
|
|
92593d459b | ||
|
|
99d3374d35 | ||
|
|
cbcd53a8a0 | ||
|
|
6ba95446ec | ||
|
|
50f079af8c | ||
|
|
8c96f9fd93 | ||
|
|
e574bcf15c | ||
|
|
7520af749c | ||
|
|
b55df9e186 | ||
|
|
9ea53d7b1e | ||
|
|
6ae38d0718 | ||
|
|
eedbc667c6 | ||
|
|
9b524e0496 | ||
|
|
92b2da0286 | ||
|
|
0794380ca8 | ||
|
|
a7e05c4cd6 | ||
|
|
336962eb55 | ||
|
|
fbc527145c | ||
|
|
2d65464c04 | ||
|
|
415a61a09b | ||
|
|
f95435b0f1 | ||
|
|
e077cc6581 | ||
|
|
551274f167 | ||
|
|
4f7ac59c6f | ||
|
|
0e06e2de97 | ||
|
|
ed1d411bde | ||
|
|
8933e03c02 | ||
|
|
2c48155769 | ||
|
|
16e258bdbc | ||
|
|
c418ca1890 | ||
|
|
3be011bdaf | ||
|
|
526f6e3058 | ||
|
|
21b7dccf1c | ||
|
|
adc6fc8524 | ||
|
|
b5216ed7af | ||
|
|
d4718c373a | ||
|
|
797513b372 | ||
|
|
0b7342ba67 | ||
|
|
103686f89b | ||
|
|
aaf3d6a7c7 | ||
|
|
923d9fb07b | ||
|
|
df164a58c9 | ||
|
|
5ef65f039d | ||
|
|
fd61fcef0d | ||
|
|
d67d985b81 | ||
|
|
a74276d31b | ||
|
|
6d0e783236 | ||
|
|
17cde0cbb7 | ||
|
|
80ce83ef9d | ||
|
|
7e2c9f97e9 | ||
|
|
727c471234 | ||
|
|
201da6f2a2 | ||
|
|
99adbe5784 | ||
|
|
d0fc5268a6 | ||
|
|
0c9d9e8dcf | ||
|
|
1641fd91cf | ||
|
|
835f1efc76 | ||
|
|
d6179bc12b | ||
|
|
3edda51379 | ||
|
|
82b74e8ce7 | ||
|
|
65ac2b3e18 | ||
|
|
ae17b4b24a | ||
|
|
06e137aee9 | ||
|
|
e97255a17f | ||
|
|
58fd6f9273 | ||
|
|
31b2fab6e9 | ||
|
|
9053bccd33 | ||
|
|
edc47247f9 | ||
|
|
107e202ab4 | ||
|
|
3c400f958e | ||
|
|
973ed7686b | ||
|
|
716ed94ca1 | ||
|
|
5fe1a28954 | ||
|
|
a820500ae0 | ||
|
|
f812efff3c | ||
|
|
a3a7f8fb6c | ||
|
|
00eb637e51 | ||
|
|
151eca971b | ||
|
|
f693a04531 | ||
|
|
eae80e2c86 | ||
|
|
f8bb065ffd | ||
|
|
120cde9917 | ||
|
|
d6d7ca19c1 | ||
|
|
ec8b06e96c | ||
|
|
0c14639f9c | ||
|
|
27aabbc4d9 | ||
|
|
09186cd8ad | ||
|
|
52e4abf562 | ||
|
|
324c85cd9f | ||
|
|
a5e3935672 | ||
|
|
c58ba19451 | ||
|
|
b5318ed248 | ||
|
|
964171b26a | ||
|
|
1fa29f89f9 | ||
|
|
68df5f832c | ||
|
|
40a3134b32 | ||
|
|
9f3310f67a | ||
|
|
278214ef86 | ||
|
|
109a6ed599 | ||
|
|
99d3a76b56 | ||
|
|
c72719747a | ||
|
|
a84dcf6a8e | ||
|
|
c36c759c8b | ||
|
|
bbf33f88e0 | ||
|
|
e2e5aa32a8 | ||
|
|
e88a7c3fd7 | ||
|
|
98393ba2e1 | ||
|
|
e145b8171d | ||
|
|
5cf95f5b3d | ||
|
|
8fbc14b191 | ||
|
|
30f2c71861 | ||
|
|
d4fc12f56c | ||
|
|
7c32e5b1fb | ||
|
|
13bad6dfed | ||
|
|
24e14cbc73 | ||
|
|
a2d63d117b | ||
|
|
102a151127 | ||
|
|
cc5d779050 | ||
|
|
2c41394892 | ||
|
|
454c604b86 | ||
|
|
f13ad54ba1 | ||
|
|
a66dd8be82 | ||
|
|
7de1683195 | ||
|
|
b1f336c874 | ||
|
|
39ac2b5042 | ||
|
|
c27459a760 | ||
|
|
0a3b78fec1 | ||
|
|
156a86013f | ||
|
|
20313127f5 | ||
|
|
b0a91ce9e3 | ||
|
|
6c5daf5ed6 | ||
|
|
3bac3c6263 | ||
|
|
74ce839bc1 | ||
|
|
d2a728fc08 | ||
|
|
3e15a5e2db | ||
|
|
4840cdd293 | ||
|
|
f04281ac4a | ||
|
|
4f75ea0fd0 | ||
|
|
12b8eee86f | ||
|
|
90d5e9dccd | ||
|
|
1daea51cfb | ||
|
|
905b4f0a6b | ||
|
|
dcc7ba20e6 | ||
|
|
39dec1059b | ||
|
|
f4104f696e | ||
|
|
f22c9af136 | ||
|
|
13578bb8c0 | ||
|
|
39c0fc0e5a | ||
|
|
cfc9514f89 | ||
|
|
580a3182ab | ||
|
|
83919c087d | ||
|
|
e8712b3a29 | ||
|
|
fda900e95d | ||
|
|
beb3558d01 | ||
|
|
97dbe648f9 | ||
|
|
7ff484c0c7 | ||
|
|
f7e34a707d | ||
|
|
73bc7220db | ||
|
|
f2a323ef7f | ||
|
|
15345f874f | ||
|
|
534ac22fd2 | ||
|
|
b0f7df93a4 | ||
|
|
1b0cba3919 | ||
|
|
ff4929fcce | ||
|
|
1a7ab6346f | ||
|
|
47b21707be | ||
|
|
8b986ae094 | ||
|
|
32cb489d1d | ||
|
|
0e7fcc6893 | ||
|
|
89f2429283 | ||
|
|
1fc3a82d9e | ||
|
|
fe552ba53f | ||
|
|
410ec57f80 | ||
|
|
2ef0054840 | ||
|
|
704f2b91e2 | ||
|
|
d1940fe0f9 | ||
|
|
8d9ae731ef | ||
|
|
b1810e2c44 | ||
|
|
44bfac9fe6 | ||
|
|
e4299178f7 | ||
|
|
8cb952ff3f | ||
|
|
b519fd2533 | ||
|
|
c7599094f5 | ||
|
|
8c63211aaf | ||
|
|
1bea12f746 | ||
|
|
124d728010 | ||
|
|
63515e967e | ||
|
|
5c3b96a947 | ||
|
|
0af902b81c | ||
|
|
b75a04eb08 | ||
|
|
3ae1c5ccc8 | ||
|
|
091ff7e91c | ||
|
|
a44a4bc759 | ||
|
|
7593918006 | ||
|
|
d400f0fb58 | ||
|
|
226646d5b8 | ||
|
|
9b2aabfdc8 | ||
|
|
35159ac456 | ||
|
|
e603142215 | ||
|
|
1bdfb5f382 | ||
|
|
282f139ee9 | ||
|
|
5eaaadad26 | ||
|
|
72735baa11 | ||
|
|
21c8051b02 | ||
|
|
d6d881b0ca | ||
|
|
5fdd5cad4e | ||
|
|
44df1128af | ||
|
|
bc787f20e3 | ||
|
|
c4524ebbd1 | ||
|
|
98b99ef5b1 | ||
|
|
df67471959 | ||
|
|
54a37cc658 | ||
|
|
c4a37e38ab | ||
|
|
13eed3baa7 | ||
|
|
f0b2cc5590 | ||
|
|
69e1252f7f | ||
|
|
ed8f617c81 | ||
|
|
ad8a290ca5 | ||
|
|
00a85c4438 | ||
|
|
9a18be0a61 | ||
|
|
fa62b9bde2 | ||
|
|
20a1507f7a | ||
|
|
b7492ebdfa | ||
|
|
48bf65db74 | ||
|
|
6561365326 | ||
|
|
59c51127f6 | ||
|
|
59772504e3 | ||
|
|
c2e5f4e80a | ||
|
|
daa98107c3 | ||
|
|
140cbe9f25 | ||
|
|
3a9ceb8371 | ||
|
|
4274329867 | ||
|
|
86cf59f9a8 | ||
|
|
4ea40b30a2 | ||
|
|
9bf7562d49 | ||
|
|
ce2f66ad17 | ||
|
|
eacfca37f2 | ||
|
|
7cdc26a8ba | ||
|
|
7d81c41404 | ||
|
|
e5035a9c4b | ||
|
|
fe74ca3529 | ||
|
|
900cbce84f | ||
|
|
78289ded8f | ||
|
|
99c9c73c9d | ||
|
|
db9656c70c | ||
|
|
296796eb54 | ||
|
|
fb9f16ad29 | ||
|
|
64df85f3ee | ||
|
|
8bb47bbdf1 | ||
|
|
d929caf0e6 | ||
|
|
a25bedff28 | ||
|
|
b8039af905 | ||
|
|
6c367ac29c | ||
|
|
af226673da | ||
|
|
957aa2e3d1 | ||
|
|
c920146bff | ||
|
|
2c9c9891c6 | ||
|
|
bf3c1d3745 | ||
|
|
3c41f27298 | ||
|
|
a397f34ec4 | ||
|
|
b4634f30e6 | ||
|
|
2016fa315b | ||
|
|
dc60c011a6 | ||
|
|
408d3a964d | ||
|
|
dbf765ffd7 | ||
|
|
8f92263707 | ||
|
|
a7f63ed9a3 | ||
|
|
fd2fe9ebd7 | ||
|
|
9fc02c8ce1 | ||
|
|
2fb9806f36 | ||
|
|
f2ce1b4032 | ||
|
|
b1568d3eed | ||
|
|
37b9550de6 | ||
|
|
67d8fa26a7 | ||
|
|
485e8455bd | ||
|
|
e16735bbbd | ||
|
|
4feedab02c | ||
|
|
ed0e1c07b9 | ||
|
|
e420861151 | ||
|
|
155cbf686d | ||
|
|
219a403f36 | ||
|
|
ed6ea22947 | ||
|
|
3bb966cf35 | ||
|
|
2b11547eeb | ||
|
|
d98cb7b53f | ||
|
|
d935be7b0a | ||
|
|
aa37d6e7f9 | ||
|
|
f72cd5b0ff | ||
|
|
5116c61f43 | ||
|
|
687beda478 | ||
|
|
bb5fe39d3d | ||
|
|
0e9be13cb6 | ||
|
|
23b274c472 | ||
|
|
a11f6ea1e6 | ||
|
|
c05555c290 | ||
|
|
6caee6b0f0 | ||
|
|
ae4f6b1dd4 | ||
|
|
40af2a81db | ||
|
|
cb3cf7789f | ||
|
|
0f7f458ce0 | ||
|
|
26bcb590a7 | ||
|
|
05894827c1 | ||
|
|
58be07f5b1 | ||
|
|
f1137927d4 | ||
|
|
37fbd769b7 | ||
|
|
3f6aae633e | ||
|
|
85c6957b63 | ||
|
|
c318d42d14 | ||
|
|
455f28ae54 | ||
|
|
b5dda3624f | ||
|
|
11613ad69f | ||
|
|
6d0720c956 | ||
|
|
8999e5fc54 | ||
|
|
82d7300fc0 | ||
|
|
12255ed453 | ||
|
|
5fe7c687f3 | ||
|
|
200fc0c599 | ||
|
|
4d8108f34d | ||
|
|
a0246836a8 | ||
|
|
d6a970133e | ||
|
|
26f77bd00f | ||
|
|
7cc2941053 | ||
|
|
6a1bbedae8 | ||
|
|
e3760630bf | ||
|
|
ce77cb81df | ||
|
|
4dce95142f | ||
|
|
570f79d91a | ||
|
|
a712875830 | ||
|
|
3a07809545 | ||
|
|
bb6b86ad59 | ||
|
|
bd2e984963 | ||
|
|
9408579862 | ||
|
|
0cf9206170 | ||
|
|
86c607a211 | ||
|
|
ec60c24849 | ||
|
|
72bd6d5844 | ||
|
|
f1e8357131 | ||
|
|
21341c5213 | ||
|
|
fa2f9686ce | ||
|
|
05e45e92cf | ||
|
|
ce610e0262 | ||
|
|
e130d0a3e6 | ||
|
|
1a7c4a2869 | ||
|
|
624c7dbf9d | ||
|
|
fca98c42d5 | ||
|
|
a3007c5906 | ||
|
|
1251629997 | ||
|
|
9475cd765a | ||
|
|
aefed50e8b | ||
|
|
0e04310a56 | ||
|
|
9c2f14dade | ||
|
|
2cfc714b64 | ||
|
|
990d858764 | ||
|
|
5b788fe188 | ||
|
|
1beed21032 | ||
|
|
18436dc3be | ||
|
|
7ecc58095b | ||
|
|
bc164ef549 | ||
|
|
3effe77830 | ||
|
|
bea9922840 | ||
|
|
dba7fd06c8 | ||
|
|
592cb49f93 | ||
|
|
4c11361513 | ||
|
|
ef9cc680f0 | ||
|
|
24bf2be5ae | ||
|
|
257660200a | ||
|
|
01bebf2176 | ||
|
|
4aa4ab50c4 | ||
|
|
bd6bee8da7 | ||
|
|
fe4e2fcadb | ||
|
|
dc903e49af | ||
|
|
082985276f | ||
|
|
636b11abea | ||
|
|
3e890e11d9 | ||
|
|
9a6b559afe | ||
|
|
fa39c23d44 | ||
|
|
fab2296927 | ||
|
|
720521d020 | ||
|
|
0ee46bbe5f | ||
|
|
082b6b35f8 | ||
|
|
4c89b242be | ||
|
|
cf420de65f | ||
|
|
5ec9197912 | ||
|
|
4f78309e51 | ||
|
|
8011b308c2 | ||
|
|
ab8593d5f3 | ||
|
|
54db79bfdd | ||
|
|
c7d2ed4f7d | ||
|
|
729f63d6e5 | ||
|
|
d0f26f3e97 | ||
|
|
b6e241b0dc | ||
|
|
75edb8c12c | ||
|
|
bf133c65c3 | ||
|
|
2bee953560 | ||
|
|
ee73883214 | ||
|
|
488767550e | ||
|
|
16b71aa0a8 | ||
|
|
437ffba4b1 | ||
|
|
2be8a9bf12 | ||
|
|
833fcd10ab | ||
|
|
40ca2575da | ||
|
|
68234959c4 | ||
|
|
338caf7da9 | ||
|
|
d3fb7b3c06 | ||
|
|
693deda18f | ||
|
|
686be81226 | ||
|
|
e62528d3e2 | ||
|
|
2d8de5291e | ||
|
|
4011208db3 | ||
|
|
4ad9d6b5cc | ||
|
|
417a4b86b6 | ||
|
|
41cad291f9 | ||
|
|
356d9949b7 | ||
|
|
a21e38e334 | ||
|
|
8332342d75 | ||
|
|
cdd7a1042a | ||
|
|
72f3f79016 | ||
|
|
ab82ff0b69 | ||
|
|
b354825150 | ||
|
|
a585bce38e | ||
|
|
b37c81ddf1 | ||
|
|
37c4079098 | ||
|
|
0c79b09a10 | ||
|
|
8f002bd68d | ||
|
|
3fe676a3dd | ||
|
|
26c4d746d2 | ||
|
|
d0008b57b5 | ||
|
|
08cf364ee6 | ||
|
|
b3707021b1 | ||
|
|
7b3bd2fbf7 | ||
|
|
a330f6f689 | ||
|
|
d8521637bb | ||
|
|
424a463b21 | ||
|
|
790c6980fe | ||
|
|
27a5b7dd5c | ||
|
|
95a94eeebf | ||
|
|
bcd9aa84d6 | ||
|
|
c6a4877391 | ||
|
|
a413346610 | ||
|
|
f42d100f15 | ||
|
|
9ba19df2af | ||
|
|
dbc28746c0 | ||
|
|
28232fc2a5 | ||
|
|
efcdb7eb66 | ||
|
|
8550b4b051 | ||
|
|
7ba75c3291 | ||
|
|
55ba57d056 | ||
|
|
8de695585d | ||
|
|
7724964a36 | ||
|
|
64fc83326f | ||
|
|
c1af7557b5 | ||
|
|
262c1e47ad | ||
|
|
3e29bf4e54 | ||
|
|
6d2b87d385 | ||
|
|
a28408b29f | ||
|
|
4a9028aedd | ||
|
|
7aaedf500f | ||
|
|
cb84cc39ce | ||
|
|
1c90b59bb8 | ||
|
|
b9541a65b0 | ||
|
|
77e846d24e | ||
|
|
568c69c9be | ||
|
|
ffe35bef93 | ||
|
|
9b9363f18a | ||
|
|
58664fcddb | ||
|
|
857135aab1 | ||
|
|
1cc581aed8 | ||
|
|
f5724795cf | ||
|
|
e4e24f7ae5 | ||
|
|
1f9a0fab3c | ||
|
|
b692d48b98 | ||
|
|
01020c1c09 | ||
|
|
39e0639b4b | ||
|
|
86253f3772 | ||
|
|
efb4f388a5 | ||
|
|
b77afa8903 | ||
|
|
794197c068 | ||
|
|
34fa05cccc | ||
|
|
1a5bd37849 | ||
|
|
da03b38c84 | ||
|
|
1d71a32b41 | ||
|
|
0efdada928 | ||
|
|
0c7dba6d43 | ||
|
|
c50658a4f5 | ||
|
|
afd6ab75f8 | ||
|
|
597f7bbafd | ||
|
|
87760a795d | ||
|
|
f4fe024e50 | ||
|
|
797b296f3a | ||
|
|
b8a231c40f | ||
|
|
5cb94f02b3 | ||
|
|
db7a657001 | ||
|
|
ca2c8b961e | ||
|
|
4e4538f4e8 | ||
|
|
796c5de5d5 | ||
|
|
beceee846a | ||
|
|
8573316fdf | ||
|
|
6c59eb052e | ||
|
|
0ff99258ac | ||
|
|
141ee6565d | ||
|
|
38fa4e91fa | ||
|
|
2f20bb89f3 | ||
|
|
c04b675a1a | ||
|
|
e70298e624 | ||
|
|
6181dc4037 | ||
|
|
9b0cae1d45 | ||
|
|
491440094b | ||
|
|
e6b2d31db7 | ||
|
|
0ca8a480c5 | ||
|
|
349faf18fa | ||
|
|
88ed8f3887 | ||
|
|
6a6f900b7d | ||
|
|
17383ddfe0 | ||
|
|
1b846c0842 | ||
|
|
dbda758841 | ||
|
|
c6b3bb9f13 | ||
|
|
bdeeea2e46 | ||
|
|
427c9a6b21 | ||
|
|
dfda2f733c | ||
|
|
6f600a80b8 | ||
|
|
62181a3d7f | ||
|
|
6c386d3fc9 | ||
|
|
b9e6cff20c | ||
|
|
d65a7f1a25 | ||
|
|
76d0f45b9b | ||
|
|
3a19ac432b | ||
|
|
6ec9ee89a7 | ||
|
|
472179b550 | ||
|
|
f38bd7b187 | ||
|
|
b73143d7a7 | ||
|
|
9a2c372c23 | ||
|
|
b21369b7bc | ||
|
|
5939a1f995 | ||
|
|
e4b73e90e1 | ||
|
|
073d019103 | ||
|
|
761ccf4b3f | ||
|
|
7a023b9fdc | ||
|
|
9f804047f5 | ||
|
|
a625727853 | ||
|
|
e0737451db | ||
|
|
0f572d1e5d | ||
|
|
142f84703b | ||
|
|
b47bd97e9e | ||
|
|
4099303d1f | ||
|
|
71eeb7ca83 | ||
|
|
186a5e4dfc | ||
|
|
0d84ec51a8 | ||
|
|
6c9ed77e5f | ||
|
|
fc3aaed8a8 | ||
|
|
c72cc1b49c | ||
|
|
13227b6aa5 | ||
|
|
cc65fab226 | ||
|
|
dee2e0906e | ||
|
|
e142cb6d26 | ||
|
|
4185006147 | ||
|
|
a4e18c515c | ||
|
|
2011391e65 | ||
|
|
96896bf8f1 | ||
|
|
ac312ff5d5 | ||
|
|
b3552ee347 | ||
|
|
b998c5f86c | ||
|
|
0b8430ff43 | ||
|
|
3e80032c18 | ||
|
|
41fadc3437 | ||
|
|
c1fe585ffb | ||
|
|
078df0f029 | ||
|
|
9f9293cd61 | ||
|
|
4e87513867 | ||
|
|
c05aca19ae | ||
|
|
db2c7fabe1 | ||
|
|
e7eb0ec2b3 | ||
|
|
da75268545 | ||
|
|
49ab1e7bd5 | ||
|
|
b5a2d7882a | ||
|
|
534df06794 | ||
|
|
e31ddf0599 | ||
|
|
ce22e54359 | ||
|
|
7ce7ec56eb | ||
|
|
2b39728ea0 | ||
|
|
2af5c7f02e | ||
|
|
d6e0199e05 | ||
|
|
301ed0b255 | ||
|
|
ac5306be5b | ||
|
|
9de62d0286 | ||
|
|
067b14d551 | ||
|
|
03110c9870 | ||
|
|
a2b5bf54c8 | ||
|
|
5602a3dfc0 | ||
|
|
ed5b3f8679 | ||
|
|
7bf7acb1ff | ||
|
|
ffa5dc549b | ||
|
|
a59feb7ad4 | ||
|
|
753a1c7219 | ||
|
|
004f050741 | ||
|
|
fcde642563 | ||
|
|
ac0a1c0bc1 | ||
|
|
3f93731300 | ||
|
|
00d7b5c284 | ||
|
|
4397b55ceb | ||
|
|
b87abcc2c1 | ||
|
|
79dbf2746f | ||
|
|
a4bd9fae9a | ||
|
|
d4493e700e | ||
|
|
83d65228e9 | ||
|
|
8a2caeef3d | ||
|
|
6280ef4ab8 | ||
|
|
899afa2092 | ||
|
|
7c6b965969 | ||
|
|
5fac189736 | ||
|
|
d3271f548c | ||
|
|
023195dd4b | ||
|
|
299dd86c77 | ||
|
|
f818cfa32b | ||
|
|
fc21d2038f | ||
|
|
8277e4e102 | ||
|
|
242dbef54e | ||
|
|
9ffd84ce05 | ||
|
|
cb37ce0f5f | ||
|
|
7ab739b22b | ||
|
|
224b06f05a | ||
|
|
d36d33f837 | ||
|
|
724dced820 | ||
|
|
b8ca0e57ad | ||
|
|
fe5fc411a7 | ||
|
|
20d43bbfcb | ||
|
|
442f56cdc3 | ||
|
|
35dabaf1e5 | ||
|
|
1aec794a34 | ||
|
|
5bd8d6c69d | ||
|
|
aa26785c00 | ||
|
|
f450b37cfd | ||
|
|
b88e470594 | ||
|
|
f38677794a | ||
|
|
ac4db41435 | ||
|
|
3a9d521ffe | ||
|
|
b1bf33b13b | ||
|
|
352418d2d7 | ||
|
|
fb523985ed | ||
|
|
7ffe6f053c | ||
|
|
ea77191b70 | ||
|
|
e0b882d4d2 | ||
|
|
10a74d6d08 | ||
|
|
f092e85b62 | ||
|
|
8aa0f15740 | ||
|
|
18d4d4de24 | ||
|
|
b3c42dee7e | ||
|
|
5836f35291 | ||
|
|
dbd8a4083c | ||
|
|
0fd52ad1fe | ||
|
|
8031c788d9 | ||
|
|
10a29db93d | ||
|
|
8f3f2e6921 | ||
|
|
65c262acef | ||
|
|
d586893402 | ||
|
|
ba62e018db | ||
|
|
57c17e705f | ||
|
|
2e253fb6a8 | ||
|
|
0c32001fe4 | ||
|
|
48f6c2c526 | ||
|
|
39fd1e8f46 | ||
|
|
810abe0275 | ||
|
|
62816ee51a | ||
|
|
a0599c1639 | ||
|
|
8a4a1b385d | ||
|
|
5def8ba78d | ||
|
|
42da687602 | ||
|
|
e64c067636 | ||
|
|
c89fbabbf3 | ||
|
|
778b8b490c | ||
|
|
bade52d748 | ||
|
|
abc322b075 | ||
|
|
9a31c5961a | ||
|
|
f536e45378 | ||
|
|
18961e6369 | ||
|
|
1505ec8c35 | ||
|
|
d41efdbd1c | ||
|
|
156cb4034e | ||
|
|
d2e188ee62 | ||
|
|
1de16de55b | ||
|
|
ac3b3673b9 | ||
|
|
91bf5532b2 | ||
|
|
b25b95f933 | ||
|
|
a0ed0842a0 | ||
|
|
12845da91a | ||
|
|
3e6e28e688 | ||
|
|
9fed60628d | ||
|
|
e67dafe9c8 | ||
|
|
5e5531805b | ||
|
|
b6822b310e | ||
|
|
3e8d2a557e | ||
|
|
23caf2b14d | ||
|
|
562520a4bb | ||
|
|
75d882e945 | ||
|
|
b39e41c803 | ||
|
|
348352cc71 | ||
|
|
bec5e45605 | ||
|
|
4d8004ab21 | ||
|
|
2e141b2a90 | ||
|
|
ed556fbd3a | ||
|
|
ebf6a2d833 | ||
|
|
25028b7178 | ||
|
|
389128d1a3 | ||
|
|
6e85677c52 | ||
|
|
1443d846c4 | ||
|
|
d7419caa4b | ||
|
|
e277f9f6d1 | ||
|
|
3f0932ff7b | ||
|
|
0a61534e03 | ||
|
|
121b1493cc | ||
|
|
a57c7c3e09 | ||
|
|
b89b986a9e | ||
|
|
1bb882ac96 | ||
|
|
9e7928873b | ||
|
|
21591dc6b1 | ||
|
|
3ec95f7a8e | ||
|
|
33d466a5cc | ||
|
|
e8b947dfde | ||
|
|
60a343120d | ||
|
|
8af74e93a2 | ||
|
|
e650349bb7 | ||
|
|
44a4570870 | ||
|
|
f1572774f2 | ||
|
|
ec18da8aa9 | ||
|
|
199c28dad6 | ||
|
|
4a8a939f64 | ||
|
|
cef203f261 | ||
|
|
d7de5415b5 | ||
|
|
188d11bc23 | ||
|
|
990902845a | ||
|
|
07bb07c342 | ||
|
|
a09e0afbd6 | ||
|
|
bbea017d5a | ||
|
|
426c56c77d | ||
|
|
642334da1f | ||
|
|
b44acd82e6 | ||
|
|
62d0de2ee6 | ||
|
|
3c7e319029 | ||
|
|
715b1ea10d | ||
|
|
6980a32628 | ||
|
|
15f44a78a9 | ||
|
|
6b05f7905b | ||
|
|
9beb51bd77 | ||
|
|
0b62cf372b | ||
|
|
b7badec752 | ||
|
|
a5e5a4c37f | ||
|
|
c448a833f5 | ||
|
|
761049d6f8 | ||
|
|
df12174458 | ||
|
|
6e7566f781 | ||
|
|
30232c1635 | ||
|
|
4a088410ae | ||
|
|
b05967f2c9 | ||
|
|
1d0c9536fc | ||
|
|
3c4ac4b105 | ||
|
|
ff05642f3e | ||
|
|
4e98c350a5 | ||
|
|
e5e5b93884 | ||
|
|
2f6cefca8a | ||
|
|
8149af22ec | ||
|
|
55ee288c36 | ||
|
|
1833e57c38 | ||
|
|
c14945791c | ||
|
|
b914d5ca25 | ||
|
|
7411a49572 | ||
|
|
3fcd2bb88d | ||
|
|
978f769d6d | ||
|
|
9d693eef30 | ||
|
|
8f79ba1dd1 | ||
|
|
15613894f0 | ||
|
|
a88fbba49f | ||
|
|
f3f173f653 | ||
|
|
5002a749cf | ||
|
|
4a107483c1 | ||
|
|
9ef1ea283b | ||
|
|
32153ec379 | ||
|
|
ceb82a05ca | ||
|
|
899bf8160d | ||
|
|
49f77c9c06 | ||
|
|
cd5feccdbf | ||
|
|
a1da22cee9 | ||
|
|
a950db74c0 | ||
|
|
b0891fa986 | ||
|
|
b57763f397 | ||
|
|
de75a98093 | ||
|
|
0d01feebc3 | ||
|
|
0fb7f3b970 | ||
|
|
a9637baddf | ||
|
|
5e61161767 | ||
|
|
83d281de71 | ||
|
|
28f63cf335 | ||
|
|
f3a3aaca60 | ||
|
|
908e8b8746 | ||
|
|
4573f3cb77 | ||
|
|
d72a3ec669 | ||
|
|
3439657bba | ||
|
|
1ad7912e75 | ||
|
|
30aff82341 | ||
|
|
c54a5b613b | ||
|
|
31ad30b3a5 | ||
|
|
4ccb7ebab6 | ||
|
|
bf69a90b69 | ||
|
|
bf19307916 | ||
|
|
d42c4229fd | ||
|
|
31eddbf346 | ||
|
|
e9b383d277 | ||
|
|
eeafb81c90 | ||
|
|
02e27c94f2 | ||
|
|
167386ea49 | ||
|
|
e31994ac77 | ||
|
|
ea9a5decac | ||
|
|
1cb191a6ee | ||
|
|
60737bdd7b | ||
|
|
2dded4888e | ||
|
|
eaf89735b8 | ||
|
|
8fa2f92a91 | ||
|
|
174324e2a0 | ||
|
|
bc3686058a | ||
|
|
0110015c8b | ||
|
|
5ca8a6d421 | ||
|
|
0fc9ff7490 | ||
|
|
08d939b010 | ||
|
|
020920d988 | ||
|
|
bd3d9ac533 | ||
|
|
85670d95ee | ||
|
|
3d1007d101 | ||
|
|
35821d444e | ||
|
|
3cd7c2d8e5 | ||
|
|
5b08791086 | ||
|
|
31b9dcb5eb | ||
|
|
43adc75428 | ||
|
|
67a4523ca7 | ||
|
|
b35b9be0c8 | ||
|
|
9215322846 | ||
|
|
cbebc040cc | ||
|
|
bea26e83da | ||
|
|
a85dbce041 | ||
|
|
baaa3514d4 | ||
|
|
71fdaac1b2 | ||
|
|
fb31319e52 | ||
|
|
08ed90c5ec | ||
|
|
0d102f76cc | ||
|
|
28cb1ed85b | ||
|
|
cd9b20dc9d | ||
|
|
f09abff407 | ||
|
|
f9934bd8e5 | ||
|
|
1182052c7f | ||
|
|
0d06d50a65 | ||
|
|
d9d4ec9d9d | ||
|
|
9a6f65988f | ||
|
|
601e233d47 | ||
|
|
ae178fc4ec | ||
|
|
cafe03a70a | ||
|
|
99f42e2ee1 | ||
|
|
a3f1d9cdfd | ||
|
|
4cab657ebe | ||
|
|
db6f8618e6 | ||
|
|
98af1fb6ee | ||
|
|
ad1d55f12d | ||
|
|
7df49811b7 | ||
|
|
ff2ac8a66e | ||
|
|
53da1f849a | ||
|
|
503d1ef452 | ||
|
|
9accd92757 | ||
|
|
306da92031 | ||
|
|
e7b6a852c5 | ||
|
|
9dfaf19516 | ||
|
|
34aece0b43 | ||
|
|
9768de2d5e | ||
|
|
c3eb0ea9db | ||
|
|
4cdc0a3e61 | ||
|
|
b568ce70b2 | ||
|
|
18b0601990 | ||
|
|
b308996885 | ||
|
|
73d896f378 | ||
|
|
36ec1d84a1 | ||
|
|
8d6b9ae43e | ||
|
|
a95cc0eba2 | ||
|
|
58d101ff2e | ||
|
|
544f06451f | ||
|
|
20cf775b1e | ||
|
|
5fcc135f81 | ||
|
|
9a0ed659f7 | ||
|
|
54612159be | ||
|
|
355d0be78a | ||
|
|
73b75a4a27 | ||
|
|
c4209a65e3 | ||
|
|
9dce376780 | ||
|
|
07c61394e9 | ||
|
|
3e287f930d | ||
|
|
7b1a37bd91 | ||
|
|
2db44a1578 | ||
|
|
006c9aae7b | ||
|
|
b147a90463 | ||
|
|
741171c49f | ||
|
|
c375ed8638 | ||
|
|
238f29c90a | ||
|
|
084f27a2e8 | ||
|
|
27b5bf54cc | ||
|
|
eda393b11c | ||
|
|
c330eef7b9 | ||
|
|
1eb3884b7a | ||
|
|
5ea3b3038e | ||
|
|
641ac9aed9 | ||
|
|
82bd75fb75 | ||
|
|
c94a7b1eff | ||
|
|
4caebdcd06 | ||
|
|
b3cece27d6 | ||
|
|
819982af7b | ||
|
|
42cf53e487 | ||
|
|
e0d2398ca5 | ||
|
|
3f299936bf | ||
|
|
540592d71f | ||
|
|
5a9e5672d3 | ||
|
|
0a23b5fcd5 | ||
|
|
f0c22d593f | ||
|
|
5f5ddd7c26 | ||
|
|
144f269059 | ||
|
|
0d532afd8e | ||
|
|
07fd17ccda | ||
|
|
fcaa3f0d73 | ||
|
|
64b40df15b | ||
|
|
77ff9cece8 | ||
|
|
6326ef73f3 | ||
|
|
f29d1e6269 | ||
|
|
d6c5e92c9d | ||
|
|
811479d168 | ||
|
|
2ed8d333d9 | ||
|
|
79020cd33c | ||
|
|
c8757c2134 | ||
|
|
2a65257182 | ||
|
|
931605a1c4 | ||
|
|
81ae9af2e4 | ||
|
|
e84a0948e9 | ||
|
|
5239b3e8f8 | ||
|
|
a601c56af1 | ||
|
|
5a3c19fe3e | ||
|
|
af45e5d544 | ||
|
|
72af8b11c2 | ||
|
|
a1db221caf | ||
|
|
14b8f97de2 | ||
|
|
d902c12941 | ||
|
|
fe3d91c40c | ||
|
|
31167d11dd | ||
|
|
6e3751a0c5 | ||
|
|
b5941fb3fd | ||
|
|
cfccd367ad | ||
|
|
2c8c6a410c | ||
|
|
2075bba86c | ||
|
|
1d7b47c982 | ||
|
|
89fb80fcc5 | ||
|
|
f1d230ce6e | ||
|
|
f51a5aa7eb | ||
|
|
cf9c9bbfd7 | ||
|
|
b8a3e87f3d | ||
|
|
e5bad2746f | ||
|
|
7316f17674 | ||
|
|
609e69a801 | ||
|
|
d979593cbb | ||
|
|
0808e00d0e | ||
|
|
2045c828be | ||
|
|
1b3bd32805 | ||
|
|
877f2a25a9 | ||
|
|
eb462f0345 | ||
|
|
102b40543d | ||
|
|
12077c6dad | ||
|
|
7441c191a7 | ||
|
|
b355991b0b |
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.ai binary
|
||||
4
.gitignore
vendored
@@ -19,3 +19,7 @@ build
|
||||
signing.properties
|
||||
library/lib/
|
||||
library/obj/
|
||||
ffpr
|
||||
test/androidTestEspresso/res/values/arrays.xml
|
||||
obj/
|
||||
jni/libspeex/.deps/
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
language: android
|
||||
android:
|
||||
components:
|
||||
- platform-tools
|
||||
- build-tools-19.1.0
|
||||
- android-19
|
||||
- extra-android-m2repository
|
||||
@@ -1,9 +1,9 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,pt_PT:pt,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,de_DE:de,tr_TR:tr,fr_FR:fr,es_ES:es,hu_HU:hu,sv_SE:sv-rSE,bg_BG:bg,el_GR:el,kn_IN:kn-rIN,cs_CZ:cs
|
||||
lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,pt_PT:pt,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,de_DE:de,tr_TR:tr,fr_FR:fr,es_ES:es,hu_HU:hu,sv_SE:sv-rSE,bg_BG:bg,el_GR:el,kn_IN:kn-rIN,cs_CZ:cs,sr:sr,he:iw,id:in
|
||||
|
||||
|
||||
[textsecure-official.master]
|
||||
[signal-android.master]
|
||||
file_filter = res/values-<lang>/strings.xml
|
||||
source_file = res/values/strings.xml
|
||||
source_lang = en
|
||||
|
||||
@@ -2,14 +2,26 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="org.thoughtcrime.securesms"
|
||||
android:versionCode="78"
|
||||
android:versionName="2.1.6">
|
||||
android:versionCode="177"
|
||||
android:versionName="3.7.2">
|
||||
|
||||
<uses-sdk tools:overrideLibrary="com.amulyakhare.textdrawable,com.astuetz.pagerslidingtabstrip,pl.tajchert.waitingdots,com.h6ah4i.android.multiselectlistpreferencecompat"/>
|
||||
|
||||
<permission android:name="org.thoughtcrime.securesms.ACCESS_SECRETS"
|
||||
android:label="Access to TextSecure Secrets"
|
||||
android:protectionLevel="signature" />
|
||||
|
||||
<uses-permission android:name="org.thoughtcrime.securesms.ACCESS_SECRETS"/>
|
||||
<uses-feature android:name="android.hardware.camera" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.bluetooth" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.location" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.location.network" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.microphone" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.wifi" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.portrait" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
|
||||
<uses-permission android:name="org.thoughtcrime.securesms.ACCESS_SECRETS"/>
|
||||
<uses-permission android:name="android.permission.READ_PROFILE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_PROFILE"/>
|
||||
<uses-permission android:name="android.permission.BROADCAST_WAP_PUSH"
|
||||
@@ -31,53 +43,70 @@
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_CALL_LOG" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||
|
||||
<!-- For sending location tiles in the future -->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
|
||||
<!-- So we can add a TextSecure 'Account' -->
|
||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
|
||||
|
||||
<!-- For conversation 'shortcuts' on the desktop -->
|
||||
<uses-permission android:name="android.permission.INSTALL_SHORTCUT"/>
|
||||
|
||||
<!-- For sending/receiving events -->
|
||||
<uses-permission android:name="android.permission.WRITE_CALENDAR"/>
|
||||
<uses-permission android:name="android.permission.READ_CALENDAR"/>
|
||||
|
||||
<!-- For fixing MMS -->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
|
||||
|
||||
<!-- Set image as wallpaper -->
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
|
||||
|
||||
<!-- Permissions from RedPhone -->
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />
|
||||
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
|
||||
<uses-permission android:name="android.permission.RAISED_THREAD_PRIORITY" />
|
||||
<uses-permission android:name="android.permission.READ_CALL_STATE"/>
|
||||
<uses-permission android:name="android.permission.READ_LOGS"/>
|
||||
<uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
|
||||
|
||||
<permission android:name="org.thoughtcrime.securesms.permission.C2D_MESSAGE"
|
||||
android:protectionLevel="signature" />
|
||||
<uses-permission android:name="org.thoughtcrime.securesms.permission.C2D_MESSAGE" />
|
||||
|
||||
<application android:name="org.thoughtcrime.securesms.ApplicationListener"
|
||||
<application android:name=".ApplicationContext"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name"
|
||||
tools:replace="android:allowBackup"
|
||||
android:allowBackup="false"
|
||||
android:theme="@style/TextSecure.LightTheme">
|
||||
|
||||
<meta-data android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version" />
|
||||
<meta-data android:name="com.google.android.gms.version"
|
||||
android:value="@integer/google_play_services_version" />
|
||||
|
||||
<activity android:name=".RoutingActivity"
|
||||
android:theme="@style/NoAnimation.Theme.BlackScreen"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
|
||||
<meta-data android:name="org.thoughtcrime.securesms.mms.TextSecureGlideModule"
|
||||
android:value="GlideModule" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SENDTO"/>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:scheme="sms" />
|
||||
<data android:scheme="smsto" />
|
||||
<data android:scheme="mms" />
|
||||
<data android:scheme="mmsto" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="audio/*" />
|
||||
<data android:mimeType="image/*" />
|
||||
<data android:mimeType="text/plain" />
|
||||
<data android:mimeType="video/*" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<activity android:name=".RegistrationProblemsActivity"
|
||||
android:theme="@style/TextSecure.Light.Dialog"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
<activity android:name="org.thoughtcrime.redphone.RedPhone"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|fontScale"
|
||||
android:launchMode="singleTask">
|
||||
</activity>
|
||||
|
||||
<activity android:name=".CountrySelectionActivity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
@@ -85,12 +114,32 @@
|
||||
<activity android:name=".ImportExportActivity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".InviteActivity"
|
||||
android:theme="@style/TextSecure.HighlightTheme"
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:parentActivityName=".ConversationListActivity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="org.thoughtcrime.securesms.ConversationListActivity" />
|
||||
</activity>
|
||||
|
||||
<activity android:name=".PromptMmsActivity"
|
||||
android:label="Configure MMS Settings"
|
||||
android:windowSoftInputMode="stateUnchanged"
|
||||
android:windowSoftInputMode="stateUnchanged"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".MmsPreferencesActivity"
|
||||
<activity android:name=".DeviceProvisioningActivity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="tsdevice"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name=".preferences.MmsPreferencesActivity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ShareActivity"
|
||||
@@ -98,53 +147,103 @@
|
||||
android:launchMode="singleTask"
|
||||
android:noHistory="true"
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:mimeType="audio/*" />
|
||||
<data android:mimeType="image/*" />
|
||||
<data android:mimeType="text/plain" />
|
||||
<data android:mimeType="video/*" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<activity android:name=".ConversationListActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
|
||||
android:exported="true" />
|
||||
|
||||
<activity-alias android:name=".RoutingActivity"
|
||||
android:targetActivity=".ConversationListActivity"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
|
||||
|
||||
</activity-alias>
|
||||
|
||||
<activity android:name=".ConversationListArchiveActivity"
|
||||
android:label="@string/AndroidManifest_conversations_archive"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
|
||||
android:parentActivityName=".ConversationListActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="org.thoughtcrime.securesms.ConversationListActivity" />
|
||||
</activity>
|
||||
|
||||
<activity android:name=".ConversationActivity"
|
||||
android:windowSoftInputMode="stateUnchanged"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize" />
|
||||
|
||||
<activity android:name=".ConversationPopupActivity"
|
||||
android:windowSoftInputMode="stateVisible"
|
||||
android:launchMode="singleTask"
|
||||
android:taskAffinity=""
|
||||
android:excludeFromRecents="true"
|
||||
android:theme="@style/TextSecure.LightTheme.Popup"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize" />
|
||||
|
||||
<activity android:name=".MessageDetailsActivity"
|
||||
android:label="@string/AndroidManifest__message_details"
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".GroupCreateActivity"
|
||||
android:windowSoftInputMode="stateVisible"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
android:windowSoftInputMode="stateVisible"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".DatabaseMigrationActivity"
|
||||
android:theme="@style/NoAnimation.Theme.Sherlock.Light.DarkActionBar"
|
||||
android:theme="@style/NoAnimation.Theme.AppCompat.Light.DarkActionBar"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".DatabaseUpgradeActivity"
|
||||
android:theme="@style/NoAnimation.Theme.Sherlock.Light.DarkActionBar"
|
||||
android:theme="@style/NoAnimation.Theme.AppCompat.Light.DarkActionBar"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ExperienceUpgradeActivity"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".PassphraseCreateActivity"
|
||||
android:label="@string/AndroidManifest__create_passphrase"
|
||||
android:windowSoftInputMode="stateUnchanged"
|
||||
android:theme="@style/TextSecure.IntroTheme"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/TextSecure.LightIntroTheme"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".PassphrasePromptActivity"
|
||||
android:label="@string/AndroidManifest__enter_passphrase"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/TextSecure.IntroTheme"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@style/TextSecure.LightIntroTheme"
|
||||
android:windowSoftInputMode="stateAlwaysVisible"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ContactSelectionActivity"
|
||||
android:label="@string/AndroidManifest__select_contacts"
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".NewConversationActivity"
|
||||
android:label="@string/AndroidManifest__select_contacts"
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:theme="@style/TextSecure.LightNoActionBar"
|
||||
android:windowSoftInputMode="stateAlwaysVisible"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".PushContactSelectionActivity"
|
||||
@@ -152,11 +251,6 @@
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".AutoInitiateActivity"
|
||||
android:theme="@style/TextSecure.Light.Dialog"
|
||||
android:label="@string/AndroidManifest__textsecure_detected"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ViewIdentityActivity"
|
||||
android:label="@string/AndroidManifest__public_identity_key"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
@@ -172,11 +266,6 @@
|
||||
android:label="@string/AndroidManifest__verify_identity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ReceiveKeyActivity"
|
||||
android:label="@string/AndroidManifest__complete_key_exchange"
|
||||
android:theme="@style/TextSecure.Light.Dialog"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".ApplicationPreferencesActivity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
@@ -187,11 +276,25 @@
|
||||
<activity android:name=".RegistrationProgressActivity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".DeviceActivity"
|
||||
android:label="@string/AndroidManifest_manage_linked_devices"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".LogSubmitActivity"
|
||||
android:label="@string/AndroidManifest__log_submit"
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".MediaPreviewActivity"
|
||||
android:label="@string/AndroidManifest__media_preview"
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".MediaOverviewActivity"
|
||||
android:windowSoftInputMode="stateHidden"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".DummyActivity"
|
||||
android:theme="@android:style/Theme.NoDisplay"
|
||||
android:enabled="true"
|
||||
@@ -203,13 +306,57 @@
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:finishOnTaskLaunch="true" />
|
||||
|
||||
<service android:enabled="true" android:name=".service.GcmRegistrationService"/>
|
||||
<activity android:name=".PlayServicesProblemActivity"
|
||||
android:theme="@style/TextSecure.DialogActivity"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".SmsSendtoActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SENDTO" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="sms" />
|
||||
<data android:scheme="smsto" />
|
||||
<data android:scheme="mms" />
|
||||
<data android:scheme="mmsto" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="vnd.android.cursor.item/vnd.org.thoughtcrime.securesms.contact" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name="org.thoughtcrime.redphone.RedPhoneShare"
|
||||
android:theme="@style/NoAnimation.Theme.BlackScreen"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="vnd.android.cursor.item/vnd.org.thoughtcrime.securesms.call" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<activity android:name=".RecipientPreferenceActivity"
|
||||
android:theme="@style/TextSecure.LightNoActionBar"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name=".BlockedContactsActivity"
|
||||
android:theme="@style/TextSecure.LightTheme"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
|
||||
<activity android:name="com.soundcloud.android.crop.CropImageActivity" />
|
||||
|
||||
<service android:enabled="true" android:name="org.thoughtcrime.redphone.RedPhoneService"/>
|
||||
|
||||
<service android:enabled="true" android:name=".service.ApplicationMigrationService"/>
|
||||
<service android:enabled="true" android:name=".service.KeyCachingService"/>
|
||||
<service android:enabled="true" android:name=".service.SendReceiveService"/>
|
||||
<service android:enabled="true" android:name=".service.RegistrationService"/>
|
||||
<service android:enabled="true" android:name=".service.DirectoryRefreshService"/>
|
||||
<service android:enabled="true" android:name=".service.PreKeyService"/>
|
||||
<service android:enabled="true" android:name=".service.MessageRetrievalService"/>
|
||||
|
||||
<service android:name=".service.QuickResponseService"
|
||||
android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"
|
||||
@@ -224,14 +371,20 @@
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service android:name=".service.AccountAuthenticatorService" android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.accounts.AccountAuthenticator" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.accounts.AccountAuthenticator" android:resource="@xml/authenticator" />
|
||||
</service>
|
||||
|
||||
<!-- <receiver android:name=".service.BootListener" -->
|
||||
<!-- android:enabled="true" -->
|
||||
<!-- android:exported="false">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.intent.action.BOOT_COMPLETED" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </receiver>-->
|
||||
<service android:name=".service.ContactsSyncAdapterService" android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.content.SyncAdapter"/>
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.content.SyncAdapter" android:resource="@xml/syncadapter" />
|
||||
<meta-data android:name="android.provider.CONTACTS_STRUCTURE" android:resource="@xml/contactsformat" />
|
||||
</service>
|
||||
|
||||
<receiver android:name=".gcm.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" >
|
||||
<intent-filter>
|
||||
@@ -281,10 +434,22 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".notifications.WearReplyReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="org.thoughtcrime.securesms.notifications.WEAR_REPLY"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<provider android:name=".providers.PartProvider"
|
||||
android:grantUriPermissions="true"
|
||||
android:authorities="org.thoughtcrime.provider.securesms" />
|
||||
|
||||
<provider android:name=".providers.MmsBodyProvider"
|
||||
android:grantUriPermissions="true"
|
||||
android:authorities="org.thoughtcrime.provider.securesms.mms" />
|
||||
|
||||
<receiver android:name=".service.RegistrationNotifier"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
@@ -299,6 +464,24 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<uses-library android:name="android.test.runner" />
|
||||
<receiver android:name=".notifications.MessageNotifier$ReminderReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="org.thoughtcrime.securesms.MessageNotifier.REMINDER_ACTION"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".notifications.MessageNotifier$DeleteReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="org.thoughtcrime.securesms.MessageNotifier.DELETE_REMINDER_ACTION"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".ExperienceUpgradeActivity$AppUpgradeReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PACKAGE_REPLACED"/>
|
||||
<data android:scheme="package" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
65
BUILDING.md
@@ -1,44 +1,47 @@
|
||||
Building TextSecure
|
||||
=====================
|
||||
Building Signal
|
||||
===============
|
||||
|
||||
Basics
|
||||
------
|
||||
|
||||
TextSecure uses [Gradle](http://gradle.org) to build the project and to maintain
|
||||
dependencies.
|
||||
Signal uses [Gradle](http://gradle.org) to build the project and to maintain
|
||||
dependencies. However, you needn't install it yourself; the
|
||||
"gradle wrapper" `gradlew`, mentioned below, will do that for you.
|
||||
|
||||
Building TextSecure
|
||||
-------------------
|
||||
Building Signal
|
||||
---------------
|
||||
|
||||
The following steps should help you (re)build TextSecure from the command line.
|
||||
The following steps should help you (re)build Signal from the command line.
|
||||
|
||||
1. Checkout the source somewhere on your filesystem with
|
||||
1. Checkout the Signal-Android project source with the command:
|
||||
|
||||
git clone https://github.com/WhisperSystems/TextSecure.git
|
||||
git clone https://github.com/WhisperSystems/Signal-Android.git
|
||||
|
||||
2. Make sure you have the [Android SDK](https://developer.android.com/sdk/index.html) installed somewhere on your system.
|
||||
3. Ensure the "Android Support Repository" and "Android SDK Build-tools" are installed from the Android SDK manager.
|
||||
4. Create a local.properties file at the root of your source checkout and add an sdk.dir entry to it.
|
||||
2. Make sure you have the [Android SDK](https://developer.android.com/sdk/index.html) installed.
|
||||
3. Ensure that the following packages are installed from the Android SDK manager:
|
||||
* Android SDK Build Tools
|
||||
* SDK Platform (API level 22)
|
||||
* Android Support Repository
|
||||
* Google Repository
|
||||
4. Create a local.properties file at the root of your source checkout and add an sdk.dir entry to it. For example:
|
||||
|
||||
sdk.dir=\<path to your sdk installation\>
|
||||
sdk.dir=/Application/android-sdk-macosx
|
||||
|
||||
5. Execute Gradle:
|
||||
|
||||
./gradlew build
|
||||
|
||||
Re-building native components
|
||||
-----------------------------
|
||||
Visual assets
|
||||
----------------------
|
||||
|
||||
Note: This step is optional; native components are contained as binaries (see [library/libs](library/libs)).
|
||||
Source assets tend to be large binary blobs, which are best stored outside of git repositories. We host ours in a [Pixelapse repository](https://www.pixelapse.com/openwhispersystems/projects/signal-android/). Some source files are SVGs that can be auto-colored and sized using a tool like [android-res-utils](https://github.com/sebkur/android-res-utils).
|
||||
|
||||
1. Ensure that the Android NDK is installed.
|
||||
Sample command for generating our audio placeholder image:
|
||||
|
||||
Execute ndk-build:
|
||||
|
||||
cd library
|
||||
ndk-build
|
||||
|
||||
Afterwards, execute Gradle as above to re-create the APK.
|
||||
```bash
|
||||
pngs_from_svg.py ic_audio.svg /path/to/Signal/res/ 150 --color #000 --opacity 0.54 --suffix _light
|
||||
pngs_from_svg.py ic_audio.svg /path/to/Signal/res/ 150 --color #fff --opacity 1.00 --suffix _light
|
||||
```
|
||||
|
||||
Setting up a development environment
|
||||
------------------------------------
|
||||
@@ -46,13 +49,14 @@ Setting up a development environment
|
||||
[Android Studio](https://developer.android.com/sdk/installing/studio.html) is the recommended development environment.
|
||||
|
||||
1. Install Android Studio.
|
||||
2. Make sure the "Android Support Repository" is installed in the Android Studio SDK.
|
||||
3. Make sure the latest "Android SDK build-tools" is installed in the Android Studio SDK.
|
||||
4. Create a new Android Studio project. from the Quickstart pannel (use File > Close Project to see it), choose "Checkout from Version Control" then "git".
|
||||
5. Paste the URL for the TextSecure project when prompted (https://github.com/WhisperSystems/TextSecure.git).
|
||||
6. Android studio should detect the presence of a project file and ask you whether to open it. Click "yes".
|
||||
7. Default config options should be good enough.
|
||||
8. Project initialisation and build should proceed.
|
||||
2. Open Android Studio. On a new installation, the Quickstart panel will appear. If you have open projects, close them using "File > Close Project" to see the Quickstart panel.
|
||||
3. From the Quickstart panel, choose "Configure" then "SDK Manager".
|
||||
4. In the SDK Tools tab of the SDK Manager, make sure that the "Android Support Repository" is installed, and that the latest "Android SDK build-tools" are installed. Click "OK" to return to the Quickstart panel.
|
||||
5. From the Quickstart panel, choose "Checkout from Version Control" then "git".
|
||||
6. Paste the URL for the Signal-Android project when prompted (https://github.com/WhisperSystems/Signal-Android.git).
|
||||
7. Android studio should detect the presence of a project file and ask you whether to open it. Click "yes".
|
||||
9. Default config options should be good enough.
|
||||
9. Project initialisation and build should proceed.
|
||||
|
||||
Contributing code
|
||||
-----------------
|
||||
@@ -65,3 +69,4 @@ Mailing list
|
||||
Development discussion happens on the whispersystems mailing list.
|
||||
[To join](https://lists.riseup.net/www/info/whispersystems)
|
||||
Send emails to whispersystems@lists.riseup.net
|
||||
|
||||
|
||||
33
CONTRIBUTING.md
Normal file
@@ -0,0 +1,33 @@
|
||||
##Translations
|
||||
|
||||
Please do not submit issues or pull requests for translation fixes. Anyone can update the translations in [Transifex](https://www.transifex.com/projects/p/signal-android/). Please submit your corrections there.
|
||||
|
||||
## Submitting useful bug reports
|
||||
1. Search our issues first to make sure this is not a duplicate.
|
||||
1. Read the [Submitting useful bug reports guide](https://github.com/WhisperSystems/TextSecure/wiki/Submitting-useful-bug-reports) before posting a bug.
|
||||
|
||||
## Development Ideology
|
||||
|
||||
Truths which we believe to be self-evident:
|
||||
|
||||
1. **The answer is not more options.** If you feel compelled to add a
|
||||
preference that's exposed to the user, it's very possible you've made
|
||||
a wrong turn somewhere.
|
||||
1. **The user doesn't know what a key is.** We need to minimize the points
|
||||
at which a user is exposed to this sort of terminology as extremely as
|
||||
possible.
|
||||
1. **There are no power users.** The idea that some users "understand"
|
||||
concepts better than others has proven to be, for the most part, false.
|
||||
If anything, "power users" are more dangerous than the rest, and we
|
||||
should avoid exposing dangerous functionality to them.
|
||||
1. **If it's "like PGP," it's wrong.** PGP is our guide for what
|
||||
not to do.
|
||||
1. **It's an asynchronous world.** Be wary of anything that is
|
||||
anti-asynchronous: ACKs, protocol confirmations, or any protocol-level
|
||||
"advisory" message.
|
||||
1. **There is no such thing as time.** Protocol ideas that require synchronized
|
||||
clocks are doomed to failure.
|
||||
|
||||
Before you submit a pull request, please check if your code follows the [Code style Guidelines](https://github.com/WhisperSystems/Signal-Android/wiki/Code-Style-Guidelines).
|
||||
|
||||
[](https://gitter.im/WhisperSystems/Signal-Android?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
31
README.md
@@ -1,9 +1,8 @@
|
||||
# TextSecure [](https://travis-ci.org/WhisperSystems/TextSecure)
|
||||
# Signal Android
|
||||
|
||||
TextSecure is a messaging app for easy private communicate with friends.
|
||||
Signal is a messaging app for simple private communication with friends.
|
||||
|
||||
TextSecure can use either data (WiFi/3G/4G) or SMS to communicate securely, and all TextSecure
|
||||
messages can also be encrypted locally on your device.
|
||||
Signal uses your phone's data connection (WiFi/3G/4G) to communicate securely, optionally supports plain SMS/MMS to function as a unified messenger, and can also encrypt the stored messages on your phone.
|
||||
|
||||
Currently available on the Play store.
|
||||
|
||||
@@ -12,21 +11,29 @@ Currently available on the Play store.
|
||||
## Contributing Bug reports
|
||||
We use GitHub for bug tracking. Please search the existing issues for your bug and create a new one if the issue is not yet tracked!
|
||||
|
||||
https://github.com/WhisperSystems/TextSecure/issues
|
||||
https://github.com/WhisperSystems/Signal-Android/issues
|
||||
|
||||
## Joining the Beta
|
||||
Want to live life on the bleeding edge and help out with testing?
|
||||
|
||||
You can subscribe to Signal Android Beta releases here:
|
||||
https://play.google.com/apps/testing/org.thoughtcrime.securesms
|
||||
|
||||
If you're interested in a life of peace and tranquility, stick with the standard releases.
|
||||
|
||||
## Contributing Translations
|
||||
Interested in helping to translate TextSecure? Contribute here:
|
||||
Interested in helping to translate Signal? Contribute here:
|
||||
|
||||
https://www.transifex.com/projects/p/textsecure-official/
|
||||
https://www.transifex.com/projects/p/signal-android/
|
||||
|
||||
## Contributing Code
|
||||
Instructions on how to setup your development environment and build TextSecure can be found in [BUILDING.md](https://github.com/WhisperSystems/TextSecure/blob/master/BUILDING.md).
|
||||
Instructions on how to setup your development environment and build Signal can be found in [BUILDING.md](https://github.com/WhisperSystems/Signal-Android/blob/master/BUILDING.md).
|
||||
|
||||
If you're new to the TextSecure codebase, we recommend going through our issues and picking out a simple bug to fix (check the "easy" label in our issues) in order to get yourself familiar.
|
||||
If you're new to the Signal codebase, we recommend going through our issues and picking out a simple bug to fix (check the "easy" label in our issues) in order to get yourself familiar.
|
||||
|
||||
For larger changes and feature ideas, we ask that you propose it on the mailing list for a high-level discussion before implementation.
|
||||
|
||||
This repository is set up with [BitHub](https://whispersystems.org/blog/bithub/), so you can make money for committing to TextSecure. The current BitHub price for an accepted pull request is:
|
||||
This repository is set up with [BitHub](https://whispersystems.org/blog/bithub/), so you can make money for committing to Signal. The current BitHub price for an accepted pull request is:
|
||||
|
||||
[](https://whispersystems.org/blog/bithub/)
|
||||
|
||||
@@ -38,7 +45,7 @@ whispersystems@lists.riseup.net
|
||||
https://lists.riseup.net/www/info/whispersystems
|
||||
|
||||
## Contributing Funds
|
||||
[](https://whispersystems.org/blog/bithub/)
|
||||
[](https://www.coinbase.com/checkouts/51dac699e660a4d773216b5ad94d6a0b)
|
||||
|
||||
You can add funds to BitHub to directly help further development efforts.
|
||||
|
||||
@@ -52,7 +59,7 @@ http://support.whispersystems.org/
|
||||
## Documentation
|
||||
Looking for documentation? Check out the wiki!
|
||||
|
||||
https://github.com/WhisperSystems/TextSecure/wiki
|
||||
https://github.com/WhisperSystems/Signal-Android/wiki
|
||||
|
||||
# Legal things
|
||||
## Cryptography Notice
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package org.thoughtcrime.securesms.service;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.test.InstrumentationTestCase;
|
||||
|
||||
import static org.fest.assertions.api.Assertions.*;
|
||||
|
||||
public class MmsReceiverTest extends InstrumentationTestCase {
|
||||
|
||||
private MmsReceiver mmsReceiver;
|
||||
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
mmsReceiver = new MmsReceiver(getInstrumentation().getContext());
|
||||
}
|
||||
|
||||
public void tearDown() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
public void testProcessMalformedData() throws Exception {
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(SendReceiveService.RECEIVE_MMS_ACTION);
|
||||
intent.putExtra("data", new byte[]{0x00});
|
||||
mmsReceiver.process(null, intent);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
import org.whispersystems.textsecure.util.InvalidNumberException;
|
||||
import org.whispersystems.textsecure.util.PhoneNumberFormatter;
|
||||
import static org.fest.assertions.api.Assertions.assertThat;
|
||||
|
||||
public class PhoneNumberFormatterTest extends AndroidTestCase {
|
||||
private static final String LOCAL_NUMBER = "+15555555555";
|
||||
|
||||
public void testFormatNumberE164() throws Exception, InvalidNumberException {
|
||||
assertThat(PhoneNumberFormatter.formatNumber("(555) 555-5555", LOCAL_NUMBER)).isEqualTo(LOCAL_NUMBER);
|
||||
assertThat(PhoneNumberFormatter.formatNumber("555-5555", LOCAL_NUMBER)).isEqualTo(LOCAL_NUMBER);
|
||||
assertThat(PhoneNumberFormatter.formatNumber("(123) 555-5555", LOCAL_NUMBER)).isNotEqualTo(LOCAL_NUMBER);
|
||||
}
|
||||
|
||||
public void testFormatNumberEmail() throws Exception {
|
||||
try {
|
||||
PhoneNumberFormatter.formatNumber("person@domain.com", LOCAL_NUMBER);
|
||||
throw new AssertionFailedError("should have thrown on email");
|
||||
} catch (InvalidNumberException ine) {
|
||||
// success
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import static org.fest.assertions.api.Assertions.assertThat;
|
||||
|
||||
public class UtilTest extends AndroidTestCase {
|
||||
|
||||
}
|
||||
1884
apntool/apnlists/cyanogenmod.xml
Normal file
2217
apntool/apnlists/hangouts.xml
Normal file
2218
apntool/apns.xml
@@ -1,19 +1,31 @@
|
||||
import sys
|
||||
import re
|
||||
import argparse
|
||||
import sqlite3
|
||||
import gzip
|
||||
from progressbar import ProgressBar, Counter, Timer
|
||||
from lxml import etree
|
||||
|
||||
parser = argparse.ArgumentParser(prog='apntool', description="""Process Android's apn xml files and drop them into an easily
|
||||
queryable SQLite db. Tested up to version 9 of their APN file.""")
|
||||
parser.add_argument('-v', '--version', action='version', version='%(prog)s v1.0')
|
||||
parser = argparse.ArgumentParser(prog='apntool', description="""Process Android's apn xml files and drop them into an
|
||||
easily queryable SQLite db. Tested up to version 9 of
|
||||
their APN file.""")
|
||||
parser.add_argument('-v', '--version', action='version', version='%(prog)s v1.1')
|
||||
parser.add_argument('-i', '--input', help='the xml file to parse', default='apns.xml', required=False)
|
||||
parser.add_argument('-o', '--output', help='the sqlite db output file', default='apns.db', required=False)
|
||||
parser.add_argument('--quiet', help='do not show progress or verbose instructions', action='store_true', required=False)
|
||||
parser.add_argument('--no-gzip', help="do not gzip after creation", action='store_true', required=False)
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
def normalized(target):
|
||||
o2_typo = re.compile(r"02\.co\.uk")
|
||||
port_typo = re.compile(r"(\d+\.\d+\.\d+\.\d+)\.(\d+)")
|
||||
leading_zeros = re.compile(r"(/|\.|^)0+(\d+)")
|
||||
subbed = o2_typo.sub(r'o2.co.uk', target)
|
||||
subbed = port_typo.sub(r'\1:\2', subbed)
|
||||
subbed = leading_zeros.sub(r'\1\2', subbed)
|
||||
return subbed
|
||||
|
||||
try:
|
||||
connection = sqlite3.connect(args.output)
|
||||
cursor = connection.cursor()
|
||||
@@ -28,23 +40,41 @@ try:
|
||||
cursor.execute("PRAGMA page_size=32768")
|
||||
cursor.execute("VACUUM")
|
||||
cursor.execute("DROP TABLE IF EXISTS apns")
|
||||
cursor.execute("""CREATE TABLE apns(_id INTEGER PRIMARY KEY, mccmnc TEXT, mcc TEXT, mnc TEXT, carrier TEXT, apn TEXT,
|
||||
mmsc TEXT, port INTEGER, type TEXT, protocol TEXT, bearer TEXT, roaming_protocol TEXT,
|
||||
cursor.execute("""CREATE TABLE apns(_id INTEGER PRIMARY KEY, mccmnc TEXT, mcc TEXT, mnc TEXT, carrier TEXT,
|
||||
apn TEXT, mmsc TEXT, port INTEGER, type TEXT, protocol TEXT, bearer TEXT, roaming_protocol TEXT,
|
||||
carrier_enabled INTEGER, mmsproxy TEXT, mmsport INTEGER, proxy TEXT, mvno_match_data TEXT,
|
||||
mvno_type TEXT, authtype INTEGER, user TEXT, password TEXT, server TEXT)""")
|
||||
|
||||
apns = etree.parse(args.input)
|
||||
root = apns.getroot()
|
||||
pbar = ProgressBar(widgets=['Processed: ', Counter(), ' apns (', Timer(), ')'], maxval=len(list(root))).start() if not args.quiet else None
|
||||
pbar = None
|
||||
if not args.quiet:
|
||||
pbar = ProgressBar(widgets=['Processed: ', Counter(), ' apns (', Timer(), ')'], maxval=len(list(root))).start()
|
||||
|
||||
count = 0
|
||||
for apn in root.iter("apn"):
|
||||
if apn.get("mmsc") is None:
|
||||
continue
|
||||
sqlvars = ["?" for x in apn.attrib.keys()] + ["?"]
|
||||
values = [apn.get(attrib) for attrib in apn.attrib.keys()] + ["%s%s" % (apn.get("mcc"), apn.get("mnc"))]
|
||||
mccmnc = "%s%s" % (apn.get("mcc"), apn.get("mnc"))
|
||||
normalized_mmsc = normalized(apn.get("mmsc"))
|
||||
if normalized_mmsc != apn.get("mmsc"):
|
||||
print("normalize MMSC: %s => %s" % (apn.get("mmsc"), normalized_mmsc))
|
||||
apn.set("mmsc", normalized_mmsc)
|
||||
|
||||
if not apn.get("mmsproxy") is None:
|
||||
normalized_mmsproxy = normalized(apn.get("mmsproxy"))
|
||||
if normalized_mmsproxy != apn.get("mmsproxy"):
|
||||
print("normalize proxy: %s => %s" % (apn.get("mmsproxy"), normalized_mmsproxy))
|
||||
apn.set("mmsproxy", normalized_mmsproxy)
|
||||
|
||||
values = [apn.get(attrib) for attrib in apn.attrib.keys()] + [mccmnc]
|
||||
keys = apn.attrib.keys() + ["mccmnc"]
|
||||
|
||||
statement = "INSERT INTO apns (%s) VALUES (%s)" % (", ".join(keys), ", ".join(sqlvars))
|
||||
cursor.execute(statement, values)
|
||||
cursor.execute("SELECT 1 FROM apns WHERE mccmnc = ? AND apn = ?", [mccmnc, apn.get("apn")])
|
||||
if cursor.fetchone() is None:
|
||||
statement = "INSERT INTO apns (%s) VALUES (%s)" % (", ".join(keys), ", ".join(sqlvars))
|
||||
cursor.execute(statement, values)
|
||||
|
||||
count += 1
|
||||
if not args.quiet:
|
||||
|
||||
31036
artwork/icon.ai
|
Before Width: | Height: | Size: 496 KiB |
|
Before Width: | Height: | Size: 93 KiB |
BIN
artwork/logo-512.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
assets/emoji-nature.png
Normal file
|
After Width: | Height: | Size: 922 KiB |
BIN
assets/emoji-objects.png
Normal file
|
After Width: | Height: | Size: 681 KiB |
BIN
assets/emoji-people.png
Normal file
|
After Width: | Height: | Size: 612 KiB |
BIN
assets/emoji-places.png
Normal file
|
After Width: | Height: | Size: 511 KiB |
BIN
assets/emoji-symbol.png
Normal file
|
After Width: | Height: | Size: 546 KiB |
|
Before Width: | Height: | Size: 445 KiB |
|
Before Width: | Height: | Size: 547 KiB |
|
Before Width: | Height: | Size: 660 KiB |
|
Before Width: | Height: | Size: 369 KiB |
|
Before Width: | Height: | Size: 363 KiB |
BIN
assets/fonts/Roboto-Light.ttf
Normal file
238
build.gradle
@@ -1,9 +1,11 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://repo1.maven.org/maven2"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.12.+'
|
||||
classpath 'com.android.tools.build:gradle:1.2.3'
|
||||
classpath files('libs/gradle-witness.jar')
|
||||
}
|
||||
}
|
||||
@@ -12,77 +14,222 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'witness'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://raw.github.com/whispersystems/maven/master/gcm-client/releases/"
|
||||
url "https://repo1.maven.org/maven2/"
|
||||
}
|
||||
maven {
|
||||
url "https://raw.github.com/whispersystems/maven/master/gson/releases/"
|
||||
url "https://raw.github.com/whispersystems/maven/master/preferencefragment/releases/"
|
||||
}
|
||||
maven {
|
||||
url "https://raw.github.com/whispersystems/maven/master/smil/releases/"
|
||||
}
|
||||
maven {
|
||||
url "https://raw.github.com/whispersystems/maven/master/shortcutbadger/releases/"
|
||||
}
|
||||
maven { // textdrawable
|
||||
url 'https://dl.bintray.com/amulyakhare/maven'
|
||||
}
|
||||
jcenter()
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
|
||||
compile 'com.android.support:support-v4:20.0.0'
|
||||
compile 'se.emilsjolander:stickylistheaders:2.2.0'
|
||||
compile 'com.google.android.gms:play-services:5.0.89'
|
||||
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
|
||||
compile 'me.leolin:ShortcutBadger:1.1.0-WS1'
|
||||
compile 'se.emilsjolander:stickylistheaders:2.7.0'
|
||||
compile 'com.google.android.gms:play-services-base:6.5.87'
|
||||
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
|
||||
compile 'org.w3c:smil:1.0.0'
|
||||
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
|
||||
compile 'com.github.chrisbanes.photoview:library:1.2.3'
|
||||
compile 'com.github.bumptech.glide:glide:3.6.1'
|
||||
compile 'com.makeramen:roundedimageview:2.1.0'
|
||||
compile 'com.pnikosis:materialish-progress:1.5'
|
||||
compile 'de.greenrobot:eventbus:2.4.0'
|
||||
compile 'pl.tajchert:waitingdots:0.1.0'
|
||||
compile 'com.soundcloud.android:android-crop:0.9.10@aar'
|
||||
compile 'com.android.support:appcompat-v7:22.2.1'
|
||||
compile 'com.android.support:recyclerview-v7:22.2.1'
|
||||
compile 'com.android.support:design:22.2.1'
|
||||
compile 'com.android.support:cardview-v7:22.2.1'
|
||||
compile 'com.melnykov:floatingactionbutton:1.3.0'
|
||||
compile 'com.google.zxing:android-integration:3.1.0'
|
||||
compile ('com.android.support:support-v4-preferencefragment:1.0.0@aar'){
|
||||
exclude module: 'support-v4'
|
||||
}
|
||||
compile ('com.android.support:gridlayout-v7:22.2.0') {
|
||||
exclude module: 'support-v4'
|
||||
}
|
||||
|
||||
androidTestCompile 'com.squareup:fest-android:1.0.8'
|
||||
compile 'com.squareup.dagger:dagger:1.2.2'
|
||||
compile ("com.doomonafireball.betterpickers:library:1.5.3") {
|
||||
exclude group: 'com.android.support', module: 'support-v4'
|
||||
}
|
||||
compile 'com.madgag.spongycastle:prov:1.51.0.0'
|
||||
provided 'com.squareup.dagger:dagger-compiler:1.2.2'
|
||||
|
||||
compile project(':library')
|
||||
compile 'org.whispersystems:jobmanager:1.0.2'
|
||||
compile 'org.whispersystems:libpastelog:1.0.6'
|
||||
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
||||
compile 'org.whispersystems:textsecure-android:1.8.3'
|
||||
compile 'com.h6ah4i.android.compat:mulsellistprefcompat:1.0.0'
|
||||
compile 'com.google.zxing:core:3.2.1'
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile 'org.assertj:assertj-core:1.7.1'
|
||||
testCompile 'org.mockito:mockito-core:1.9.5'
|
||||
testCompile 'org.powermock:powermock-api-mockito:1.6.1'
|
||||
testCompile 'org.powermock:powermock-module-junit4:1.6.1'
|
||||
testCompile 'org.powermock:powermock-module-junit4-rule:1.6.1'
|
||||
testCompile 'org.powermock:powermock-classloading-xstream:1.6.1'
|
||||
|
||||
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
|
||||
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
|
||||
androidTestCompile ('org.assertj:assertj-core:1.7.1') {
|
||||
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
||||
}
|
||||
androidTestCompile ('com.squareup.assertj:assertj-android:1.0.0') {
|
||||
exclude group: 'org.hamcrest', module: 'hamcrest-core'
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
}
|
||||
}
|
||||
|
||||
dependencyVerification {
|
||||
verify = [
|
||||
'com.actionbarsherlock:actionbarsherlock:5ab04d74101f70024b222e3ff9c87bee151ec43331b4a2134b6cc08cf8565819',
|
||||
'com.android.support:support-v4:81f2b1c2c94efd5a4ec7fcd97b6cdcd00e87a933905c5c86103c7319eb024572',
|
||||
'se.emilsjolander:stickylistheaders:89146b46c96fea0e40200474a2625cda10fe94891e4128f53cdb42375091b9b6',
|
||||
'com.google.android.gms:play-services:38f326e525830f1d70f60f594ceafcbdf5b312287ddbecd338fd1ed7958a4b1e',
|
||||
'com.astuetz:pagerslidingtabstrip:f1641396732c7132a7abb837e482e5ee2b0ebb8d10813fc52bbaec2c15c184c2',
|
||||
'com.google.protobuf:protobuf-java:ad9769a22989e688a46af4d3accc348cc501ced22118033230542bc916e33f0b',
|
||||
'com.madgag:sc-light-jdk15on:931f39d351429fb96c2f749e7ecb1a256a8ebbf5edca7995c9cc085b94d1841d',
|
||||
'com.googlecode.libphonenumber:libphonenumber:eba17eae81dd622ea89a00a3a8c025b2f25d342e0d9644c5b62e16f15687c3ab',
|
||||
'org.whispersystems:gson:08f4f7498455d1539c9233e5aac18e9b1805815ef29221572996508eb512fe51',
|
||||
'me.leolin:ShortcutBadger:3142d017234bfa0cdd69ccded7cc5ea63f13b97574803c8c616c9bbeaad33ad9',
|
||||
'se.emilsjolander:stickylistheaders:a08ca948aa6b220f09d82f16bbbac395f6b78897e9eeac6a9f0b0ba755928eeb',
|
||||
'com.google.android.gms:play-services-base:832cb6b3130e871db6a412c4ab585656dbcc5e7948101f190186757785703f75',
|
||||
'com.jpardogo.materialtabstrip:library:c6ef812fba4f74be7dc4a905faa4c2908cba261a94c13d4f96d5e67e4aad4aaa',
|
||||
'org.w3c:smil:085dc40f2bb249651578bfa07499fd08b16ad0886dbe2c4078586a408da62f9b',
|
||||
'org.apache.httpcomponents:httpclient-android:6f56466a9bd0d42934b90bfbfe9977a8b654c058bf44a12bdc2877c4e1f033f1',
|
||||
'com.github.chrisbanes.photoview:library:8b5344e206f125e7ba9d684008f36c4992d03853c57e5814125f88496126e3cc',
|
||||
'com.github.bumptech.glide:glide:4718ac4c57ebabe56e673dc3265950b9dbf940d1c43c0adc363e8b95c0abdf75',
|
||||
'com.makeramen:roundedimageview:1f5a1865796b308c6cdd114acc6e78408b110f0a62fc63553278fbeacd489cd1',
|
||||
'com.pnikosis:materialish-progress:d71d80e00717a096784482aee21001a9d299fec3833e4ebd87739ed36cf77c54',
|
||||
'de.greenrobot:eventbus:61d743a748156a372024d083de763b9e91ac2dcb3f6a1cbc74995c7ddab6e968',
|
||||
'pl.tajchert:waitingdots:2835d49e0787dbcb606c5a60021ced66578503b1e9fddcd7a5ef0cd5f095ba2c',
|
||||
'com.soundcloud.android:android-crop:ffd4b973cf6e97f7d64118a0dc088df50e9066fd5634fe6911dd0c0c5d346177',
|
||||
'com.android.support:appcompat-v7:4b5ccba8c4557ef04f99aa0a80f8aa7d50f05f926a709010a54afd5c878d3618',
|
||||
'com.android.support:recyclerview-v7:b0f530a5b14334d56ce0de85527ffe93ac419bc928e2884287ce1dddfedfb505',
|
||||
'com.android.support:design:58be3ca6a73789615f7ece0937d2f683b98b594bb90aa10565fa760fb10b07ee',
|
||||
'com.android.support:cardview-v7:2c2354761a4e20ba451ae903ab808f15c9acc8343b1e74001869c2d0a672c1fc',
|
||||
'com.melnykov:floatingactionbutton:15d58d4fac0f7a288d0e5301bbaf501a146f5b3f5921277811bf99bd3b397263',
|
||||
'com.google.zxing:android-integration:89e56aadf1164bd71e57949163c53abf90af368b51669c0d4a47a163335f95c4',
|
||||
'com.android.support:support-v4-preferencefragment:5470f5872514a6226fa1fc6f4e000991f38805691c534cf0bd2778911fc773ad',
|
||||
'com.android.support:gridlayout-v7:a9b770cffca2c7c5cd83cba4dd12503365de5e8d9c79c479165adf18ab3bc25b',
|
||||
'com.squareup.dagger:dagger:789aca24537022e49f91fc6444078d9de8f1dd99e1bfb090f18491b186967883',
|
||||
'com.doomonafireball.betterpickers:library:132ecd685c95a99e7377c4e27bfadbb2d7ed0bea995944060cd62d4369fdaf3d',
|
||||
'com.madgag.spongycastle:prov:b8c3fec3a59aac1aa04ccf4dad7179351e54ef7672f53f508151b614c131398a',
|
||||
'org.whispersystems:jobmanager:506f679fc2fcf7bb6d10f00f41d6f6ea0abf75c70dc95b913398661ad538a181',
|
||||
'org.whispersystems:libpastelog:550d33c565380d90f4c671e7b8ed5f3a6da55a9fda468373177106b2eb5220b2',
|
||||
'com.amulyakhare:com.amulyakhare.textdrawable:54c92b5fba38cfd316a07e5a30528068f45ce8515a6890f1297df4c401af5dcb',
|
||||
'org.whispersystems:textsecure-android:aec5fc59952d9f5482491091091687816f46be1144342a0244f48fd55d6ab393',
|
||||
'com.h6ah4i.android.compat:mulsellistprefcompat:47167c5cb796de1a854788e9ff318358e36c8fb88123baaa6e38fb78511dfabe',
|
||||
'com.google.zxing:core:b4d82452e7a6bf6ec2698904b332431717ed8f9a850224f295aec89de80f2259',
|
||||
'com.android.support:support-annotations:104f353b53d5dd8d64b2f77eece4b37f6b961de9732eb6b706395e91033ec70a',
|
||||
'com.nineoldandroids:library:68025a14e3e7673d6ad2f95e4b46d78d7d068343aa99256b686fe59de1b3163a',
|
||||
'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
|
||||
'com.madgag.spongycastle:core:8d6240b974b0aca4d3da9c7dd44d42339d8a374358aca5fc98e50a995764511f',
|
||||
'org.whispersystems:textsecure-java:b407ca6d1430204dfabf38e27db22d5177409072a9668238bd1877de7676ad3f',
|
||||
'org.whispersystems:axolotl-android:40d3db5004a84749a73f68d2f0d01b2ae35a73c54df96d8c6c6723b96efb6fc0',
|
||||
'com.googlecode.libphonenumber:libphonenumber:9625de9d2270e9a280ff4e6d9ef3106573fb4828773fd32c9b7614f4e17d2811',
|
||||
'com.google.protobuf:protobuf-java:e0c1c64575c005601725e7c6a02cebf9e1285e888f756b2a1d73ffa8d725cc74',
|
||||
'com.squareup.okhttp:okhttp:89b7f63e2e5b6c410266abc14f50fe52ea8d2d8a57260829e499b1cd9f0e61af',
|
||||
'com.fasterxml.jackson.core:jackson-databind:835097bcdd11f5bc8a08378c70d4c8054dfa4b911691cc2752063c75534d198d',
|
||||
'org.whispersystems:axolotl-java:6daee739b89d8d7101de6d98f77132fee48495c6ea647d880e77def842f999ea',
|
||||
'org.whispersystems:curve25519-android:3c29a4131a69b0d16baaa3d707678deb39602c3a3ffd75805ce7f9db252e5d0d',
|
||||
'com.squareup.okio:okio:5e1098bd3fdee4c3347f5ab815b40ba851e4ab1b348c5e49a5b0362f0ce6e978',
|
||||
'com.fasterxml.jackson.core:jackson-annotations:0ca408c24202a7626ec8b861e99d85eca5e38b73311dd6dd12e3e9deecc3fe94',
|
||||
'com.fasterxml.jackson.core:jackson-core:cbf4604784b4de226262845447a1ad3bb38a6728cebe86562e2c5afada8be2c0',
|
||||
'org.whispersystems:curve25519-java:9ccef8f5aba05d9942336f023c589d6278b4f9135bdc34a7bade1f4e7ad65fa3',
|
||||
'com.android.support:support-v4:c62f0d025dafa86f423f48df9185b0d89496adbc5f6a9be5a7c394d84cf91423',
|
||||
]
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion '19.1.0'
|
||||
compileSdkVersion 22
|
||||
buildToolsVersion '22.0.1'
|
||||
|
||||
dexOptions {
|
||||
javaMaxHeapSize "4g"
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 19
|
||||
targetSdkVersion 22
|
||||
|
||||
buildConfigField "long", "BUILD_TIMESTAMP", System.currentTimeMillis() + "L"
|
||||
buildConfigField "String", "TEXTSECURE_URL", "\"https://textsecure-service.whispersystems.org\""
|
||||
buildConfigField "String", "USER_AGENT", "\"OWA\""
|
||||
buildConfigField "String", "REDPHONE_MASTER_URL", "\"https://redphone-master.whispersystems.org\""
|
||||
buildConfigField "String", "REDPHONE_RELAY_HOST", "\"relay.whispersystems.org\""
|
||||
buildConfigField "String", "REDPHONE_PREFIX_NAME", "\".whispersystems.org\""
|
||||
buildConfigField "boolean", "DEV_BUILD", "false"
|
||||
}
|
||||
|
||||
android {
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src']
|
||||
resources.srcDirs = ['src']
|
||||
aidl.srcDirs = ['src']
|
||||
renderscript.srcDirs = ['src']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
androidTest {
|
||||
java.srcDirs = ['androidTest']
|
||||
resources.srcDirs = ['androidTest']
|
||||
aidl.srcDirs = ['androidTest']
|
||||
renderscript.srcDirs = ['androidTest']
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'LICENSE.txt'
|
||||
exclude 'LICENSE'
|
||||
exclude 'NOTICE'
|
||||
exclude 'asm-license.txt'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/NOTICE'
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
||||
'proguard-google-play-services.pro',
|
||||
'proguard-dagger.pro',
|
||||
'proguard-jackson.pro',
|
||||
'proguard-sqlite.pro',
|
||||
'proguard-appcompat-v7.pro',
|
||||
'proguard-square-okhttp.pro',
|
||||
'proguard-square-okio.pro',
|
||||
'proguard-spongycastle.pro',
|
||||
'proguard-rounded-image-view.pro',
|
||||
'proguard-glide.pro',
|
||||
'proguard-shortcutbadger.pro',
|
||||
'proguard-retrofit.pro',
|
||||
'proguard.cfg'
|
||||
}
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles = buildTypes.debug.proguardFiles
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
dev.initWith(buildTypes.debug)
|
||||
dev {
|
||||
buildConfigField "boolean", "DEV_BUILD", "true"
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src']
|
||||
resources.srcDirs = ['src']
|
||||
aidl.srcDirs = ['src']
|
||||
renderscript.srcDirs = ['src']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
}
|
||||
androidTest {
|
||||
java.srcDirs = ['test/androidTest/java']
|
||||
}
|
||||
test {
|
||||
java.srcDirs = ['test/unitTest/java']
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@@ -90,6 +237,12 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.whenTaskAdded { task ->
|
||||
if (task.name.equals("lint")) {
|
||||
task.enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
def Properties props = new Properties()
|
||||
def propFile = new File('signing.properties')
|
||||
|
||||
@@ -114,3 +267,4 @@ if (propFile.canRead()){
|
||||
println 'signing.properties not found'
|
||||
android.buildTypes.release.signingConfig = null
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
##Translations
|
||||
|
||||
Please do not submit issues or pull requests for translation fixes. Anyone can update the translations in [Transifex](https://www.transifex.com/projects/p/textsecure-official/). Please submit your corrections there.
|
||||
|
||||
## Submitting useful bug reports
|
||||
1. Search our issues first to make sure this is not a duplicate.
|
||||
1. Read the [Submitting useful bug reports guide](https://github.com/WhisperSystems/TextSecure/wiki/Submitting-useful-bug-reports) before posting a bug.
|
||||
|
||||
## Development Ideology
|
||||
|
||||
Truths which we believe to be self-evident:
|
||||
|
||||
1. **The answer is not more options.** If you feel compelled to add a
|
||||
preference that's exposed to the user, it's very possible you've made
|
||||
a wrong turn somewhere.
|
||||
1. **The user doesn't know what a key is.** We need to minimize the points
|
||||
at which a user is exposed to this sort of terminology as extremely as
|
||||
possible.
|
||||
1. **There are no power users.** The idea that some users "understand"
|
||||
concepts better than others has proven to be, for the most part, false.
|
||||
If anything, "power users" are more dangerous than the rest, and we
|
||||
should avoid exposing dangerous functionality to them.
|
||||
1. **If it's "like PGP," it's wrong.** PGP is our spirit guide for what
|
||||
not to do.
|
||||
1. **It's an asynchronous world.** Be wary of anything that is
|
||||
anti-asynchronous: ACKs, protocol confirmations, or any protocol-level
|
||||
"advisory" message.
|
||||
1. **There is no such thing as time.** Protocol ideas that require synchronized
|
||||
clocks are doomed to failure.
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Mon Jun 09 23:26:49 PDT 2014
|
||||
#Wed Jul 22 14:31:11 PDT 2015
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip
|
||||
|
||||
58
jni/Android.mk
Normal file
@@ -0,0 +1,58 @@
|
||||
JNI_DIR := $(call my-dir)
|
||||
|
||||
include $(JNI_DIR)/libspeex/Android.mk
|
||||
|
||||
include $(JNI_DIR)/webrtc/common_audio/signal_processing/Android.mk
|
||||
include $(JNI_DIR)/webrtc/modules/audio_processing/aec/Android.mk
|
||||
include $(JNI_DIR)/webrtc/modules/audio_processing/aecm/Android.mk
|
||||
include $(JNI_DIR)/webrtc/modules/audio_processing/agc/Android.mk
|
||||
include $(JNI_DIR)/webrtc/modules/audio_processing/ns/Android.mk
|
||||
include $(JNI_DIR)/webrtc/modules/audio_processing/utility/Android.mk
|
||||
include $(JNI_DIR)/webrtc/system_wrappers/source/Android.mk
|
||||
|
||||
include $(JNI_DIR)/webrtc/modules/audio_coding/neteq/Android.mk
|
||||
include $(JNI_DIR)/webrtc/modules/audio_coding/codecs/g711/Android.mk
|
||||
include $(JNI_DIR)/webrtc/modules/audio_coding/codecs/cng/Android.mk
|
||||
include $(JNI_DIR)/webrtc/common_audio/vad/Android.mk
|
||||
|
||||
include $(JNI_DIR)/openssl/Android.mk
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := redphone-audio
|
||||
LOCAL_C_INCLUDES := $(JNI_DIR)/libsrtp/include/ $(JNI_DIR)/libsrtp/crypto/include/ $(JNI_DIR)/libspeex/include/ $(JNI_DIR)/webrtc/ $(JNI_DIR)/openssl/include/ $(JNI_DIR)
|
||||
LOCAL_LDLIBS += -lOpenSLES -llog
|
||||
LOCAL_CFLAGS += -Wall
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(JNI_DIR)/redphone/MicrophoneReader.cpp \
|
||||
$(JNI_DIR)/redphone/AudioCodec.cpp \
|
||||
$(JNI_DIR)/redphone/RtpAudioSender.cpp \
|
||||
$(JNI_DIR)/redphone/RtpPacket.cpp \
|
||||
$(JNI_DIR)/redphone/RtpAudioReceiver.cpp \
|
||||
$(JNI_DIR)/redphone/AudioPlayer.cpp \
|
||||
$(JNI_DIR)/redphone/JitterBuffer.cpp \
|
||||
$(JNI_DIR)/redphone/CallAudioManager.cpp \
|
||||
$(JNI_DIR)/redphone/WebRtcJitterBuffer.cpp \
|
||||
$(JNI_DIR)/redphone/SrtpStream.cpp \
|
||||
$(JNI_DIR)/redphone/NetworkUtil.cpp
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libspeex \
|
||||
libwebrtc_aecm \
|
||||
libwebrtc_ns \
|
||||
libwebrtc_spl \
|
||||
libwebrtc_apm_utility \
|
||||
libwebrtc_system_wrappers \
|
||||
libwebrtc_neteq \
|
||||
libwebrtc_g711 \
|
||||
libwebrtc_cng \
|
||||
libwebrtc_spl \
|
||||
libwebrtc_vad \
|
||||
libcrypto_static
|
||||
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
5
jni/Application.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
APP_ABI := armeabi armeabi-v7a x86
|
||||
APP_PLATFORM := android-9
|
||||
APP_STL := stlport_static
|
||||
APP_CPPFLAGS += -fexceptions
|
||||
APP_OPTIM := debug
|
||||
53
jni/android-webrtc.mk
Normal file
@@ -0,0 +1,53 @@
|
||||
# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file in the root of the source
|
||||
# tree. An additional intellectual property rights grant can be found
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
# These defines will apply to all source files
|
||||
# Think again before changing it
|
||||
MY_WEBRTC_COMMON_DEFS := \
|
||||
'-DWEBRTC_TARGET_PC' \
|
||||
'-DWEBRTC_LINUX' \
|
||||
'-DWEBRTC_THREAD_RR' \
|
||||
'-DWEBRTC_CLOCK_TYPE_REALTIME' \
|
||||
'-DWEBRTC_ANDROID'
|
||||
# The following macros are used by modules,
|
||||
# we might need to re-organize them
|
||||
# '-DWEBRTC_ANDROID_OPENSLES' [module audio_device]
|
||||
# '-DNETEQ_VOICEENGINE_CODECS' [module audio_coding neteq]
|
||||
# '-DWEBRTC_MODULE_UTILITY_VIDEO' [module media_file] [module utility]
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
MY_WEBRTC_COMMON_DEFS += \
|
||||
'-DWEBRTC_ARCH_ARM'
|
||||
# '-DWEBRTC_DETECT_ARM_NEON' # only used in a build configuration without Neon
|
||||
# TODO(kma): figure out if the above define could be moved to NDK build only.
|
||||
|
||||
# TODO(kma): test if the code under next two macros works with generic GCC compilers
|
||||
ifeq ($(ARCH_ARM_HAVE_NEON),true)
|
||||
MY_WEBRTC_COMMON_DEFS += \
|
||||
'-DWEBRTC_ARCH_ARM_NEON'
|
||||
endif
|
||||
|
||||
ifneq (,$(filter '-DWEBRTC_DETECT_ARM_NEON' '-DWEBRTC_ARCH_ARM_NEON', \
|
||||
$(MY_WEBRTC_COMMON_DEFS)))
|
||||
WEBRTC_BUILD_NEON_LIBS := true
|
||||
# TODO(kma): Use MY_ARM_CFLAGS_NEON for Neon libraies in AECM, NS, and iSAC.
|
||||
MY_ARM_CFLAGS_NEON := \
|
||||
-mfpu=neon \
|
||||
-mfloat-abi=softfp \
|
||||
-flax-vector-conversions
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
|
||||
MY_WEBRTC_COMMON_DEFS += \
|
||||
'-DWEBRTC_ARCH_ARM_V7A'
|
||||
endif
|
||||
|
||||
endif # ifeq ($(TARGET_ARCH),arm)
|
||||
|
||||
#added for redphone
|
||||
|
||||
#MY_WEBRTC_COMMON_DEFS += '-DNDEBUG'
|
||||
52
jni/libspeex/Android.mk
Normal file
@@ -0,0 +1,52 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libspeex
|
||||
LOCAL_CFLAGS := -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT="" -UHAVE_CONFIG_H
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(LOCAL_PATH)/bits.c \
|
||||
$(LOCAL_PATH)/buffer.c \
|
||||
$(LOCAL_PATH)/cb_search.c \
|
||||
$(LOCAL_PATH)/exc_10_16_table.c \
|
||||
$(LOCAL_PATH)/exc_10_32_table.c \
|
||||
$(LOCAL_PATH)/exc_20_32_table.c \
|
||||
$(LOCAL_PATH)/exc_5_256_table.c \
|
||||
$(LOCAL_PATH)/exc_5_64_table.c \
|
||||
$(LOCAL_PATH)/exc_8_128_table.c \
|
||||
$(LOCAL_PATH)/fftwrap.c \
|
||||
$(LOCAL_PATH)/filterbank.c \
|
||||
$(LOCAL_PATH)/filters.c \
|
||||
$(LOCAL_PATH)/gain_table.c \
|
||||
$(LOCAL_PATH)/gain_table_lbr.c \
|
||||
$(LOCAL_PATH)/hexc_10_32_table.c \
|
||||
$(LOCAL_PATH)/hexc_table.c \
|
||||
$(LOCAL_PATH)/high_lsp_tables.c \
|
||||
$(LOCAL_PATH)/jitter.c \
|
||||
$(LOCAL_PATH)/kiss_fft.c \
|
||||
$(LOCAL_PATH)/kiss_fftr.c \
|
||||
$(LOCAL_PATH)/lpc.c \
|
||||
$(LOCAL_PATH)/lsp.c \
|
||||
$(LOCAL_PATH)/lsp_tables_nb.c \
|
||||
$(LOCAL_PATH)/ltp.c \
|
||||
$(LOCAL_PATH)/mdf.c \
|
||||
$(LOCAL_PATH)/modes.c \
|
||||
$(LOCAL_PATH)/modes_wb.c \
|
||||
$(LOCAL_PATH)/nb_celp.c \
|
||||
$(LOCAL_PATH)/preprocess.c \
|
||||
$(LOCAL_PATH)/quant_lsp.c \
|
||||
$(LOCAL_PATH)/resample.c \
|
||||
$(LOCAL_PATH)/sb_celp.c \
|
||||
$(LOCAL_PATH)/scal.c \
|
||||
$(LOCAL_PATH)/smallft.c \
|
||||
$(LOCAL_PATH)/speex.c \
|
||||
$(LOCAL_PATH)/speex_callbacks.c \
|
||||
$(LOCAL_PATH)/speex_header.c \
|
||||
$(LOCAL_PATH)/stereo.c \
|
||||
$(LOCAL_PATH)/vbr.c \
|
||||
$(LOCAL_PATH)/vq.c \
|
||||
$(LOCAL_PATH)/window.c
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
667
jni/libspeex/Makefile
Normal file
@@ -0,0 +1,667 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# libspeex/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
|
||||
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||
#AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
|
||||
|
||||
SOURCES = $(libspeex_la_SOURCES) $(libspeexdsp_la_SOURCES) $(testdenoise_SOURCES) $(testecho_SOURCES) $(testenc_SOURCES) $(testenc_uwb_SOURCES) $(testenc_wb_SOURCES) $(testjitter_SOURCES)
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ..
|
||||
|
||||
pkgdatadir = $(datadir)/speex
|
||||
pkglibdir = $(libdir)/speex
|
||||
pkgincludedir = $(includedir)/speex
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = /usr/bin/install -c
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = x86_64-unknown-linux-gnu
|
||||
noinst_PROGRAMS = testenc$(EXEEXT) testenc_wb$(EXEEXT) \
|
||||
testenc_uwb$(EXEEXT) testdenoise$(EXEEXT) testecho$(EXEEXT) \
|
||||
testjitter$(EXEEXT)
|
||||
subdir = libspeex
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(mkdir_p)
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libspeex_la_LIBADD =
|
||||
am_libspeex_la_OBJECTS = cb_search.lo exc_10_32_table.lo \
|
||||
exc_8_128_table.lo filters.lo gain_table.lo hexc_table.lo \
|
||||
high_lsp_tables.lo lsp.lo ltp.lo speex.lo stereo.lo vbr.lo \
|
||||
vq.lo bits.lo exc_10_16_table.lo exc_20_32_table.lo \
|
||||
exc_5_256_table.lo exc_5_64_table.lo gain_table_lbr.lo \
|
||||
hexc_10_32_table.lo lpc.lo lsp_tables_nb.lo modes.lo \
|
||||
modes_wb.lo nb_celp.lo quant_lsp.lo sb_celp.lo \
|
||||
speex_callbacks.lo speex_header.lo window.lo
|
||||
libspeex_la_OBJECTS = $(am_libspeex_la_OBJECTS)
|
||||
libspeexdsp_la_LIBADD =
|
||||
am__libspeexdsp_la_SOURCES_DIST = preprocess.c jitter.c mdf.c \
|
||||
fftwrap.c filterbank.c resample.c buffer.c scal.c smallft.c \
|
||||
kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
|
||||
am__objects_1 = smallft.lo
|
||||
#am__objects_1 = kiss_fft.lo kiss_fftr.lo
|
||||
am_libspeexdsp_la_OBJECTS = preprocess.lo jitter.lo mdf.lo fftwrap.lo \
|
||||
filterbank.lo resample.lo buffer.lo scal.lo $(am__objects_1)
|
||||
libspeexdsp_la_OBJECTS = $(am_libspeexdsp_la_OBJECTS)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_testdenoise_OBJECTS = testdenoise.$(OBJEXT)
|
||||
testdenoise_OBJECTS = $(am_testdenoise_OBJECTS)
|
||||
testdenoise_DEPENDENCIES = libspeexdsp.la
|
||||
am_testecho_OBJECTS = testecho.$(OBJEXT)
|
||||
testecho_OBJECTS = $(am_testecho_OBJECTS)
|
||||
testecho_DEPENDENCIES = libspeexdsp.la
|
||||
am_testenc_OBJECTS = testenc.$(OBJEXT)
|
||||
testenc_OBJECTS = $(am_testenc_OBJECTS)
|
||||
testenc_DEPENDENCIES = libspeex.la
|
||||
am_testenc_uwb_OBJECTS = testenc_uwb.$(OBJEXT)
|
||||
testenc_uwb_OBJECTS = $(am_testenc_uwb_OBJECTS)
|
||||
testenc_uwb_DEPENDENCIES = libspeex.la
|
||||
am_testenc_wb_OBJECTS = testenc_wb.$(OBJEXT)
|
||||
testenc_wb_OBJECTS = $(am_testenc_wb_OBJECTS)
|
||||
testenc_wb_DEPENDENCIES = libspeex.la
|
||||
am_testjitter_OBJECTS = testjitter.$(OBJEXT)
|
||||
testjitter_OBJECTS = $(am_testjitter_OBJECTS)
|
||||
testjitter_DEPENDENCIES = libspeexdsp.la
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
DEP_FILES = ./$(DEPDIR)/bits.Plo ./$(DEPDIR)/buffer.Plo \
|
||||
./$(DEPDIR)/cb_search.Plo \
|
||||
./$(DEPDIR)/exc_10_16_table.Plo \
|
||||
./$(DEPDIR)/exc_10_32_table.Plo \
|
||||
./$(DEPDIR)/exc_20_32_table.Plo \
|
||||
./$(DEPDIR)/exc_5_256_table.Plo \
|
||||
./$(DEPDIR)/exc_5_64_table.Plo \
|
||||
./$(DEPDIR)/exc_8_128_table.Plo \
|
||||
./$(DEPDIR)/fftwrap.Plo ./$(DEPDIR)/filterbank.Plo \
|
||||
./$(DEPDIR)/filters.Plo ./$(DEPDIR)/gain_table.Plo \
|
||||
./$(DEPDIR)/gain_table_lbr.Plo \
|
||||
./$(DEPDIR)/hexc_10_32_table.Plo \
|
||||
./$(DEPDIR)/hexc_table.Plo \
|
||||
./$(DEPDIR)/high_lsp_tables.Plo \
|
||||
./$(DEPDIR)/jitter.Plo ./$(DEPDIR)/kiss_fft.Plo \
|
||||
./$(DEPDIR)/kiss_fftr.Plo ./$(DEPDIR)/lpc.Plo \
|
||||
./$(DEPDIR)/lsp.Plo ./$(DEPDIR)/lsp_tables_nb.Plo \
|
||||
./$(DEPDIR)/ltp.Plo ./$(DEPDIR)/mdf.Plo \
|
||||
./$(DEPDIR)/modes.Plo ./$(DEPDIR)/modes_wb.Plo \
|
||||
./$(DEPDIR)/nb_celp.Plo ./$(DEPDIR)/preprocess.Plo \
|
||||
./$(DEPDIR)/quant_lsp.Plo ./$(DEPDIR)/resample.Plo \
|
||||
./$(DEPDIR)/sb_celp.Plo ./$(DEPDIR)/scal.Plo \
|
||||
./$(DEPDIR)/smallft.Plo ./$(DEPDIR)/speex.Plo \
|
||||
./$(DEPDIR)/speex_callbacks.Plo \
|
||||
./$(DEPDIR)/speex_header.Plo \
|
||||
./$(DEPDIR)/stereo.Plo ./$(DEPDIR)/testdenoise.Po \
|
||||
./$(DEPDIR)/testecho.Po ./$(DEPDIR)/testenc.Po \
|
||||
./$(DEPDIR)/testenc_uwb.Po \
|
||||
./$(DEPDIR)/testenc_wb.Po \
|
||||
./$(DEPDIR)/testjitter.Po ./$(DEPDIR)/vbr.Plo \
|
||||
./$(DEPDIR)/vq.Plo ./$(DEPDIR)/window.Plo
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libspeex_la_SOURCES) $(libspeexdsp_la_SOURCES) \
|
||||
$(testdenoise_SOURCES) $(testecho_SOURCES) $(testenc_SOURCES) \
|
||||
$(testenc_uwb_SOURCES) $(testenc_wb_SOURCES) \
|
||||
$(testjitter_SOURCES)
|
||||
DIST_SOURCES = $(libspeex_la_SOURCES) \
|
||||
$(am__libspeexdsp_la_SOURCES_DIST) $(testdenoise_SOURCES) \
|
||||
$(testecho_SOURCES) $(testenc_SOURCES) $(testenc_uwb_SOURCES) \
|
||||
$(testenc_wb_SOURCES) $(testjitter_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run aclocal-1.8
|
||||
AMDEP_FALSE = #
|
||||
AMDEP_TRUE =
|
||||
AMTAR = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run tar
|
||||
AR = ar
|
||||
AS = as
|
||||
AUTOCONF = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run automake-1.8
|
||||
AWK = gawk
|
||||
BUILD_KISS_FFT_FALSE =
|
||||
BUILD_KISS_FFT_TRUE = #
|
||||
BUILD_SMALLFT_FALSE = #
|
||||
BUILD_SMALLFT_TRUE =
|
||||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2 -fvisibility=hidden
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXXCPP = g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
DEPDIR = .deps
|
||||
DLLTOOL = dlltool
|
||||
DSYMUTIL =
|
||||
ECHO = echo
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EXEEXT =
|
||||
F77 =
|
||||
FFLAGS =
|
||||
FFT_CFLAGS =
|
||||
FFT_LIBS =
|
||||
FFT_PKGCONFIG =
|
||||
GREP = /bin/grep
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
|
||||
LDFLAGS =
|
||||
LIBOBJS =
|
||||
LIBS = -lm
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LN_S = ln -s
|
||||
LTLIBOBJS =
|
||||
MAINT = #
|
||||
MAINTAINER_MODE_FALSE =
|
||||
MAINTAINER_MODE_TRUE = #
|
||||
MAKEINFO = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run makeinfo
|
||||
NMEDIT =
|
||||
OBJDUMP = objdump
|
||||
OBJEXT = o
|
||||
OGG_CFLAGS =
|
||||
OGG_LIBS =
|
||||
PACKAGE = speex
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME =
|
||||
PACKAGE_STRING =
|
||||
PACKAGE_TARNAME =
|
||||
PACKAGE_VERSION =
|
||||
PATH_SEPARATOR = :
|
||||
PKG_CONFIG = /usr/bin/pkg-config
|
||||
RANLIB = ranlib
|
||||
SED = /bin/sed
|
||||
SET_MAKE =
|
||||
SHELL = /bin/bash
|
||||
SIZE16 = short
|
||||
SIZE32 = int
|
||||
SPEEX_LT_AGE = 5
|
||||
SPEEX_LT_CURRENT = 6
|
||||
SPEEX_LT_REVISION = 0
|
||||
SPEEX_VERSION = 1.2rc1
|
||||
STRIP = strip
|
||||
VERSION = 1.2rc1
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
ac_ct_F77 =
|
||||
am__fastdepCC_FALSE = #
|
||||
am__fastdepCC_TRUE =
|
||||
am__fastdepCXX_FALSE = #
|
||||
am__fastdepCXX_TRUE =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = x86_64-unknown-linux-gnu
|
||||
build_alias =
|
||||
build_cpu = x86_64
|
||||
build_os = linux-gnu
|
||||
build_vendor = unknown
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE}
|
||||
dvidir = ${docdir}
|
||||
exec_prefix = ${prefix}
|
||||
host = x86_64-unknown-linux-gnu
|
||||
host_alias =
|
||||
host_cpu = x86_64
|
||||
host_os = linux-gnu
|
||||
host_vendor = unknown
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${datarootdir}/info
|
||||
install_sh = /home/moxie/Downloads/speex-1.2rc1/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${datarootdir}/man
|
||||
mkdir_p = mkdir -p -- .
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
src =
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
EXTRA_DIST = echo_diagnostic.m
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir)
|
||||
lib_LTLIBRARIES = libspeex.la libspeexdsp.la
|
||||
|
||||
# Sources for compilation in the library
|
||||
libspeex_la_SOURCES = cb_search.c exc_10_32_table.c exc_8_128_table.c \
|
||||
filters.c gain_table.c hexc_table.c high_lsp_tables.c lsp.c \
|
||||
ltp.c speex.c stereo.c vbr.c vq.c bits.c exc_10_16_table.c \
|
||||
exc_20_32_table.c exc_5_256_table.c exc_5_64_table.c gain_table_lbr.c hexc_10_32_table.c \
|
||||
lpc.c lsp_tables_nb.c modes.c modes_wb.c nb_celp.c quant_lsp.c sb_celp.c \
|
||||
speex_callbacks.c speex_header.c window.c
|
||||
|
||||
#FFTSRC =
|
||||
FFTSRC = smallft.c
|
||||
#FFTSRC = kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
|
||||
libspeexdsp_la_SOURCES = preprocess.c jitter.c mdf.c fftwrap.c filterbank.c resample.c buffer.c scal.c $(FFTSRC)
|
||||
noinst_HEADERS = arch.h cb_search_arm4.h cb_search_bfin.h cb_search_sse.h \
|
||||
filters.h filters_arm4.h filters_bfin.h filters_sse.h fixed_arm4.h \
|
||||
fixed_arm5e.h fixed_bfin.h fixed_debug.h lpc.h lpc_bfin.h ltp.h ltp_arm4.h \
|
||||
ltp_sse.h math_approx.h misc_bfin.h nb_celp.h quant_lsp.h sb_celp.h \
|
||||
stack_alloc.h vbr.h vq.h vq_arm4.h vq_bfin.h vq_sse.h cb_search.h fftwrap.h \
|
||||
filterbank.h fixed_generic.h lsp.h lsp_bfin.h ltp_bfin.h modes.h os_support.h \
|
||||
pseudofloat.h quant_lsp_bfin.h smallft.h vorbis_psy.h resample_sse.h
|
||||
|
||||
libspeex_la_LDFLAGS = -no-undefined -version-info 6:0:5
|
||||
libspeexdsp_la_LDFLAGS = -no-undefined -version-info 6:0:5
|
||||
testenc_SOURCES = testenc.c
|
||||
testenc_LDADD = libspeex.la
|
||||
testenc_wb_SOURCES = testenc_wb.c
|
||||
testenc_wb_LDADD = libspeex.la
|
||||
testenc_uwb_SOURCES = testenc_uwb.c
|
||||
testenc_uwb_LDADD = libspeex.la
|
||||
testdenoise_SOURCES = testdenoise.c
|
||||
testdenoise_LDADD = libspeexdsp.la
|
||||
testecho_SOURCES = testecho.c
|
||||
testecho_LDADD = libspeexdsp.la
|
||||
testjitter_SOURCES = testjitter.c
|
||||
testjitter_LDADD = libspeexdsp.la
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libspeex/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu libspeex/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: # $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libspeex.la: $(libspeex_la_OBJECTS) $(libspeex_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libspeex_la_LDFLAGS) $(libspeex_la_OBJECTS) $(libspeex_la_LIBADD) $(LIBS)
|
||||
libspeexdsp.la: $(libspeexdsp_la_OBJECTS) $(libspeexdsp_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libspeexdsp_la_LDFLAGS) $(libspeexdsp_la_OBJECTS) $(libspeexdsp_la_LIBADD) $(LIBS)
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
testdenoise$(EXEEXT): $(testdenoise_OBJECTS) $(testdenoise_DEPENDENCIES)
|
||||
@rm -f testdenoise$(EXEEXT)
|
||||
$(LINK) $(testdenoise_LDFLAGS) $(testdenoise_OBJECTS) $(testdenoise_LDADD) $(LIBS)
|
||||
testecho$(EXEEXT): $(testecho_OBJECTS) $(testecho_DEPENDENCIES)
|
||||
@rm -f testecho$(EXEEXT)
|
||||
$(LINK) $(testecho_LDFLAGS) $(testecho_OBJECTS) $(testecho_LDADD) $(LIBS)
|
||||
testenc$(EXEEXT): $(testenc_OBJECTS) $(testenc_DEPENDENCIES)
|
||||
@rm -f testenc$(EXEEXT)
|
||||
$(LINK) $(testenc_LDFLAGS) $(testenc_OBJECTS) $(testenc_LDADD) $(LIBS)
|
||||
testenc_uwb$(EXEEXT): $(testenc_uwb_OBJECTS) $(testenc_uwb_DEPENDENCIES)
|
||||
@rm -f testenc_uwb$(EXEEXT)
|
||||
$(LINK) $(testenc_uwb_LDFLAGS) $(testenc_uwb_OBJECTS) $(testenc_uwb_LDADD) $(LIBS)
|
||||
testenc_wb$(EXEEXT): $(testenc_wb_OBJECTS) $(testenc_wb_DEPENDENCIES)
|
||||
@rm -f testenc_wb$(EXEEXT)
|
||||
$(LINK) $(testenc_wb_LDFLAGS) $(testenc_wb_OBJECTS) $(testenc_wb_LDADD) $(LIBS)
|
||||
testjitter$(EXEEXT): $(testjitter_OBJECTS) $(testjitter_DEPENDENCIES)
|
||||
@rm -f testjitter$(EXEEXT)
|
||||
$(LINK) $(testjitter_LDFLAGS) $(testjitter_OBJECTS) $(testjitter_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include ./$(DEPDIR)/bits.Plo
|
||||
include ./$(DEPDIR)/buffer.Plo
|
||||
include ./$(DEPDIR)/cb_search.Plo
|
||||
include ./$(DEPDIR)/exc_10_16_table.Plo
|
||||
include ./$(DEPDIR)/exc_10_32_table.Plo
|
||||
include ./$(DEPDIR)/exc_20_32_table.Plo
|
||||
include ./$(DEPDIR)/exc_5_256_table.Plo
|
||||
include ./$(DEPDIR)/exc_5_64_table.Plo
|
||||
include ./$(DEPDIR)/exc_8_128_table.Plo
|
||||
include ./$(DEPDIR)/fftwrap.Plo
|
||||
include ./$(DEPDIR)/filterbank.Plo
|
||||
include ./$(DEPDIR)/filters.Plo
|
||||
include ./$(DEPDIR)/gain_table.Plo
|
||||
include ./$(DEPDIR)/gain_table_lbr.Plo
|
||||
include ./$(DEPDIR)/hexc_10_32_table.Plo
|
||||
include ./$(DEPDIR)/hexc_table.Plo
|
||||
include ./$(DEPDIR)/high_lsp_tables.Plo
|
||||
include ./$(DEPDIR)/jitter.Plo
|
||||
include ./$(DEPDIR)/kiss_fft.Plo
|
||||
include ./$(DEPDIR)/kiss_fftr.Plo
|
||||
include ./$(DEPDIR)/lpc.Plo
|
||||
include ./$(DEPDIR)/lsp.Plo
|
||||
include ./$(DEPDIR)/lsp_tables_nb.Plo
|
||||
include ./$(DEPDIR)/ltp.Plo
|
||||
include ./$(DEPDIR)/mdf.Plo
|
||||
include ./$(DEPDIR)/modes.Plo
|
||||
include ./$(DEPDIR)/modes_wb.Plo
|
||||
include ./$(DEPDIR)/nb_celp.Plo
|
||||
include ./$(DEPDIR)/preprocess.Plo
|
||||
include ./$(DEPDIR)/quant_lsp.Plo
|
||||
include ./$(DEPDIR)/resample.Plo
|
||||
include ./$(DEPDIR)/sb_celp.Plo
|
||||
include ./$(DEPDIR)/scal.Plo
|
||||
include ./$(DEPDIR)/smallft.Plo
|
||||
include ./$(DEPDIR)/speex.Plo
|
||||
include ./$(DEPDIR)/speex_callbacks.Plo
|
||||
include ./$(DEPDIR)/speex_header.Plo
|
||||
include ./$(DEPDIR)/stereo.Plo
|
||||
include ./$(DEPDIR)/testdenoise.Po
|
||||
include ./$(DEPDIR)/testecho.Po
|
||||
include ./$(DEPDIR)/testenc.Po
|
||||
include ./$(DEPDIR)/testenc_uwb.Po
|
||||
include ./$(DEPDIR)/testenc_wb.Po
|
||||
include ./$(DEPDIR)/testjitter.Po
|
||||
include ./$(DEPDIR)/vbr.Plo
|
||||
include ./$(DEPDIR)/vq.Plo
|
||||
include ./$(DEPDIR)/window.Plo
|
||||
|
||||
.c.o:
|
||||
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
|
||||
# $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
|
||||
# $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=yes \
|
||||
# depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \
|
||||
# $(CCDEPMODE) $(depcomp) \
|
||||
# $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
clean-noinstPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-libLTLIBRARIES install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
55
jni/libspeex/Makefile.am
Normal file
@@ -0,0 +1,55 @@
|
||||
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||
#AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
|
||||
EXTRA_DIST=echo_diagnostic.m
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@
|
||||
|
||||
lib_LTLIBRARIES = libspeex.la libspeexdsp.la
|
||||
|
||||
# Sources for compilation in the library
|
||||
libspeex_la_SOURCES = cb_search.c exc_10_32_table.c exc_8_128_table.c \
|
||||
filters.c gain_table.c hexc_table.c high_lsp_tables.c lsp.c \
|
||||
ltp.c speex.c stereo.c vbr.c vq.c bits.c exc_10_16_table.c \
|
||||
exc_20_32_table.c exc_5_256_table.c exc_5_64_table.c gain_table_lbr.c hexc_10_32_table.c \
|
||||
lpc.c lsp_tables_nb.c modes.c modes_wb.c nb_celp.c quant_lsp.c sb_celp.c \
|
||||
speex_callbacks.c speex_header.c window.c
|
||||
|
||||
if BUILD_KISS_FFT
|
||||
FFTSRC=kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
|
||||
else
|
||||
if BUILD_SMALLFT
|
||||
FFTSRC=smallft.c
|
||||
else
|
||||
FFTSRC=
|
||||
endif
|
||||
endif
|
||||
|
||||
libspeexdsp_la_SOURCES = preprocess.c jitter.c mdf.c fftwrap.c filterbank.c resample.c buffer.c scal.c $(FFTSRC)
|
||||
|
||||
noinst_HEADERS = arch.h cb_search_arm4.h cb_search_bfin.h cb_search_sse.h \
|
||||
filters.h filters_arm4.h filters_bfin.h filters_sse.h fixed_arm4.h \
|
||||
fixed_arm5e.h fixed_bfin.h fixed_debug.h lpc.h lpc_bfin.h ltp.h ltp_arm4.h \
|
||||
ltp_sse.h math_approx.h misc_bfin.h nb_celp.h quant_lsp.h sb_celp.h \
|
||||
stack_alloc.h vbr.h vq.h vq_arm4.h vq_bfin.h vq_sse.h cb_search.h fftwrap.h \
|
||||
filterbank.h fixed_generic.h lsp.h lsp_bfin.h ltp_bfin.h modes.h os_support.h \
|
||||
pseudofloat.h quant_lsp_bfin.h smallft.h vorbis_psy.h resample_sse.h
|
||||
|
||||
|
||||
libspeex_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@
|
||||
libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@
|
||||
|
||||
noinst_PROGRAMS = testenc testenc_wb testenc_uwb testdenoise testecho testjitter
|
||||
testenc_SOURCES = testenc.c
|
||||
testenc_LDADD = libspeex.la
|
||||
testenc_wb_SOURCES = testenc_wb.c
|
||||
testenc_wb_LDADD = libspeex.la
|
||||
testenc_uwb_SOURCES = testenc_uwb.c
|
||||
testenc_uwb_LDADD = libspeex.la
|
||||
testdenoise_SOURCES = testdenoise.c
|
||||
testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||
testecho_SOURCES = testecho.c
|
||||
testecho_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||
testjitter_SOURCES = testjitter.c
|
||||
testjitter_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||
667
jni/libspeex/Makefile.in
Normal file
@@ -0,0 +1,667 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||
#AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
|
||||
|
||||
SOURCES = $(libspeex_la_SOURCES) $(libspeexdsp_la_SOURCES) $(testdenoise_SOURCES) $(testecho_SOURCES) $(testenc_SOURCES) $(testenc_uwb_SOURCES) $(testenc_wb_SOURCES) $(testjitter_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
noinst_PROGRAMS = testenc$(EXEEXT) testenc_wb$(EXEEXT) \
|
||||
testenc_uwb$(EXEEXT) testdenoise$(EXEEXT) testecho$(EXEEXT) \
|
||||
testjitter$(EXEEXT)
|
||||
subdir = libspeex
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(mkdir_p)
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libspeex_la_LIBADD =
|
||||
am_libspeex_la_OBJECTS = cb_search.lo exc_10_32_table.lo \
|
||||
exc_8_128_table.lo filters.lo gain_table.lo hexc_table.lo \
|
||||
high_lsp_tables.lo lsp.lo ltp.lo speex.lo stereo.lo vbr.lo \
|
||||
vq.lo bits.lo exc_10_16_table.lo exc_20_32_table.lo \
|
||||
exc_5_256_table.lo exc_5_64_table.lo gain_table_lbr.lo \
|
||||
hexc_10_32_table.lo lpc.lo lsp_tables_nb.lo modes.lo \
|
||||
modes_wb.lo nb_celp.lo quant_lsp.lo sb_celp.lo \
|
||||
speex_callbacks.lo speex_header.lo window.lo
|
||||
libspeex_la_OBJECTS = $(am_libspeex_la_OBJECTS)
|
||||
libspeexdsp_la_LIBADD =
|
||||
am__libspeexdsp_la_SOURCES_DIST = preprocess.c jitter.c mdf.c \
|
||||
fftwrap.c filterbank.c resample.c buffer.c scal.c smallft.c \
|
||||
kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
|
||||
@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_TRUE@am__objects_1 = smallft.lo
|
||||
@BUILD_KISS_FFT_TRUE@am__objects_1 = kiss_fft.lo kiss_fftr.lo
|
||||
am_libspeexdsp_la_OBJECTS = preprocess.lo jitter.lo mdf.lo fftwrap.lo \
|
||||
filterbank.lo resample.lo buffer.lo scal.lo $(am__objects_1)
|
||||
libspeexdsp_la_OBJECTS = $(am_libspeexdsp_la_OBJECTS)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_testdenoise_OBJECTS = testdenoise.$(OBJEXT)
|
||||
testdenoise_OBJECTS = $(am_testdenoise_OBJECTS)
|
||||
testdenoise_DEPENDENCIES = libspeexdsp.la
|
||||
am_testecho_OBJECTS = testecho.$(OBJEXT)
|
||||
testecho_OBJECTS = $(am_testecho_OBJECTS)
|
||||
testecho_DEPENDENCIES = libspeexdsp.la
|
||||
am_testenc_OBJECTS = testenc.$(OBJEXT)
|
||||
testenc_OBJECTS = $(am_testenc_OBJECTS)
|
||||
testenc_DEPENDENCIES = libspeex.la
|
||||
am_testenc_uwb_OBJECTS = testenc_uwb.$(OBJEXT)
|
||||
testenc_uwb_OBJECTS = $(am_testenc_uwb_OBJECTS)
|
||||
testenc_uwb_DEPENDENCIES = libspeex.la
|
||||
am_testenc_wb_OBJECTS = testenc_wb.$(OBJEXT)
|
||||
testenc_wb_OBJECTS = $(am_testenc_wb_OBJECTS)
|
||||
testenc_wb_DEPENDENCIES = libspeex.la
|
||||
am_testjitter_OBJECTS = testjitter.$(OBJEXT)
|
||||
testjitter_OBJECTS = $(am_testjitter_OBJECTS)
|
||||
testjitter_DEPENDENCIES = libspeexdsp.la
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bits.Plo ./$(DEPDIR)/buffer.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/cb_search.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/exc_10_16_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/exc_10_32_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/exc_20_32_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/exc_5_256_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/exc_5_64_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/exc_8_128_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/fftwrap.Plo ./$(DEPDIR)/filterbank.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/filters.Plo ./$(DEPDIR)/gain_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/gain_table_lbr.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/hexc_10_32_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/hexc_table.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/high_lsp_tables.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/jitter.Plo ./$(DEPDIR)/kiss_fft.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/kiss_fftr.Plo ./$(DEPDIR)/lpc.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/lsp.Plo ./$(DEPDIR)/lsp_tables_nb.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/ltp.Plo ./$(DEPDIR)/mdf.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/modes.Plo ./$(DEPDIR)/modes_wb.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/nb_celp.Plo ./$(DEPDIR)/preprocess.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/quant_lsp.Plo ./$(DEPDIR)/resample.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sb_celp.Plo ./$(DEPDIR)/scal.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/smallft.Plo ./$(DEPDIR)/speex.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/speex_callbacks.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/speex_header.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/stereo.Plo ./$(DEPDIR)/testdenoise.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/testecho.Po ./$(DEPDIR)/testenc.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/testenc_uwb.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/testenc_wb.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/testjitter.Po ./$(DEPDIR)/vbr.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/vq.Plo ./$(DEPDIR)/window.Plo
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libspeex_la_SOURCES) $(libspeexdsp_la_SOURCES) \
|
||||
$(testdenoise_SOURCES) $(testecho_SOURCES) $(testenc_SOURCES) \
|
||||
$(testenc_uwb_SOURCES) $(testenc_wb_SOURCES) \
|
||||
$(testjitter_SOURCES)
|
||||
DIST_SOURCES = $(libspeex_la_SOURCES) \
|
||||
$(am__libspeexdsp_la_SOURCES_DIST) $(testdenoise_SOURCES) \
|
||||
$(testecho_SOURCES) $(testenc_SOURCES) $(testenc_uwb_SOURCES) \
|
||||
$(testenc_wb_SOURCES) $(testjitter_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_KISS_FFT_FALSE = @BUILD_KISS_FFT_FALSE@
|
||||
BUILD_KISS_FFT_TRUE = @BUILD_KISS_FFT_TRUE@
|
||||
BUILD_SMALLFT_FALSE = @BUILD_SMALLFT_FALSE@
|
||||
BUILD_SMALLFT_TRUE = @BUILD_SMALLFT_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FFT_CFLAGS = @FFT_CFLAGS@
|
||||
FFT_LIBS = @FFT_LIBS@
|
||||
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SIZE16 = @SIZE16@
|
||||
SIZE32 = @SIZE32@
|
||||
SPEEX_LT_AGE = @SPEEX_LT_AGE@
|
||||
SPEEX_LT_CURRENT = @SPEEX_LT_CURRENT@
|
||||
SPEEX_LT_REVISION = @SPEEX_LT_REVISION@
|
||||
SPEEX_VERSION = @SPEEX_VERSION@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
src = @src@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
EXTRA_DIST = echo_diagnostic.m
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@
|
||||
lib_LTLIBRARIES = libspeex.la libspeexdsp.la
|
||||
|
||||
# Sources for compilation in the library
|
||||
libspeex_la_SOURCES = cb_search.c exc_10_32_table.c exc_8_128_table.c \
|
||||
filters.c gain_table.c hexc_table.c high_lsp_tables.c lsp.c \
|
||||
ltp.c speex.c stereo.c vbr.c vq.c bits.c exc_10_16_table.c \
|
||||
exc_20_32_table.c exc_5_256_table.c exc_5_64_table.c gain_table_lbr.c hexc_10_32_table.c \
|
||||
lpc.c lsp_tables_nb.c modes.c modes_wb.c nb_celp.c quant_lsp.c sb_celp.c \
|
||||
speex_callbacks.c speex_header.c window.c
|
||||
|
||||
@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_FALSE@FFTSRC =
|
||||
@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_TRUE@FFTSRC = smallft.c
|
||||
@BUILD_KISS_FFT_TRUE@FFTSRC = kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
|
||||
libspeexdsp_la_SOURCES = preprocess.c jitter.c mdf.c fftwrap.c filterbank.c resample.c buffer.c scal.c $(FFTSRC)
|
||||
noinst_HEADERS = arch.h cb_search_arm4.h cb_search_bfin.h cb_search_sse.h \
|
||||
filters.h filters_arm4.h filters_bfin.h filters_sse.h fixed_arm4.h \
|
||||
fixed_arm5e.h fixed_bfin.h fixed_debug.h lpc.h lpc_bfin.h ltp.h ltp_arm4.h \
|
||||
ltp_sse.h math_approx.h misc_bfin.h nb_celp.h quant_lsp.h sb_celp.h \
|
||||
stack_alloc.h vbr.h vq.h vq_arm4.h vq_bfin.h vq_sse.h cb_search.h fftwrap.h \
|
||||
filterbank.h fixed_generic.h lsp.h lsp_bfin.h ltp_bfin.h modes.h os_support.h \
|
||||
pseudofloat.h quant_lsp_bfin.h smallft.h vorbis_psy.h resample_sse.h
|
||||
|
||||
libspeex_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@
|
||||
libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@
|
||||
testenc_SOURCES = testenc.c
|
||||
testenc_LDADD = libspeex.la
|
||||
testenc_wb_SOURCES = testenc_wb.c
|
||||
testenc_wb_LDADD = libspeex.la
|
||||
testenc_uwb_SOURCES = testenc_uwb.c
|
||||
testenc_uwb_LDADD = libspeex.la
|
||||
testdenoise_SOURCES = testdenoise.c
|
||||
testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||
testecho_SOURCES = testecho.c
|
||||
testecho_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||
testjitter_SOURCES = testjitter.c
|
||||
testjitter_LDADD = libspeexdsp.la @FFT_LIBS@
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libspeex/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu libspeex/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libspeex.la: $(libspeex_la_OBJECTS) $(libspeex_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libspeex_la_LDFLAGS) $(libspeex_la_OBJECTS) $(libspeex_la_LIBADD) $(LIBS)
|
||||
libspeexdsp.la: $(libspeexdsp_la_OBJECTS) $(libspeexdsp_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libspeexdsp_la_LDFLAGS) $(libspeexdsp_la_OBJECTS) $(libspeexdsp_la_LIBADD) $(LIBS)
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
testdenoise$(EXEEXT): $(testdenoise_OBJECTS) $(testdenoise_DEPENDENCIES)
|
||||
@rm -f testdenoise$(EXEEXT)
|
||||
$(LINK) $(testdenoise_LDFLAGS) $(testdenoise_OBJECTS) $(testdenoise_LDADD) $(LIBS)
|
||||
testecho$(EXEEXT): $(testecho_OBJECTS) $(testecho_DEPENDENCIES)
|
||||
@rm -f testecho$(EXEEXT)
|
||||
$(LINK) $(testecho_LDFLAGS) $(testecho_OBJECTS) $(testecho_LDADD) $(LIBS)
|
||||
testenc$(EXEEXT): $(testenc_OBJECTS) $(testenc_DEPENDENCIES)
|
||||
@rm -f testenc$(EXEEXT)
|
||||
$(LINK) $(testenc_LDFLAGS) $(testenc_OBJECTS) $(testenc_LDADD) $(LIBS)
|
||||
testenc_uwb$(EXEEXT): $(testenc_uwb_OBJECTS) $(testenc_uwb_DEPENDENCIES)
|
||||
@rm -f testenc_uwb$(EXEEXT)
|
||||
$(LINK) $(testenc_uwb_LDFLAGS) $(testenc_uwb_OBJECTS) $(testenc_uwb_LDADD) $(LIBS)
|
||||
testenc_wb$(EXEEXT): $(testenc_wb_OBJECTS) $(testenc_wb_DEPENDENCIES)
|
||||
@rm -f testenc_wb$(EXEEXT)
|
||||
$(LINK) $(testenc_wb_LDFLAGS) $(testenc_wb_OBJECTS) $(testenc_wb_LDADD) $(LIBS)
|
||||
testjitter$(EXEEXT): $(testjitter_OBJECTS) $(testjitter_DEPENDENCIES)
|
||||
@rm -f testjitter$(EXEEXT)
|
||||
$(LINK) $(testjitter_LDFLAGS) $(testjitter_OBJECTS) $(testjitter_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bits.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cb_search.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_10_16_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_10_32_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_20_32_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_5_256_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_5_64_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_8_128_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftwrap.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filterbank.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filters.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gain_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gain_table_lbr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hexc_10_32_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hexc_table.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/high_lsp_tables.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jitter.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kiss_fft.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kiss_fftr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsp_tables_nb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdf.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modes.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modes_wb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nb_celp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preprocess.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quant_lsp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resample.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sb_celp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scal.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smallft.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speex.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speex_callbacks.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speex_header.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stereo.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdenoise.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testecho.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testenc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testenc_uwb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testenc_wb.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testjitter.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vq.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
clean-noinstPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-libLTLIBRARIES install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
160
jni/libspeex/_kiss_fft_guts.h
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
Copyright (c) 2003-2004, Mark Borgerding
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define MIN(a,b) ((a)<(b) ? (a):(b))
|
||||
#define MAX(a,b) ((a)>(b) ? (a):(b))
|
||||
|
||||
/* kiss_fft.h
|
||||
defines kiss_fft_scalar as either short or a float type
|
||||
and defines
|
||||
typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */
|
||||
#include "kiss_fft.h"
|
||||
#include "math_approx.h"
|
||||
|
||||
#define MAXFACTORS 32
|
||||
/* e.g. an fft of length 128 has 4 factors
|
||||
as far as kissfft is concerned
|
||||
4*4*4*2
|
||||
*/
|
||||
|
||||
struct kiss_fft_state{
|
||||
int nfft;
|
||||
int inverse;
|
||||
int factors[2*MAXFACTORS];
|
||||
kiss_fft_cpx twiddles[1];
|
||||
};
|
||||
|
||||
/*
|
||||
Explanation of macros dealing with complex math:
|
||||
|
||||
C_MUL(m,a,b) : m = a*b
|
||||
C_FIXDIV( c , div ) : if a fixed point impl., c /= div. noop otherwise
|
||||
C_SUB( res, a,b) : res = a - b
|
||||
C_SUBFROM( res , a) : res -= a
|
||||
C_ADDTO( res , a) : res += a
|
||||
* */
|
||||
#ifdef FIXED_POINT
|
||||
#include "arch.h"
|
||||
# define FRACBITS 15
|
||||
# define SAMPPROD spx_int32_t
|
||||
#define SAMP_MAX 32767
|
||||
|
||||
#define SAMP_MIN -SAMP_MAX
|
||||
|
||||
#if defined(CHECK_OVERFLOW)
|
||||
# define CHECK_OVERFLOW_OP(a,op,b) \
|
||||
if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \
|
||||
fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) ); }
|
||||
#endif
|
||||
|
||||
|
||||
# define smul(a,b) ( (SAMPPROD)(a)*(b) )
|
||||
# define sround( x ) (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS )
|
||||
|
||||
# define S_MUL(a,b) sround( smul(a,b) )
|
||||
|
||||
# define C_MUL(m,a,b) \
|
||||
do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \
|
||||
(m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0)
|
||||
|
||||
# define C_MUL4(m,a,b) \
|
||||
do{ (m).r = PSHR32( smul((a).r,(b).r) - smul((a).i,(b).i),17 ); \
|
||||
(m).i = PSHR32( smul((a).r,(b).i) + smul((a).i,(b).r),17 ); }while(0)
|
||||
|
||||
# define DIVSCALAR(x,k) \
|
||||
(x) = sround( smul( x, SAMP_MAX/k ) )
|
||||
|
||||
# define C_FIXDIV(c,div) \
|
||||
do { DIVSCALAR( (c).r , div); \
|
||||
DIVSCALAR( (c).i , div); }while (0)
|
||||
|
||||
# define C_MULBYSCALAR( c, s ) \
|
||||
do{ (c).r = sround( smul( (c).r , s ) ) ;\
|
||||
(c).i = sround( smul( (c).i , s ) ) ; }while(0)
|
||||
|
||||
#else /* not FIXED_POINT*/
|
||||
|
||||
# define S_MUL(a,b) ( (a)*(b) )
|
||||
#define C_MUL(m,a,b) \
|
||||
do{ (m).r = (a).r*(b).r - (a).i*(b).i;\
|
||||
(m).i = (a).r*(b).i + (a).i*(b).r; }while(0)
|
||||
|
||||
#define C_MUL4(m,a,b) C_MUL(m,a,b)
|
||||
|
||||
# define C_FIXDIV(c,div) /* NOOP */
|
||||
# define C_MULBYSCALAR( c, s ) \
|
||||
do{ (c).r *= (s);\
|
||||
(c).i *= (s); }while(0)
|
||||
#endif
|
||||
|
||||
#ifndef CHECK_OVERFLOW_OP
|
||||
# define CHECK_OVERFLOW_OP(a,op,b) /* noop */
|
||||
#endif
|
||||
|
||||
#define C_ADD( res, a,b)\
|
||||
do { \
|
||||
CHECK_OVERFLOW_OP((a).r,+,(b).r)\
|
||||
CHECK_OVERFLOW_OP((a).i,+,(b).i)\
|
||||
(res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \
|
||||
}while(0)
|
||||
#define C_SUB( res, a,b)\
|
||||
do { \
|
||||
CHECK_OVERFLOW_OP((a).r,-,(b).r)\
|
||||
CHECK_OVERFLOW_OP((a).i,-,(b).i)\
|
||||
(res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \
|
||||
}while(0)
|
||||
#define C_ADDTO( res , a)\
|
||||
do { \
|
||||
CHECK_OVERFLOW_OP((res).r,+,(a).r)\
|
||||
CHECK_OVERFLOW_OP((res).i,+,(a).i)\
|
||||
(res).r += (a).r; (res).i += (a).i;\
|
||||
}while(0)
|
||||
|
||||
#define C_SUBFROM( res , a)\
|
||||
do {\
|
||||
CHECK_OVERFLOW_OP((res).r,-,(a).r)\
|
||||
CHECK_OVERFLOW_OP((res).i,-,(a).i)\
|
||||
(res).r -= (a).r; (res).i -= (a).i; \
|
||||
}while(0)
|
||||
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
# define KISS_FFT_COS(phase) floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase))))
|
||||
# define KISS_FFT_SIN(phase) floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))
|
||||
# define HALF_OF(x) ((x)>>1)
|
||||
#elif defined(USE_SIMD)
|
||||
# define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) )
|
||||
# define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) )
|
||||
# define HALF_OF(x) ((x)*_mm_set1_ps(.5))
|
||||
#else
|
||||
# define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase)
|
||||
# define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase)
|
||||
# define HALF_OF(x) ((x)*.5)
|
||||
#endif
|
||||
|
||||
#define kf_cexp(x,phase) \
|
||||
do{ \
|
||||
(x)->r = KISS_FFT_COS(phase);\
|
||||
(x)->i = KISS_FFT_SIN(phase);\
|
||||
}while(0)
|
||||
#define kf_cexp2(x,phase) \
|
||||
do{ \
|
||||
(x)->r = spx_cos_norm((phase));\
|
||||
(x)->i = spx_cos_norm((phase)-32768);\
|
||||
}while(0)
|
||||
|
||||
|
||||
/* a debugging function */
|
||||
#define pcpx(c)\
|
||||
fprintf(stderr,"%g + %gi\n",(double)((c)->r),(double)((c)->i) )
|
||||
239
jni/libspeex/arch.h
Normal file
@@ -0,0 +1,239 @@
|
||||
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||
/**
|
||||
@file arch.h
|
||||
@brief Various architecture definitions Speex
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef ARCH_H
|
||||
#define ARCH_H
|
||||
|
||||
#ifndef SPEEX_VERSION
|
||||
#define SPEEX_MAJOR_VERSION 1 /**< Major Speex version. */
|
||||
#define SPEEX_MINOR_VERSION 1 /**< Minor Speex version. */
|
||||
#define SPEEX_MICRO_VERSION 15 /**< Micro Speex version. */
|
||||
#define SPEEX_EXTRA_VERSION "" /**< Extra Speex version. */
|
||||
#define SPEEX_VERSION "speex-1.2beta3" /**< Speex version string. */
|
||||
#endif
|
||||
|
||||
/* A couple test to catch stupid option combinations */
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
#ifdef FLOATING_POINT
|
||||
#error You cannot compile as floating point and fixed point at the same time
|
||||
#endif
|
||||
#ifdef _USE_SSE
|
||||
#error SSE is only for floating-point
|
||||
#endif
|
||||
#if ((defined (ARM4_ASM)||defined (ARM4_ASM)) && defined(BFIN_ASM)) || (defined (ARM4_ASM)&&defined(ARM5E_ASM))
|
||||
#error Make up your mind. What CPU do you have?
|
||||
#endif
|
||||
#ifdef VORBIS_PSYCHO
|
||||
#error Vorbis-psy model currently not implemented in fixed-point
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifndef FLOATING_POINT
|
||||
#error You now need to define either FIXED_POINT or FLOATING_POINT
|
||||
#endif
|
||||
#if defined (ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
|
||||
#error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions?
|
||||
#endif
|
||||
#ifdef FIXED_POINT_DEBUG
|
||||
#error "Don't you think enabling fixed-point is a good thing to do if you want to debug that?"
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef OUTSIDE_SPEEX
|
||||
#include "speex/speex_types.h"
|
||||
#endif
|
||||
|
||||
#define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */
|
||||
#define ABS16(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 16-bit value. */
|
||||
#define MIN16(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 16-bit value. */
|
||||
#define MAX16(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 16-bit value. */
|
||||
#define ABS32(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 32-bit value. */
|
||||
#define MIN32(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 32-bit value. */
|
||||
#define MAX32(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 32-bit value. */
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
typedef spx_int16_t spx_word16_t;
|
||||
typedef spx_int32_t spx_word32_t;
|
||||
typedef spx_word32_t spx_mem_t;
|
||||
typedef spx_word16_t spx_coef_t;
|
||||
typedef spx_word16_t spx_lsp_t;
|
||||
typedef spx_word32_t spx_sig_t;
|
||||
|
||||
#define Q15ONE 32767
|
||||
|
||||
#define LPC_SCALING 8192
|
||||
#define SIG_SCALING 16384
|
||||
#define LSP_SCALING 8192.
|
||||
#define GAMMA_SCALING 32768.
|
||||
#define GAIN_SCALING 64
|
||||
#define GAIN_SCALING_1 0.015625
|
||||
|
||||
#define LPC_SHIFT 13
|
||||
#define LSP_SHIFT 13
|
||||
#define SIG_SHIFT 14
|
||||
#define GAIN_SHIFT 6
|
||||
|
||||
#define VERY_SMALL 0
|
||||
#define VERY_LARGE32 ((spx_word32_t)2147483647)
|
||||
#define VERY_LARGE16 ((spx_word16_t)32767)
|
||||
#define Q15_ONE ((spx_word16_t)32767)
|
||||
|
||||
|
||||
#ifdef FIXED_DEBUG
|
||||
#include "fixed_debug.h"
|
||||
#else
|
||||
|
||||
#include "fixed_generic.h"
|
||||
|
||||
#ifdef ARM5E_ASM
|
||||
#include "fixed_arm5e.h"
|
||||
#elif defined (ARM4_ASM)
|
||||
#include "fixed_arm4.h"
|
||||
#elif defined (BFIN_ASM)
|
||||
#include "fixed_bfin.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
|
||||
typedef float spx_mem_t;
|
||||
typedef float spx_coef_t;
|
||||
typedef float spx_lsp_t;
|
||||
typedef float spx_sig_t;
|
||||
typedef float spx_word16_t;
|
||||
typedef float spx_word32_t;
|
||||
|
||||
#define Q15ONE 1.0f
|
||||
#define LPC_SCALING 1.f
|
||||
#define SIG_SCALING 1.f
|
||||
#define LSP_SCALING 1.f
|
||||
#define GAMMA_SCALING 1.f
|
||||
#define GAIN_SCALING 1.f
|
||||
#define GAIN_SCALING_1 1.f
|
||||
|
||||
|
||||
#define VERY_SMALL 1e-15f
|
||||
#define VERY_LARGE32 1e15f
|
||||
#define VERY_LARGE16 1e15f
|
||||
#define Q15_ONE ((spx_word16_t)1.f)
|
||||
|
||||
#define QCONST16(x,bits) (x)
|
||||
#define QCONST32(x,bits) (x)
|
||||
|
||||
#define NEG16(x) (-(x))
|
||||
#define NEG32(x) (-(x))
|
||||
#define EXTRACT16(x) (x)
|
||||
#define EXTEND32(x) (x)
|
||||
#define SHR16(a,shift) (a)
|
||||
#define SHL16(a,shift) (a)
|
||||
#define SHR32(a,shift) (a)
|
||||
#define SHL32(a,shift) (a)
|
||||
#define PSHR16(a,shift) (a)
|
||||
#define PSHR32(a,shift) (a)
|
||||
#define VSHR32(a,shift) (a)
|
||||
#define SATURATE16(x,a) (x)
|
||||
#define SATURATE32(x,a) (x)
|
||||
|
||||
#define PSHR(a,shift) (a)
|
||||
#define SHR(a,shift) (a)
|
||||
#define SHL(a,shift) (a)
|
||||
#define SATURATE(x,a) (x)
|
||||
|
||||
#define ADD16(a,b) ((a)+(b))
|
||||
#define SUB16(a,b) ((a)-(b))
|
||||
#define ADD32(a,b) ((a)+(b))
|
||||
#define SUB32(a,b) ((a)-(b))
|
||||
#define MULT16_16_16(a,b) ((a)*(b))
|
||||
#define MULT16_16(a,b) ((spx_word32_t)(a)*(spx_word32_t)(b))
|
||||
#define MAC16_16(c,a,b) ((c)+(spx_word32_t)(a)*(spx_word32_t)(b))
|
||||
|
||||
#define MULT16_32_Q11(a,b) ((a)*(b))
|
||||
#define MULT16_32_Q13(a,b) ((a)*(b))
|
||||
#define MULT16_32_Q14(a,b) ((a)*(b))
|
||||
#define MULT16_32_Q15(a,b) ((a)*(b))
|
||||
#define MULT16_32_P15(a,b) ((a)*(b))
|
||||
|
||||
#define MAC16_32_Q11(c,a,b) ((c)+(a)*(b))
|
||||
#define MAC16_32_Q15(c,a,b) ((c)+(a)*(b))
|
||||
|
||||
#define MAC16_16_Q11(c,a,b) ((c)+(a)*(b))
|
||||
#define MAC16_16_Q13(c,a,b) ((c)+(a)*(b))
|
||||
#define MAC16_16_P13(c,a,b) ((c)+(a)*(b))
|
||||
#define MULT16_16_Q11_32(a,b) ((a)*(b))
|
||||
#define MULT16_16_Q13(a,b) ((a)*(b))
|
||||
#define MULT16_16_Q14(a,b) ((a)*(b))
|
||||
#define MULT16_16_Q15(a,b) ((a)*(b))
|
||||
#define MULT16_16_P15(a,b) ((a)*(b))
|
||||
#define MULT16_16_P13(a,b) ((a)*(b))
|
||||
#define MULT16_16_P14(a,b) ((a)*(b))
|
||||
|
||||
#define DIV32_16(a,b) (((spx_word32_t)(a))/(spx_word16_t)(b))
|
||||
#define PDIV32_16(a,b) (((spx_word32_t)(a))/(spx_word16_t)(b))
|
||||
#define DIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
|
||||
#define PDIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
|
||||
|
||||
/* 2 on TI C5x DSP */
|
||||
#define BYTES_PER_CHAR 2
|
||||
#define BITS_PER_CHAR 16
|
||||
#define LOG2_BITS_PER_CHAR 4
|
||||
|
||||
#else
|
||||
|
||||
#define BYTES_PER_CHAR 1
|
||||
#define BITS_PER_CHAR 8
|
||||
#define LOG2_BITS_PER_CHAR 3
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef FIXED_DEBUG
|
||||
extern long long spx_mips;
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
372
jni/libspeex/bits.c
Normal file
@@ -0,0 +1,372 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: speex_bits.c
|
||||
|
||||
Handles bit packing/unpacking
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <speex/speex_bits.h>
|
||||
#include "arch.h"
|
||||
#include "os_support.h"
|
||||
|
||||
/* Maximum size of the bit-stream (for fixed-size allocation) */
|
||||
#ifndef MAX_CHARS_PER_FRAME
|
||||
#define MAX_CHARS_PER_FRAME (2000/BYTES_PER_CHAR)
|
||||
#endif
|
||||
|
||||
EXPORT void speex_bits_init(SpeexBits *bits)
|
||||
{
|
||||
bits->chars = (char*)speex_alloc(MAX_CHARS_PER_FRAME);
|
||||
if (!bits->chars)
|
||||
return;
|
||||
|
||||
bits->buf_size = MAX_CHARS_PER_FRAME;
|
||||
|
||||
bits->owner=1;
|
||||
|
||||
speex_bits_reset(bits);
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size)
|
||||
{
|
||||
bits->chars = (char*)buff;
|
||||
bits->buf_size = buf_size;
|
||||
|
||||
bits->owner=0;
|
||||
|
||||
speex_bits_reset(bits);
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_set_bit_buffer(SpeexBits *bits, void *buff, int buf_size)
|
||||
{
|
||||
bits->chars = (char*)buff;
|
||||
bits->buf_size = buf_size;
|
||||
|
||||
bits->owner=0;
|
||||
|
||||
bits->nbBits=buf_size<<LOG2_BITS_PER_CHAR;
|
||||
bits->charPtr=0;
|
||||
bits->bitPtr=0;
|
||||
bits->overflow=0;
|
||||
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_destroy(SpeexBits *bits)
|
||||
{
|
||||
if (bits->owner)
|
||||
speex_free(bits->chars);
|
||||
/* Will do something once the allocation is dynamic */
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_reset(SpeexBits *bits)
|
||||
{
|
||||
/* We only need to clear the first byte now */
|
||||
bits->chars[0]=0;
|
||||
bits->nbBits=0;
|
||||
bits->charPtr=0;
|
||||
bits->bitPtr=0;
|
||||
bits->overflow=0;
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_rewind(SpeexBits *bits)
|
||||
{
|
||||
bits->charPtr=0;
|
||||
bits->bitPtr=0;
|
||||
bits->overflow=0;
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
|
||||
{
|
||||
int i;
|
||||
int nchars = len / BYTES_PER_CHAR;
|
||||
if (nchars > bits->buf_size)
|
||||
{
|
||||
speex_notify("Packet is larger than allocated buffer");
|
||||
if (bits->owner)
|
||||
{
|
||||
char *tmp = (char*)speex_realloc(bits->chars, nchars);
|
||||
if (tmp)
|
||||
{
|
||||
bits->buf_size=nchars;
|
||||
bits->chars=tmp;
|
||||
} else {
|
||||
nchars=bits->buf_size;
|
||||
speex_warning("Could not resize input buffer: truncating input");
|
||||
}
|
||||
} else {
|
||||
speex_warning("Do not own input buffer: truncating oversize input");
|
||||
nchars=bits->buf_size;
|
||||
}
|
||||
}
|
||||
#if (BYTES_PER_CHAR==2)
|
||||
/* Swap bytes to proper endian order (could be done externally) */
|
||||
#define HTOLS(A) ((((A) >> 8)&0xff)|(((A) & 0xff)<<8))
|
||||
#else
|
||||
#define HTOLS(A) (A)
|
||||
#endif
|
||||
for (i=0;i<nchars;i++)
|
||||
bits->chars[i]=HTOLS(chars[i]);
|
||||
|
||||
bits->nbBits=nchars<<LOG2_BITS_PER_CHAR;
|
||||
bits->charPtr=0;
|
||||
bits->bitPtr=0;
|
||||
bits->overflow=0;
|
||||
}
|
||||
|
||||
static void speex_bits_flush(SpeexBits *bits)
|
||||
{
|
||||
int nchars = ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR);
|
||||
if (bits->charPtr>0)
|
||||
SPEEX_MOVE(bits->chars, &bits->chars[bits->charPtr], nchars-bits->charPtr);
|
||||
bits->nbBits -= bits->charPtr<<LOG2_BITS_PER_CHAR;
|
||||
bits->charPtr=0;
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes)
|
||||
{
|
||||
int i,pos;
|
||||
int nchars = nbytes/BYTES_PER_CHAR;
|
||||
|
||||
if (((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR)+nchars > bits->buf_size)
|
||||
{
|
||||
/* Packet is larger than allocated buffer */
|
||||
if (bits->owner)
|
||||
{
|
||||
char *tmp = (char*)speex_realloc(bits->chars, (bits->nbBits>>LOG2_BITS_PER_CHAR)+nchars+1);
|
||||
if (tmp)
|
||||
{
|
||||
bits->buf_size=(bits->nbBits>>LOG2_BITS_PER_CHAR)+nchars+1;
|
||||
bits->chars=tmp;
|
||||
} else {
|
||||
nchars=bits->buf_size-(bits->nbBits>>LOG2_BITS_PER_CHAR)-1;
|
||||
speex_warning("Could not resize input buffer: truncating oversize input");
|
||||
}
|
||||
} else {
|
||||
speex_warning("Do not own input buffer: truncating oversize input");
|
||||
nchars=bits->buf_size;
|
||||
}
|
||||
}
|
||||
|
||||
speex_bits_flush(bits);
|
||||
pos=bits->nbBits>>LOG2_BITS_PER_CHAR;
|
||||
for (i=0;i<nchars;i++)
|
||||
bits->chars[pos+i]=HTOLS(chars[i]);
|
||||
bits->nbBits+=nchars<<LOG2_BITS_PER_CHAR;
|
||||
}
|
||||
|
||||
EXPORT int speex_bits_write(SpeexBits *bits, char *chars, int max_nbytes)
|
||||
{
|
||||
int i;
|
||||
int max_nchars = max_nbytes/BYTES_PER_CHAR;
|
||||
int charPtr, bitPtr, nbBits;
|
||||
|
||||
/* Insert terminator, but save the data so we can put it back after */
|
||||
bitPtr=bits->bitPtr;
|
||||
charPtr=bits->charPtr;
|
||||
nbBits=bits->nbBits;
|
||||
speex_bits_insert_terminator(bits);
|
||||
bits->bitPtr=bitPtr;
|
||||
bits->charPtr=charPtr;
|
||||
bits->nbBits=nbBits;
|
||||
|
||||
if (max_nchars > ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR))
|
||||
max_nchars = ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR);
|
||||
|
||||
for (i=0;i<max_nchars;i++)
|
||||
chars[i]=HTOLS(bits->chars[i]);
|
||||
return max_nchars*BYTES_PER_CHAR;
|
||||
}
|
||||
|
||||
EXPORT int speex_bits_write_whole_bytes(SpeexBits *bits, char *chars, int max_nbytes)
|
||||
{
|
||||
int max_nchars = max_nbytes/BYTES_PER_CHAR;
|
||||
int i;
|
||||
if (max_nchars > ((bits->nbBits)>>LOG2_BITS_PER_CHAR))
|
||||
max_nchars = ((bits->nbBits)>>LOG2_BITS_PER_CHAR);
|
||||
for (i=0;i<max_nchars;i++)
|
||||
chars[i]=HTOLS(bits->chars[i]);
|
||||
|
||||
if (bits->bitPtr>0)
|
||||
bits->chars[0]=bits->chars[max_nchars];
|
||||
else
|
||||
bits->chars[0]=0;
|
||||
bits->charPtr=0;
|
||||
bits->nbBits &= (BITS_PER_CHAR-1);
|
||||
return max_nchars*BYTES_PER_CHAR;
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
|
||||
{
|
||||
unsigned int d=data;
|
||||
|
||||
if (bits->charPtr+((nbBits+bits->bitPtr)>>LOG2_BITS_PER_CHAR) >= bits->buf_size)
|
||||
{
|
||||
speex_notify("Buffer too small to pack bits");
|
||||
if (bits->owner)
|
||||
{
|
||||
int new_nchars = ((bits->buf_size+5)*3)>>1;
|
||||
char *tmp = (char*)speex_realloc(bits->chars, new_nchars);
|
||||
if (tmp)
|
||||
{
|
||||
bits->buf_size=new_nchars;
|
||||
bits->chars=tmp;
|
||||
} else {
|
||||
speex_warning("Could not resize input buffer: not packing");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
speex_warning("Do not own input buffer: not packing");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
while(nbBits)
|
||||
{
|
||||
int bit;
|
||||
bit = (d>>(nbBits-1))&1;
|
||||
bits->chars[bits->charPtr] |= bit<<(BITS_PER_CHAR-1-bits->bitPtr);
|
||||
bits->bitPtr++;
|
||||
|
||||
if (bits->bitPtr==BITS_PER_CHAR)
|
||||
{
|
||||
bits->bitPtr=0;
|
||||
bits->charPtr++;
|
||||
bits->chars[bits->charPtr] = 0;
|
||||
}
|
||||
bits->nbBits++;
|
||||
nbBits--;
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT int speex_bits_unpack_signed(SpeexBits *bits, int nbBits)
|
||||
{
|
||||
unsigned int d=speex_bits_unpack_unsigned(bits,nbBits);
|
||||
/* If number is negative */
|
||||
if (d>>(nbBits-1))
|
||||
{
|
||||
d |= (-1)<<nbBits;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
EXPORT unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits)
|
||||
{
|
||||
unsigned int d=0;
|
||||
if ((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr+nbBits>bits->nbBits)
|
||||
bits->overflow=1;
|
||||
if (bits->overflow)
|
||||
return 0;
|
||||
while(nbBits)
|
||||
{
|
||||
d<<=1;
|
||||
d |= (bits->chars[bits->charPtr]>>(BITS_PER_CHAR-1 - bits->bitPtr))&1;
|
||||
bits->bitPtr++;
|
||||
if (bits->bitPtr==BITS_PER_CHAR)
|
||||
{
|
||||
bits->bitPtr=0;
|
||||
bits->charPtr++;
|
||||
}
|
||||
nbBits--;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
EXPORT unsigned int speex_bits_peek_unsigned(SpeexBits *bits, int nbBits)
|
||||
{
|
||||
unsigned int d=0;
|
||||
int bitPtr, charPtr;
|
||||
char *chars;
|
||||
|
||||
if ((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr+nbBits>bits->nbBits)
|
||||
bits->overflow=1;
|
||||
if (bits->overflow)
|
||||
return 0;
|
||||
|
||||
bitPtr=bits->bitPtr;
|
||||
charPtr=bits->charPtr;
|
||||
chars = bits->chars;
|
||||
while(nbBits)
|
||||
{
|
||||
d<<=1;
|
||||
d |= (chars[charPtr]>>(BITS_PER_CHAR-1 - bitPtr))&1;
|
||||
bitPtr++;
|
||||
if (bitPtr==BITS_PER_CHAR)
|
||||
{
|
||||
bitPtr=0;
|
||||
charPtr++;
|
||||
}
|
||||
nbBits--;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
EXPORT int speex_bits_peek(SpeexBits *bits)
|
||||
{
|
||||
if ((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr+1>bits->nbBits)
|
||||
bits->overflow=1;
|
||||
if (bits->overflow)
|
||||
return 0;
|
||||
return (bits->chars[bits->charPtr]>>(BITS_PER_CHAR-1 - bits->bitPtr))&1;
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_advance(SpeexBits *bits, int n)
|
||||
{
|
||||
if (((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr+n>bits->nbBits) || bits->overflow){
|
||||
bits->overflow=1;
|
||||
return;
|
||||
}
|
||||
bits->charPtr += (bits->bitPtr+n) >> LOG2_BITS_PER_CHAR; /* divide by BITS_PER_CHAR */
|
||||
bits->bitPtr = (bits->bitPtr+n) & (BITS_PER_CHAR-1); /* modulo by BITS_PER_CHAR */
|
||||
}
|
||||
|
||||
EXPORT int speex_bits_remaining(SpeexBits *bits)
|
||||
{
|
||||
if (bits->overflow)
|
||||
return -1;
|
||||
else
|
||||
return bits->nbBits-((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr);
|
||||
}
|
||||
|
||||
EXPORT int speex_bits_nbytes(SpeexBits *bits)
|
||||
{
|
||||
return ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR);
|
||||
}
|
||||
|
||||
EXPORT void speex_bits_insert_terminator(SpeexBits *bits)
|
||||
{
|
||||
if (bits->bitPtr)
|
||||
speex_bits_pack(bits, 0, 1);
|
||||
while (bits->bitPtr)
|
||||
speex_bits_pack(bits, 1, 1);
|
||||
}
|
||||
176
jni/libspeex/buffer.c
Normal file
@@ -0,0 +1,176 @@
|
||||
/* Copyright (C) 2007 Jean-Marc Valin
|
||||
|
||||
File: buffer.c
|
||||
This is a very simple ring buffer implementation. It is not thread-safe
|
||||
so you need to do your own locking.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "os_support.h"
|
||||
#include "arch.h"
|
||||
#include <speex/speex_buffer.h>
|
||||
|
||||
struct SpeexBuffer_ {
|
||||
char *data;
|
||||
int size;
|
||||
int read_ptr;
|
||||
int write_ptr;
|
||||
int available;
|
||||
};
|
||||
|
||||
EXPORT SpeexBuffer *speex_buffer_init(int size)
|
||||
{
|
||||
SpeexBuffer *st = speex_alloc(sizeof(SpeexBuffer));
|
||||
st->data = speex_alloc(size);
|
||||
st->size = size;
|
||||
st->read_ptr = 0;
|
||||
st->write_ptr = 0;
|
||||
st->available = 0;
|
||||
return st;
|
||||
}
|
||||
|
||||
EXPORT void speex_buffer_destroy(SpeexBuffer *st)
|
||||
{
|
||||
speex_free(st->data);
|
||||
speex_free(st);
|
||||
}
|
||||
|
||||
EXPORT int speex_buffer_write(SpeexBuffer *st, void *_data, int len)
|
||||
{
|
||||
int end;
|
||||
int end1;
|
||||
char *data = _data;
|
||||
if (len > st->size)
|
||||
{
|
||||
data += len-st->size;
|
||||
len = st->size;
|
||||
}
|
||||
end = st->write_ptr + len;
|
||||
end1 = end;
|
||||
if (end1 > st->size)
|
||||
end1 = st->size;
|
||||
SPEEX_COPY(st->data + st->write_ptr, data, end1 - st->write_ptr);
|
||||
if (end > st->size)
|
||||
{
|
||||
end -= st->size;
|
||||
SPEEX_COPY(st->data, data+end1 - st->write_ptr, end);
|
||||
}
|
||||
st->available += len;
|
||||
if (st->available > st->size)
|
||||
{
|
||||
st->available = st->size;
|
||||
st->read_ptr = st->write_ptr;
|
||||
}
|
||||
st->write_ptr += len;
|
||||
if (st->write_ptr > st->size)
|
||||
st->write_ptr -= st->size;
|
||||
return len;
|
||||
}
|
||||
|
||||
EXPORT int speex_buffer_writezeros(SpeexBuffer *st, int len)
|
||||
{
|
||||
/* This is almost the same as for speex_buffer_write() but using
|
||||
SPEEX_MEMSET() instead of SPEEX_COPY(). Update accordingly. */
|
||||
int end;
|
||||
int end1;
|
||||
if (len > st->size)
|
||||
{
|
||||
len = st->size;
|
||||
}
|
||||
end = st->write_ptr + len;
|
||||
end1 = end;
|
||||
if (end1 > st->size)
|
||||
end1 = st->size;
|
||||
SPEEX_MEMSET(st->data + st->write_ptr, 0, end1 - st->write_ptr);
|
||||
if (end > st->size)
|
||||
{
|
||||
end -= st->size;
|
||||
SPEEX_MEMSET(st->data, 0, end);
|
||||
}
|
||||
st->available += len;
|
||||
if (st->available > st->size)
|
||||
{
|
||||
st->available = st->size;
|
||||
st->read_ptr = st->write_ptr;
|
||||
}
|
||||
st->write_ptr += len;
|
||||
if (st->write_ptr > st->size)
|
||||
st->write_ptr -= st->size;
|
||||
return len;
|
||||
}
|
||||
|
||||
EXPORT int speex_buffer_read(SpeexBuffer *st, void *_data, int len)
|
||||
{
|
||||
int end, end1;
|
||||
char *data = _data;
|
||||
if (len > st->available)
|
||||
{
|
||||
SPEEX_MEMSET(data+st->available, 0, st->size-st->available);
|
||||
len = st->available;
|
||||
}
|
||||
end = st->read_ptr + len;
|
||||
end1 = end;
|
||||
if (end1 > st->size)
|
||||
end1 = st->size;
|
||||
SPEEX_COPY(data, st->data + st->read_ptr, end1 - st->read_ptr);
|
||||
|
||||
if (end > st->size)
|
||||
{
|
||||
end -= st->size;
|
||||
SPEEX_COPY(data+end1 - st->read_ptr, st->data, end);
|
||||
}
|
||||
st->available -= len;
|
||||
st->read_ptr += len;
|
||||
if (st->read_ptr > st->size)
|
||||
st->read_ptr -= st->size;
|
||||
return len;
|
||||
}
|
||||
|
||||
EXPORT int speex_buffer_get_available(SpeexBuffer *st)
|
||||
{
|
||||
return st->available;
|
||||
}
|
||||
|
||||
EXPORT int speex_buffer_resize(SpeexBuffer *st, int len)
|
||||
{
|
||||
int old_len = st->size;
|
||||
if (len > old_len)
|
||||
{
|
||||
st->data = speex_realloc(st->data, len);
|
||||
/* FIXME: move data/pointers properly for growing the buffer */
|
||||
} else {
|
||||
/* FIXME: move data/pointers properly for shrinking the buffer */
|
||||
st->data = speex_realloc(st->data, len);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
612
jni/libspeex/cb_search.c
Normal file
@@ -0,0 +1,612 @@
|
||||
/* Copyright (C) 2002-2006 Jean-Marc Valin
|
||||
File: cb_search.c
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "cb_search.h"
|
||||
#include "filters.h"
|
||||
#include "stack_alloc.h"
|
||||
#include "vq.h"
|
||||
#include "arch.h"
|
||||
#include "math_approx.h"
|
||||
#include "os_support.h"
|
||||
|
||||
#ifdef _USE_SSE
|
||||
#include "cb_search_sse.h"
|
||||
#elif defined(ARM4_ASM) || defined(ARM5E_ASM)
|
||||
#include "cb_search_arm4.h"
|
||||
#elif defined(BFIN_ASM)
|
||||
#include "cb_search_bfin.h"
|
||||
#endif
|
||||
|
||||
#ifndef OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
|
||||
static void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
|
||||
{
|
||||
int i, j, k;
|
||||
VARDECL(spx_word16_t *shape);
|
||||
ALLOC(shape, subvect_size, spx_word16_t);
|
||||
for (i=0;i<shape_cb_size;i++)
|
||||
{
|
||||
spx_word16_t *res;
|
||||
|
||||
res = resp+i*subvect_size;
|
||||
for (k=0;k<subvect_size;k++)
|
||||
shape[k] = (spx_word16_t)shape_cb[i*subvect_size+k];
|
||||
E[i]=0;
|
||||
|
||||
/* Compute codeword response using convolution with impulse response */
|
||||
for(j=0;j<subvect_size;j++)
|
||||
{
|
||||
spx_word32_t resj=0;
|
||||
spx_word16_t res16;
|
||||
for (k=0;k<=j;k++)
|
||||
resj = MAC16_16(resj,shape[k],r[j-k]);
|
||||
#ifdef FIXED_POINT
|
||||
res16 = EXTRACT16(SHR32(resj, 13));
|
||||
#else
|
||||
res16 = 0.03125f*resj;
|
||||
#endif
|
||||
/* Compute codeword energy */
|
||||
E[i]=MAC16_16(E[i],res16,res16);
|
||||
res[j] = res16;
|
||||
/*printf ("%d\n", (int)res[j]);*/
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OVERRIDE_TARGET_UPDATE
|
||||
static inline void target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len)
|
||||
{
|
||||
int n;
|
||||
for (n=0;n<len;n++)
|
||||
t[n] = SUB16(t[n],PSHR32(MULT16_16(g,r[n]),13));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static void split_cb_search_shape_sign_N1(
|
||||
spx_word16_t target[], /* target vector */
|
||||
spx_coef_t ak[], /* LPCs for this subframe */
|
||||
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
|
||||
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
|
||||
const void *par, /* Codebook/search parameters*/
|
||||
int p, /* number of LPC coeffs */
|
||||
int nsf, /* number of samples in subframe */
|
||||
spx_sig_t *exc,
|
||||
spx_word16_t *r,
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
int update_target
|
||||
)
|
||||
{
|
||||
int i,j,m,q;
|
||||
VARDECL(spx_word16_t *resp);
|
||||
#ifdef _USE_SSE
|
||||
VARDECL(__m128 *resp2);
|
||||
VARDECL(__m128 *E);
|
||||
#else
|
||||
spx_word16_t *resp2;
|
||||
VARDECL(spx_word32_t *E);
|
||||
#endif
|
||||
VARDECL(spx_word16_t *t);
|
||||
VARDECL(spx_sig_t *e);
|
||||
const signed char *shape_cb;
|
||||
int shape_cb_size, subvect_size, nb_subvect;
|
||||
const split_cb_params *params;
|
||||
int best_index;
|
||||
spx_word32_t best_dist;
|
||||
int have_sign;
|
||||
|
||||
params = (const split_cb_params *) par;
|
||||
subvect_size = params->subvect_size;
|
||||
nb_subvect = params->nb_subvect;
|
||||
shape_cb_size = 1<<params->shape_bits;
|
||||
shape_cb = params->shape_cb;
|
||||
have_sign = params->have_sign;
|
||||
ALLOC(resp, shape_cb_size*subvect_size, spx_word16_t);
|
||||
#ifdef _USE_SSE
|
||||
ALLOC(resp2, (shape_cb_size*subvect_size)>>2, __m128);
|
||||
ALLOC(E, shape_cb_size>>2, __m128);
|
||||
#else
|
||||
resp2 = resp;
|
||||
ALLOC(E, shape_cb_size, spx_word32_t);
|
||||
#endif
|
||||
ALLOC(t, nsf, spx_word16_t);
|
||||
ALLOC(e, nsf, spx_sig_t);
|
||||
|
||||
/* FIXME: Do we still need to copy the target? */
|
||||
SPEEX_COPY(t, target, nsf);
|
||||
|
||||
compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack);
|
||||
|
||||
for (i=0;i<nb_subvect;i++)
|
||||
{
|
||||
spx_word16_t *x=t+subvect_size*i;
|
||||
/*Find new n-best based on previous n-best j*/
|
||||
if (have_sign)
|
||||
vq_nbest_sign(x, resp2, subvect_size, shape_cb_size, E, 1, &best_index, &best_dist, stack);
|
||||
else
|
||||
vq_nbest(x, resp2, subvect_size, shape_cb_size, E, 1, &best_index, &best_dist, stack);
|
||||
|
||||
speex_bits_pack(bits,best_index,params->shape_bits+have_sign);
|
||||
|
||||
{
|
||||
int rind;
|
||||
spx_word16_t *res;
|
||||
spx_word16_t sign=1;
|
||||
rind = best_index;
|
||||
if (rind>=shape_cb_size)
|
||||
{
|
||||
sign=-1;
|
||||
rind-=shape_cb_size;
|
||||
}
|
||||
res = resp+rind*subvect_size;
|
||||
if (sign>0)
|
||||
for (m=0;m<subvect_size;m++)
|
||||
t[subvect_size*i+m] = SUB16(t[subvect_size*i+m], res[m]);
|
||||
else
|
||||
for (m=0;m<subvect_size;m++)
|
||||
t[subvect_size*i+m] = ADD16(t[subvect_size*i+m], res[m]);
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
if (sign==1)
|
||||
{
|
||||
for (j=0;j<subvect_size;j++)
|
||||
e[subvect_size*i+j]=SHL32(EXTEND32(shape_cb[rind*subvect_size+j]),SIG_SHIFT-5);
|
||||
} else {
|
||||
for (j=0;j<subvect_size;j++)
|
||||
e[subvect_size*i+j]=NEG32(SHL32(EXTEND32(shape_cb[rind*subvect_size+j]),SIG_SHIFT-5));
|
||||
}
|
||||
#else
|
||||
for (j=0;j<subvect_size;j++)
|
||||
e[subvect_size*i+j]=sign*0.03125*shape_cb[rind*subvect_size+j];
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
for (m=0;m<subvect_size;m++)
|
||||
{
|
||||
spx_word16_t g;
|
||||
int rind;
|
||||
spx_word16_t sign=1;
|
||||
rind = best_index;
|
||||
if (rind>=shape_cb_size)
|
||||
{
|
||||
sign=-1;
|
||||
rind-=shape_cb_size;
|
||||
}
|
||||
|
||||
q=subvect_size-m;
|
||||
#ifdef FIXED_POINT
|
||||
g=sign*shape_cb[rind*subvect_size+m];
|
||||
#else
|
||||
g=sign*0.03125*shape_cb[rind*subvect_size+m];
|
||||
#endif
|
||||
target_update(t+subvect_size*(i+1), g, r+q, nsf-subvect_size*(i+1));
|
||||
}
|
||||
}
|
||||
|
||||
/* Update excitation */
|
||||
/* FIXME: We could update the excitation directly above */
|
||||
for (j=0;j<nsf;j++)
|
||||
exc[j]=ADD32(exc[j],e[j]);
|
||||
|
||||
/* Update target: only update target if necessary */
|
||||
if (update_target)
|
||||
{
|
||||
VARDECL(spx_word16_t *r2);
|
||||
ALLOC(r2, nsf, spx_word16_t);
|
||||
for (j=0;j<nsf;j++)
|
||||
r2[j] = EXTRACT16(PSHR32(e[j] ,6));
|
||||
syn_percep_zero16(r2, ak, awk1, awk2, r2, nsf,p, stack);
|
||||
for (j=0;j<nsf;j++)
|
||||
target[j]=SUB16(target[j],PSHR16(r2[j],2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void split_cb_search_shape_sign(
|
||||
spx_word16_t target[], /* target vector */
|
||||
spx_coef_t ak[], /* LPCs for this subframe */
|
||||
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
|
||||
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
|
||||
const void *par, /* Codebook/search parameters*/
|
||||
int p, /* number of LPC coeffs */
|
||||
int nsf, /* number of samples in subframe */
|
||||
spx_sig_t *exc,
|
||||
spx_word16_t *r,
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
int complexity,
|
||||
int update_target
|
||||
)
|
||||
{
|
||||
int i,j,k,m,n,q;
|
||||
VARDECL(spx_word16_t *resp);
|
||||
#ifdef _USE_SSE
|
||||
VARDECL(__m128 *resp2);
|
||||
VARDECL(__m128 *E);
|
||||
#else
|
||||
spx_word16_t *resp2;
|
||||
VARDECL(spx_word32_t *E);
|
||||
#endif
|
||||
VARDECL(spx_word16_t *t);
|
||||
VARDECL(spx_sig_t *e);
|
||||
VARDECL(spx_word16_t *tmp);
|
||||
VARDECL(spx_word32_t *ndist);
|
||||
VARDECL(spx_word32_t *odist);
|
||||
VARDECL(int *itmp);
|
||||
VARDECL(spx_word16_t **ot2);
|
||||
VARDECL(spx_word16_t **nt2);
|
||||
spx_word16_t **ot, **nt;
|
||||
VARDECL(int **nind);
|
||||
VARDECL(int **oind);
|
||||
VARDECL(int *ind);
|
||||
const signed char *shape_cb;
|
||||
int shape_cb_size, subvect_size, nb_subvect;
|
||||
const split_cb_params *params;
|
||||
int N=2;
|
||||
VARDECL(int *best_index);
|
||||
VARDECL(spx_word32_t *best_dist);
|
||||
VARDECL(int *best_nind);
|
||||
VARDECL(int *best_ntarget);
|
||||
int have_sign;
|
||||
N=complexity;
|
||||
if (N>10)
|
||||
N=10;
|
||||
/* Complexity isn't as important for the codebooks as it is for the pitch */
|
||||
N=(2*N)/3;
|
||||
if (N<1)
|
||||
N=1;
|
||||
if (N==1)
|
||||
{
|
||||
split_cb_search_shape_sign_N1(target,ak,awk1,awk2,par,p,nsf,exc,r,bits,stack,update_target);
|
||||
return;
|
||||
}
|
||||
ALLOC(ot2, N, spx_word16_t*);
|
||||
ALLOC(nt2, N, spx_word16_t*);
|
||||
ALLOC(oind, N, int*);
|
||||
ALLOC(nind, N, int*);
|
||||
|
||||
params = (const split_cb_params *) par;
|
||||
subvect_size = params->subvect_size;
|
||||
nb_subvect = params->nb_subvect;
|
||||
shape_cb_size = 1<<params->shape_bits;
|
||||
shape_cb = params->shape_cb;
|
||||
have_sign = params->have_sign;
|
||||
ALLOC(resp, shape_cb_size*subvect_size, spx_word16_t);
|
||||
#ifdef _USE_SSE
|
||||
ALLOC(resp2, (shape_cb_size*subvect_size)>>2, __m128);
|
||||
ALLOC(E, shape_cb_size>>2, __m128);
|
||||
#else
|
||||
resp2 = resp;
|
||||
ALLOC(E, shape_cb_size, spx_word32_t);
|
||||
#endif
|
||||
ALLOC(t, nsf, spx_word16_t);
|
||||
ALLOC(e, nsf, spx_sig_t);
|
||||
ALLOC(ind, nb_subvect, int);
|
||||
|
||||
ALLOC(tmp, 2*N*nsf, spx_word16_t);
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
ot2[i]=tmp+2*i*nsf;
|
||||
nt2[i]=tmp+(2*i+1)*nsf;
|
||||
}
|
||||
ot=ot2;
|
||||
nt=nt2;
|
||||
ALLOC(best_index, N, int);
|
||||
ALLOC(best_dist, N, spx_word32_t);
|
||||
ALLOC(best_nind, N, int);
|
||||
ALLOC(best_ntarget, N, int);
|
||||
ALLOC(ndist, N, spx_word32_t);
|
||||
ALLOC(odist, N, spx_word32_t);
|
||||
|
||||
ALLOC(itmp, 2*N*nb_subvect, int);
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
nind[i]=itmp+2*i*nb_subvect;
|
||||
oind[i]=itmp+(2*i+1)*nb_subvect;
|
||||
}
|
||||
|
||||
SPEEX_COPY(t, target, nsf);
|
||||
|
||||
for (j=0;j<N;j++)
|
||||
SPEEX_COPY(&ot[j][0], t, nsf);
|
||||
|
||||
/* Pre-compute codewords response and energy */
|
||||
compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack);
|
||||
|
||||
for (j=0;j<N;j++)
|
||||
odist[j]=0;
|
||||
|
||||
/*For all subvectors*/
|
||||
for (i=0;i<nb_subvect;i++)
|
||||
{
|
||||
/*"erase" nbest list*/
|
||||
for (j=0;j<N;j++)
|
||||
ndist[j]=VERY_LARGE32;
|
||||
/* This is not strictly necessary, but it provides an additonal safety
|
||||
to prevent crashes in case something goes wrong in the previous
|
||||
steps (e.g. NaNs) */
|
||||
for (j=0;j<N;j++)
|
||||
best_nind[j] = best_ntarget[j] = 0;
|
||||
/*For all n-bests of previous subvector*/
|
||||
for (j=0;j<N;j++)
|
||||
{
|
||||
spx_word16_t *x=ot[j]+subvect_size*i;
|
||||
spx_word32_t tener = 0;
|
||||
for (m=0;m<subvect_size;m++)
|
||||
tener = MAC16_16(tener, x[m],x[m]);
|
||||
#ifdef FIXED_POINT
|
||||
tener = SHR32(tener,1);
|
||||
#else
|
||||
tener *= .5;
|
||||
#endif
|
||||
/*Find new n-best based on previous n-best j*/
|
||||
if (have_sign)
|
||||
vq_nbest_sign(x, resp2, subvect_size, shape_cb_size, E, N, best_index, best_dist, stack);
|
||||
else
|
||||
vq_nbest(x, resp2, subvect_size, shape_cb_size, E, N, best_index, best_dist, stack);
|
||||
|
||||
/*For all new n-bests*/
|
||||
for (k=0;k<N;k++)
|
||||
{
|
||||
/* Compute total distance (including previous sub-vectors */
|
||||
spx_word32_t err = ADD32(ADD32(odist[j],best_dist[k]),tener);
|
||||
|
||||
/*update n-best list*/
|
||||
if (err<ndist[N-1])
|
||||
{
|
||||
for (m=0;m<N;m++)
|
||||
{
|
||||
if (err < ndist[m])
|
||||
{
|
||||
for (n=N-1;n>m;n--)
|
||||
{
|
||||
ndist[n] = ndist[n-1];
|
||||
best_nind[n] = best_nind[n-1];
|
||||
best_ntarget[n] = best_ntarget[n-1];
|
||||
}
|
||||
/* n is equal to m here, so they're interchangeable */
|
||||
ndist[m] = err;
|
||||
best_nind[n] = best_index[k];
|
||||
best_ntarget[n] = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i==0)
|
||||
break;
|
||||
}
|
||||
for (j=0;j<N;j++)
|
||||
{
|
||||
/*previous target (we don't care what happened before*/
|
||||
for (m=(i+1)*subvect_size;m<nsf;m++)
|
||||
nt[j][m]=ot[best_ntarget[j]][m];
|
||||
|
||||
/* New code: update the rest of the target only if it's worth it */
|
||||
for (m=0;m<subvect_size;m++)
|
||||
{
|
||||
spx_word16_t g;
|
||||
int rind;
|
||||
spx_word16_t sign=1;
|
||||
rind = best_nind[j];
|
||||
if (rind>=shape_cb_size)
|
||||
{
|
||||
sign=-1;
|
||||
rind-=shape_cb_size;
|
||||
}
|
||||
|
||||
q=subvect_size-m;
|
||||
#ifdef FIXED_POINT
|
||||
g=sign*shape_cb[rind*subvect_size+m];
|
||||
#else
|
||||
g=sign*0.03125*shape_cb[rind*subvect_size+m];
|
||||
#endif
|
||||
target_update(nt[j]+subvect_size*(i+1), g, r+q, nsf-subvect_size*(i+1));
|
||||
}
|
||||
|
||||
for (q=0;q<nb_subvect;q++)
|
||||
nind[j][q]=oind[best_ntarget[j]][q];
|
||||
nind[j][i]=best_nind[j];
|
||||
}
|
||||
|
||||
/*update old-new data*/
|
||||
/* just swap pointers instead of a long copy */
|
||||
{
|
||||
spx_word16_t **tmp2;
|
||||
tmp2=ot;
|
||||
ot=nt;
|
||||
nt=tmp2;
|
||||
}
|
||||
for (j=0;j<N;j++)
|
||||
for (m=0;m<nb_subvect;m++)
|
||||
oind[j][m]=nind[j][m];
|
||||
for (j=0;j<N;j++)
|
||||
odist[j]=ndist[j];
|
||||
}
|
||||
|
||||
/*save indices*/
|
||||
for (i=0;i<nb_subvect;i++)
|
||||
{
|
||||
ind[i]=nind[0][i];
|
||||
speex_bits_pack(bits,ind[i],params->shape_bits+have_sign);
|
||||
}
|
||||
|
||||
/* Put everything back together */
|
||||
for (i=0;i<nb_subvect;i++)
|
||||
{
|
||||
int rind;
|
||||
spx_word16_t sign=1;
|
||||
rind = ind[i];
|
||||
if (rind>=shape_cb_size)
|
||||
{
|
||||
sign=-1;
|
||||
rind-=shape_cb_size;
|
||||
}
|
||||
#ifdef FIXED_POINT
|
||||
if (sign==1)
|
||||
{
|
||||
for (j=0;j<subvect_size;j++)
|
||||
e[subvect_size*i+j]=SHL32(EXTEND32(shape_cb[rind*subvect_size+j]),SIG_SHIFT-5);
|
||||
} else {
|
||||
for (j=0;j<subvect_size;j++)
|
||||
e[subvect_size*i+j]=NEG32(SHL32(EXTEND32(shape_cb[rind*subvect_size+j]),SIG_SHIFT-5));
|
||||
}
|
||||
#else
|
||||
for (j=0;j<subvect_size;j++)
|
||||
e[subvect_size*i+j]=sign*0.03125*shape_cb[rind*subvect_size+j];
|
||||
#endif
|
||||
}
|
||||
/* Update excitation */
|
||||
for (j=0;j<nsf;j++)
|
||||
exc[j]=ADD32(exc[j],e[j]);
|
||||
|
||||
/* Update target: only update target if necessary */
|
||||
if (update_target)
|
||||
{
|
||||
VARDECL(spx_word16_t *r2);
|
||||
ALLOC(r2, nsf, spx_word16_t);
|
||||
for (j=0;j<nsf;j++)
|
||||
r2[j] = EXTRACT16(PSHR32(e[j] ,6));
|
||||
syn_percep_zero16(r2, ak, awk1, awk2, r2, nsf,p, stack);
|
||||
for (j=0;j<nsf;j++)
|
||||
target[j]=SUB16(target[j],PSHR16(r2[j],2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void split_cb_shape_sign_unquant(
|
||||
spx_sig_t *exc,
|
||||
const void *par, /* non-overlapping codebook */
|
||||
int nsf, /* number of samples in subframe */
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
spx_int32_t *seed
|
||||
)
|
||||
{
|
||||
int i,j;
|
||||
VARDECL(int *ind);
|
||||
VARDECL(int *signs);
|
||||
const signed char *shape_cb;
|
||||
int shape_cb_size, subvect_size, nb_subvect;
|
||||
const split_cb_params *params;
|
||||
int have_sign;
|
||||
|
||||
params = (const split_cb_params *) par;
|
||||
subvect_size = params->subvect_size;
|
||||
nb_subvect = params->nb_subvect;
|
||||
shape_cb_size = 1<<params->shape_bits;
|
||||
shape_cb = params->shape_cb;
|
||||
have_sign = params->have_sign;
|
||||
|
||||
ALLOC(ind, nb_subvect, int);
|
||||
ALLOC(signs, nb_subvect, int);
|
||||
|
||||
/* Decode codewords and gains */
|
||||
for (i=0;i<nb_subvect;i++)
|
||||
{
|
||||
if (have_sign)
|
||||
signs[i] = speex_bits_unpack_unsigned(bits, 1);
|
||||
else
|
||||
signs[i] = 0;
|
||||
ind[i] = speex_bits_unpack_unsigned(bits, params->shape_bits);
|
||||
}
|
||||
/* Compute decoded excitation */
|
||||
for (i=0;i<nb_subvect;i++)
|
||||
{
|
||||
spx_word16_t s=1;
|
||||
if (signs[i])
|
||||
s=-1;
|
||||
#ifdef FIXED_POINT
|
||||
if (s==1)
|
||||
{
|
||||
for (j=0;j<subvect_size;j++)
|
||||
exc[subvect_size*i+j]=SHL32(EXTEND32(shape_cb[ind[i]*subvect_size+j]),SIG_SHIFT-5);
|
||||
} else {
|
||||
for (j=0;j<subvect_size;j++)
|
||||
exc[subvect_size*i+j]=NEG32(SHL32(EXTEND32(shape_cb[ind[i]*subvect_size+j]),SIG_SHIFT-5));
|
||||
}
|
||||
#else
|
||||
for (j=0;j<subvect_size;j++)
|
||||
exc[subvect_size*i+j]+=s*0.03125*shape_cb[ind[i]*subvect_size+j];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void noise_codebook_quant(
|
||||
spx_word16_t target[], /* target vector */
|
||||
spx_coef_t ak[], /* LPCs for this subframe */
|
||||
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
|
||||
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
|
||||
const void *par, /* Codebook/search parameters*/
|
||||
int p, /* number of LPC coeffs */
|
||||
int nsf, /* number of samples in subframe */
|
||||
spx_sig_t *exc,
|
||||
spx_word16_t *r,
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
int complexity,
|
||||
int update_target
|
||||
)
|
||||
{
|
||||
int i;
|
||||
VARDECL(spx_word16_t *tmp);
|
||||
ALLOC(tmp, nsf, spx_word16_t);
|
||||
residue_percep_zero16(target, ak, awk1, awk2, tmp, nsf, p, stack);
|
||||
|
||||
for (i=0;i<nsf;i++)
|
||||
exc[i]+=SHL32(EXTEND32(tmp[i]),8);
|
||||
SPEEX_MEMSET(target, 0, nsf);
|
||||
}
|
||||
|
||||
|
||||
void noise_codebook_unquant(
|
||||
spx_sig_t *exc,
|
||||
const void *par, /* non-overlapping codebook */
|
||||
int nsf, /* number of samples in subframe */
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
spx_int32_t *seed
|
||||
)
|
||||
{
|
||||
int i;
|
||||
/* FIXME: This is bad, but I don't think the function ever gets called anyway */
|
||||
for (i=0;i<nsf;i++)
|
||||
exc[i]=SHL32(EXTEND32(speex_rand(1, seed)),SIG_SHIFT);
|
||||
}
|
||||
103
jni/libspeex/cb_search.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin & David Rowe */
|
||||
/**
|
||||
@file cb_search.h
|
||||
@brief Overlapped codebook search
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef CB_SEARCH_H
|
||||
#define CB_SEARCH_H
|
||||
|
||||
#include <speex/speex_bits.h>
|
||||
#include "arch.h"
|
||||
|
||||
/** Split codebook parameters. */
|
||||
typedef struct split_cb_params {
|
||||
int subvect_size;
|
||||
int nb_subvect;
|
||||
const signed char *shape_cb;
|
||||
int shape_bits;
|
||||
int have_sign;
|
||||
} split_cb_params;
|
||||
|
||||
|
||||
void split_cb_search_shape_sign(
|
||||
spx_word16_t target[], /* target vector */
|
||||
spx_coef_t ak[], /* LPCs for this subframe */
|
||||
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
|
||||
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
|
||||
const void *par, /* Codebook/search parameters */
|
||||
int p, /* number of LPC coeffs */
|
||||
int nsf, /* number of samples in subframe */
|
||||
spx_sig_t *exc,
|
||||
spx_word16_t *r,
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
int complexity,
|
||||
int update_target
|
||||
);
|
||||
|
||||
void split_cb_shape_sign_unquant(
|
||||
spx_sig_t *exc,
|
||||
const void *par, /* non-overlapping codebook */
|
||||
int nsf, /* number of samples in subframe */
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
spx_int32_t *seed
|
||||
);
|
||||
|
||||
|
||||
void noise_codebook_quant(
|
||||
spx_word16_t target[], /* target vector */
|
||||
spx_coef_t ak[], /* LPCs for this subframe */
|
||||
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
|
||||
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
|
||||
const void *par, /* Codebook/search parameters */
|
||||
int p, /* number of LPC coeffs */
|
||||
int nsf, /* number of samples in subframe */
|
||||
spx_sig_t *exc,
|
||||
spx_word16_t *r,
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
int complexity,
|
||||
int update_target
|
||||
);
|
||||
|
||||
|
||||
void noise_codebook_unquant(
|
||||
spx_sig_t *exc,
|
||||
const void *par, /* non-overlapping codebook */
|
||||
int nsf, /* number of samples in subframe */
|
||||
SpeexBits *bits,
|
||||
char *stack,
|
||||
spx_int32_t *seed
|
||||
);
|
||||
|
||||
#endif
|
||||
137
jni/libspeex/cb_search_arm4.h
Normal file
@@ -0,0 +1,137 @@
|
||||
/* Copyright (C) 2004 Jean-Marc Valin */
|
||||
/**
|
||||
@file cb_search_arm4.h
|
||||
@brief Fixed codebook functions (ARM4 version)
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* This optimization is temporaly disabled until it is fixed to account for the fact
|
||||
that "r" is now a 16-bit array */
|
||||
#if 0
|
||||
#define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
|
||||
static void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
|
||||
{
|
||||
int i, j, k;
|
||||
//const signed char *shape;
|
||||
for (i=0;i<shape_cb_size;i+=4)
|
||||
{
|
||||
|
||||
//shape = shape_cb;
|
||||
E[0]=0;
|
||||
E[1]=0;
|
||||
E[2]=0;
|
||||
E[3]=0;
|
||||
|
||||
/* Compute codeword response using convolution with impulse response */
|
||||
for(j=0;j<subvect_size;j++)
|
||||
{
|
||||
#if 1
|
||||
spx_word16_t *res;
|
||||
res = resp+j;
|
||||
spx_word32_t resj0,resj1,resj2,resj3;
|
||||
spx_word32_t dead1, dead2, dead3, dead4, dead5, dead6, dead7, dead8;
|
||||
__asm__ __volatile__ (
|
||||
"mov %0, #0 \n\t"
|
||||
"mov %1, #0 \n\t"
|
||||
"mov %2, #0 \n\t"
|
||||
"mov %3, #0 \n\t"
|
||||
".weighted%=: \n\t"
|
||||
"ldrsb %8, [%6] \n\t"
|
||||
"ldr %10, [%5], #-4 \n\t"
|
||||
"mov %9, %6 \n\t"
|
||||
"ldrsb %11, [%9, %7]! \n\t"
|
||||
"mla %0, %10, %8, %0 \n\t"
|
||||
"ldrsb %8, [%9, %7]! \n\t"
|
||||
"mla %1, %10, %11, %1 \n\t"
|
||||
"ldrsb %11, [%9, %7]! \n\t"
|
||||
"mla %2, %10, %8, %2 \n\t"
|
||||
"subs %4, %4, #1 \n\t"
|
||||
"mla %3, %10, %11, %3 \n\t"
|
||||
"add %6, %6, #1 \n\t"
|
||||
"bne .weighted%= \n\t"
|
||||
: "=r" (resj0), "=r" (resj1), "=r" (resj2), "=r" (resj3),
|
||||
"=r" (dead1), "=r" (dead2), "=r" (dead3), "=r" (dead4),
|
||||
"=r" (dead5), "=r" (dead6), "=r" (dead7), "=r" (dead8)
|
||||
: "4" (j+1), "5" (r+j), "6" (shape_cb), "7" (subvect_size)
|
||||
: "cc", "memory");
|
||||
#else
|
||||
spx_word16_t *res;
|
||||
res = resp+j;
|
||||
spx_word32_t resj0=0;
|
||||
spx_word32_t resj1=0;
|
||||
spx_word32_t resj2=0;
|
||||
spx_word32_t resj3=0;
|
||||
for (k=0;k<=j;k++)
|
||||
{
|
||||
const signed char *shape=shape_cb+k;
|
||||
resj0 = MAC16_16(resj0,*shape,r[j-k]);
|
||||
shape += subvect_size;
|
||||
resj1 = MAC16_16(resj1,*shape,r[j-k]);
|
||||
shape += subvect_size;
|
||||
resj2 = MAC16_16(resj2,*shape,r[j-k]);
|
||||
shape += subvect_size;
|
||||
resj3 = MAC16_16(resj3,*shape,r[j-k]);
|
||||
shape += subvect_size;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
resj0 = SHR(resj0, 11);
|
||||
resj1 = SHR(resj1, 11);
|
||||
resj2 = SHR(resj2, 11);
|
||||
resj3 = SHR(resj3, 11);
|
||||
#else
|
||||
resj0 *= 0.03125;
|
||||
resj1 *= 0.03125;
|
||||
resj2 *= 0.03125;
|
||||
resj3 *= 0.03125;
|
||||
#endif
|
||||
|
||||
/* Compute codeword energy */
|
||||
E[0]=ADD32(E[0],MULT16_16(resj0,resj0));
|
||||
E[1]=ADD32(E[1],MULT16_16(resj1,resj1));
|
||||
E[2]=ADD32(E[2],MULT16_16(resj2,resj2));
|
||||
E[3]=ADD32(E[3],MULT16_16(resj3,resj3));
|
||||
*res = resj0;
|
||||
res += subvect_size;
|
||||
*res = resj1;
|
||||
res += subvect_size;
|
||||
*res = resj2;
|
||||
res += subvect_size;
|
||||
*res = resj3;
|
||||
res += subvect_size;
|
||||
}
|
||||
resp += subvect_size<<2;
|
||||
shape_cb += subvect_size<<2;
|
||||
E+=4;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
112
jni/libspeex/cb_search_bfin.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/* Copyright (C) 2005 Analog Devices */
|
||||
/**
|
||||
@author Jean-Marc Valin
|
||||
@file cb_search_bfin.h
|
||||
@brief Fixed codebook functions (Blackfin version)
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
|
||||
void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<shape_cb_size;i++)
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"P0 = %0;\n\t"
|
||||
"LC0 = P0;\n\t"
|
||||
"P1 = %1;\n\t"
|
||||
"P2 = %2;\n\t"
|
||||
"P3 = %3;\n\t"
|
||||
"P0 = 1;\n\t"
|
||||
"L0 = 0;\n\t"
|
||||
"L1 = 0;\n\t"
|
||||
"R2 = 0;\n\t"
|
||||
"A1 = 0;\n\t"
|
||||
"LOOP outter%= LC0;\n\t"
|
||||
"LOOP_BEGIN outter%=;\n\t"
|
||||
"A0 = 0;\n\t"
|
||||
"P4 = P1;\n\t"
|
||||
"I1 = P2;\n\t"
|
||||
"R0 = B[P4++] (X) || R1.L = W[I1--];\n\t"
|
||||
"LOOP inner%= LC1 = P0;\n\t"
|
||||
"LOOP_BEGIN inner%=;\n\t"
|
||||
"A0 += R0.L*R1.L (IS) || R0 = B[P4++] (X) || R1.L = W[I1--];\n\t"
|
||||
"LOOP_END inner%=;\n\t"
|
||||
"R0 = A0;\n\t"
|
||||
"R0 >>>= 13;\n\t"
|
||||
"A1 += R0.L*R0.L (IS);\n\t"
|
||||
"W[P3++] = R0;\n\t"
|
||||
"P0 += 1;\n\t"
|
||||
"P2 += 2;\n\t"
|
||||
"LOOP_END outter%=;\n\t"
|
||||
"P4 = %4;\n\t"
|
||||
"R1 = A1;\n\t"
|
||||
"[P4] = R1;\n\t"
|
||||
:
|
||||
: "m" (subvect_size), "m" (shape_cb), "m" (r), "m" (resp), "m" (E)
|
||||
: "A0", "P0", "P1", "P2", "P3", "P4", "R0", "R1", "R2", "I0", "I1", "L0",
|
||||
"L1", "A0", "A1", "memory"
|
||||
#if !(__GNUC__ == 3)
|
||||
, "LC0", "LC1" /* gcc 3.4 doesn't know about LC registers */
|
||||
#endif
|
||||
);
|
||||
shape_cb += subvect_size;
|
||||
resp += subvect_size;
|
||||
E++;
|
||||
}
|
||||
}
|
||||
|
||||
#define OVERRIDE_TARGET_UPDATE
|
||||
static inline void target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len)
|
||||
{
|
||||
if (!len)
|
||||
return;
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"I0 = %0;\n\t"
|
||||
"I1 = %1;\n\t"
|
||||
"L0 = 0;\n\t"
|
||||
"L1 = 0;\n\t"
|
||||
"R2 = 4096;\n\t"
|
||||
"LOOP tupdate%= LC0 = %3;\n\t"
|
||||
"LOOP_BEGIN tupdate%=;\n\t"
|
||||
"R0.L = W[I0] || R1.L = W[I1++];\n\t"
|
||||
"R1 = (A1 = R1.L*%2.L) (IS);\n\t"
|
||||
"R1 = R1 + R2;\n\t"
|
||||
"R1 >>>= 13;\n\t"
|
||||
"R0.L = R0.L - R1.L;\n\t"
|
||||
"W[I0++] = R0.L;\n\t"
|
||||
"LOOP_END tupdate%=;\n\t"
|
||||
:
|
||||
: "a" (t), "a" (r), "d" (g), "a" (len)
|
||||
: "R0", "R1", "R2", "A1", "I0", "I1", "L0", "L1"
|
||||
);
|
||||
}
|
||||
84
jni/libspeex/cb_search_sse.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/* Copyright (C) 2004 Jean-Marc Valin */
|
||||
/**
|
||||
@file cb_search_sse.h
|
||||
@brief Fixed codebook functions (SSE version)
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <xmmintrin.h>
|
||||
|
||||
static inline void _spx_mm_getr_ps (__m128 U, float *__Z, float *__Y, float *__X, float *__W)
|
||||
{
|
||||
union {
|
||||
float __a[4];
|
||||
__m128 __v;
|
||||
} __u;
|
||||
|
||||
__u.__v = U;
|
||||
|
||||
*__Z = __u.__a[0];
|
||||
*__Y = __u.__a[1];
|
||||
*__X = __u.__a[2];
|
||||
*__W = __u.__a[3];
|
||||
|
||||
}
|
||||
|
||||
#define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
|
||||
static void compute_weighted_codebook(const signed char *shape_cb, const spx_sig_t *_r, float *resp, __m128 *resp2, __m128 *E, int shape_cb_size, int subvect_size, char *stack)
|
||||
{
|
||||
int i, j, k;
|
||||
__m128 resj, EE;
|
||||
VARDECL(__m128 *r);
|
||||
VARDECL(__m128 *shape);
|
||||
ALLOC(r, subvect_size, __m128);
|
||||
ALLOC(shape, subvect_size, __m128);
|
||||
for(j=0;j<subvect_size;j++)
|
||||
r[j] = _mm_load_ps1(_r+j);
|
||||
for (i=0;i<shape_cb_size;i+=4)
|
||||
{
|
||||
float *_res = resp+i*subvect_size;
|
||||
const signed char *_shape = shape_cb+i*subvect_size;
|
||||
EE = _mm_setzero_ps();
|
||||
for(j=0;j<subvect_size;j++)
|
||||
{
|
||||
shape[j] = _mm_setr_ps(0.03125*_shape[j], 0.03125*_shape[subvect_size+j], 0.03125*_shape[2*subvect_size+j], 0.03125*_shape[3*subvect_size+j]);
|
||||
}
|
||||
for(j=0;j<subvect_size;j++)
|
||||
{
|
||||
resj = _mm_setzero_ps();
|
||||
for (k=0;k<=j;k++)
|
||||
resj = _mm_add_ps(resj, _mm_mul_ps(shape[k],r[j-k]));
|
||||
_spx_mm_getr_ps(resj, _res+j, _res+subvect_size+j, _res+2*subvect_size+j, _res+3*subvect_size+j);
|
||||
*resp2++ = resj;
|
||||
EE = _mm_add_ps(EE, _mm_mul_ps(resj, resj));
|
||||
}
|
||||
E[i>>2] = EE;
|
||||
}
|
||||
}
|
||||
72
jni/libspeex/echo_diagnostic.m
Normal file
@@ -0,0 +1,72 @@
|
||||
% Attempts to diagnose AEC problems from recorded samples
|
||||
%
|
||||
% out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
|
||||
%
|
||||
% Computes the full matrix inversion to cancel echo from the
|
||||
% recording 'rec_file' using the far end signal 'play_file' using
|
||||
% a filter length of 'tail_length'. The output is saved to 'out_file'.
|
||||
function out = echo_diagnostic(rec_file, play_file, out_file, tail_length)
|
||||
|
||||
F=fopen(rec_file,'rb');
|
||||
rec=fread(F,Inf,'short');
|
||||
fclose (F);
|
||||
F=fopen(play_file,'rb');
|
||||
play=fread(F,Inf,'short');
|
||||
fclose (F);
|
||||
|
||||
rec = [rec; zeros(1024,1)];
|
||||
play = [play; zeros(1024,1)];
|
||||
|
||||
N = length(rec);
|
||||
corr = real(ifft(fft(rec).*conj(fft(play))));
|
||||
acorr = real(ifft(fft(play).*conj(fft(play))));
|
||||
|
||||
[a,b] = max(corr);
|
||||
|
||||
if b > N/2
|
||||
b = b-N;
|
||||
end
|
||||
printf ("Far end to near end delay is %d samples\n", b);
|
||||
if (b > .3*tail_length)
|
||||
printf ('This is too much delay, try delaying the far-end signal a bit\n');
|
||||
else if (b < 0)
|
||||
printf ('You have a negative delay, the echo canceller has no chance to cancel anything!\n');
|
||||
else
|
||||
printf ('Delay looks OK.\n');
|
||||
end
|
||||
end
|
||||
end
|
||||
N2 = round(N/2);
|
||||
corr1 = real(ifft(fft(rec(1:N2)).*conj(fft(play(1:N2)))));
|
||||
corr2 = real(ifft(fft(rec(N2+1:end)).*conj(fft(play(N2+1:end)))));
|
||||
|
||||
[a,b1] = max(corr1);
|
||||
if b1 > N2/2
|
||||
b1 = b1-N2;
|
||||
end
|
||||
[a,b2] = max(corr2);
|
||||
if b2 > N2/2
|
||||
b2 = b2-N2;
|
||||
end
|
||||
drift = (b1-b2)/N2;
|
||||
printf ('Drift estimate is %f%% (%d samples)\n', 100*drift, b1-b2);
|
||||
if abs(b1-b2) < 10
|
||||
printf ('A drift of a few (+-10) samples is normal.\n');
|
||||
else
|
||||
if abs(b1-b2) < 30
|
||||
printf ('There may be (not sure) excessive clock drift. Is the capture and playback done on the same soundcard?\n');
|
||||
else
|
||||
printf ('Your clock is drifting! No way the AEC will be able to do anything with that. Most likely, you''re doing capture and playback from two different cards.\n');
|
||||
end
|
||||
end
|
||||
end
|
||||
acorr(1) = .001+1.00001*acorr(1);
|
||||
AtA = toeplitz(acorr(1:tail_length));
|
||||
bb = corr(1:tail_length);
|
||||
h = AtA\bb;
|
||||
|
||||
out = (rec - filter(h, 1, play));
|
||||
|
||||
F=fopen(out_file,'w');
|
||||
fwrite(F,out,'short');
|
||||
fclose (F);
|
||||
50
jni/libspeex/exc_10_16_table.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: exc_10_16_table.c
|
||||
Codebook for excitation in narrowband CELP mode (3200 bps)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
const signed char exc_10_16_table[160] = {
|
||||
22,39,14,44,11,35,-2,23,-4,6,
|
||||
46,-28,13,-27,-23,12,4,20,-5,9,
|
||||
37,-18,-23,23,0,9,-6,-20,4,-1,
|
||||
-17,-5,-4,17,0,1,9,-2,1,2,
|
||||
2,-12,8,-25,39,15,9,16,-55,-11,
|
||||
9,11,5,10,-2,-60,8,13,-6,11,
|
||||
-16,27,-47,-12,11,1,16,-7,9,-3,
|
||||
-29,9,-14,25,-19,34,36,12,40,-10,
|
||||
-3,-24,-14,-37,-21,-35,-2,-36,3,-6,
|
||||
67,28,6,-17,-3,-12,-16,-15,-17,-7,
|
||||
-59,-36,-13,1,7,1,2,10,2,11,
|
||||
13,10,8,-2,7,3,5,4,2,2,
|
||||
-3,-8,4,-5,6,7,-42,15,35,-2,
|
||||
-46,38,28,-20,-9,1,7,-3,0,-2,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
-15,-28,52,32,5,-5,-17,-20,-10,-1};
|
||||
66
jni/libspeex/exc_10_32_table.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: exc_10_32_table.c
|
||||
Codebook for excitation in narrowband CELP mode (4000 bps)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
const signed char exc_10_32_table[320] = {
|
||||
7,17,17,27,25,22,12,4,-3,0,
|
||||
28,-36,39,-24,-15,3,-9,15,-5,10,
|
||||
31,-28,11,31,-21,9,-11,-11,-2,-7,
|
||||
-25,14,-22,31,4,-14,19,-12,14,-5,
|
||||
4,-7,4,-5,9,0,-2,42,-47,-16,
|
||||
1,8,0,9,23,-57,0,28,-11,6,
|
||||
-31,55,-45,3,-5,4,2,-2,4,-7,
|
||||
-3,6,-2,7,-3,12,5,8,54,-10,
|
||||
8,-7,-8,-24,-25,-27,-14,-5,8,5,
|
||||
44,23,5,-9,-11,-11,-13,-9,-12,-8,
|
||||
-29,-8,-22,6,-15,3,-12,-1,-5,-3,
|
||||
34,-1,29,-16,17,-4,12,2,1,4,
|
||||
-2,-4,2,-1,11,-3,-52,28,30,-9,
|
||||
-32,25,44,-20,-24,4,6,-1,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,
|
||||
-25,-10,22,29,13,-13,-22,-13,-4,0,
|
||||
-4,-16,10,15,-36,-24,28,25,-1,-3,
|
||||
66,-33,-11,-15,6,0,3,4,-2,5,
|
||||
24,-20,-47,29,19,-2,-4,-1,0,-1,
|
||||
-2,3,1,8,-11,5,5,-57,28,28,
|
||||
0,-16,4,-4,12,-6,-1,2,-20,61,
|
||||
-9,24,-22,-42,29,6,17,8,4,2,
|
||||
-65,15,8,10,5,6,5,3,2,-2,
|
||||
-3,5,-9,4,-5,23,13,23,-3,-63,
|
||||
3,-5,-4,-6,0,-3,23,-36,-46,9,
|
||||
5,5,8,4,9,-5,1,-3,10,1,
|
||||
-6,10,-11,24,-47,31,22,-12,14,-10,
|
||||
6,11,-7,-7,7,-31,51,-12,-6,7,
|
||||
6,-17,9,-11,-20,52,-19,3,-6,-6,
|
||||
-8,-5,23,-41,37,1,-21,10,-14,8,
|
||||
7,5,-15,-15,23,39,-26,-33,7,2,
|
||||
-32,-30,-21,-8,4,12,17,15,14,11};
|
||||
66
jni/libspeex/exc_20_32_table.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: exc_20_32_table.c
|
||||
Codebook for excitation in narrowband CELP mode (2000 bps)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
const signed char exc_20_32_table[640] = {
|
||||
12,32,25,46,36,33,9,14,-3,6,1,-8,0,-10,-5,-7,-7,-7,-5,-5,
|
||||
31,-27,24,-32,-4,10,-11,21,-3,19,23,-9,22,24,-10,-1,-10,-13,-7,-11,
|
||||
42,-33,31,19,-8,0,-10,-16,1,-21,-17,10,-8,14,8,4,11,-2,5,-2,
|
||||
-33,11,-16,33,11,-4,9,-4,11,2,6,-5,8,-5,11,-4,-6,26,-36,-16,
|
||||
0,4,-2,-8,12,6,-1,34,-46,-22,9,9,21,9,5,-66,-5,26,2,10,
|
||||
13,2,19,9,12,-81,3,13,13,0,-14,22,-35,6,-7,-4,6,-6,10,-6,
|
||||
-31,38,-33,0,-10,-11,5,-12,12,-17,5,0,-6,13,-9,10,8,25,33,2,
|
||||
-12,8,-6,10,-2,21,7,17,43,5,11,-7,-9,-20,-36,-20,-23,-4,-4,-3,
|
||||
27,-9,-9,-49,-39,-38,-11,-9,6,5,23,25,5,3,3,4,1,2,-3,-1,
|
||||
87,39,17,-21,-9,-19,-9,-15,-13,-14,-17,-11,-10,-11,-8,-6,-1,-3,-3,-1,
|
||||
-54,-34,-27,-8,-11,-4,-5,0,0,4,8,6,9,7,9,7,6,5,5,5,
|
||||
48,10,19,-10,12,-1,9,-3,2,5,-3,2,-2,-2,0,-2,-26,6,9,-7,
|
||||
-16,-9,2,7,7,-5,-43,11,22,-11,-9,34,37,-15,-13,-6,1,-1,1,1,
|
||||
-64,56,52,-11,-27,5,4,3,1,2,1,3,-1,-4,-4,-10,-7,-4,-4,2,
|
||||
-1,-7,-7,-12,-10,-15,-9,-5,-5,-11,-16,-13,6,16,4,-13,-16,-10,-4,2,
|
||||
-47,-13,25,47,19,-14,-20,-8,-17,0,-3,-13,1,6,-17,-14,15,1,10,6,
|
||||
-24,0,-10,19,-69,-8,14,49,17,-5,33,-29,3,-4,0,2,-8,5,-6,2,
|
||||
120,-56,-12,-47,23,-9,6,-5,1,2,-5,1,-10,4,-1,-1,4,-1,0,-3,
|
||||
30,-52,-67,30,22,11,-1,-4,3,0,7,2,0,1,-10,-4,-8,-13,5,1,
|
||||
1,-1,5,13,-9,-3,-10,-62,22,48,-4,-6,2,3,5,1,1,4,1,13,
|
||||
3,-20,10,-9,13,-2,-4,9,-20,44,-1,20,-32,-67,19,0,28,11,8,2,
|
||||
-11,15,-19,-53,31,2,34,10,6,-4,-58,8,10,13,14,1,12,2,0,0,
|
||||
-128,37,-8,44,-9,26,-3,18,2,6,11,-1,9,1,5,3,0,1,1,2,
|
||||
12,3,-2,-3,7,25,9,18,-6,-37,3,-8,-16,3,-10,-7,17,-34,-44,11,
|
||||
17,-15,-3,-16,-1,-13,11,-46,-65,-2,8,13,2,4,4,5,15,5,9,6,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
-9,19,-12,12,-28,38,29,-1,12,2,5,23,-10,3,4,-15,21,-4,3,3,
|
||||
6,17,-9,-4,-8,-20,26,5,-10,6,1,-19,18,-15,-12,47,-6,-2,-7,-9,
|
||||
-1,-17,-2,-2,-14,30,-14,2,-7,-4,-1,-12,11,-25,16,-3,-12,11,-7,7,
|
||||
-17,1,19,-28,31,-7,-10,7,-10,3,12,5,-16,6,24,41,-29,-54,0,1,
|
||||
7,-1,5,-6,13,10,-4,-8,8,-9,-27,-53,-38,-1,10,19,17,16,12,12,
|
||||
0,3,-7,-4,13,12,-31,-14,6,-5,3,5,17,43,50,25,10,1,-6,-2};
|
||||
290
jni/libspeex/exc_5_256_table.c
Normal file
@@ -0,0 +1,290 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: exc_5_256_table.c
|
||||
Codebook for excitation in narrowband CELP mode (12800 bps)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
const signed char exc_5_256_table[1280] = {
|
||||
-8,-37,5,-43,5,
|
||||
73,61,39,12,-3,
|
||||
-61,-32,2,42,30,
|
||||
-3,17,-27,9,34,
|
||||
20,-1,-5,2,23,
|
||||
-7,-46,26,53,-47,
|
||||
20,-2,-33,-89,-51,
|
||||
-64,27,11,15,-34,
|
||||
-5,-56,25,-9,-1,
|
||||
-29,1,40,67,-23,
|
||||
-16,16,33,19,7,
|
||||
14,85,22,-10,-10,
|
||||
-12,-7,-1,52,89,
|
||||
29,11,-20,-37,-46,
|
||||
-15,17,-24,-28,24,
|
||||
2,1,0,23,-101,
|
||||
23,14,-1,-23,-18,
|
||||
9,5,-13,38,1,
|
||||
-28,-28,4,27,51,
|
||||
-26,34,-40,35,47,
|
||||
54,38,-54,-26,-6,
|
||||
42,-25,13,-30,-36,
|
||||
18,41,-4,-33,23,
|
||||
-32,-7,-4,51,-3,
|
||||
17,-52,56,-47,36,
|
||||
-2,-21,36,10,8,
|
||||
-33,31,19,9,-5,
|
||||
-40,10,-9,-21,19,
|
||||
18,-78,-18,-5,0,
|
||||
-26,-36,-47,-51,-44,
|
||||
18,40,27,-2,29,
|
||||
49,-26,2,32,-54,
|
||||
30,-73,54,3,-5,
|
||||
36,22,53,10,-1,
|
||||
-84,-53,-29,-5,3,
|
||||
-44,53,-51,4,22,
|
||||
71,-35,-1,33,-5,
|
||||
-27,-7,36,17,-23,
|
||||
-39,16,-9,-55,-15,
|
||||
-20,39,-35,6,-39,
|
||||
-14,18,48,-64,-17,
|
||||
-15,9,39,81,37,
|
||||
-68,37,47,-21,-6,
|
||||
-104,13,6,9,-2,
|
||||
35,8,-23,18,42,
|
||||
45,21,33,-5,-49,
|
||||
9,-6,-43,-56,39,
|
||||
2,-16,-25,87,1,
|
||||
-3,-9,17,-25,-11,
|
||||
-9,-1,10,2,-14,
|
||||
-14,4,-1,-10,28,
|
||||
-23,40,-32,26,-9,
|
||||
26,4,-27,-23,3,
|
||||
42,-60,1,49,-3,
|
||||
27,10,-52,-40,-2,
|
||||
18,45,-23,17,-44,
|
||||
3,-3,17,-46,52,
|
||||
-40,-47,25,75,31,
|
||||
-49,53,30,-30,-32,
|
||||
-36,38,-6,-15,-16,
|
||||
54,-27,-48,3,38,
|
||||
-29,-32,-22,-14,-4,
|
||||
-23,-13,32,-39,9,
|
||||
8,-45,-13,34,-16,
|
||||
49,40,32,31,28,
|
||||
23,23,32,47,59,
|
||||
-68,8,62,44,25,
|
||||
-14,-24,-65,-16,36,
|
||||
67,-25,-38,-21,4,
|
||||
-33,-2,42,5,-63,
|
||||
40,11,26,-42,-23,
|
||||
-61,79,-31,23,-20,
|
||||
10,-32,53,-25,-36,
|
||||
10,-26,-5,3,0,
|
||||
-71,5,-10,-37,1,
|
||||
-24,21,-54,-17,1,
|
||||
-29,-25,-15,-27,32,
|
||||
68,45,-16,-37,-18,
|
||||
-5,1,0,-77,71,
|
||||
-6,3,-20,71,-67,
|
||||
29,-35,10,-30,19,
|
||||
4,16,17,5,0,
|
||||
-14,19,2,28,26,
|
||||
59,3,2,24,39,
|
||||
55,-50,-45,-18,-17,
|
||||
33,-35,14,-1,1,
|
||||
8,87,-35,-29,0,
|
||||
-27,13,-7,23,-13,
|
||||
37,-40,50,-35,14,
|
||||
19,-7,-14,49,54,
|
||||
-5,22,-2,-29,-8,
|
||||
-27,38,13,27,48,
|
||||
12,-41,-21,-15,28,
|
||||
7,-16,-24,-19,-20,
|
||||
11,-20,9,2,13,
|
||||
23,-20,11,27,-27,
|
||||
71,-69,8,2,-6,
|
||||
22,12,16,16,9,
|
||||
-16,-8,-17,1,25,
|
||||
1,40,-37,-33,66,
|
||||
94,53,4,-22,-25,
|
||||
-41,-42,25,35,-16,
|
||||
-15,57,31,-29,-32,
|
||||
21,16,-60,45,15,
|
||||
-1,7,57,-26,-47,
|
||||
-29,11,8,15,19,
|
||||
-105,-8,54,27,10,
|
||||
-17,6,-12,-1,-10,
|
||||
4,0,23,-10,31,
|
||||
13,11,10,12,-64,
|
||||
23,-3,-8,-19,16,
|
||||
52,24,-40,16,10,
|
||||
40,5,9,0,-13,
|
||||
-7,-21,-8,-6,-7,
|
||||
-21,59,16,-53,18,
|
||||
-60,11,-47,14,-18,
|
||||
25,-13,-24,4,-39,
|
||||
16,-28,54,26,-67,
|
||||
30,27,-20,-52,20,
|
||||
-12,55,12,18,-16,
|
||||
39,-14,-6,-26,56,
|
||||
-88,-55,12,25,26,
|
||||
-37,6,75,0,-34,
|
||||
-81,54,-30,1,-7,
|
||||
49,-23,-14,21,10,
|
||||
-62,-58,-57,-47,-34,
|
||||
15,-4,34,-78,31,
|
||||
25,-11,7,50,-10,
|
||||
42,-63,14,-36,-4,
|
||||
57,55,57,53,42,
|
||||
-42,-1,15,40,37,
|
||||
15,25,-11,6,1,
|
||||
31,-2,-6,-1,-7,
|
||||
-64,34,28,30,-1,
|
||||
3,21,0,-88,-12,
|
||||
-56,25,-28,40,8,
|
||||
-28,-14,9,12,2,
|
||||
-6,-17,22,49,-6,
|
||||
-26,14,28,-20,4,
|
||||
-12,50,35,40,13,
|
||||
-38,-58,-29,17,30,
|
||||
22,60,26,-54,-39,
|
||||
-12,58,-28,-63,10,
|
||||
-21,-8,-12,26,-62,
|
||||
6,-10,-11,-22,-6,
|
||||
-7,4,1,18,2,
|
||||
-70,11,14,4,13,
|
||||
19,-24,-34,24,67,
|
||||
17,51,-21,13,23,
|
||||
54,-30,48,1,-13,
|
||||
80,26,-16,-2,13,
|
||||
-4,6,-30,29,-24,
|
||||
73,-58,30,-27,20,
|
||||
-2,-21,41,45,30,
|
||||
-27,-3,-5,-18,-20,
|
||||
-49,-3,-35,10,42,
|
||||
-19,-67,-53,-11,9,
|
||||
13,-15,-33,-51,-30,
|
||||
15,7,25,-30,4,
|
||||
28,-22,-34,54,-29,
|
||||
39,-46,20,16,34,
|
||||
-4,47,75,1,-44,
|
||||
-55,-24,7,-1,9,
|
||||
-42,50,-8,-36,41,
|
||||
68,0,-4,-10,-23,
|
||||
-15,-50,64,36,-9,
|
||||
-27,12,25,-38,-47,
|
||||
-37,32,-49,51,-36,
|
||||
2,-4,69,-26,19,
|
||||
7,45,67,46,13,
|
||||
-63,46,15,-47,4,
|
||||
-41,13,-6,5,-21,
|
||||
37,26,-55,-7,33,
|
||||
-1,-28,10,-17,-64,
|
||||
-14,0,-36,-17,93,
|
||||
-3,-9,-66,44,-21,
|
||||
3,-12,38,-6,-13,
|
||||
-12,19,13,43,-43,
|
||||
-10,-12,6,-5,9,
|
||||
-49,32,-5,2,4,
|
||||
5,15,-16,10,-21,
|
||||
8,-62,-8,64,8,
|
||||
79,-1,-66,-49,-18,
|
||||
5,40,-5,-30,-45,
|
||||
1,-6,21,-32,93,
|
||||
-18,-30,-21,32,21,
|
||||
-18,22,8,5,-41,
|
||||
-54,80,22,-10,-7,
|
||||
-8,-23,-64,66,56,
|
||||
-14,-30,-41,-46,-14,
|
||||
-29,-37,27,-14,42,
|
||||
-2,-9,-29,34,14,
|
||||
33,-14,22,4,10,
|
||||
26,26,28,32,23,
|
||||
-72,-32,3,0,-14,
|
||||
35,-42,-78,-32,6,
|
||||
29,-18,-45,-5,7,
|
||||
-33,-45,-3,-22,-34,
|
||||
8,-8,4,-51,-25,
|
||||
-9,59,-78,21,-5,
|
||||
-25,-48,66,-15,-17,
|
||||
-24,-49,-13,25,-23,
|
||||
-64,-6,40,-24,-19,
|
||||
-11,57,-33,-8,1,
|
||||
10,-52,-54,28,39,
|
||||
49,34,-11,-61,-41,
|
||||
-43,10,15,-15,51,
|
||||
30,15,-51,32,-34,
|
||||
-2,-34,14,18,16,
|
||||
1,1,-3,-3,1,
|
||||
1,-18,6,16,48,
|
||||
12,-5,-42,7,36,
|
||||
48,7,-20,-10,7,
|
||||
12,2,54,39,-38,
|
||||
37,54,4,-11,-8,
|
||||
-46,-10,5,-10,-34,
|
||||
46,-12,29,-37,39,
|
||||
36,-11,24,56,17,
|
||||
14,20,25,0,-25,
|
||||
-28,55,-7,-5,27,
|
||||
3,9,-26,-8,6,
|
||||
-24,-10,-30,-31,-34,
|
||||
18,4,22,21,40,
|
||||
-1,-29,-37,-8,-21,
|
||||
92,-29,11,-3,11,
|
||||
73,23,22,7,4,
|
||||
-44,-9,-11,21,-13,
|
||||
11,9,-78,-1,47,
|
||||
114,-12,-37,-19,-5,
|
||||
-11,-22,19,12,-30,
|
||||
7,38,45,-21,-8,
|
||||
-9,55,-45,56,-21,
|
||||
7,17,46,-57,-87,
|
||||
-6,27,31,31,7,
|
||||
-56,-12,46,21,-5,
|
||||
-12,36,3,3,-21,
|
||||
43,19,12,-7,9,
|
||||
-14,0,-9,-33,-91,
|
||||
7,26,3,-11,64,
|
||||
83,-31,-46,25,2,
|
||||
9,5,2,2,-1,
|
||||
20,-17,10,-5,-27,
|
||||
-8,20,8,-19,16,
|
||||
-21,-13,-31,5,5,
|
||||
42,24,9,34,-20,
|
||||
28,-61,22,11,-39,
|
||||
64,-20,-1,-30,-9,
|
||||
-20,24,-25,-24,-29,
|
||||
22,-60,6,-5,41,
|
||||
-9,-87,14,34,15,
|
||||
-57,52,69,15,-3,
|
||||
-102,58,16,3,6,
|
||||
60,-75,-32,26,7,
|
||||
-57,-27,-32,-24,-21,
|
||||
-29,-16,62,-46,31,
|
||||
30,-27,-15,7,15};
|
||||
98
jni/libspeex/exc_5_64_table.c
Normal file
@@ -0,0 +1,98 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: exc_5_64_table.c
|
||||
Codebook for excitation in narrowband CELP mode (9600 bps)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
const signed char exc_5_64_table[320]={
|
||||
1,5,-15,49,-66,
|
||||
-48,-4,50,-44,7,
|
||||
37,16,-18,25,-26,
|
||||
-26,-15,19,19,-27,
|
||||
-47,28,57,5,-17,
|
||||
-32,-41,68,21,-2,
|
||||
64,56,8,-16,-13,
|
||||
-26,-9,-16,11,6,
|
||||
-39,25,-19,22,-31,
|
||||
20,-45,55,-43,10,
|
||||
-16,47,-40,40,-20,
|
||||
-51,3,-17,-14,-15,
|
||||
-24,53,-20,-46,46,
|
||||
27,-68,32,3,-18,
|
||||
-5,9,-31,16,-9,
|
||||
-10,-1,-23,48,95,
|
||||
47,25,-41,-32,-3,
|
||||
15,-25,-55,36,41,
|
||||
-27,20,5,13,14,
|
||||
-22,5,2,-23,18,
|
||||
46,-15,17,-18,-34,
|
||||
-5,-8,27,-55,73,
|
||||
16,2,-1,-17,40,
|
||||
-78,33,0,2,19,
|
||||
4,53,-16,-15,-16,
|
||||
-28,-3,-13,49,8,
|
||||
-7,-29,27,-13,32,
|
||||
20,32,-61,16,14,
|
||||
41,44,40,24,20,
|
||||
7,4,48,-60,-77,
|
||||
17,-6,-48,65,-15,
|
||||
32,-30,-71,-10,-3,
|
||||
-6,10,-2,-7,-29,
|
||||
-56,67,-30,7,-5,
|
||||
86,-6,-10,0,5,
|
||||
-31,60,34,-38,-3,
|
||||
24,10,-2,30,23,
|
||||
24,-41,12,70,-43,
|
||||
15,-17,6,13,16,
|
||||
-13,8,30,-15,-8,
|
||||
5,23,-34,-98,-4,
|
||||
-13,13,-48,-31,70,
|
||||
12,31,25,24,-24,
|
||||
26,-7,33,-16,8,
|
||||
5,-11,-14,-8,-65,
|
||||
13,10,-2,-9,0,
|
||||
-3,-68,5,35,7,
|
||||
0,-31,-1,-17,-9,
|
||||
-9,16,-37,-18,-1,
|
||||
69,-48,-28,22,-21,
|
||||
-11,5,49,55,23,
|
||||
-86,-36,16,2,13,
|
||||
63,-51,30,-11,13,
|
||||
24,-18,-6,14,-19,
|
||||
1,41,9,-5,27,
|
||||
-36,-44,-34,-37,-21,
|
||||
-26,31,-39,15,43,
|
||||
5,-8,29,20,-8,
|
||||
-20,-52,-28,-1,13,
|
||||
26,-34,-10,-9,27,
|
||||
-8,8,27,-66,4,
|
||||
12,-22,49,10,-77,
|
||||
32,-18,3,-38,12,
|
||||
-3,-1,2,2,0};
|
||||
162
jni/libspeex/exc_8_128_table.c
Normal file
@@ -0,0 +1,162 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: exc_8_128_table.c
|
||||
Codebook for excitation in narrowband CELP mode (7000 bps)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
const signed char exc_8_128_table[1024] = {
|
||||
-14,9,13,-32,2,-10,31,-10,
|
||||
-8,-8,6,-4,-1,10,-64,23,
|
||||
6,20,13,6,8,-22,16,34,
|
||||
7,42,-49,-28,5,26,4,-15,
|
||||
41,34,41,32,33,24,23,14,
|
||||
8,40,34,4,-24,-41,-19,-15,
|
||||
13,-13,33,-54,24,27,-44,33,
|
||||
27,-15,-15,24,-19,14,-36,14,
|
||||
-9,24,-12,-4,37,-5,16,-34,
|
||||
5,10,33,-15,-54,-16,12,25,
|
||||
12,1,2,0,3,-1,-4,-4,
|
||||
11,2,-56,54,27,-20,13,-6,
|
||||
-46,-41,-33,-11,-5,7,12,14,
|
||||
-14,-5,8,20,6,3,4,-8,
|
||||
-5,-42,11,8,-14,25,-2,2,
|
||||
13,11,-22,39,-9,9,5,-45,
|
||||
-9,7,-9,12,-7,34,-17,-102,
|
||||
7,2,-42,18,35,-9,-34,11,
|
||||
-5,-2,3,22,46,-52,-25,-9,
|
||||
-94,8,11,-5,-5,-5,4,-7,
|
||||
-35,-7,54,5,-32,3,24,-9,
|
||||
-22,8,65,37,-1,-12,-23,-6,
|
||||
-9,-28,55,-33,14,-3,2,18,
|
||||
-60,41,-17,8,-16,17,-11,0,
|
||||
-11,29,-28,37,9,-53,33,-14,
|
||||
-9,7,-25,-7,-11,26,-32,-8,
|
||||
24,-21,22,-19,19,-10,29,-14,
|
||||
0,0,0,0,0,0,0,0,
|
||||
-5,-52,10,41,6,-30,-4,16,
|
||||
32,22,-27,-22,32,-3,-28,-3,
|
||||
3,-35,6,17,23,21,8,2,
|
||||
4,-45,-17,14,23,-4,-31,-11,
|
||||
-3,14,1,19,-11,2,61,-8,
|
||||
9,-12,7,-10,12,-3,-24,99,
|
||||
-48,23,50,-37,-5,-23,0,8,
|
||||
-14,35,-64,-5,46,-25,13,-1,
|
||||
-49,-19,-15,9,34,50,25,11,
|
||||
-6,-9,-16,-20,-32,-33,-32,-27,
|
||||
10,-8,12,-15,56,-14,-32,33,
|
||||
3,-9,1,65,-9,-9,-10,-2,
|
||||
-6,-23,9,17,3,-28,13,-32,
|
||||
4,-2,-10,4,-16,76,12,-52,
|
||||
6,13,33,-6,4,-14,-9,-3,
|
||||
1,-15,-16,28,1,-15,11,16,
|
||||
9,4,-21,-37,-40,-6,22,12,
|
||||
-15,-23,-14,-17,-16,-9,-10,-9,
|
||||
13,-39,41,5,-9,16,-38,25,
|
||||
46,-47,4,49,-14,17,-2,6,
|
||||
18,5,-6,-33,-22,44,50,-2,
|
||||
1,3,-6,7,7,-3,-21,38,
|
||||
-18,34,-14,-41,60,-13,6,16,
|
||||
-24,35,19,-13,-36,24,3,-17,
|
||||
-14,-10,36,44,-44,-29,-3,3,
|
||||
-54,-8,12,55,26,4,-2,-5,
|
||||
2,-11,22,-23,2,22,1,-25,
|
||||
-39,66,-49,21,-8,-2,10,-14,
|
||||
-60,25,6,10,27,-25,16,5,
|
||||
-2,-9,26,-13,-20,58,-2,7,
|
||||
52,-9,2,5,-4,-15,23,-1,
|
||||
-38,23,8,27,-6,0,-27,-7,
|
||||
39,-10,-14,26,11,-45,-12,9,
|
||||
-5,34,4,-35,10,43,-22,-11,
|
||||
56,-7,20,1,10,1,-26,9,
|
||||
94,11,-27,-14,-13,1,-11,0,
|
||||
14,-5,-6,-10,-4,-15,-8,-41,
|
||||
21,-5,1,-28,-8,22,-9,33,
|
||||
-23,-4,-4,-12,39,4,-7,3,
|
||||
-60,80,8,-17,2,-6,12,-5,
|
||||
1,9,15,27,31,30,27,23,
|
||||
61,47,26,10,-5,-8,-12,-13,
|
||||
5,-18,25,-15,-4,-15,-11,12,
|
||||
-2,-2,-16,-2,-6,24,12,11,
|
||||
-4,9,1,-9,14,-45,57,12,
|
||||
20,-35,26,11,-64,32,-10,-10,
|
||||
42,-4,-9,-16,32,24,7,10,
|
||||
52,-11,-57,29,0,8,0,-6,
|
||||
17,-17,-56,-40,7,20,18,12,
|
||||
-6,16,5,7,-1,9,1,10,
|
||||
29,12,16,13,-2,23,7,9,
|
||||
-3,-4,-5,18,-64,13,55,-25,
|
||||
9,-9,24,14,-25,15,-11,-40,
|
||||
-30,37,1,-19,22,-5,-31,13,
|
||||
-2,0,7,-4,16,-67,12,66,
|
||||
-36,24,-8,18,-15,-23,19,0,
|
||||
-45,-7,4,3,-13,13,35,5,
|
||||
13,33,10,27,23,0,-7,-11,
|
||||
43,-74,36,-12,2,5,-8,6,
|
||||
-33,11,-16,-14,-5,-7,-3,17,
|
||||
-34,27,-16,11,-9,15,33,-31,
|
||||
8,-16,7,-6,-7,63,-55,-17,
|
||||
11,-1,20,-46,34,-30,6,9,
|
||||
19,28,-9,5,-24,-8,-23,-2,
|
||||
31,-19,-16,-5,-15,-18,0,26,
|
||||
18,37,-5,-15,-2,17,5,-27,
|
||||
21,-33,44,12,-27,-9,17,11,
|
||||
25,-21,-31,-7,13,33,-8,-25,
|
||||
-7,7,-10,4,-6,-9,48,-82,
|
||||
-23,-8,6,11,-23,3,-3,49,
|
||||
-29,25,31,4,14,16,9,-4,
|
||||
-18,10,-26,3,5,-44,-9,9,
|
||||
-47,-55,15,9,28,1,4,-3,
|
||||
46,6,-6,-38,-29,-31,-15,-6,
|
||||
3,0,14,-6,8,-54,-50,33,
|
||||
-5,1,-14,33,-48,26,-4,-5,
|
||||
-3,-5,-3,-5,-28,-22,77,55,
|
||||
-1,2,10,10,-9,-14,-66,-49,
|
||||
11,-36,-6,-20,10,-10,16,12,
|
||||
4,-1,-16,45,-44,-50,31,-2,
|
||||
25,42,23,-32,-22,0,11,20,
|
||||
-40,-35,-40,-36,-32,-26,-21,-13,
|
||||
52,-22,6,-24,-20,17,-5,-8,
|
||||
36,-25,-11,21,-26,6,34,-8,
|
||||
7,20,-3,5,-25,-8,18,-5,
|
||||
-9,-4,1,-9,20,20,39,48,
|
||||
-24,9,5,-65,22,29,4,3,
|
||||
-43,-11,32,-6,9,19,-27,-10,
|
||||
-47,-14,24,10,-7,-36,-7,-1,
|
||||
-4,-5,-5,16,53,25,-26,-29,
|
||||
-4,-12,45,-58,-34,33,-5,2,
|
||||
-1,27,-48,31,-15,22,-5,4,
|
||||
7,7,-25,-3,11,-22,16,-12,
|
||||
8,-3,7,-11,45,14,-73,-19,
|
||||
56,-46,24,-20,28,-12,-2,-1,
|
||||
-36,-3,-33,19,-6,7,2,-15,
|
||||
5,-31,-45,8,35,13,20,0,
|
||||
-9,48,-13,-43,-3,-13,2,-5,
|
||||
72,-68,-27,2,1,-2,-7,5,
|
||||
36,33,-40,-12,-4,-5,23,19};
|
||||
397
jni/libspeex/fftwrap.c
Normal file
@@ -0,0 +1,397 @@
|
||||
/* Copyright (C) 2005-2006 Jean-Marc Valin
|
||||
File: fftwrap.c
|
||||
|
||||
Wrapper for various FFTs
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "arch.h"
|
||||
#include "os_support.h"
|
||||
|
||||
#define MAX_FFT_SIZE 2048
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t bound, int len)
|
||||
{
|
||||
int i, shift;
|
||||
spx_word16_t max_val = 0;
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
if (in[i]>max_val)
|
||||
max_val = in[i];
|
||||
if (-in[i]>max_val)
|
||||
max_val = -in[i];
|
||||
}
|
||||
shift=0;
|
||||
while (max_val <= (bound>>1) && max_val != 0)
|
||||
{
|
||||
max_val <<= 1;
|
||||
shift++;
|
||||
}
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
out[i] = SHL16(in[i], shift);
|
||||
}
|
||||
return shift;
|
||||
}
|
||||
|
||||
static void renorm_range(spx_word16_t *in, spx_word16_t *out, int shift, int len)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
out[i] = PSHR16(in[i], shift);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_SMALLFT
|
||||
|
||||
#include "smallft.h"
|
||||
#include <math.h>
|
||||
|
||||
void *spx_fft_init(int size)
|
||||
{
|
||||
struct drft_lookup *table;
|
||||
table = speex_alloc(sizeof(struct drft_lookup));
|
||||
spx_drft_init((struct drft_lookup *)table, size);
|
||||
return (void*)table;
|
||||
}
|
||||
|
||||
void spx_fft_destroy(void *table)
|
||||
{
|
||||
spx_drft_clear(table);
|
||||
speex_free(table);
|
||||
}
|
||||
|
||||
void spx_fft(void *table, float *in, float *out)
|
||||
{
|
||||
if (in==out)
|
||||
{
|
||||
int i;
|
||||
float scale = 1./((struct drft_lookup *)table)->n;
|
||||
speex_warning("FFT should not be done in-place");
|
||||
for (i=0;i<((struct drft_lookup *)table)->n;i++)
|
||||
out[i] = scale*in[i];
|
||||
} else {
|
||||
int i;
|
||||
float scale = 1./((struct drft_lookup *)table)->n;
|
||||
for (i=0;i<((struct drft_lookup *)table)->n;i++)
|
||||
out[i] = scale*in[i];
|
||||
}
|
||||
spx_drft_forward((struct drft_lookup *)table, out);
|
||||
}
|
||||
|
||||
void spx_ifft(void *table, float *in, float *out)
|
||||
{
|
||||
if (in==out)
|
||||
{
|
||||
speex_warning("FFT should not be done in-place");
|
||||
} else {
|
||||
int i;
|
||||
for (i=0;i<((struct drft_lookup *)table)->n;i++)
|
||||
out[i] = in[i];
|
||||
}
|
||||
spx_drft_backward((struct drft_lookup *)table, out);
|
||||
}
|
||||
|
||||
#elif defined(USE_INTEL_MKL)
|
||||
#include <mkl.h>
|
||||
|
||||
struct mkl_config {
|
||||
DFTI_DESCRIPTOR_HANDLE desc;
|
||||
int N;
|
||||
};
|
||||
|
||||
void *spx_fft_init(int size)
|
||||
{
|
||||
struct mkl_config *table = (struct mkl_config *) speex_alloc(sizeof(struct mkl_config));
|
||||
table->N = size;
|
||||
DftiCreateDescriptor(&table->desc, DFTI_SINGLE, DFTI_REAL, 1, size);
|
||||
DftiSetValue(table->desc, DFTI_PACKED_FORMAT, DFTI_PACK_FORMAT);
|
||||
DftiSetValue(table->desc, DFTI_PLACEMENT, DFTI_NOT_INPLACE);
|
||||
DftiSetValue(table->desc, DFTI_FORWARD_SCALE, 1.0f / size);
|
||||
DftiCommitDescriptor(table->desc);
|
||||
return table;
|
||||
}
|
||||
|
||||
void spx_fft_destroy(void *table)
|
||||
{
|
||||
struct mkl_config *t = (struct mkl_config *) table;
|
||||
DftiFreeDescriptor(t->desc);
|
||||
speex_free(table);
|
||||
}
|
||||
|
||||
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||
{
|
||||
struct mkl_config *t = (struct mkl_config *) table;
|
||||
DftiComputeForward(t->desc, in, out);
|
||||
}
|
||||
|
||||
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||
{
|
||||
struct mkl_config *t = (struct mkl_config *) table;
|
||||
DftiComputeBackward(t->desc, in, out);
|
||||
}
|
||||
|
||||
#elif defined(USE_GPL_FFTW3)
|
||||
|
||||
#include <fftw3.h>
|
||||
|
||||
struct fftw_config {
|
||||
float *in;
|
||||
float *out;
|
||||
fftwf_plan fft;
|
||||
fftwf_plan ifft;
|
||||
int N;
|
||||
};
|
||||
|
||||
void *spx_fft_init(int size)
|
||||
{
|
||||
struct fftw_config *table = (struct fftw_config *) speex_alloc(sizeof(struct fftw_config));
|
||||
table->in = fftwf_malloc(sizeof(float) * (size+2));
|
||||
table->out = fftwf_malloc(sizeof(float) * (size+2));
|
||||
|
||||
table->fft = fftwf_plan_dft_r2c_1d(size, table->in, (fftwf_complex *) table->out, FFTW_PATIENT);
|
||||
table->ifft = fftwf_plan_dft_c2r_1d(size, (fftwf_complex *) table->in, table->out, FFTW_PATIENT);
|
||||
|
||||
table->N = size;
|
||||
return table;
|
||||
}
|
||||
|
||||
void spx_fft_destroy(void *table)
|
||||
{
|
||||
struct fftw_config *t = (struct fftw_config *) table;
|
||||
fftwf_destroy_plan(t->fft);
|
||||
fftwf_destroy_plan(t->ifft);
|
||||
fftwf_free(t->in);
|
||||
fftwf_free(t->out);
|
||||
speex_free(table);
|
||||
}
|
||||
|
||||
|
||||
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||
{
|
||||
int i;
|
||||
struct fftw_config *t = (struct fftw_config *) table;
|
||||
const int N = t->N;
|
||||
float *iptr = t->in;
|
||||
float *optr = t->out;
|
||||
const float m = 1.0 / N;
|
||||
for(i=0;i<N;++i)
|
||||
iptr[i]=in[i] * m;
|
||||
|
||||
fftwf_execute(t->fft);
|
||||
|
||||
out[0] = optr[0];
|
||||
for(i=1;i<N;++i)
|
||||
out[i] = optr[i+1];
|
||||
}
|
||||
|
||||
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||
{
|
||||
int i;
|
||||
struct fftw_config *t = (struct fftw_config *) table;
|
||||
const int N = t->N;
|
||||
float *iptr = t->in;
|
||||
float *optr = t->out;
|
||||
|
||||
iptr[0] = in[0];
|
||||
iptr[1] = 0.0f;
|
||||
for(i=1;i<N;++i)
|
||||
iptr[i+1] = in[i];
|
||||
iptr[N+1] = 0.0f;
|
||||
|
||||
fftwf_execute(t->ifft);
|
||||
|
||||
for(i=0;i<N;++i)
|
||||
out[i] = optr[i];
|
||||
}
|
||||
|
||||
#elif defined(USE_KISS_FFT)
|
||||
|
||||
#include "kiss_fftr.h"
|
||||
#include "kiss_fft.h"
|
||||
|
||||
struct kiss_config {
|
||||
kiss_fftr_cfg forward;
|
||||
kiss_fftr_cfg backward;
|
||||
int N;
|
||||
};
|
||||
|
||||
void *spx_fft_init(int size)
|
||||
{
|
||||
struct kiss_config *table;
|
||||
table = (struct kiss_config*)speex_alloc(sizeof(struct kiss_config));
|
||||
table->forward = kiss_fftr_alloc(size,0,NULL,NULL);
|
||||
table->backward = kiss_fftr_alloc(size,1,NULL,NULL);
|
||||
table->N = size;
|
||||
return table;
|
||||
}
|
||||
|
||||
void spx_fft_destroy(void *table)
|
||||
{
|
||||
struct kiss_config *t = (struct kiss_config *)table;
|
||||
kiss_fftr_free(t->forward);
|
||||
kiss_fftr_free(t->backward);
|
||||
speex_free(table);
|
||||
}
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||
{
|
||||
int shift;
|
||||
struct kiss_config *t = (struct kiss_config *)table;
|
||||
shift = maximize_range(in, in, 32000, t->N);
|
||||
kiss_fftr2(t->forward, in, out);
|
||||
renorm_range(in, in, shift, t->N);
|
||||
renorm_range(out, out, shift, t->N);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||
{
|
||||
int i;
|
||||
float scale;
|
||||
struct kiss_config *t = (struct kiss_config *)table;
|
||||
scale = 1./t->N;
|
||||
kiss_fftr2(t->forward, in, out);
|
||||
for (i=0;i<t->N;i++)
|
||||
out[i] *= scale;
|
||||
}
|
||||
#endif
|
||||
|
||||
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
|
||||
{
|
||||
struct kiss_config *t = (struct kiss_config *)table;
|
||||
kiss_fftri2(t->backward, in, out);
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#error No other FFT implemented
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
/*#include "smallft.h"*/
|
||||
|
||||
|
||||
void spx_fft_float(void *table, float *in, float *out)
|
||||
{
|
||||
int i;
|
||||
#ifdef USE_SMALLFT
|
||||
int N = ((struct drft_lookup *)table)->n;
|
||||
#elif defined(USE_KISS_FFT)
|
||||
int N = ((struct kiss_config *)table)->N;
|
||||
#else
|
||||
#endif
|
||||
#ifdef VAR_ARRAYS
|
||||
spx_word16_t _in[N];
|
||||
spx_word16_t _out[N];
|
||||
#else
|
||||
spx_word16_t _in[MAX_FFT_SIZE];
|
||||
spx_word16_t _out[MAX_FFT_SIZE];
|
||||
#endif
|
||||
for (i=0;i<N;i++)
|
||||
_in[i] = (int)floor(.5+in[i]);
|
||||
spx_fft(table, _in, _out);
|
||||
for (i=0;i<N;i++)
|
||||
out[i] = _out[i];
|
||||
#if 0
|
||||
if (!fixed_point)
|
||||
{
|
||||
float scale;
|
||||
struct drft_lookup t;
|
||||
spx_drft_init(&t, ((struct kiss_config *)table)->N);
|
||||
scale = 1./((struct kiss_config *)table)->N;
|
||||
for (i=0;i<((struct kiss_config *)table)->N;i++)
|
||||
out[i] = scale*in[i];
|
||||
spx_drft_forward(&t, out);
|
||||
spx_drft_clear(&t);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void spx_ifft_float(void *table, float *in, float *out)
|
||||
{
|
||||
int i;
|
||||
#ifdef USE_SMALLFT
|
||||
int N = ((struct drft_lookup *)table)->n;
|
||||
#elif defined(USE_KISS_FFT)
|
||||
int N = ((struct kiss_config *)table)->N;
|
||||
#else
|
||||
#endif
|
||||
#ifdef VAR_ARRAYS
|
||||
spx_word16_t _in[N];
|
||||
spx_word16_t _out[N];
|
||||
#else
|
||||
spx_word16_t _in[MAX_FFT_SIZE];
|
||||
spx_word16_t _out[MAX_FFT_SIZE];
|
||||
#endif
|
||||
for (i=0;i<N;i++)
|
||||
_in[i] = (int)floor(.5+in[i]);
|
||||
spx_ifft(table, _in, _out);
|
||||
for (i=0;i<N;i++)
|
||||
out[i] = _out[i];
|
||||
#if 0
|
||||
if (!fixed_point)
|
||||
{
|
||||
int i;
|
||||
struct drft_lookup t;
|
||||
spx_drft_init(&t, ((struct kiss_config *)table)->N);
|
||||
for (i=0;i<((struct kiss_config *)table)->N;i++)
|
||||
out[i] = in[i];
|
||||
spx_drft_backward(&t, out);
|
||||
spx_drft_clear(&t);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void spx_fft_float(void *table, float *in, float *out)
|
||||
{
|
||||
spx_fft(table, in, out);
|
||||
}
|
||||
void spx_ifft_float(void *table, float *in, float *out)
|
||||
{
|
||||
spx_ifft(table, in, out);
|
||||
}
|
||||
|
||||
#endif
|
||||
58
jni/libspeex/fftwrap.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* Copyright (C) 2005 Jean-Marc Valin
|
||||
File: fftwrap.h
|
||||
|
||||
Wrapper for various FFTs
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef FFTWRAP_H
|
||||
#define FFTWRAP_H
|
||||
|
||||
#include "arch.h"
|
||||
|
||||
/** Compute tables for an FFT */
|
||||
void *spx_fft_init(int size);
|
||||
|
||||
/** Destroy tables for an FFT */
|
||||
void spx_fft_destroy(void *table);
|
||||
|
||||
/** Forward (real to half-complex) transform */
|
||||
void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out);
|
||||
|
||||
/** Backward (half-complex to real) transform */
|
||||
void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out);
|
||||
|
||||
/** Forward (real to half-complex) transform of float data */
|
||||
void spx_fft_float(void *table, float *in, float *out);
|
||||
|
||||
/** Backward (half-complex to real) transform of float data */
|
||||
void spx_ifft_float(void *table, float *in, float *out);
|
||||
|
||||
#endif
|
||||
227
jni/libspeex/filterbank.c
Normal file
@@ -0,0 +1,227 @@
|
||||
/* Copyright (C) 2006 Jean-Marc Valin */
|
||||
/**
|
||||
@file filterbank.c
|
||||
@brief Converting between psd and filterbank
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "filterbank.h"
|
||||
#include "arch.h"
|
||||
#include <math.h>
|
||||
#include "math_approx.h"
|
||||
#include "os_support.h"
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
#define toBARK(n) (MULT16_16(26829,spx_atan(SHR32(MULT16_16(97,n),2))) + MULT16_16(4588,spx_atan(MULT16_32_Q15(20,MULT16_16(n,n)))) + MULT16_16(3355,n))
|
||||
|
||||
#else
|
||||
#define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
|
||||
#endif
|
||||
|
||||
#define toMEL(n) (2595.f*log10(1.f+(n)/700.f))
|
||||
|
||||
FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type)
|
||||
{
|
||||
FilterBank *bank;
|
||||
spx_word32_t df;
|
||||
spx_word32_t max_mel, mel_interval;
|
||||
int i;
|
||||
int id1;
|
||||
int id2;
|
||||
df = DIV32(SHL32(sampling,15),MULT16_16(2,len));
|
||||
max_mel = toBARK(EXTRACT16(sampling/2));
|
||||
mel_interval = PDIV32(max_mel,banks-1);
|
||||
|
||||
bank = (FilterBank*)speex_alloc(sizeof(FilterBank));
|
||||
bank->nb_banks = banks;
|
||||
bank->len = len;
|
||||
bank->bank_left = (int*)speex_alloc(len*sizeof(int));
|
||||
bank->bank_right = (int*)speex_alloc(len*sizeof(int));
|
||||
bank->filter_left = (spx_word16_t*)speex_alloc(len*sizeof(spx_word16_t));
|
||||
bank->filter_right = (spx_word16_t*)speex_alloc(len*sizeof(spx_word16_t));
|
||||
/* Think I can safely disable normalisation that for fixed-point (and probably float as well) */
|
||||
#ifndef FIXED_POINT
|
||||
bank->scaling = (float*)speex_alloc(banks*sizeof(float));
|
||||
#endif
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
spx_word16_t curr_freq;
|
||||
spx_word32_t mel;
|
||||
spx_word16_t val;
|
||||
curr_freq = EXTRACT16(MULT16_32_P15(i,df));
|
||||
mel = toBARK(curr_freq);
|
||||
if (mel > max_mel)
|
||||
break;
|
||||
#ifdef FIXED_POINT
|
||||
id1 = DIV32(mel,mel_interval);
|
||||
#else
|
||||
id1 = (int)(floor(mel/mel_interval));
|
||||
#endif
|
||||
if (id1>banks-2)
|
||||
{
|
||||
id1 = banks-2;
|
||||
val = Q15_ONE;
|
||||
} else {
|
||||
val = DIV32_16(mel - id1*mel_interval,EXTRACT16(PSHR32(mel_interval,15)));
|
||||
}
|
||||
id2 = id1+1;
|
||||
bank->bank_left[i] = id1;
|
||||
bank->filter_left[i] = SUB16(Q15_ONE,val);
|
||||
bank->bank_right[i] = id2;
|
||||
bank->filter_right[i] = val;
|
||||
}
|
||||
|
||||
/* Think I can safely disable normalisation for fixed-point (and probably float as well) */
|
||||
#ifndef FIXED_POINT
|
||||
for (i=0;i<bank->nb_banks;i++)
|
||||
bank->scaling[i] = 0;
|
||||
for (i=0;i<bank->len;i++)
|
||||
{
|
||||
int id = bank->bank_left[i];
|
||||
bank->scaling[id] += bank->filter_left[i];
|
||||
id = bank->bank_right[i];
|
||||
bank->scaling[id] += bank->filter_right[i];
|
||||
}
|
||||
for (i=0;i<bank->nb_banks;i++)
|
||||
bank->scaling[i] = Q15_ONE/(bank->scaling[i]);
|
||||
#endif
|
||||
return bank;
|
||||
}
|
||||
|
||||
void filterbank_destroy(FilterBank *bank)
|
||||
{
|
||||
speex_free(bank->bank_left);
|
||||
speex_free(bank->bank_right);
|
||||
speex_free(bank->filter_left);
|
||||
speex_free(bank->filter_right);
|
||||
#ifndef FIXED_POINT
|
||||
speex_free(bank->scaling);
|
||||
#endif
|
||||
speex_free(bank);
|
||||
}
|
||||
|
||||
void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<bank->nb_banks;i++)
|
||||
mel[i] = 0;
|
||||
|
||||
for (i=0;i<bank->len;i++)
|
||||
{
|
||||
int id;
|
||||
id = bank->bank_left[i];
|
||||
mel[id] += MULT16_32_P15(bank->filter_left[i],ps[i]);
|
||||
id = bank->bank_right[i];
|
||||
mel[id] += MULT16_32_P15(bank->filter_right[i],ps[i]);
|
||||
}
|
||||
/* Think I can safely disable normalisation that for fixed-point (and probably float as well) */
|
||||
#ifndef FIXED_POINT
|
||||
/*for (i=0;i<bank->nb_banks;i++)
|
||||
mel[i] = MULT16_32_P15(Q15(bank->scaling[i]),mel[i]);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
|
||||
void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *ps)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<bank->len;i++)
|
||||
{
|
||||
spx_word32_t tmp;
|
||||
int id1, id2;
|
||||
id1 = bank->bank_left[i];
|
||||
id2 = bank->bank_right[i];
|
||||
tmp = MULT16_16(mel[id1],bank->filter_left[i]);
|
||||
tmp += MULT16_16(mel[id2],bank->filter_right[i]);
|
||||
ps[i] = EXTRACT16(PSHR32(tmp,15));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef FIXED_POINT
|
||||
void filterbank_compute_bank(FilterBank *bank, float *ps, float *mel)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<bank->nb_banks;i++)
|
||||
mel[i] = 0;
|
||||
|
||||
for (i=0;i<bank->len;i++)
|
||||
{
|
||||
int id = bank->bank_left[i];
|
||||
mel[id] += bank->filter_left[i]*ps[i];
|
||||
id = bank->bank_right[i];
|
||||
mel[id] += bank->filter_right[i]*ps[i];
|
||||
}
|
||||
for (i=0;i<bank->nb_banks;i++)
|
||||
mel[i] *= bank->scaling[i];
|
||||
}
|
||||
|
||||
void filterbank_compute_psd(FilterBank *bank, float *mel, float *ps)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<bank->len;i++)
|
||||
{
|
||||
int id = bank->bank_left[i];
|
||||
ps[i] = mel[id]*bank->filter_left[i];
|
||||
id = bank->bank_right[i];
|
||||
ps[i] += mel[id]*bank->filter_right[i];
|
||||
}
|
||||
}
|
||||
|
||||
void filterbank_psy_smooth(FilterBank *bank, float *ps, float *mask)
|
||||
{
|
||||
/* Low freq slope: 14 dB/Bark*/
|
||||
/* High freq slope: 9 dB/Bark*/
|
||||
/* Noise vs tone: 5 dB difference */
|
||||
/* FIXME: Temporary kludge */
|
||||
float bark[100];
|
||||
int i;
|
||||
/* Assumes 1/3 Bark resolution */
|
||||
float decay_low = 0.34145f;
|
||||
float decay_high = 0.50119f;
|
||||
filterbank_compute_bank(bank, ps, bark);
|
||||
for (i=1;i<bank->nb_banks;i++)
|
||||
{
|
||||
/*float decay_high = 13-1.6*log10(bark[i-1]);
|
||||
decay_high = pow(10,(-decay_high/30.f));*/
|
||||
bark[i] = bark[i] + decay_high*bark[i-1];
|
||||
}
|
||||
for (i=bank->nb_banks-2;i>=0;i--)
|
||||
{
|
||||
bark[i] = bark[i] + decay_low*bark[i+1];
|
||||
}
|
||||
filterbank_compute_psd(bank, bark, mask);
|
||||
}
|
||||
|
||||
#endif
|
||||
66
jni/libspeex/filterbank.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* Copyright (C) 2006 Jean-Marc Valin */
|
||||
/**
|
||||
@file filterbank.h
|
||||
@brief Converting between psd and filterbank
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef FILTERBANK_H
|
||||
#define FILTERBANK_H
|
||||
|
||||
#include "arch.h"
|
||||
|
||||
typedef struct {
|
||||
int *bank_left;
|
||||
int *bank_right;
|
||||
spx_word16_t *filter_left;
|
||||
spx_word16_t *filter_right;
|
||||
#ifndef FIXED_POINT
|
||||
float *scaling;
|
||||
#endif
|
||||
int nb_banks;
|
||||
int len;
|
||||
} FilterBank;
|
||||
|
||||
|
||||
FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type);
|
||||
|
||||
void filterbank_destroy(FilterBank *bank);
|
||||
|
||||
void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel);
|
||||
|
||||
void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *psd);
|
||||
|
||||
#ifndef FIXED_POINT
|
||||
void filterbank_compute_bank(FilterBank *bank, float *psd, float *mel);
|
||||
void filterbank_compute_psd(FilterBank *bank, float *mel, float *psd);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
821
jni/libspeex/filters.c
Normal file
@@ -0,0 +1,821 @@
|
||||
/* Copyright (C) 2002-2006 Jean-Marc Valin
|
||||
File: filters.c
|
||||
Various analysis/synthesis filters
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "filters.h"
|
||||
#include "stack_alloc.h"
|
||||
#include "arch.h"
|
||||
#include "math_approx.h"
|
||||
#include "ltp.h"
|
||||
#include <math.h>
|
||||
|
||||
#ifdef _USE_SSE
|
||||
#include "filters_sse.h"
|
||||
#elif defined (ARM4_ASM) || defined(ARM5E_ASM)
|
||||
#include "filters_arm4.h"
|
||||
#elif defined (BFIN_ASM)
|
||||
#include "filters_bfin.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void bw_lpc(spx_word16_t gamma, const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order)
|
||||
{
|
||||
int i;
|
||||
spx_word16_t tmp=gamma;
|
||||
for (i=0;i<order;i++)
|
||||
{
|
||||
lpc_out[i] = MULT16_16_P15(tmp,lpc_in[i]);
|
||||
tmp = MULT16_16_P15(tmp, gamma);
|
||||
}
|
||||
}
|
||||
|
||||
void sanitize_values32(spx_word32_t *vec, spx_word32_t min_val, spx_word32_t max_val, int len)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
/* It's important we do the test that way so we can catch NaNs, which are neither greater nor smaller */
|
||||
if (!(vec[i]>=min_val && vec[i] <= max_val))
|
||||
{
|
||||
if (vec[i] < min_val)
|
||||
vec[i] = min_val;
|
||||
else if (vec[i] > max_val)
|
||||
vec[i] = max_val;
|
||||
else /* Has to be NaN */
|
||||
vec[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem)
|
||||
{
|
||||
int i;
|
||||
#ifdef FIXED_POINT
|
||||
const spx_word16_t Pcoef[5][3] = {{16384, -31313, 14991}, {16384, -31569, 15249}, {16384, -31677, 15328}, {16384, -32313, 15947}, {16384, -22446, 6537}};
|
||||
const spx_word16_t Zcoef[5][3] = {{15672, -31344, 15672}, {15802, -31601, 15802}, {15847, -31694, 15847}, {16162, -32322, 16162}, {14418, -28836, 14418}};
|
||||
#else
|
||||
const spx_word16_t Pcoef[5][3] = {{1.00000f, -1.91120f, 0.91498f}, {1.00000f, -1.92683f, 0.93071f}, {1.00000f, -1.93338f, 0.93553f}, {1.00000f, -1.97226f, 0.97332f}, {1.00000f, -1.37000f, 0.39900f}};
|
||||
const spx_word16_t Zcoef[5][3] = {{0.95654f, -1.91309f, 0.95654f}, {0.96446f, -1.92879f, 0.96446f}, {0.96723f, -1.93445f, 0.96723f}, {0.98645f, -1.97277f, 0.98645f}, {0.88000f, -1.76000f, 0.88000f}};
|
||||
#endif
|
||||
const spx_word16_t *den, *num;
|
||||
if (filtID>4)
|
||||
filtID=4;
|
||||
|
||||
den = Pcoef[filtID]; num = Zcoef[filtID];
|
||||
/*return;*/
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
spx_word16_t yi;
|
||||
spx_word32_t vout = ADD32(MULT16_16(num[0], x[i]),mem[0]);
|
||||
yi = EXTRACT16(SATURATE(PSHR32(vout,14),32767));
|
||||
mem[0] = ADD32(MAC16_16(mem[1], num[1],x[i]), SHL32(MULT16_32_Q15(-den[1],vout),1));
|
||||
mem[1] = ADD32(MULT16_16(num[2],x[i]), SHL32(MULT16_32_Q15(-den[2],vout),1));
|
||||
y[i] = yi;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
/* FIXME: These functions are ugly and probably introduce too much error */
|
||||
void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
y[i] = SHL32(MULT16_32_Q14(EXTRACT16(SHR32(x[i],7)),scale),7);
|
||||
}
|
||||
}
|
||||
|
||||
void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int len)
|
||||
{
|
||||
int i;
|
||||
if (scale > SHL32(EXTEND32(SIG_SCALING), 8))
|
||||
{
|
||||
spx_word16_t scale_1;
|
||||
scale = PSHR32(scale, SIG_SHIFT);
|
||||
scale_1 = EXTRACT16(PDIV32_16(SHL32(EXTEND32(SIG_SCALING),7),scale));
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
y[i] = MULT16_16_P15(scale_1, x[i]);
|
||||
}
|
||||
} else if (scale > SHR32(EXTEND32(SIG_SCALING), 2)) {
|
||||
spx_word16_t scale_1;
|
||||
scale = PSHR32(scale, SIG_SHIFT-5);
|
||||
scale_1 = DIV32_16(SHL32(EXTEND32(SIG_SCALING),3),scale);
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
y[i] = PSHR32(MULT16_16(scale_1, SHL16(x[i],2)),8);
|
||||
}
|
||||
} else {
|
||||
spx_word16_t scale_1;
|
||||
scale = PSHR32(scale, SIG_SHIFT-7);
|
||||
if (scale < 5)
|
||||
scale = 5;
|
||||
scale_1 = DIV32_16(SHL32(EXTEND32(SIG_SCALING),3),scale);
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
y[i] = PSHR32(MULT16_16(scale_1, SHL16(x[i],2)),6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<len;i++)
|
||||
y[i] = scale*x[i];
|
||||
}
|
||||
|
||||
void signal_div(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
|
||||
{
|
||||
int i;
|
||||
float scale_1 = 1/scale;
|
||||
for (i=0;i<len;i++)
|
||||
y[i] = scale_1*x[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
|
||||
|
||||
spx_word16_t compute_rms(const spx_sig_t *x, int len)
|
||||
{
|
||||
int i;
|
||||
spx_word32_t sum=0;
|
||||
spx_sig_t max_val=1;
|
||||
int sig_shift;
|
||||
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
spx_sig_t tmp = x[i];
|
||||
if (tmp<0)
|
||||
tmp = -tmp;
|
||||
if (tmp > max_val)
|
||||
max_val = tmp;
|
||||
}
|
||||
|
||||
sig_shift=0;
|
||||
while (max_val>16383)
|
||||
{
|
||||
sig_shift++;
|
||||
max_val >>= 1;
|
||||
}
|
||||
|
||||
for (i=0;i<len;i+=4)
|
||||
{
|
||||
spx_word32_t sum2=0;
|
||||
spx_word16_t tmp;
|
||||
tmp = EXTRACT16(SHR32(x[i],sig_shift));
|
||||
sum2 = MAC16_16(sum2,tmp,tmp);
|
||||
tmp = EXTRACT16(SHR32(x[i+1],sig_shift));
|
||||
sum2 = MAC16_16(sum2,tmp,tmp);
|
||||
tmp = EXTRACT16(SHR32(x[i+2],sig_shift));
|
||||
sum2 = MAC16_16(sum2,tmp,tmp);
|
||||
tmp = EXTRACT16(SHR32(x[i+3],sig_shift));
|
||||
sum2 = MAC16_16(sum2,tmp,tmp);
|
||||
sum = ADD32(sum,SHR32(sum2,6));
|
||||
}
|
||||
|
||||
return EXTRACT16(PSHR32(SHL32(EXTEND32(spx_sqrt(DIV32(sum,len))),(sig_shift+3)),SIG_SHIFT));
|
||||
}
|
||||
|
||||
spx_word16_t compute_rms16(const spx_word16_t *x, int len)
|
||||
{
|
||||
int i;
|
||||
spx_word16_t max_val=10;
|
||||
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
spx_sig_t tmp = x[i];
|
||||
if (tmp<0)
|
||||
tmp = -tmp;
|
||||
if (tmp > max_val)
|
||||
max_val = tmp;
|
||||
}
|
||||
if (max_val>16383)
|
||||
{
|
||||
spx_word32_t sum=0;
|
||||
for (i=0;i<len;i+=4)
|
||||
{
|
||||
spx_word32_t sum2=0;
|
||||
sum2 = MAC16_16(sum2,SHR16(x[i],1),SHR16(x[i],1));
|
||||
sum2 = MAC16_16(sum2,SHR16(x[i+1],1),SHR16(x[i+1],1));
|
||||
sum2 = MAC16_16(sum2,SHR16(x[i+2],1),SHR16(x[i+2],1));
|
||||
sum2 = MAC16_16(sum2,SHR16(x[i+3],1),SHR16(x[i+3],1));
|
||||
sum = ADD32(sum,SHR32(sum2,6));
|
||||
}
|
||||
return SHL16(spx_sqrt(DIV32(sum,len)),4);
|
||||
} else {
|
||||
spx_word32_t sum=0;
|
||||
int sig_shift=0;
|
||||
if (max_val < 8192)
|
||||
sig_shift=1;
|
||||
if (max_val < 4096)
|
||||
sig_shift=2;
|
||||
if (max_val < 2048)
|
||||
sig_shift=3;
|
||||
for (i=0;i<len;i+=4)
|
||||
{
|
||||
spx_word32_t sum2=0;
|
||||
sum2 = MAC16_16(sum2,SHL16(x[i],sig_shift),SHL16(x[i],sig_shift));
|
||||
sum2 = MAC16_16(sum2,SHL16(x[i+1],sig_shift),SHL16(x[i+1],sig_shift));
|
||||
sum2 = MAC16_16(sum2,SHL16(x[i+2],sig_shift),SHL16(x[i+2],sig_shift));
|
||||
sum2 = MAC16_16(sum2,SHL16(x[i+3],sig_shift),SHL16(x[i+3],sig_shift));
|
||||
sum = ADD32(sum,SHR32(sum2,6));
|
||||
}
|
||||
return SHL16(spx_sqrt(DIV32(sum,len)),3-sig_shift);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef OVERRIDE_NORMALIZE16
|
||||
int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len)
|
||||
{
|
||||
int i;
|
||||
spx_sig_t max_val=1;
|
||||
int sig_shift;
|
||||
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
spx_sig_t tmp = x[i];
|
||||
if (tmp<0)
|
||||
tmp = NEG32(tmp);
|
||||
if (tmp >= max_val)
|
||||
max_val = tmp;
|
||||
}
|
||||
|
||||
sig_shift=0;
|
||||
while (max_val>max_scale)
|
||||
{
|
||||
sig_shift++;
|
||||
max_val >>= 1;
|
||||
}
|
||||
|
||||
for (i=0;i<len;i++)
|
||||
y[i] = EXTRACT16(SHR32(x[i], sig_shift));
|
||||
|
||||
return sig_shift;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
spx_word16_t compute_rms(const spx_sig_t *x, int len)
|
||||
{
|
||||
int i;
|
||||
float sum=0;
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
sum += x[i]*x[i];
|
||||
}
|
||||
return sqrt(.1+sum/len);
|
||||
}
|
||||
spx_word16_t compute_rms16(const spx_word16_t *x, int len)
|
||||
{
|
||||
return compute_rms(x, len);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifndef OVERRIDE_FILTER_MEM16
|
||||
void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
|
||||
{
|
||||
int i,j;
|
||||
spx_word16_t xi,yi,nyi;
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
xi= x[i];
|
||||
yi = EXTRACT16(SATURATE(ADD32(EXTEND32(x[i]),PSHR32(mem[0],LPC_SHIFT)),32767));
|
||||
nyi = NEG16(yi);
|
||||
for (j=0;j<ord-1;j++)
|
||||
{
|
||||
mem[j] = MAC16_16(MAC16_16(mem[j+1], num[j],xi), den[j],nyi);
|
||||
}
|
||||
mem[ord-1] = ADD32(MULT16_16(num[ord-1],xi), MULT16_16(den[ord-1],nyi));
|
||||
y[i] = yi;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OVERRIDE_IIR_MEM16
|
||||
void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
|
||||
{
|
||||
int i,j;
|
||||
spx_word16_t yi,nyi;
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
yi = EXTRACT16(SATURATE(ADD32(EXTEND32(x[i]),PSHR32(mem[0],LPC_SHIFT)),32767));
|
||||
nyi = NEG16(yi);
|
||||
for (j=0;j<ord-1;j++)
|
||||
{
|
||||
mem[j] = MAC16_16(mem[j+1],den[j],nyi);
|
||||
}
|
||||
mem[ord-1] = MULT16_16(den[ord-1],nyi);
|
||||
y[i] = yi;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef OVERRIDE_FIR_MEM16
|
||||
void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
|
||||
{
|
||||
int i,j;
|
||||
spx_word16_t xi,yi;
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
xi=x[i];
|
||||
yi = EXTRACT16(SATURATE(ADD32(EXTEND32(x[i]),PSHR32(mem[0],LPC_SHIFT)),32767));
|
||||
for (j=0;j<ord-1;j++)
|
||||
{
|
||||
mem[j] = MAC16_16(mem[j+1], num[j],xi);
|
||||
}
|
||||
mem[ord-1] = MULT16_16(num[ord-1],xi);
|
||||
y[i] = yi;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void syn_percep_zero16(const spx_word16_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
|
||||
{
|
||||
int i;
|
||||
VARDECL(spx_mem_t *mem);
|
||||
ALLOC(mem, ord, spx_mem_t);
|
||||
for (i=0;i<ord;i++)
|
||||
mem[i]=0;
|
||||
iir_mem16(xx, ak, y, N, ord, mem, stack);
|
||||
for (i=0;i<ord;i++)
|
||||
mem[i]=0;
|
||||
filter_mem16(y, awk1, awk2, y, N, ord, mem, stack);
|
||||
}
|
||||
void residue_percep_zero16(const spx_word16_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
|
||||
{
|
||||
int i;
|
||||
VARDECL(spx_mem_t *mem);
|
||||
ALLOC(mem, ord, spx_mem_t);
|
||||
for (i=0;i<ord;i++)
|
||||
mem[i]=0;
|
||||
filter_mem16(xx, ak, awk1, y, N, ord, mem, stack);
|
||||
for (i=0;i<ord;i++)
|
||||
mem[i]=0;
|
||||
fir_mem16(y, awk2, y, N, ord, mem, stack);
|
||||
}
|
||||
|
||||
|
||||
#ifndef OVERRIDE_COMPUTE_IMPULSE_RESPONSE
|
||||
void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
|
||||
{
|
||||
int i,j;
|
||||
spx_word16_t y1, ny1i, ny2i;
|
||||
VARDECL(spx_mem_t *mem1);
|
||||
VARDECL(spx_mem_t *mem2);
|
||||
ALLOC(mem1, ord, spx_mem_t);
|
||||
ALLOC(mem2, ord, spx_mem_t);
|
||||
|
||||
y[0] = LPC_SCALING;
|
||||
for (i=0;i<ord;i++)
|
||||
y[i+1] = awk1[i];
|
||||
i++;
|
||||
for (;i<N;i++)
|
||||
y[i] = VERY_SMALL;
|
||||
for (i=0;i<ord;i++)
|
||||
mem1[i] = mem2[i] = 0;
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
y1 = ADD16(y[i], EXTRACT16(PSHR32(mem1[0],LPC_SHIFT)));
|
||||
ny1i = NEG16(y1);
|
||||
y[i] = PSHR32(ADD32(SHL32(EXTEND32(y1),LPC_SHIFT+1),mem2[0]),LPC_SHIFT);
|
||||
ny2i = NEG16(y[i]);
|
||||
for (j=0;j<ord-1;j++)
|
||||
{
|
||||
mem1[j] = MAC16_16(mem1[j+1], awk2[j],ny1i);
|
||||
mem2[j] = MAC16_16(mem2[j+1], ak[j],ny2i);
|
||||
}
|
||||
mem1[ord-1] = MULT16_16(awk2[ord-1],ny1i);
|
||||
mem2[ord-1] = MULT16_16(ak[ord-1],ny2i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Decomposes a signal into low-band and high-band using a QMF */
|
||||
void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_word16_t *y1, spx_word16_t *y2, int N, int M, spx_word16_t *mem, char *stack)
|
||||
{
|
||||
int i,j,k,M2;
|
||||
VARDECL(spx_word16_t *a);
|
||||
VARDECL(spx_word16_t *x);
|
||||
spx_word16_t *x2;
|
||||
|
||||
ALLOC(a, M, spx_word16_t);
|
||||
ALLOC(x, N+M-1, spx_word16_t);
|
||||
x2=x+M-1;
|
||||
M2=M>>1;
|
||||
for (i=0;i<M;i++)
|
||||
a[M-i-1]= aa[i];
|
||||
for (i=0;i<M-1;i++)
|
||||
x[i]=mem[M-i-2];
|
||||
for (i=0;i<N;i++)
|
||||
x[i+M-1]=SHR16(xx[i],1);
|
||||
for (i=0;i<M-1;i++)
|
||||
mem[i]=SHR16(xx[N-i-1],1);
|
||||
for (i=0,k=0;i<N;i+=2,k++)
|
||||
{
|
||||
spx_word32_t y1k=0, y2k=0;
|
||||
for (j=0;j<M2;j++)
|
||||
{
|
||||
y1k=ADD32(y1k,MULT16_16(a[j],ADD16(x[i+j],x2[i-j])));
|
||||
y2k=SUB32(y2k,MULT16_16(a[j],SUB16(x[i+j],x2[i-j])));
|
||||
j++;
|
||||
y1k=ADD32(y1k,MULT16_16(a[j],ADD16(x[i+j],x2[i-j])));
|
||||
y2k=ADD32(y2k,MULT16_16(a[j],SUB16(x[i+j],x2[i-j])));
|
||||
}
|
||||
y1[k] = EXTRACT16(SATURATE(PSHR32(y1k,15),32767));
|
||||
y2[k] = EXTRACT16(SATURATE(PSHR32(y2k,15),32767));
|
||||
}
|
||||
}
|
||||
|
||||
/* Re-synthesised a signal from the QMF low-band and high-band signals */
|
||||
void qmf_synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_t *a, spx_word16_t *y, int N, int M, spx_word16_t *mem1, spx_word16_t *mem2, char *stack)
|
||||
/* assumptions:
|
||||
all odd x[i] are zero -- well, actually they are left out of the array now
|
||||
N and M are multiples of 4 */
|
||||
{
|
||||
int i, j;
|
||||
int M2, N2;
|
||||
VARDECL(spx_word16_t *xx1);
|
||||
VARDECL(spx_word16_t *xx2);
|
||||
|
||||
M2 = M>>1;
|
||||
N2 = N>>1;
|
||||
ALLOC(xx1, M2+N2, spx_word16_t);
|
||||
ALLOC(xx2, M2+N2, spx_word16_t);
|
||||
|
||||
for (i = 0; i < N2; i++)
|
||||
xx1[i] = x1[N2-1-i];
|
||||
for (i = 0; i < M2; i++)
|
||||
xx1[N2+i] = mem1[2*i+1];
|
||||
for (i = 0; i < N2; i++)
|
||||
xx2[i] = x2[N2-1-i];
|
||||
for (i = 0; i < M2; i++)
|
||||
xx2[N2+i] = mem2[2*i+1];
|
||||
|
||||
for (i = 0; i < N2; i += 2) {
|
||||
spx_sig_t y0, y1, y2, y3;
|
||||
spx_word16_t x10, x20;
|
||||
|
||||
y0 = y1 = y2 = y3 = 0;
|
||||
x10 = xx1[N2-2-i];
|
||||
x20 = xx2[N2-2-i];
|
||||
|
||||
for (j = 0; j < M2; j += 2) {
|
||||
spx_word16_t x11, x21;
|
||||
spx_word16_t a0, a1;
|
||||
|
||||
a0 = a[2*j];
|
||||
a1 = a[2*j+1];
|
||||
x11 = xx1[N2-1+j-i];
|
||||
x21 = xx2[N2-1+j-i];
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
/* We multiply twice by the same coef to avoid overflows */
|
||||
y0 = MAC16_16(MAC16_16(y0, a0, x11), NEG16(a0), x21);
|
||||
y1 = MAC16_16(MAC16_16(y1, a1, x11), a1, x21);
|
||||
y2 = MAC16_16(MAC16_16(y2, a0, x10), NEG16(a0), x20);
|
||||
y3 = MAC16_16(MAC16_16(y3, a1, x10), a1, x20);
|
||||
#else
|
||||
y0 = ADD32(y0,MULT16_16(a0, x11-x21));
|
||||
y1 = ADD32(y1,MULT16_16(a1, x11+x21));
|
||||
y2 = ADD32(y2,MULT16_16(a0, x10-x20));
|
||||
y3 = ADD32(y3,MULT16_16(a1, x10+x20));
|
||||
#endif
|
||||
a0 = a[2*j+2];
|
||||
a1 = a[2*j+3];
|
||||
x10 = xx1[N2+j-i];
|
||||
x20 = xx2[N2+j-i];
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
/* We multiply twice by the same coef to avoid overflows */
|
||||
y0 = MAC16_16(MAC16_16(y0, a0, x10), NEG16(a0), x20);
|
||||
y1 = MAC16_16(MAC16_16(y1, a1, x10), a1, x20);
|
||||
y2 = MAC16_16(MAC16_16(y2, a0, x11), NEG16(a0), x21);
|
||||
y3 = MAC16_16(MAC16_16(y3, a1, x11), a1, x21);
|
||||
#else
|
||||
y0 = ADD32(y0,MULT16_16(a0, x10-x20));
|
||||
y1 = ADD32(y1,MULT16_16(a1, x10+x20));
|
||||
y2 = ADD32(y2,MULT16_16(a0, x11-x21));
|
||||
y3 = ADD32(y3,MULT16_16(a1, x11+x21));
|
||||
#endif
|
||||
}
|
||||
#ifdef FIXED_POINT
|
||||
y[2*i] = EXTRACT16(SATURATE32(PSHR32(y0,15),32767));
|
||||
y[2*i+1] = EXTRACT16(SATURATE32(PSHR32(y1,15),32767));
|
||||
y[2*i+2] = EXTRACT16(SATURATE32(PSHR32(y2,15),32767));
|
||||
y[2*i+3] = EXTRACT16(SATURATE32(PSHR32(y3,15),32767));
|
||||
#else
|
||||
/* Normalize up explicitly if we're in float */
|
||||
y[2*i] = 2.f*y0;
|
||||
y[2*i+1] = 2.f*y1;
|
||||
y[2*i+2] = 2.f*y2;
|
||||
y[2*i+3] = 2.f*y3;
|
||||
#endif
|
||||
}
|
||||
|
||||
for (i = 0; i < M2; i++)
|
||||
mem1[2*i+1] = xx1[i];
|
||||
for (i = 0; i < M2; i++)
|
||||
mem2[2*i+1] = xx2[i];
|
||||
}
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
#if 0
|
||||
const spx_word16_t shift_filt[3][7] = {{-33, 1043, -4551, 19959, 19959, -4551, 1043},
|
||||
{-98, 1133, -4425, 29179, 8895, -2328, 444},
|
||||
{444, -2328, 8895, 29179, -4425, 1133, -98}};
|
||||
#else
|
||||
const spx_word16_t shift_filt[3][7] = {{-390, 1540, -4993, 20123, 20123, -4993, 1540},
|
||||
{-1064, 2817, -6694, 31589, 6837, -990, -209},
|
||||
{-209, -990, 6837, 31589, -6694, 2817, -1064}};
|
||||
#endif
|
||||
#else
|
||||
#if 0
|
||||
const float shift_filt[3][7] = {{-9.9369e-04, 3.1831e-02, -1.3889e-01, 6.0910e-01, 6.0910e-01, -1.3889e-01, 3.1831e-02},
|
||||
{-0.0029937, 0.0345613, -0.1350474, 0.8904793, 0.2714479, -0.0710304, 0.0135403},
|
||||
{0.0135403, -0.0710304, 0.2714479, 0.8904793, -0.1350474, 0.0345613, -0.0029937}};
|
||||
#else
|
||||
const float shift_filt[3][7] = {{-0.011915f, 0.046995f, -0.152373f, 0.614108f, 0.614108f, -0.152373f, 0.046995f},
|
||||
{-0.0324855f, 0.0859768f, -0.2042986f, 0.9640297f, 0.2086420f, -0.0302054f, -0.0063646f},
|
||||
{-0.0063646f, -0.0302054f, 0.2086420f, 0.9640297f, -0.2042986f, 0.0859768f, -0.0324855f}};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int interp_pitch(
|
||||
spx_word16_t *exc, /*decoded excitation*/
|
||||
spx_word16_t *interp, /*decoded excitation*/
|
||||
int pitch, /*pitch period*/
|
||||
int len
|
||||
)
|
||||
{
|
||||
int i,j,k;
|
||||
spx_word32_t corr[4][7];
|
||||
spx_word32_t maxcorr;
|
||||
int maxi, maxj;
|
||||
for (i=0;i<7;i++)
|
||||
{
|
||||
corr[0][i] = inner_prod(exc, exc-pitch-3+i, len);
|
||||
}
|
||||
for (i=0;i<3;i++)
|
||||
{
|
||||
for (j=0;j<7;j++)
|
||||
{
|
||||
int i1, i2;
|
||||
spx_word32_t tmp=0;
|
||||
i1 = 3-j;
|
||||
if (i1<0)
|
||||
i1 = 0;
|
||||
i2 = 10-j;
|
||||
if (i2>7)
|
||||
i2 = 7;
|
||||
for (k=i1;k<i2;k++)
|
||||
tmp += MULT16_32_Q15(shift_filt[i][k],corr[0][j+k-3]);
|
||||
corr[i+1][j] = tmp;
|
||||
}
|
||||
}
|
||||
maxi=maxj=0;
|
||||
maxcorr = corr[0][0];
|
||||
for (i=0;i<4;i++)
|
||||
{
|
||||
for (j=0;j<7;j++)
|
||||
{
|
||||
if (corr[i][j] > maxcorr)
|
||||
{
|
||||
maxcorr = corr[i][j];
|
||||
maxi=i;
|
||||
maxj=j;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i=0;i<len;i++)
|
||||
{
|
||||
spx_word32_t tmp = 0;
|
||||
if (maxi>0)
|
||||
{
|
||||
for (k=0;k<7;k++)
|
||||
{
|
||||
tmp += MULT16_16(exc[i-(pitch-maxj+3)+k-3],shift_filt[maxi-1][k]);
|
||||
}
|
||||
} else {
|
||||
tmp = SHL32(exc[i-(pitch-maxj+3)],15);
|
||||
}
|
||||
interp[i] = PSHR32(tmp,15);
|
||||
}
|
||||
return pitch-maxj+3;
|
||||
}
|
||||
|
||||
void multicomb(
|
||||
spx_word16_t *exc, /*decoded excitation*/
|
||||
spx_word16_t *new_exc, /*enhanced excitation*/
|
||||
spx_coef_t *ak, /*LPC filter coefs*/
|
||||
int p, /*LPC order*/
|
||||
int nsf, /*sub-frame size*/
|
||||
int pitch, /*pitch period*/
|
||||
int max_pitch,
|
||||
spx_word16_t comb_gain, /*gain of comb filter*/
|
||||
char *stack
|
||||
)
|
||||
{
|
||||
int i;
|
||||
VARDECL(spx_word16_t *iexc);
|
||||
spx_word16_t old_ener, new_ener;
|
||||
int corr_pitch;
|
||||
|
||||
spx_word16_t iexc0_mag, iexc1_mag, exc_mag;
|
||||
spx_word32_t corr0, corr1;
|
||||
spx_word16_t gain0, gain1;
|
||||
spx_word16_t pgain1, pgain2;
|
||||
spx_word16_t c1, c2;
|
||||
spx_word16_t g1, g2;
|
||||
spx_word16_t ngain;
|
||||
spx_word16_t gg1, gg2;
|
||||
#ifdef FIXED_POINT
|
||||
int scaledown=0;
|
||||
#endif
|
||||
#if 0 /* Set to 1 to enable full pitch search */
|
||||
int nol_pitch[6];
|
||||
spx_word16_t nol_pitch_coef[6];
|
||||
spx_word16_t ol_pitch_coef;
|
||||
open_loop_nbest_pitch(exc, 20, 120, nsf,
|
||||
nol_pitch, nol_pitch_coef, 6, stack);
|
||||
corr_pitch=nol_pitch[0];
|
||||
ol_pitch_coef = nol_pitch_coef[0];
|
||||
/*Try to remove pitch multiples*/
|
||||
for (i=1;i<6;i++)
|
||||
{
|
||||
#ifdef FIXED_POINT
|
||||
if ((nol_pitch_coef[i]>MULT16_16_Q15(nol_pitch_coef[0],19661)) &&
|
||||
#else
|
||||
if ((nol_pitch_coef[i]>.6*nol_pitch_coef[0]) &&
|
||||
#endif
|
||||
(ABS(2*nol_pitch[i]-corr_pitch)<=2 || ABS(3*nol_pitch[i]-corr_pitch)<=3 ||
|
||||
ABS(4*nol_pitch[i]-corr_pitch)<=4 || ABS(5*nol_pitch[i]-corr_pitch)<=5))
|
||||
{
|
||||
corr_pitch = nol_pitch[i];
|
||||
}
|
||||
}
|
||||
#else
|
||||
corr_pitch = pitch;
|
||||
#endif
|
||||
|
||||
ALLOC(iexc, 2*nsf, spx_word16_t);
|
||||
|
||||
interp_pitch(exc, iexc, corr_pitch, 80);
|
||||
if (corr_pitch>max_pitch)
|
||||
interp_pitch(exc, iexc+nsf, 2*corr_pitch, 80);
|
||||
else
|
||||
interp_pitch(exc, iexc+nsf, -corr_pitch, 80);
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
for (i=0;i<nsf;i++)
|
||||
{
|
||||
if (ABS16(exc[i])>16383)
|
||||
{
|
||||
scaledown = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (scaledown)
|
||||
{
|
||||
for (i=0;i<nsf;i++)
|
||||
exc[i] = SHR16(exc[i],1);
|
||||
for (i=0;i<2*nsf;i++)
|
||||
iexc[i] = SHR16(iexc[i],1);
|
||||
}
|
||||
#endif
|
||||
/*interp_pitch(exc, iexc+2*nsf, 2*corr_pitch, 80);*/
|
||||
|
||||
/*printf ("%d %d %f\n", pitch, corr_pitch, max_corr*ener_1);*/
|
||||
iexc0_mag = spx_sqrt(1000+inner_prod(iexc,iexc,nsf));
|
||||
iexc1_mag = spx_sqrt(1000+inner_prod(iexc+nsf,iexc+nsf,nsf));
|
||||
exc_mag = spx_sqrt(1+inner_prod(exc,exc,nsf));
|
||||
corr0 = inner_prod(iexc,exc,nsf);
|
||||
if (corr0<0)
|
||||
corr0=0;
|
||||
corr1 = inner_prod(iexc+nsf,exc,nsf);
|
||||
if (corr1<0)
|
||||
corr1=0;
|
||||
#ifdef FIXED_POINT
|
||||
/* Doesn't cost much to limit the ratio and it makes the rest easier */
|
||||
if (SHL32(EXTEND32(iexc0_mag),6) < EXTEND32(exc_mag))
|
||||
iexc0_mag = ADD16(1,PSHR16(exc_mag,6));
|
||||
if (SHL32(EXTEND32(iexc1_mag),6) < EXTEND32(exc_mag))
|
||||
iexc1_mag = ADD16(1,PSHR16(exc_mag,6));
|
||||
#endif
|
||||
if (corr0 > MULT16_16(iexc0_mag,exc_mag))
|
||||
pgain1 = QCONST16(1., 14);
|
||||
else
|
||||
pgain1 = PDIV32_16(SHL32(PDIV32(corr0, exc_mag),14),iexc0_mag);
|
||||
if (corr1 > MULT16_16(iexc1_mag,exc_mag))
|
||||
pgain2 = QCONST16(1., 14);
|
||||
else
|
||||
pgain2 = PDIV32_16(SHL32(PDIV32(corr1, exc_mag),14),iexc1_mag);
|
||||
gg1 = PDIV32_16(SHL32(EXTEND32(exc_mag),8), iexc0_mag);
|
||||
gg2 = PDIV32_16(SHL32(EXTEND32(exc_mag),8), iexc1_mag);
|
||||
if (comb_gain>0)
|
||||
{
|
||||
#ifdef FIXED_POINT
|
||||
c1 = (MULT16_16_Q15(QCONST16(.4,15),comb_gain)+QCONST16(.07,15));
|
||||
c2 = QCONST16(.5,15)+MULT16_16_Q14(QCONST16(1.72,14),(c1-QCONST16(.07,15)));
|
||||
#else
|
||||
c1 = .4*comb_gain+.07;
|
||||
c2 = .5+1.72*(c1-.07);
|
||||
#endif
|
||||
} else
|
||||
{
|
||||
c1=c2=0;
|
||||
}
|
||||
#ifdef FIXED_POINT
|
||||
g1 = 32767 - MULT16_16_Q13(MULT16_16_Q15(c2, pgain1),pgain1);
|
||||
g2 = 32767 - MULT16_16_Q13(MULT16_16_Q15(c2, pgain2),pgain2);
|
||||
#else
|
||||
g1 = 1-c2*pgain1*pgain1;
|
||||
g2 = 1-c2*pgain2*pgain2;
|
||||
#endif
|
||||
if (g1<c1)
|
||||
g1 = c1;
|
||||
if (g2<c1)
|
||||
g2 = c1;
|
||||
g1 = (spx_word16_t)PDIV32_16(SHL32(EXTEND32(c1),14),(spx_word16_t)g1);
|
||||
g2 = (spx_word16_t)PDIV32_16(SHL32(EXTEND32(c1),14),(spx_word16_t)g2);
|
||||
if (corr_pitch>max_pitch)
|
||||
{
|
||||
gain0 = MULT16_16_Q15(QCONST16(.7,15),MULT16_16_Q14(g1,gg1));
|
||||
gain1 = MULT16_16_Q15(QCONST16(.3,15),MULT16_16_Q14(g2,gg2));
|
||||
} else {
|
||||
gain0 = MULT16_16_Q15(QCONST16(.6,15),MULT16_16_Q14(g1,gg1));
|
||||
gain1 = MULT16_16_Q15(QCONST16(.6,15),MULT16_16_Q14(g2,gg2));
|
||||
}
|
||||
for (i=0;i<nsf;i++)
|
||||
new_exc[i] = ADD16(exc[i], EXTRACT16(PSHR32(ADD32(MULT16_16(gain0,iexc[i]), MULT16_16(gain1,iexc[i+nsf])),8)));
|
||||
/* FIXME: compute_rms16 is currently not quite accurate enough (but close) */
|
||||
new_ener = compute_rms16(new_exc, nsf);
|
||||
old_ener = compute_rms16(exc, nsf);
|
||||
|
||||
if (old_ener < 1)
|
||||
old_ener = 1;
|
||||
if (new_ener < 1)
|
||||
new_ener = 1;
|
||||
if (old_ener > new_ener)
|
||||
old_ener = new_ener;
|
||||
ngain = PDIV32_16(SHL32(EXTEND32(old_ener),14),new_ener);
|
||||
|
||||
for (i=0;i<nsf;i++)
|
||||
new_exc[i] = MULT16_16_Q14(ngain, new_exc[i]);
|
||||
#ifdef FIXED_POINT
|
||||
if (scaledown)
|
||||
{
|
||||
for (i=0;i<nsf;i++)
|
||||
exc[i] = SHL16(exc[i],1);
|
||||
for (i=0;i<nsf;i++)
|
||||
new_exc[i] = SHL16(SATURATE16(new_exc[i],16383),1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
90
jni/libspeex/filters.h
Normal file
@@ -0,0 +1,90 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin */
|
||||
/**
|
||||
@file filters.h
|
||||
@brief Various analysis/synthesis filters
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef FILTERS_H
|
||||
#define FILTERS_H
|
||||
|
||||
#include "arch.h"
|
||||
|
||||
spx_word16_t compute_rms(const spx_sig_t *x, int len);
|
||||
spx_word16_t compute_rms16(const spx_word16_t *x, int len);
|
||||
void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
|
||||
void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int len);
|
||||
|
||||
#ifdef FIXED_POINT
|
||||
|
||||
int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define HIGHPASS_NARROWBAND 0
|
||||
#define HIGHPASS_WIDEBAND 2
|
||||
#define HIGHPASS_INPUT 0
|
||||
#define HIGHPASS_OUTPUT 1
|
||||
#define HIGHPASS_IRS 4
|
||||
|
||||
void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem);
|
||||
|
||||
|
||||
void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_word16_t *, spx_word16_t *y2, int N, int M, spx_word16_t *mem, char *stack);
|
||||
void qmf_synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_t *a, spx_word16_t *y, int N, int M, spx_word16_t *mem1, spx_word16_t *mem2, char *stack);
|
||||
|
||||
void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
|
||||
void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
|
||||
void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
|
||||
|
||||
/* Apply bandwidth expansion on LPC coef */
|
||||
void bw_lpc(spx_word16_t , const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
|
||||
void sanitize_values32(spx_word32_t *vec, spx_word32_t min_val, spx_word32_t max_val, int len);
|
||||
|
||||
|
||||
void syn_percep_zero16(const spx_word16_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack);
|
||||
void residue_percep_zero16(const spx_word16_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack);
|
||||
|
||||
void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack);
|
||||
|
||||
void multicomb(
|
||||
spx_word16_t *exc, /*decoded excitation*/
|
||||
spx_word16_t *new_exc, /*enhanced excitation*/
|
||||
spx_coef_t *ak, /*LPC filter coefs*/
|
||||
int p, /*LPC order*/
|
||||
int nsf, /*sub-frame size*/
|
||||
int pitch, /*pitch period*/
|
||||
int max_pitch, /*pitch gain (3-tap)*/
|
||||
spx_word16_t comb_gain, /*gain of comb filter*/
|
||||
char *stack
|
||||
);
|
||||
|
||||
#endif
|
||||
96
jni/libspeex/filters_arm4.h
Normal file
@@ -0,0 +1,96 @@
|
||||
/* Copyright (C) 2004 Jean-Marc Valin */
|
||||
/**
|
||||
@file filters_arm4.h
|
||||
@brief Various analysis/synthesis filters (ARM4 version)
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define OVERRIDE_NORMALIZE16
|
||||
int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len)
|
||||
{
|
||||
spx_sig_t max_val=1;
|
||||
int sig_shift;
|
||||
int dead1, dead2, dead3, dead4, dead5, dead6;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"\tmov %1, #1 \n"
|
||||
"\tmov %3, #0 \n"
|
||||
|
||||
".normalize16loop1%=: \n"
|
||||
|
||||
"\tldr %4, [%0], #4 \n"
|
||||
"\tcmps %4, %1 \n"
|
||||
"\tmovgt %1, %4 \n"
|
||||
"\tcmps %4, %3 \n"
|
||||
"\tmovlt %3, %4 \n"
|
||||
|
||||
"\tsubs %2, %2, #1 \n"
|
||||
"\tbne .normalize16loop1%=\n"
|
||||
|
||||
"\trsb %3, %3, #0 \n"
|
||||
"\tcmp %1, %3 \n"
|
||||
"\tmovlt %1, %3 \n"
|
||||
: "=r" (dead1), "=r" (max_val), "=r" (dead3), "=r" (dead4),
|
||||
"=r" (dead5), "=r" (dead6)
|
||||
: "0" (x), "2" (len)
|
||||
: "cc");
|
||||
|
||||
sig_shift=0;
|
||||
while (max_val>max_scale)
|
||||
{
|
||||
sig_shift++;
|
||||
max_val >>= 1;
|
||||
}
|
||||
|
||||
__asm__ __volatile__ (
|
||||
".normalize16loop%=: \n"
|
||||
|
||||
"\tldr %4, [%0], #4 \n"
|
||||
"\tldr %5, [%0], #4 \n"
|
||||
"\tmov %4, %4, asr %3 \n"
|
||||
"\tstrh %4, [%1], #2 \n"
|
||||
"\tldr %4, [%0], #4 \n"
|
||||
"\tmov %5, %5, asr %3 \n"
|
||||
"\tstrh %5, [%1], #2 \n"
|
||||
"\tldr %5, [%0], #4 \n"
|
||||
"\tmov %4, %4, asr %3 \n"
|
||||
"\tstrh %4, [%1], #2 \n"
|
||||
"\tsubs %2, %2, #1 \n"
|
||||
"\tmov %5, %5, asr %3 \n"
|
||||
"\tstrh %5, [%1], #2 \n"
|
||||
|
||||
"\tbgt .normalize16loop%=\n"
|
||||
: "=r" (dead1), "=r" (dead2), "=r" (dead3), "=r" (dead4),
|
||||
"=r" (dead5), "=r" (dead6)
|
||||
: "0" (x), "1" (y), "2" (len>>2), "3" (sig_shift)
|
||||
: "cc", "memory");
|
||||
return sig_shift;
|
||||
}
|
||||
|
||||
515
jni/libspeex/filters_bfin.h
Normal file
@@ -0,0 +1,515 @@
|
||||
/* Copyright (C) 2005 Analog Devices */
|
||||
/**
|
||||
@file filters_bfin.h
|
||||
@brief Various analysis/synthesis filters (Blackfin version)
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define OVERRIDE_NORMALIZE16
|
||||
int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len)
|
||||
{
|
||||
spx_sig_t max_val=1;
|
||||
int sig_shift;
|
||||
__asm__
|
||||
(
|
||||
"%0 = 0;\n\t"
|
||||
"I0 = %1;\n\t"
|
||||
"L0 = 0;\n\t"
|
||||
"R1 = [I0++];\n\t"
|
||||
"LOOP norm_max%= LC0 = %2;\n\t"
|
||||
"LOOP_BEGIN norm_max%=;\n\t"
|
||||
"R2 = ABS R1 || R1 = [I0++];\n\t"
|
||||
"%0 = MAX(%0, R2);\n\t"
|
||||
"LOOP_END norm_max%=;\n\t"
|
||||
: "=&d" (max_val)
|
||||
: "a" (x), "a" (len)
|
||||
: "R1", "R2"
|
||||
);
|
||||
|
||||
sig_shift=0;
|
||||
while (max_val>max_scale)
|
||||
{
|
||||
sig_shift++;
|
||||
max_val >>= 1;
|
||||
}
|
||||
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"I0 = %0;\n\t"
|
||||
"L0 = 0;\n\t"
|
||||
"P1 = %1;\n\t"
|
||||
"R0 = [I0++];\n\t"
|
||||
"LOOP norm_shift%= LC0 = %3;\n\t"
|
||||
"LOOP_BEGIN norm_shift%=;\n\t"
|
||||
"R1 = ASHIFT R0 by %2.L || R0 = [I0++];\n\t"
|
||||
"W[P1++] = R1;\n\t"
|
||||
"LOOP_END norm_shift%=;\n\t"
|
||||
"R1 = ASHIFT R0 by %2.L;\n\t"
|
||||
"W[P1++] = R1;\n\t"
|
||||
: : "a" (x), "a" (y), "d" (-sig_shift), "a" (len-1)
|
||||
: "I0", "L0", "P1", "R0", "R1", "memory"
|
||||
);
|
||||
return sig_shift;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define OVERRIDE_FILTER_MEM16
|
||||
void filter_mem16(const spx_word16_t *_x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *_y, int N, int ord, spx_mem_t *mem, char *stack)
|
||||
{
|
||||
VARDECL(spx_word32_t *xy2);
|
||||
VARDECL(spx_word32_t *numden_a);
|
||||
spx_word32_t *xy;
|
||||
spx_word16_t *numden;
|
||||
int i;
|
||||
|
||||
ALLOC(xy2, (N+1), spx_word32_t);
|
||||
ALLOC(numden_a, (2*ord+2), spx_word32_t);
|
||||
xy = xy2+1;
|
||||
numden = (spx_word16_t*) numden_a;
|
||||
|
||||
for (i=0;i<ord;i++)
|
||||
{
|
||||
numden[2*i] = num[i];
|
||||
numden[2*i+1] = den[i];
|
||||
}
|
||||
__asm__ __volatile__
|
||||
(
|
||||
/* Register setup */
|
||||
"R0 = %5;\n\t" /*ord */
|
||||
|
||||
"P0 = %3;\n\t"
|
||||
"I0 = P0;\n\t"
|
||||
"B0 = P0;\n\t" /* numden */
|
||||
"L0 = 0;\n\t"
|
||||
|
||||
"P2 = %0;\n\t" /* Fused xy */
|
||||
"I2 = P2;\n\t"
|
||||
"L2 = 0;\n\t"
|
||||
|
||||
"P4 = %6;\n\t" /* mem */
|
||||
"P0 = %1;\n\t" /* _x */
|
||||
"P1 = %2;\n\t" /* _y */
|
||||
|
||||
/* First sample */
|
||||
"R1 = [P4++];\n\t"
|
||||
"R1 <<= 3;\n\t" /* shift mem */
|
||||
"R1.L = R1 (RND);\n\t"
|
||||
"R2 = W[P0++];\n\t" /* load x[0] */
|
||||
"R1.L = R1.L + R2.L;\n\t"
|
||||
"W[P1++] = R1;\n\t" /* store y[0] */
|
||||
"R2 = PACK(R1.L, R2.L);\n\t" /* pack x16 and y16 */
|
||||
"[P2] = R2;\n\t"
|
||||
|
||||
/* Samples 1 to ord-1 (using memory) */
|
||||
"R0 += -1;\n\t"
|
||||
"R3 = 0;\n\t"
|
||||
"LC0 = R0;\n\t"
|
||||
"LOOP filter_start%= LC0;\n\t"
|
||||
"LOOP_BEGIN filter_start%=;\n\t"
|
||||
"R3 += 1;\n\t"
|
||||
"LC1 = R3;\n\t"
|
||||
|
||||
"R1 = [P4++];\n\t"
|
||||
"A1 = R1;\n\t"
|
||||
"A0 = 0;\n\t"
|
||||
"I0 = B0;\n\t"
|
||||
"I2 = P2;\n\t"
|
||||
"P2 += 4;\n\t"
|
||||
"R4 = [I0++] || R5 = [I2--];\n\t"
|
||||
"LOOP filter_start_inner%= LC1;\n\t"
|
||||
"LOOP_BEGIN filter_start_inner%=;\n\t"
|
||||
"A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
|
||||
"LOOP_END filter_start_inner%=;\n\t"
|
||||
"A0 += A1;\n\t"
|
||||
"R4 = A0;\n\t"
|
||||
"R4 <<= 3;\n\t" /* shift mem */
|
||||
"R4.L = R4 (RND);\n\t"
|
||||
"R2 = W[P0++];\n\t" /* load x */
|
||||
"R4.L = R4.L + R2.L;\n\t"
|
||||
"W[P1++] = R4;\n\t" /* store y */
|
||||
//"R4 <<= 2;\n\t"
|
||||
//"R2 <<= 2;\n\t"
|
||||
"R2 = PACK(R4.L, R2.L);\n\t" /* pack x16 and y16 */
|
||||
"[P2] = R2;\n\t"
|
||||
|
||||
"LOOP_END filter_start%=;\n\t"
|
||||
|
||||
/* Samples ord to N*/
|
||||
"R0 = %5;\n\t"
|
||||
"R0 <<= 1;\n\t"
|
||||
"I0 = B0;\n\t" /* numden */
|
||||
"R0 <<= 1;\n\t"
|
||||
"L0 = R0;\n\t"
|
||||
|
||||
"R0 = %5;\n\t" /* org */
|
||||
"R2 = %4;\n\t" /* N */
|
||||
"R2 = R2 - R0;\n\t"
|
||||
"R4 = [I0++];\n\t" /* numden */
|
||||
"LC0 = R2;\n\t"
|
||||
"P3 = R0;\n\t"
|
||||
"R0 <<= 2;\n\t"
|
||||
"R0 += 8;\n\t"
|
||||
"I2 = P2;\n\t"
|
||||
"M0 = R0;\n\t"
|
||||
"A1 = A0 = 0;\n\t"
|
||||
"R5 = [I2--];\n\t" /* load xy */
|
||||
"LOOP filter_mid%= LC0;\n\t"
|
||||
"LOOP_BEGIN filter_mid%=;\n\t"
|
||||
"LOOP filter_mid_inner%= LC1=P3;\n\t"
|
||||
"LOOP_BEGIN filter_mid_inner%=;\n\t"
|
||||
"A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
|
||||
"LOOP_END filter_mid_inner%=;\n\t"
|
||||
"R0 = (A0 += A1) || I2 += M0;\n\t"
|
||||
"R0 = R0 << 3 || R5 = W[P0++];\n\t" /* load x */
|
||||
"R0.L = R0 (RND);\n\t"
|
||||
"R0.L = R0.L + R5.L;\n\t"
|
||||
"R5 = PACK(R0.L, R5.L) || W[P1++] = R0;\n\t" /* shift y | store y */
|
||||
"A1 = A0 = 0 || [I2--] = R5\n\t"
|
||||
"LOOP_END filter_mid%=;\n\t"
|
||||
"I2 += 4;\n\t"
|
||||
"P2 = I2;\n\t"
|
||||
/* Update memory */
|
||||
"P4 = %6;\n\t"
|
||||
"R0 = %5;\n\t"
|
||||
"LC0 = R0;\n\t"
|
||||
"P0 = B0;\n\t"
|
||||
"A1 = A0 = 0;\n\t"
|
||||
"LOOP mem_update%= LC0;\n\t"
|
||||
"LOOP_BEGIN mem_update%=;\n\t"
|
||||
"I2 = P2;\n\t"
|
||||
"I0 = P0;\n\t"
|
||||
"P0 += 4;\n\t"
|
||||
"R0 = LC0;\n\t"
|
||||
"LC1 = R0;\n\t"
|
||||
"R5 = [I2--] || R4 = [I0++];\n\t"
|
||||
"LOOP mem_accum%= LC1;\n\t"
|
||||
"LOOP_BEGIN mem_accum%=;\n\t"
|
||||
"A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
|
||||
"LOOP_END mem_accum%=;\n\t"
|
||||
"R0 = (A0 += A1);\n\t"
|
||||
"A1 = A0 = 0 || [P4++] = R0;\n\t"
|
||||
"LOOP_END mem_update%=;\n\t"
|
||||
"L0 = 0;\n\t"
|
||||
: : "m" (xy), "m" (_x), "m" (_y), "m" (numden), "m" (N), "m" (ord), "m" (mem)
|
||||
: "A0", "A1", "R0", "R1", "R2", "R3", "R4", "R5", "P0", "P1", "P2", "P3", "P4", "B0", "I0", "I2", "L0", "L2", "M0", "memory"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define OVERRIDE_IIR_MEM16
|
||||
void iir_mem16(const spx_word16_t *_x, const spx_coef_t *den, spx_word16_t *_y, int N, int ord, spx_mem_t *mem, char *stack)
|
||||
{
|
||||
VARDECL(spx_word16_t *y);
|
||||
spx_word16_t *yy;
|
||||
|
||||
ALLOC(y, (N+2), spx_word16_t);
|
||||
yy = y+2;
|
||||
|
||||
__asm__ __volatile__
|
||||
(
|
||||
/* Register setup */
|
||||
"R0 = %5;\n\t" /*ord */
|
||||
|
||||
"P1 = %3;\n\t"
|
||||
"I1 = P1;\n\t"
|
||||
"B1 = P1;\n\t"
|
||||
"L1 = 0;\n\t"
|
||||
|
||||
"P3 = %0;\n\t"
|
||||
"I3 = P3;\n\t"
|
||||
"L3 = 0;\n\t"
|
||||
|
||||
"P4 = %6;\n\t"
|
||||
"P0 = %1;\n\t"
|
||||
"P1 = %2;\n\t"
|
||||
|
||||
/* First sample */
|
||||
"R1 = [P4++];\n\t"
|
||||
"R1 = R1 << 3 (S);\n\t"
|
||||
"R1.L = R1 (RND);\n\t"
|
||||
"R2 = W[P0++];\n\t"
|
||||
"R1 = R1 + R2;\n\t"
|
||||
"W[P1++] = R1;\n\t"
|
||||
"W[P3] = R1;\n\t"
|
||||
|
||||
/* Samples 1 to ord-1 (using memory) */
|
||||
"R0 += -1;\n\t"
|
||||
"R3 = 0;\n\t"
|
||||
"LC0 = R0;\n\t"
|
||||
"LOOP filter_start%= LC0;\n\t"
|
||||
"LOOP_BEGIN filter_start%=;\n\t"
|
||||
"R3 += 1;\n\t"
|
||||
"LC1 = R3;\n\t"
|
||||
|
||||
"R1 = [P4++];\n\t"
|
||||
"A1 = R1;\n\t"
|
||||
"I1 = B1;\n\t"
|
||||
"I3 = P3;\n\t"
|
||||
"P3 += 2;\n\t"
|
||||
"LOOP filter_start_inner%= LC1;\n\t"
|
||||
"LOOP_BEGIN filter_start_inner%=;\n\t"
|
||||
"R4.L = W[I1++];\n\t"
|
||||
"R5.L = W[I3--];\n\t"
|
||||
"A1 -= R4.L*R5.L (IS);\n\t"
|
||||
"LOOP_END filter_start_inner%=;\n\t"
|
||||
|
||||
"R1 = A1;\n\t"
|
||||
"R1 <<= 3;\n\t"
|
||||
"R1.L = R1 (RND);\n\t"
|
||||
"R2 = W[P0++];\n\t"
|
||||
"R1 = R1 + R2;\n\t"
|
||||
"W[P1++] = R1;\n\t"
|
||||
"W[P3] = R1;\n\t"
|
||||
"LOOP_END filter_start%=;\n\t"
|
||||
|
||||
/* Samples ord to N*/
|
||||
"R0 = %5;\n\t"
|
||||
"R0 <<= 1;\n\t"
|
||||
"I1 = B1;\n\t"
|
||||
"L1 = R0;\n\t"
|
||||
|
||||
"R0 = %5;\n\t"
|
||||
"R2 = %4;\n\t"
|
||||
"R2 = R2 - R0;\n\t"
|
||||
"R4.L = W[I1++];\n\t"
|
||||
"LC0 = R2;\n\t"
|
||||
"LOOP filter_mid%= LC0;\n\t"
|
||||
"LOOP_BEGIN filter_mid%=;\n\t"
|
||||
"LC1 = R0;\n\t"
|
||||
"A1 = 0;\n\t"
|
||||
"I3 = P3;\n\t"
|
||||
"P3 += 2;\n\t"
|
||||
"R5.L = W[I3--];\n\t"
|
||||
"LOOP filter_mid_inner%= LC1;\n\t"
|
||||
"LOOP_BEGIN filter_mid_inner%=;\n\t"
|
||||
"A1 -= R4.L*R5.L (IS) || R4.L = W[I1++] || R5.L = W[I3--];\n\t"
|
||||
"LOOP_END filter_mid_inner%=;\n\t"
|
||||
"R1 = A1;\n\t"
|
||||
"R1 = R1 << 3 || R2 = W[P0++];\n\t"
|
||||
"R1.L = R1 (RND);\n\t"
|
||||
"R1 = R1 + R2;\n\t"
|
||||
"W[P1++] = R1;\n\t"
|
||||
"W[P3] = R1;\n\t"
|
||||
"LOOP_END filter_mid%=;\n\t"
|
||||
|
||||
/* Update memory */
|
||||
"P4 = %6;\n\t"
|
||||
"R0 = %5;\n\t"
|
||||
"LC0 = R0;\n\t"
|
||||
"P1 = B1;\n\t"
|
||||
"LOOP mem_update%= LC0;\n\t"
|
||||
"LOOP_BEGIN mem_update%=;\n\t"
|
||||
"A0 = 0;\n\t"
|
||||
"I3 = P3;\n\t"
|
||||
"I1 = P1;\n\t"
|
||||
"P1 += 2;\n\t"
|
||||
"R0 = LC0;\n\t"
|
||||
"LC1=R0;\n\t"
|
||||
"R5.L = W[I3--] || R4.L = W[I1++];\n\t"
|
||||
"LOOP mem_accum%= LC1;\n\t"
|
||||
"LOOP_BEGIN mem_accum%=;\n\t"
|
||||
"A0 -= R4.L*R5.L (IS) || R4.L = W[I1++] || R5.L = W[I3--];\n\t"
|
||||
"LOOP_END mem_accum%=;\n\t"
|
||||
"R0 = A0;\n\t"
|
||||
"[P4++] = R0;\n\t"
|
||||
"LOOP_END mem_update%=;\n\t"
|
||||
"L1 = 0;\n\t"
|
||||
: : "m" (yy), "m" (_x), "m" (_y), "m" (den), "m" (N), "m" (ord), "m" (mem)
|
||||
: "A0", "A1", "R0", "R1", "R2", "R3", "R4", "R5", "P0", "P1", "P2", "P3", "P4", "B1", "I1", "I3", "L1", "L3", "memory"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#define OVERRIDE_FIR_MEM16
|
||||
void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
|
||||
{
|
||||
int i;
|
||||
spx_coef_t den2[12];
|
||||
spx_coef_t *den;
|
||||
den = (spx_coef_t*)((((int)den2)+4)&0xfffffffc);
|
||||
for (i=0;i<10;i++)
|
||||
den[i] = 0;
|
||||
filter_mem16(x, num, den, y, N, ord, mem, stack);
|
||||
}
|
||||
|
||||
|
||||
#define OVERRIDE_COMPUTE_IMPULSE_RESPONSE
|
||||
void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
|
||||
{
|
||||
int i;
|
||||
VARDECL(spx_word16_t *ytmp);
|
||||
ALLOC(ytmp, N, spx_word16_t);
|
||||
spx_word16_t *ytmp2 = ytmp;
|
||||
y[0] = LPC_SCALING;
|
||||
for (i=0;i<ord;i++)
|
||||
y[i+1] = awk1[i];
|
||||
i++;
|
||||
for (;i<N;i++)
|
||||
y[i] = 0;
|
||||
|
||||
N-=1;
|
||||
__asm__ __volatile__
|
||||
(
|
||||
"I0 = %0;\n\t"
|
||||
"I1 = %1;\n\t"
|
||||
"L0 = 0;\n\t"
|
||||
"L1 = 0;\n\t"
|
||||
"L2 = 0;\n\t"
|
||||
"L3 = 0;\n\t"
|
||||
"R0 = 1;\n\t"
|
||||
"R0 <<= 13;\n\t"
|
||||
"W[I0] = R0.L;\n\t"
|
||||
"R0 <<= 1;\n\t"
|
||||
"W[I1] = R0.L;\n\t"
|
||||
"R0 = %5;\n\t"
|
||||
"LC0 = R0;\n\t"
|
||||
"R2 = 0;\n\t"
|
||||
"LOOP samples%= LC0;\n\t"
|
||||
"LOOP_BEGIN samples%=;\n\t"
|
||||
"R2 += 1;\n\t"
|
||||
"R2 = MIN(R2, %4);\n\t"
|
||||
"I0 = %0;\n\t"
|
||||
"I1 = %1;\n\t"
|
||||
"I2 = %2;\n\t"
|
||||
"I3 = %3;\n\t"
|
||||
"%0 += 2;\n\t"
|
||||
"%1 += 2;\n\t"
|
||||
"A1 = A0 = 0;\n\t"
|
||||
"R0.L = W[I0--] || R1.L = W[I2++];\n\t"
|
||||
"LC1 = R2;\n\t"
|
||||
"LOOP filter%= LC1;\n\t"
|
||||
"LOOP_BEGIN filter%=;\n\t"
|
||||
"A0 -= R0.L*R1.L (IS) || R0.L = W[I1--] || R1.L = W[I3++];\n\t"
|
||||
"A1 -= R0.L*R1.L (IS) || R0.L = W[I0--] || R1.L = W[I2++];\n\t"
|
||||
"LOOP_END filter%=;\n\t"
|
||||
"R0 = A0, R1 = A1;\n\t"
|
||||
"R3 = W[%1] (X);\n\t"
|
||||
"R3 <<= 13;\n\t"
|
||||
"R0 = R0 + R3;\n\t"
|
||||
"R3 = R0 >>> 13;\n\t"
|
||||
"W[%0] = R3.L;\n\t"
|
||||
"R0 <<= 1;\n\t"
|
||||
"R1 = R1 + R0;\n\t"
|
||||
"R1 >>>= 13;\n\t"
|
||||
"W[%1] = R1.L;\n\t"
|
||||
"LOOP_END samples%=;\n\t"
|
||||
: "=a" (ytmp2), "=a" (y)
|
||||
: "a" (awk2), "a" (ak), "d" (ord), "m" (N), "0" (ytmp2), "1" (y)
|
||||
: "A0", "A1", "R0", "R1", "R2", "R3", "I0", "I1", "I2", "I3", "L0", "L1", "L2", "L3", "A0", "A1"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if 0 /* Equivalent C function for filter_mem2 and compute_impulse_response */
|
||||
#define min(a,b) ((a)<(b) ? (a):(b))
|
||||
|
||||
void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
|
||||
{
|
||||
int i,j;
|
||||
VARDECL(spx_word16_t *ytmp);
|
||||
ALLOC(ytmp, N, spx_word16_t);
|
||||
|
||||
y[0] = LPC_SCALING;
|
||||
for (i=0;i<ord;i++)
|
||||
y[i+1] = awk1[i];
|
||||
i++;
|
||||
for (;i<N;i++)
|
||||
y[i] = 0;
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
spx_word32_t yi = SHL32(EXTEND32(y[i]),LPC_SHIFT);
|
||||
spx_word32_t yi2 = 0;
|
||||
for (j=0;j<min(i,ord);j++)
|
||||
{
|
||||
yi = MAC16_16(yi, awk2[j], -ytmp[i-j-1]);
|
||||
yi2 = MAC16_16(yi2, ak[j], -y[i-j-1]);
|
||||
}
|
||||
ytmp[i] = EXTRACT16(SHR32(yi,LPC_SHIFT));
|
||||
yi2 = ADD32(yi2,SHL32(yi,1));
|
||||
y[i] = EXTRACT16(SHR32(yi2,LPC_SHIFT));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void filter_mem2(const spx_sig_t *_x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *_y, int N, int ord, spx_mem_t *mem)
|
||||
{
|
||||
int i,j;
|
||||
spx_word16_t xi,yi,nyi;
|
||||
spx_word16_t x[N],y[N];
|
||||
spx_word16_t *xx, *yy;
|
||||
xx = x;
|
||||
yy = y;
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
x[i] = EXTRACT16(SHR32(_x[i],SIG_SHIFT));
|
||||
}
|
||||
|
||||
for (i=0;i<ord;i++)
|
||||
{
|
||||
spx_word32_t yi = mem[i];
|
||||
for (j=0;j<i;j++)
|
||||
{
|
||||
yi = MAC16_16(yi, num[j], x[i-j-1]);
|
||||
yi = MAC16_16(yi, den[j], -y[i-j-1]);
|
||||
}
|
||||
_y[i] = ADD32(_x[i],SHL32(yi,1));
|
||||
y[i] = EXTRACT16(SHR32(_y[i],SIG_SHIFT));
|
||||
}
|
||||
for (i=ord;i<N;i++)
|
||||
{
|
||||
spx_word32_t yi = 0;
|
||||
for (j=0;j<ord;j++)
|
||||
{
|
||||
yi = MAC16_16(yi, num[j], x[i-j-1]);
|
||||
yi = MAC16_16(yi, den[j], -y[i-j-1]);
|
||||
}
|
||||
_y[i] = ADD32(_x[i],SHL32(yi,1));
|
||||
y[i] = EXTRACT16(SHR32(_y[i],SIG_SHIFT));
|
||||
}
|
||||
|
||||
for (i=0;i<ord;i++)
|
||||
{
|
||||
spx_mem_t m = 0;
|
||||
for (j=0;j<ord-i;j++)
|
||||
{
|
||||
m = MAC16_16(m, x[N-1-j], num[j+i]);
|
||||
m = MAC16_16(m, -y[N-1-j], den[j+i]);
|
||||
}
|
||||
mem[i] = m;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
336
jni/libspeex/filters_sse.h
Normal file
@@ -0,0 +1,336 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin */
|
||||
/**
|
||||
@file filters_sse.h
|
||||
@brief Various analysis/synthesis filters (SSE version)
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <xmmintrin.h>
|
||||
|
||||
void filter_mem16_10(const float *x, const float *_num, const float *_den, float *y, int N, int ord, float *_mem)
|
||||
{
|
||||
__m128 num[3], den[3], mem[3];
|
||||
|
||||
int i;
|
||||
|
||||
/* Copy numerator, denominator and memory to aligned xmm */
|
||||
for (i=0;i<2;i++)
|
||||
{
|
||||
mem[i] = _mm_loadu_ps(_mem+4*i);
|
||||
num[i] = _mm_loadu_ps(_num+4*i);
|
||||
den[i] = _mm_loadu_ps(_den+4*i);
|
||||
}
|
||||
mem[2] = _mm_setr_ps(_mem[8], _mem[9], 0, 0);
|
||||
num[2] = _mm_setr_ps(_num[8], _num[9], 0, 0);
|
||||
den[2] = _mm_setr_ps(_den[8], _den[9], 0, 0);
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
__m128 xx;
|
||||
__m128 yy;
|
||||
/* Compute next filter result */
|
||||
xx = _mm_load_ps1(x+i);
|
||||
yy = _mm_add_ss(xx, mem[0]);
|
||||
_mm_store_ss(y+i, yy);
|
||||
yy = _mm_shuffle_ps(yy, yy, 0);
|
||||
|
||||
/* Update memory */
|
||||
mem[0] = _mm_move_ss(mem[0], mem[1]);
|
||||
mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
|
||||
|
||||
mem[0] = _mm_add_ps(mem[0], _mm_mul_ps(xx, num[0]));
|
||||
mem[0] = _mm_sub_ps(mem[0], _mm_mul_ps(yy, den[0]));
|
||||
|
||||
mem[1] = _mm_move_ss(mem[1], mem[2]);
|
||||
mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
|
||||
|
||||
mem[1] = _mm_add_ps(mem[1], _mm_mul_ps(xx, num[1]));
|
||||
mem[1] = _mm_sub_ps(mem[1], _mm_mul_ps(yy, den[1]));
|
||||
|
||||
mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0xfd);
|
||||
|
||||
mem[2] = _mm_add_ps(mem[2], _mm_mul_ps(xx, num[2]));
|
||||
mem[2] = _mm_sub_ps(mem[2], _mm_mul_ps(yy, den[2]));
|
||||
}
|
||||
/* Put memory back in its place */
|
||||
_mm_storeu_ps(_mem, mem[0]);
|
||||
_mm_storeu_ps(_mem+4, mem[1]);
|
||||
_mm_store_ss(_mem+8, mem[2]);
|
||||
mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0x55);
|
||||
_mm_store_ss(_mem+9, mem[2]);
|
||||
}
|
||||
|
||||
void filter_mem16_8(const float *x, const float *_num, const float *_den, float *y, int N, int ord, float *_mem)
|
||||
{
|
||||
__m128 num[2], den[2], mem[2];
|
||||
|
||||
int i;
|
||||
|
||||
/* Copy numerator, denominator and memory to aligned xmm */
|
||||
for (i=0;i<2;i++)
|
||||
{
|
||||
mem[i] = _mm_loadu_ps(_mem+4*i);
|
||||
num[i] = _mm_loadu_ps(_num+4*i);
|
||||
den[i] = _mm_loadu_ps(_den+4*i);
|
||||
}
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
__m128 xx;
|
||||
__m128 yy;
|
||||
/* Compute next filter result */
|
||||
xx = _mm_load_ps1(x+i);
|
||||
yy = _mm_add_ss(xx, mem[0]);
|
||||
_mm_store_ss(y+i, yy);
|
||||
yy = _mm_shuffle_ps(yy, yy, 0);
|
||||
|
||||
/* Update memory */
|
||||
mem[0] = _mm_move_ss(mem[0], mem[1]);
|
||||
mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
|
||||
|
||||
mem[0] = _mm_add_ps(mem[0], _mm_mul_ps(xx, num[0]));
|
||||
mem[0] = _mm_sub_ps(mem[0], _mm_mul_ps(yy, den[0]));
|
||||
|
||||
mem[1] = _mm_sub_ss(mem[1], mem[1]);
|
||||
mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
|
||||
|
||||
mem[1] = _mm_add_ps(mem[1], _mm_mul_ps(xx, num[1]));
|
||||
mem[1] = _mm_sub_ps(mem[1], _mm_mul_ps(yy, den[1]));
|
||||
}
|
||||
/* Put memory back in its place */
|
||||
_mm_storeu_ps(_mem, mem[0]);
|
||||
_mm_storeu_ps(_mem+4, mem[1]);
|
||||
}
|
||||
|
||||
|
||||
#define OVERRIDE_FILTER_MEM16
|
||||
void filter_mem16(const float *x, const float *_num, const float *_den, float *y, int N, int ord, float *_mem, char *stack)
|
||||
{
|
||||
if(ord==10)
|
||||
filter_mem16_10(x, _num, _den, y, N, ord, _mem);
|
||||
else if (ord==8)
|
||||
filter_mem16_8(x, _num, _den, y, N, ord, _mem);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void iir_mem16_10(const float *x, const float *_den, float *y, int N, int ord, float *_mem)
|
||||
{
|
||||
__m128 den[3], mem[3];
|
||||
|
||||
int i;
|
||||
|
||||
/* Copy numerator, denominator and memory to aligned xmm */
|
||||
for (i=0;i<2;i++)
|
||||
{
|
||||
mem[i] = _mm_loadu_ps(_mem+4*i);
|
||||
den[i] = _mm_loadu_ps(_den+4*i);
|
||||
}
|
||||
mem[2] = _mm_setr_ps(_mem[8], _mem[9], 0, 0);
|
||||
den[2] = _mm_setr_ps(_den[8], _den[9], 0, 0);
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
__m128 xx;
|
||||
__m128 yy;
|
||||
/* Compute next filter result */
|
||||
xx = _mm_load_ps1(x+i);
|
||||
yy = _mm_add_ss(xx, mem[0]);
|
||||
_mm_store_ss(y+i, yy);
|
||||
yy = _mm_shuffle_ps(yy, yy, 0);
|
||||
|
||||
/* Update memory */
|
||||
mem[0] = _mm_move_ss(mem[0], mem[1]);
|
||||
mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
|
||||
|
||||
mem[0] = _mm_sub_ps(mem[0], _mm_mul_ps(yy, den[0]));
|
||||
|
||||
mem[1] = _mm_move_ss(mem[1], mem[2]);
|
||||
mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
|
||||
|
||||
mem[1] = _mm_sub_ps(mem[1], _mm_mul_ps(yy, den[1]));
|
||||
|
||||
mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0xfd);
|
||||
|
||||
mem[2] = _mm_sub_ps(mem[2], _mm_mul_ps(yy, den[2]));
|
||||
}
|
||||
/* Put memory back in its place */
|
||||
_mm_storeu_ps(_mem, mem[0]);
|
||||
_mm_storeu_ps(_mem+4, mem[1]);
|
||||
_mm_store_ss(_mem+8, mem[2]);
|
||||
mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0x55);
|
||||
_mm_store_ss(_mem+9, mem[2]);
|
||||
}
|
||||
|
||||
|
||||
void iir_mem16_8(const float *x, const float *_den, float *y, int N, int ord, float *_mem)
|
||||
{
|
||||
__m128 den[2], mem[2];
|
||||
|
||||
int i;
|
||||
|
||||
/* Copy numerator, denominator and memory to aligned xmm */
|
||||
for (i=0;i<2;i++)
|
||||
{
|
||||
mem[i] = _mm_loadu_ps(_mem+4*i);
|
||||
den[i] = _mm_loadu_ps(_den+4*i);
|
||||
}
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
__m128 xx;
|
||||
__m128 yy;
|
||||
/* Compute next filter result */
|
||||
xx = _mm_load_ps1(x+i);
|
||||
yy = _mm_add_ss(xx, mem[0]);
|
||||
_mm_store_ss(y+i, yy);
|
||||
yy = _mm_shuffle_ps(yy, yy, 0);
|
||||
|
||||
/* Update memory */
|
||||
mem[0] = _mm_move_ss(mem[0], mem[1]);
|
||||
mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
|
||||
|
||||
mem[0] = _mm_sub_ps(mem[0], _mm_mul_ps(yy, den[0]));
|
||||
|
||||
mem[1] = _mm_sub_ss(mem[1], mem[1]);
|
||||
mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
|
||||
|
||||
mem[1] = _mm_sub_ps(mem[1], _mm_mul_ps(yy, den[1]));
|
||||
}
|
||||
/* Put memory back in its place */
|
||||
_mm_storeu_ps(_mem, mem[0]);
|
||||
_mm_storeu_ps(_mem+4, mem[1]);
|
||||
}
|
||||
|
||||
#define OVERRIDE_IIR_MEM16
|
||||
void iir_mem16(const float *x, const float *_den, float *y, int N, int ord, float *_mem, char *stack)
|
||||
{
|
||||
if(ord==10)
|
||||
iir_mem16_10(x, _den, y, N, ord, _mem);
|
||||
else if (ord==8)
|
||||
iir_mem16_8(x, _den, y, N, ord, _mem);
|
||||
}
|
||||
|
||||
|
||||
void fir_mem16_10(const float *x, const float *_num, float *y, int N, int ord, float *_mem)
|
||||
{
|
||||
__m128 num[3], mem[3];
|
||||
|
||||
int i;
|
||||
|
||||
/* Copy numerator, denominator and memory to aligned xmm */
|
||||
for (i=0;i<2;i++)
|
||||
{
|
||||
mem[i] = _mm_loadu_ps(_mem+4*i);
|
||||
num[i] = _mm_loadu_ps(_num+4*i);
|
||||
}
|
||||
mem[2] = _mm_setr_ps(_mem[8], _mem[9], 0, 0);
|
||||
num[2] = _mm_setr_ps(_num[8], _num[9], 0, 0);
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
__m128 xx;
|
||||
__m128 yy;
|
||||
/* Compute next filter result */
|
||||
xx = _mm_load_ps1(x+i);
|
||||
yy = _mm_add_ss(xx, mem[0]);
|
||||
_mm_store_ss(y+i, yy);
|
||||
yy = _mm_shuffle_ps(yy, yy, 0);
|
||||
|
||||
/* Update memory */
|
||||
mem[0] = _mm_move_ss(mem[0], mem[1]);
|
||||
mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
|
||||
|
||||
mem[0] = _mm_add_ps(mem[0], _mm_mul_ps(xx, num[0]));
|
||||
|
||||
mem[1] = _mm_move_ss(mem[1], mem[2]);
|
||||
mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
|
||||
|
||||
mem[1] = _mm_add_ps(mem[1], _mm_mul_ps(xx, num[1]));
|
||||
|
||||
mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0xfd);
|
||||
|
||||
mem[2] = _mm_add_ps(mem[2], _mm_mul_ps(xx, num[2]));
|
||||
}
|
||||
/* Put memory back in its place */
|
||||
_mm_storeu_ps(_mem, mem[0]);
|
||||
_mm_storeu_ps(_mem+4, mem[1]);
|
||||
_mm_store_ss(_mem+8, mem[2]);
|
||||
mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0x55);
|
||||
_mm_store_ss(_mem+9, mem[2]);
|
||||
}
|
||||
|
||||
void fir_mem16_8(const float *x, const float *_num, float *y, int N, int ord, float *_mem)
|
||||
{
|
||||
__m128 num[2], mem[2];
|
||||
|
||||
int i;
|
||||
|
||||
/* Copy numerator, denominator and memory to aligned xmm */
|
||||
for (i=0;i<2;i++)
|
||||
{
|
||||
mem[i] = _mm_loadu_ps(_mem+4*i);
|
||||
num[i] = _mm_loadu_ps(_num+4*i);
|
||||
}
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
__m128 xx;
|
||||
__m128 yy;
|
||||
/* Compute next filter result */
|
||||
xx = _mm_load_ps1(x+i);
|
||||
yy = _mm_add_ss(xx, mem[0]);
|
||||
_mm_store_ss(y+i, yy);
|
||||
yy = _mm_shuffle_ps(yy, yy, 0);
|
||||
|
||||
/* Update memory */
|
||||
mem[0] = _mm_move_ss(mem[0], mem[1]);
|
||||
mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
|
||||
|
||||
mem[0] = _mm_add_ps(mem[0], _mm_mul_ps(xx, num[0]));
|
||||
|
||||
mem[1] = _mm_sub_ss(mem[1], mem[1]);
|
||||
mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
|
||||
|
||||
mem[1] = _mm_add_ps(mem[1], _mm_mul_ps(xx, num[1]));
|
||||
}
|
||||
/* Put memory back in its place */
|
||||
_mm_storeu_ps(_mem, mem[0]);
|
||||
_mm_storeu_ps(_mem+4, mem[1]);
|
||||
}
|
||||
|
||||
#define OVERRIDE_FIR_MEM16
|
||||
void fir_mem16(const float *x, const float *_num, float *y, int N, int ord, float *_mem, char *stack)
|
||||
{
|
||||
if(ord==10)
|
||||
fir_mem16_10(x, _num, y, N, ord, _mem);
|
||||
else if (ord==8)
|
||||
fir_mem16_8(x, _num, y, N, ord, _mem);
|
||||
}
|
||||
148
jni/libspeex/fixed_arm4.h
Normal file
@@ -0,0 +1,148 @@
|
||||
/* Copyright (C) 2004 Jean-Marc Valin */
|
||||
/**
|
||||
@file fixed_arm4.h
|
||||
@brief ARM4 fixed-point operations
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef FIXED_ARM4_H
|
||||
#define FIXED_ARM4_H
|
||||
|
||||
#undef MULT16_32_Q14
|
||||
static inline spx_word32_t MULT16_32_Q14(spx_word16_t x, spx_word32_t y) {
|
||||
int res;
|
||||
int dummy;
|
||||
asm (
|
||||
"smull %0,%1,%2,%3 \n\t"
|
||||
"mov %0, %0, lsr #14 \n\t"
|
||||
"add %0, %0, %1, lsl #18 \n\t"
|
||||
: "=&r"(res), "=&r" (dummy)
|
||||
: "r"(y),"r"((int)x));
|
||||
return(res);
|
||||
}
|
||||
|
||||
#undef MULT16_32_Q15
|
||||
static inline spx_word32_t MULT16_32_Q15(spx_word16_t x, spx_word32_t y) {
|
||||
int res;
|
||||
int dummy;
|
||||
asm (
|
||||
"smull %0,%1,%2,%3 \n\t"
|
||||
"mov %0, %0, lsr #15 \n\t"
|
||||
"add %0, %0, %1, lsl #17 \n\t"
|
||||
: "=&r"(res), "=&r" (dummy)
|
||||
: "r"(y),"r"((int)x));
|
||||
return(res);
|
||||
}
|
||||
|
||||
#undef DIV32_16
|
||||
static inline short DIV32_16(int a, int b)
|
||||
{
|
||||
int res=0;
|
||||
int dead1, dead2, dead3, dead4, dead5;
|
||||
__asm__ __volatile__ (
|
||||
"\teor %5, %0, %1\n"
|
||||
"\tmovs %4, %0\n"
|
||||
"\trsbmi %0, %0, #0 \n"
|
||||
"\tmovs %4, %1\n"
|
||||
"\trsbmi %1, %1, #0 \n"
|
||||
"\tmov %4, #1\n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #14 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #14 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #13 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #13 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #12 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #12 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #11 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #11 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #10 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #10 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #9 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #9 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #8 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #8 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #7 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #7 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #6 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #6 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #5 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #5 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #4 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #4 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #3 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #2 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #2 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #1 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4, asl #1 \n"
|
||||
|
||||
"\tsubs %3, %0, %1 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
"\torrpl %2, %2, %4 \n"
|
||||
|
||||
"\tmovs %5, %5, lsr #31 \n"
|
||||
"\trsbne %2, %2, #0 \n"
|
||||
: "=r" (dead1), "=r" (dead2), "=r" (res),
|
||||
"=r" (dead3), "=r" (dead4), "=r" (dead5)
|
||||
: "0" (a), "1" (b), "2" (res)
|
||||
: "cc"
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
178
jni/libspeex/fixed_arm5e.h
Normal file
@@ -0,0 +1,178 @@
|
||||
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||
/**
|
||||
@file fixed_arm5e.h
|
||||
@brief ARM-tuned fixed-point operations
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef FIXED_ARM5E_H
|
||||
#define FIXED_ARM5E_H
|
||||
|
||||
#undef MULT16_16
|
||||
static inline spx_word32_t MULT16_16(spx_word16_t x, spx_word16_t y) {
|
||||
int res;
|
||||
asm ("smulbb %0,%1,%2;\n"
|
||||
: "=&r"(res)
|
||||
: "%r"(x),"r"(y));
|
||||
return(res);
|
||||
}
|
||||
|
||||
#undef MAC16_16
|
||||
static inline spx_word32_t MAC16_16(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
|
||||
int res;
|
||||
asm ("smlabb %0,%1,%2,%3;\n"
|
||||
: "=&r"(res)
|
||||
: "%r"(x),"r"(y),"r"(a));
|
||||
return(res);
|
||||
}
|
||||
|
||||
#undef MULT16_32_Q15
|
||||
static inline spx_word32_t MULT16_32_Q15(spx_word16_t x, spx_word32_t y) {
|
||||
int res;
|
||||
asm ("smulwb %0,%1,%2;\n"
|
||||
: "=&r"(res)
|
||||
: "%r"(y<<1),"r"(x));
|
||||
return(res);
|
||||
}
|
||||
|
||||
#undef MAC16_32_Q15
|
||||
static inline spx_word32_t MAC16_32_Q15(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
|
||||
int res;
|
||||
asm ("smlawb %0,%1,%2,%3;\n"
|
||||
: "=&r"(res)
|
||||
: "%r"(y<<1),"r"(x),"r"(a));
|
||||
return(res);
|
||||
}
|
||||
|
||||
#undef MULT16_32_Q11
|
||||
static inline spx_word32_t MULT16_32_Q11(spx_word16_t x, spx_word32_t y) {
|
||||
int res;
|
||||
asm ("smulwb %0,%1,%2;\n"
|
||||
: "=&r"(res)
|
||||
: "%r"(y<<5),"r"(x));
|
||||
return(res);
|
||||
}
|
||||
|
||||
#undef MAC16_32_Q11
|
||||
static inline spx_word32_t MAC16_32_Q11(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
|
||||
int res;
|
||||
asm ("smlawb %0,%1,%2,%3;\n"
|
||||
: "=&r"(res)
|
||||
: "%r"(y<<5),"r"(x),"r"(a));
|
||||
return(res);
|
||||
}
|
||||
|
||||
#undef DIV32_16
|
||||
static inline short DIV32_16(int a, int b)
|
||||
{
|
||||
int res=0;
|
||||
int dead1, dead2, dead3, dead4, dead5;
|
||||
__asm__ __volatile__ (
|
||||
"\teor %5, %0, %1\n"
|
||||
"\tmovs %4, %0\n"
|
||||
"\trsbmi %0, %0, #0 \n"
|
||||
"\tmovs %4, %1\n"
|
||||
"\trsbmi %1, %1, #0 \n"
|
||||
"\tmov %4, #1\n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #14 \n"
|
||||
"\torrpl %2, %2, %4, asl #14 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #13 \n"
|
||||
"\torrpl %2, %2, %4, asl #13 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #12 \n"
|
||||
"\torrpl %2, %2, %4, asl #12 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #11 \n"
|
||||
"\torrpl %2, %2, %4, asl #11 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #10 \n"
|
||||
"\torrpl %2, %2, %4, asl #10 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #9 \n"
|
||||
"\torrpl %2, %2, %4, asl #9 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #8 \n"
|
||||
"\torrpl %2, %2, %4, asl #8 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #7 \n"
|
||||
"\torrpl %2, %2, %4, asl #7 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #6 \n"
|
||||
"\torrpl %2, %2, %4, asl #6 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #5 \n"
|
||||
"\torrpl %2, %2, %4, asl #5 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #4 \n"
|
||||
"\torrpl %2, %2, %4, asl #4 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #3 \n"
|
||||
"\torrpl %2, %2, %4, asl #3 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #2 \n"
|
||||
"\torrpl %2, %2, %4, asl #2 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1, asl #1 \n"
|
||||
"\torrpl %2, %2, %4, asl #1 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tsubs %3, %0, %1 \n"
|
||||
"\torrpl %2, %2, %4 \n"
|
||||
"\tmovpl %0, %3 \n"
|
||||
|
||||
"\tmovs %5, %5, lsr #31 \n"
|
||||
"\trsbne %2, %2, #0 \n"
|
||||
: "=r" (dead1), "=r" (dead2), "=r" (res),
|
||||
"=r" (dead3), "=r" (dead4), "=r" (dead5)
|
||||
: "0" (a), "1" (b), "2" (res)
|
||||
: "memory", "cc"
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
173
jni/libspeex/fixed_bfin.h
Normal file
@@ -0,0 +1,173 @@
|
||||
/* Copyright (C) 2005 Analog Devices
|
||||
Author: Jean-Marc Valin */
|
||||
/**
|
||||
@file fixed_bfin.h
|
||||
@brief Blackfin fixed-point operations
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef FIXED_BFIN_H
|
||||
#define FIXED_BFIN_H
|
||||
|
||||
#undef PDIV32_16
|
||||
static inline spx_word16_t PDIV32_16(spx_word32_t a, spx_word16_t b)
|
||||
{
|
||||
spx_word32_t res, bb;
|
||||
bb = b;
|
||||
a += b>>1;
|
||||
__asm__ (
|
||||
"P0 = 15;\n\t"
|
||||
"R0 = %1;\n\t"
|
||||
"R1 = %2;\n\t"
|
||||
//"R0 = R0 + R1;\n\t"
|
||||
"R0 <<= 1;\n\t"
|
||||
"DIVS (R0, R1);\n\t"
|
||||
"LOOP divide%= LC0 = P0;\n\t"
|
||||
"LOOP_BEGIN divide%=;\n\t"
|
||||
"DIVQ (R0, R1);\n\t"
|
||||
"LOOP_END divide%=;\n\t"
|
||||
"R0 = R0.L;\n\t"
|
||||
"%0 = R0;\n\t"
|
||||
: "=m" (res)
|
||||
: "m" (a), "m" (bb)
|
||||
: "P0", "R0", "R1", "cc");
|
||||
return res;
|
||||
}
|
||||
|
||||
#undef DIV32_16
|
||||
static inline spx_word16_t DIV32_16(spx_word32_t a, spx_word16_t b)
|
||||
{
|
||||
spx_word32_t res, bb;
|
||||
bb = b;
|
||||
/* Make the roundinf consistent with the C version
|
||||
(do we need to do that?)*/
|
||||
if (a<0)
|
||||
a += (b-1);
|
||||
__asm__ (
|
||||
"P0 = 15;\n\t"
|
||||
"R0 = %1;\n\t"
|
||||
"R1 = %2;\n\t"
|
||||
"R0 <<= 1;\n\t"
|
||||
"DIVS (R0, R1);\n\t"
|
||||
"LOOP divide%= LC0 = P0;\n\t"
|
||||
"LOOP_BEGIN divide%=;\n\t"
|
||||
"DIVQ (R0, R1);\n\t"
|
||||
"LOOP_END divide%=;\n\t"
|
||||
"R0 = R0.L;\n\t"
|
||||
"%0 = R0;\n\t"
|
||||
: "=m" (res)
|
||||
: "m" (a), "m" (bb)
|
||||
: "P0", "R0", "R1", "cc");
|
||||
return res;
|
||||
}
|
||||
|
||||
#undef MAX16
|
||||
static inline spx_word16_t MAX16(spx_word16_t a, spx_word16_t b)
|
||||
{
|
||||
spx_word32_t res;
|
||||
__asm__ (
|
||||
"%1 = %1.L (X);\n\t"
|
||||
"%2 = %2.L (X);\n\t"
|
||||
"%0 = MAX(%1,%2);"
|
||||
: "=d" (res)
|
||||
: "%d" (a), "d" (b)
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
#undef MULT16_32_Q15
|
||||
static inline spx_word32_t MULT16_32_Q15(spx_word16_t a, spx_word32_t b)
|
||||
{
|
||||
spx_word32_t res;
|
||||
__asm__
|
||||
(
|
||||
"A1 = %2.L*%1.L (M);\n\t"
|
||||
"A1 = A1 >>> 15;\n\t"
|
||||
"%0 = (A1 += %2.L*%1.H) ;\n\t"
|
||||
: "=&W" (res), "=&d" (b)
|
||||
: "d" (a), "1" (b)
|
||||
: "A1"
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
#undef MAC16_32_Q15
|
||||
static inline spx_word32_t MAC16_32_Q15(spx_word32_t c, spx_word16_t a, spx_word32_t b)
|
||||
{
|
||||
spx_word32_t res;
|
||||
__asm__
|
||||
(
|
||||
"A1 = %2.L*%1.L (M);\n\t"
|
||||
"A1 = A1 >>> 15;\n\t"
|
||||
"%0 = (A1 += %2.L*%1.H);\n\t"
|
||||
"%0 = %0 + %4;\n\t"
|
||||
: "=&W" (res), "=&d" (b)
|
||||
: "d" (a), "1" (b), "d" (c)
|
||||
: "A1"
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
#undef MULT16_32_Q14
|
||||
static inline spx_word32_t MULT16_32_Q14(spx_word16_t a, spx_word32_t b)
|
||||
{
|
||||
spx_word32_t res;
|
||||
__asm__
|
||||
(
|
||||
"%2 <<= 1;\n\t"
|
||||
"A1 = %1.L*%2.L (M);\n\t"
|
||||
"A1 = A1 >>> 15;\n\t"
|
||||
"%0 = (A1 += %1.L*%2.H);\n\t"
|
||||
: "=W" (res), "=d" (a), "=d" (b)
|
||||
: "1" (a), "2" (b)
|
||||
: "A1"
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
#undef MAC16_32_Q14
|
||||
static inline spx_word32_t MAC16_32_Q14(spx_word32_t c, spx_word16_t a, spx_word32_t b)
|
||||
{
|
||||
spx_word32_t res;
|
||||
__asm__
|
||||
(
|
||||
"%1 <<= 1;\n\t"
|
||||
"A1 = %2.L*%1.L (M);\n\t"
|
||||
"A1 = A1 >>> 15;\n\t"
|
||||
"%0 = (A1 += %2.L*%1.H);\n\t"
|
||||
"%0 = %0 + %4;\n\t"
|
||||
: "=&W" (res), "=&d" (b)
|
||||
: "d" (a), "1" (b), "d" (c)
|
||||
: "A1"
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif
|
||||
487
jni/libspeex/fixed_debug.h
Normal file
@@ -0,0 +1,487 @@
|
||||
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||
/**
|
||||
@file fixed_debug.h
|
||||
@brief Fixed-point operations with debugging
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef FIXED_DEBUG_H
|
||||
#define FIXED_DEBUG_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
extern long long spx_mips;
|
||||
#define MIPS_INC spx_mips++,
|
||||
|
||||
#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
|
||||
#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
|
||||
|
||||
|
||||
#define VERIFY_SHORT(x) ((x)<=32767&&(x)>=-32768)
|
||||
#define VERIFY_INT(x) ((x)<=2147483647LL&&(x)>=-2147483648LL)
|
||||
|
||||
static inline short NEG16(int x)
|
||||
{
|
||||
int res;
|
||||
if (!VERIFY_SHORT(x))
|
||||
{
|
||||
fprintf (stderr, "NEG16: input is not short: %d\n", (int)x);
|
||||
}
|
||||
res = -x;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "NEG16: output is not short: %d\n", (int)res);
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
static inline int NEG32(long long x)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_INT(x))
|
||||
{
|
||||
fprintf (stderr, "NEG16: input is not int: %d\n", (int)x);
|
||||
}
|
||||
res = -x;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "NEG16: output is not int: %d\n", (int)res);
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define EXTRACT16(x) _EXTRACT16(x, __FILE__, __LINE__)
|
||||
static inline short _EXTRACT16(int x, char *file, int line)
|
||||
{
|
||||
int res;
|
||||
if (!VERIFY_SHORT(x))
|
||||
{
|
||||
fprintf (stderr, "EXTRACT16: input is not short: %d in %s: line %d\n", x, file, line);
|
||||
}
|
||||
res = x;
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define EXTEND32(x) _EXTEND32(x, __FILE__, __LINE__)
|
||||
static inline int _EXTEND32(int x, char *file, int line)
|
||||
{
|
||||
int res;
|
||||
if (!VERIFY_SHORT(x))
|
||||
{
|
||||
fprintf (stderr, "EXTEND32: input is not short: %d in %s: line %d\n", x, file, line);
|
||||
}
|
||||
res = x;
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define SHR16(a, shift) _SHR16(a, shift, __FILE__, __LINE__)
|
||||
static inline short _SHR16(int a, int shift, char *file, int line)
|
||||
{
|
||||
int res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
|
||||
{
|
||||
fprintf (stderr, "SHR16: inputs are not short: %d >> %d in %s: line %d\n", a, shift, file, line);
|
||||
}
|
||||
res = a>>shift;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "SHR16: output is not short: %d in %s: line %d\n", res, file, line);
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
#define SHL16(a, shift) _SHL16(a, shift, __FILE__, __LINE__)
|
||||
static inline short _SHL16(int a, int shift, char *file, int line)
|
||||
{
|
||||
int res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
|
||||
{
|
||||
fprintf (stderr, "SHL16: inputs are not short: %d %d in %s: line %d\n", a, shift, file, line);
|
||||
}
|
||||
res = a<<shift;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "SHL16: output is not short: %d in %s: line %d\n", res, file, line);
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline int SHR32(long long a, int shift)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
|
||||
{
|
||||
fprintf (stderr, "SHR32: inputs are not int: %d %d\n", (int)a, shift);
|
||||
}
|
||||
res = a>>shift;
|
||||
if (!VERIFY_INT(res))
|
||||
{
|
||||
fprintf (stderr, "SHR32: output is not int: %d\n", (int)res);
|
||||
}
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
static inline int SHL32(long long a, int shift)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
|
||||
{
|
||||
fprintf (stderr, "SHL32: inputs are not int: %d %d\n", (int)a, shift);
|
||||
}
|
||||
res = a<<shift;
|
||||
if (!VERIFY_INT(res))
|
||||
{
|
||||
fprintf (stderr, "SHL32: output is not int: %d\n", (int)res);
|
||||
}
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define PSHR16(a,shift) (SHR16(ADD16((a),((1<<((shift))>>1))),shift))
|
||||
#define PSHR32(a,shift) (SHR32(ADD32((a),((EXTEND32(1)<<((shift))>>1))),shift))
|
||||
#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
|
||||
|
||||
#define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||
#define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||
|
||||
//#define SHR(a,shift) ((a) >> (shift))
|
||||
//#define SHL(a,shift) ((a) << (shift))
|
||||
|
||||
#define ADD16(a, b) _ADD16(a, b, __FILE__, __LINE__)
|
||||
static inline short _ADD16(int a, int b, char *file, int line)
|
||||
{
|
||||
int res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "ADD16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line);
|
||||
}
|
||||
res = a+b;
|
||||
if (!VERIFY_SHORT(res))
|
||||
{
|
||||
fprintf (stderr, "ADD16: output is not short: %d+%d=%d in %s: line %d\n", a,b,res, file, line);
|
||||
}
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define SUB16(a, b) _SUB16(a, b, __FILE__, __LINE__)
|
||||
static inline short _SUB16(int a, int b, char *file, int line)
|
||||
{
|
||||
int res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "SUB16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line);
|
||||
}
|
||||
res = a-b;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "SUB16: output is not short: %d in %s: line %d\n", res, file, line);
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define ADD32(a, b) _ADD32(a, b, __FILE__, __LINE__)
|
||||
static inline int _ADD32(long long a, long long b, char *file, int line)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
||||
{
|
||||
fprintf (stderr, "ADD32: inputs are not int: %d %d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||
}
|
||||
res = a+b;
|
||||
if (!VERIFY_INT(res))
|
||||
{
|
||||
fprintf (stderr, "ADD32: output is not int: %d in %s: line %d\n", (int)res, file, line);
|
||||
}
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline int SUB32(long long a, long long b)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
||||
{
|
||||
fprintf (stderr, "SUB32: inputs are not int: %d %d\n", (int)a, (int)b);
|
||||
}
|
||||
res = a-b;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "SUB32: output is not int: %d\n", (int)res);
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define ADD64(a,b) (MIPS_INC(a)+(b))
|
||||
|
||||
/* result fits in 16 bits */
|
||||
static inline short MULT16_16_16(int a, int b)
|
||||
{
|
||||
int res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_16: inputs are not short: %d %d\n", a, b);
|
||||
}
|
||||
res = a*b;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "MULT16_16_16: output is not short: %d\n", res);
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define MULT16_16(a, b) _MULT16_16(a, b, __FILE__, __LINE__)
|
||||
static inline int _MULT16_16(int a, int b, char *file, int line)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16: inputs are not short: %d %d in %s: line %d\n", a, b, file, line);
|
||||
}
|
||||
res = ((long long)a)*b;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "MULT16_16: output is not int: %d in %s: line %d\n", (int)res, file, line);
|
||||
spx_mips++;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define MAC16_16(c,a,b) (spx_mips--,ADD32((c),MULT16_16((a),(b))))
|
||||
#define MAC16_16_Q11(c,a,b) (EXTRACT16(ADD16((c),EXTRACT16(SHR32(MULT16_16((a),(b)),11)))))
|
||||
#define MAC16_16_Q13(c,a,b) (EXTRACT16(ADD16((c),EXTRACT16(SHR32(MULT16_16((a),(b)),13)))))
|
||||
#define MAC16_16_P13(c,a,b) (EXTRACT16(ADD32((c),SHR32(ADD32(4096,MULT16_16((a),(b))),13))))
|
||||
|
||||
|
||||
#define MULT16_32_QX(a, b, Q) _MULT16_32_QX(a, b, Q, __FILE__, __LINE__)
|
||||
static inline int _MULT16_32_QX(int a, long long b, int Q, char *file, int line)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_32_Q%d: inputs are not short+int: %d %d in %s: line %d\n", Q, (int)a, (int)b, file, line);
|
||||
}
|
||||
if (ABS32(b)>=(EXTEND32(1)<<(15+Q)))
|
||||
fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d in %s: line %d\n", Q, (int)a, (int)b, file, line);
|
||||
res = (((long long)a)*(long long)b) >> Q;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "MULT16_32_Q%d: output is not int: %d*%d=%d in %s: line %d\n", Q, (int)a, (int)b,(int)res, file, line);
|
||||
spx_mips+=5;
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline int MULT16_32_PX(int a, long long b, int Q)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_32_P%d: inputs are not short+int: %d %d\n", Q, (int)a, (int)b);
|
||||
}
|
||||
if (ABS32(b)>=(EXTEND32(1)<<(15+Q)))
|
||||
fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d\n", Q, (int)a, (int)b);
|
||||
res = ((((long long)a)*(long long)b) + ((EXTEND32(1)<<Q)>>1))>> Q;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "MULT16_32_P%d: output is not int: %d*%d=%d\n", Q, (int)a, (int)b,(int)res);
|
||||
spx_mips+=5;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#define MULT16_32_Q11(a,b) MULT16_32_QX(a,b,11)
|
||||
#define MAC16_32_Q11(c,a,b) ADD32((c),MULT16_32_Q11((a),(b)))
|
||||
#define MULT16_32_Q12(a,b) MULT16_32_QX(a,b,12)
|
||||
#define MULT16_32_Q13(a,b) MULT16_32_QX(a,b,13)
|
||||
#define MULT16_32_Q14(a,b) MULT16_32_QX(a,b,14)
|
||||
#define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15)
|
||||
#define MULT16_32_P15(a,b) MULT16_32_PX(a,b,15)
|
||||
#define MAC16_32_Q15(c,a,b) ADD32((c),MULT16_32_Q15((a),(b)))
|
||||
|
||||
static inline int SATURATE(int a, int b)
|
||||
{
|
||||
if (a>b)
|
||||
a=b;
|
||||
if (a<-b)
|
||||
a = -b;
|
||||
return a;
|
||||
}
|
||||
|
||||
static inline int MULT16_16_Q11_32(int a, int b)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_Q11: inputs are not short: %d %d\n", a, b);
|
||||
}
|
||||
res = ((long long)a)*b;
|
||||
res >>= 11;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "MULT16_16_Q11: output is not short: %d*%d=%d\n", (int)a, (int)b, (int)res);
|
||||
spx_mips+=3;
|
||||
return res;
|
||||
}
|
||||
static inline short MULT16_16_Q13(int a, int b)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_Q13: inputs are not short: %d %d\n", a, b);
|
||||
}
|
||||
res = ((long long)a)*b;
|
||||
res >>= 13;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "MULT16_16_Q13: output is not short: %d*%d=%d\n", a, b, (int)res);
|
||||
spx_mips+=3;
|
||||
return res;
|
||||
}
|
||||
static inline short MULT16_16_Q14(int a, int b)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_Q14: inputs are not short: %d %d\n", a, b);
|
||||
}
|
||||
res = ((long long)a)*b;
|
||||
res >>= 14;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "MULT16_16_Q14: output is not short: %d\n", (int)res);
|
||||
spx_mips+=3;
|
||||
return res;
|
||||
}
|
||||
static inline short MULT16_16_Q15(int a, int b)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_Q15: inputs are not short: %d %d\n", a, b);
|
||||
}
|
||||
res = ((long long)a)*b;
|
||||
res >>= 15;
|
||||
if (!VERIFY_SHORT(res))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_Q15: output is not short: %d\n", (int)res);
|
||||
}
|
||||
spx_mips+=3;
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline short MULT16_16_P13(int a, int b)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_P13: inputs are not short: %d %d\n", a, b);
|
||||
}
|
||||
res = ((long long)a)*b;
|
||||
res += 4096;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "MULT16_16_P13: overflow: %d*%d=%d\n", a, b, (int)res);
|
||||
res >>= 13;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "MULT16_16_P13: output is not short: %d*%d=%d\n", a, b, (int)res);
|
||||
spx_mips+=4;
|
||||
return res;
|
||||
}
|
||||
static inline short MULT16_16_P14(int a, int b)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_P14: inputs are not short: %d %d\n", a, b);
|
||||
}
|
||||
res = ((long long)a)*b;
|
||||
res += 8192;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "MULT16_16_P14: overflow: %d*%d=%d\n", a, b, (int)res);
|
||||
res >>= 14;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "MULT16_16_P14: output is not short: %d*%d=%d\n", a, b, (int)res);
|
||||
spx_mips+=4;
|
||||
return res;
|
||||
}
|
||||
static inline short MULT16_16_P15(int a, int b)
|
||||
{
|
||||
long long res;
|
||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "MULT16_16_P15: inputs are not short: %d %d\n", a, b);
|
||||
}
|
||||
res = ((long long)a)*b;
|
||||
res += 16384;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "MULT16_16_P15: overflow: %d*%d=%d\n", a, b, (int)res);
|
||||
res >>= 15;
|
||||
if (!VERIFY_SHORT(res))
|
||||
fprintf (stderr, "MULT16_16_P15: output is not short: %d*%d=%d\n", a, b, (int)res);
|
||||
spx_mips+=4;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define DIV32_16(a, b) _DIV32_16(a, b, __FILE__, __LINE__)
|
||||
|
||||
static inline int _DIV32_16(long long a, long long b, char *file, int line)
|
||||
{
|
||||
long long res;
|
||||
if (b==0)
|
||||
{
|
||||
fprintf(stderr, "DIV32_16: divide by zero: %d/%d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||
return 0;
|
||||
}
|
||||
if (!VERIFY_INT(a) || !VERIFY_SHORT(b))
|
||||
{
|
||||
fprintf (stderr, "DIV32_16: inputs are not int/short: %d %d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||
}
|
||||
res = a/b;
|
||||
if (!VERIFY_SHORT(res))
|
||||
{
|
||||
fprintf (stderr, "DIV32_16: output is not short: %d / %d = %d in %s: line %d\n", (int)a,(int)b,(int)res, file, line);
|
||||
if (res>32767)
|
||||
res = 32767;
|
||||
if (res<-32768)
|
||||
res = -32768;
|
||||
}
|
||||
spx_mips+=20;
|
||||
return res;
|
||||
}
|
||||
|
||||
#define DIV32(a, b) _DIV32(a, b, __FILE__, __LINE__)
|
||||
static inline int _DIV32(long long a, long long b, char *file, int line)
|
||||
{
|
||||
long long res;
|
||||
if (b==0)
|
||||
{
|
||||
fprintf(stderr, "DIV32: divide by zero: %d/%d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
||||
{
|
||||
fprintf (stderr, "DIV32: inputs are not int/short: %d %d in %s: line %d\n", (int)a, (int)b, file, line);
|
||||
}
|
||||
res = a/b;
|
||||
if (!VERIFY_INT(res))
|
||||
fprintf (stderr, "DIV32: output is not int: %d in %s: line %d\n", (int)res, file, line);
|
||||
spx_mips+=36;
|
||||
return res;
|
||||
}
|
||||
#define PDIV32(a,b) DIV32(ADD32((a),(b)>>1),b)
|
||||
#define PDIV32_16(a,b) DIV32_16(ADD32((a),(b)>>1),b)
|
||||
|
||||
#endif
|
||||
106
jni/libspeex/fixed_generic.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/* Copyright (C) 2003 Jean-Marc Valin */
|
||||
/**
|
||||
@file fixed_generic.h
|
||||
@brief Generic fixed-point operations
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef FIXED_GENERIC_H
|
||||
#define FIXED_GENERIC_H
|
||||
|
||||
#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
|
||||
#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
|
||||
|
||||
#define NEG16(x) (-(x))
|
||||
#define NEG32(x) (-(x))
|
||||
#define EXTRACT16(x) ((spx_word16_t)(x))
|
||||
#define EXTEND32(x) ((spx_word32_t)(x))
|
||||
#define SHR16(a,shift) ((a) >> (shift))
|
||||
#define SHL16(a,shift) ((a) << (shift))
|
||||
#define SHR32(a,shift) ((a) >> (shift))
|
||||
#define SHL32(a,shift) ((a) << (shift))
|
||||
#define PSHR16(a,shift) (SHR16((a)+((1<<((shift))>>1)),shift))
|
||||
#define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift))
|
||||
#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
|
||||
#define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||
#define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||
|
||||
#define SHR(a,shift) ((a) >> (shift))
|
||||
#define SHL(a,shift) ((spx_word32_t)(a) << (shift))
|
||||
#define PSHR(a,shift) (SHR((a)+((EXTEND32(1)<<((shift))>>1)),shift))
|
||||
#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
|
||||
|
||||
|
||||
#define ADD16(a,b) ((spx_word16_t)((spx_word16_t)(a)+(spx_word16_t)(b)))
|
||||
#define SUB16(a,b) ((spx_word16_t)(a)-(spx_word16_t)(b))
|
||||
#define ADD32(a,b) ((spx_word32_t)(a)+(spx_word32_t)(b))
|
||||
#define SUB32(a,b) ((spx_word32_t)(a)-(spx_word32_t)(b))
|
||||
|
||||
|
||||
/* result fits in 16 bits */
|
||||
#define MULT16_16_16(a,b) ((((spx_word16_t)(a))*((spx_word16_t)(b))))
|
||||
|
||||
/* (spx_word32_t)(spx_word16_t) gives TI compiler a hint that it's 16x16->32 multiply */
|
||||
#define MULT16_16(a,b) (((spx_word32_t)(spx_word16_t)(a))*((spx_word32_t)(spx_word16_t)(b)))
|
||||
|
||||
#define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b))))
|
||||
#define MULT16_32_Q12(a,b) ADD32(MULT16_16((a),SHR((b),12)), SHR(MULT16_16((a),((b)&0x00000fff)),12))
|
||||
#define MULT16_32_Q13(a,b) ADD32(MULT16_16((a),SHR((b),13)), SHR(MULT16_16((a),((b)&0x00001fff)),13))
|
||||
#define MULT16_32_Q14(a,b) ADD32(MULT16_16((a),SHR((b),14)), SHR(MULT16_16((a),((b)&0x00003fff)),14))
|
||||
|
||||
#define MULT16_32_Q11(a,b) ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11))
|
||||
#define MAC16_32_Q11(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11)))
|
||||
|
||||
#define MULT16_32_P15(a,b) ADD32(MULT16_16((a),SHR((b),15)), PSHR(MULT16_16((a),((b)&0x00007fff)),15))
|
||||
#define MULT16_32_Q15(a,b) ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))
|
||||
#define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15)))
|
||||
|
||||
|
||||
#define MAC16_16_Q11(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),11)))
|
||||
#define MAC16_16_Q13(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),13)))
|
||||
#define MAC16_16_P13(c,a,b) (ADD32((c),SHR(ADD32(4096,MULT16_16((a),(b))),13)))
|
||||
|
||||
#define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11))
|
||||
#define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13))
|
||||
#define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14))
|
||||
#define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15))
|
||||
|
||||
#define MULT16_16_P13(a,b) (SHR(ADD32(4096,MULT16_16((a),(b))),13))
|
||||
#define MULT16_16_P14(a,b) (SHR(ADD32(8192,MULT16_16((a),(b))),14))
|
||||
#define MULT16_16_P15(a,b) (SHR(ADD32(16384,MULT16_16((a),(b))),15))
|
||||
|
||||
#define MUL_16_32_R15(a,bh,bl) ADD32(MULT16_16((a),(bh)), SHR(MULT16_16((a),(bl)),15))
|
||||
|
||||
#define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b))))
|
||||
#define PDIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word16_t)(b))))
|
||||
#define DIV32(a,b) (((spx_word32_t)(a))/((spx_word32_t)(b)))
|
||||
#define PDIV32(a,b) (((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word32_t)(b)))
|
||||
|
||||
#endif
|
||||
160
jni/libspeex/gain_table.c
Normal file
@@ -0,0 +1,160 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: gain_table.c
|
||||
Codebook for 3-tap pitch prediction gain (128 entries)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
const signed char gain_cdbk_nb[512] = {
|
||||
-32, -32, -32, 0,
|
||||
-28, -67, -5, 33,
|
||||
-42, -6, -32, 18,
|
||||
-57, -10, -54, 35,
|
||||
-16, 27, -41, 42,
|
||||
19, -19, -40, 36,
|
||||
-45, 24, -21, 40,
|
||||
-8, -14, -18, 28,
|
||||
1, 14, -58, 53,
|
||||
-18, -88, -39, 39,
|
||||
-38, 21, -18, 37,
|
||||
-19, 20, -43, 38,
|
||||
10, 17, -48, 54,
|
||||
-52, -58, -13, 33,
|
||||
-44, -1, -11, 32,
|
||||
-12, -11, -34, 22,
|
||||
14, 0, -46, 46,
|
||||
-37, -35, -34, 5,
|
||||
-25, 44, -30, 43,
|
||||
6, -4, -63, 49,
|
||||
-31, 43, -41, 43,
|
||||
-23, 30, -43, 41,
|
||||
-43, 26, -14, 44,
|
||||
-33, 1, -13, 27,
|
||||
-13, 18, -37, 37,
|
||||
-46, -73, -45, 34,
|
||||
-36, 24, -25, 34,
|
||||
-36, -11, -20, 19,
|
||||
-25, 12, -18, 33,
|
||||
-36, -69, -59, 34,
|
||||
-45, 6, 8, 46,
|
||||
-22, -14, -24, 18,
|
||||
-1, 13, -44, 44,
|
||||
-39, -48, -26, 15,
|
||||
-32, 31, -37, 34,
|
||||
-33, 15, -46, 31,
|
||||
-24, 30, -36, 37,
|
||||
-41, 31, -23, 41,
|
||||
-50, 22, -4, 50,
|
||||
-22, 2, -21, 28,
|
||||
-17, 30, -34, 40,
|
||||
-7, -60, -28, 29,
|
||||
-38, 42, -28, 42,
|
||||
-44, -11, 21, 43,
|
||||
-16, 8, -44, 34,
|
||||
-39, -55, -43, 21,
|
||||
-11, -35, 26, 41,
|
||||
-9, 0, -34, 29,
|
||||
-8, 121, -81, 113,
|
||||
7, -16, -22, 33,
|
||||
-37, 33, -31, 36,
|
||||
-27, -7, -36, 17,
|
||||
-34, 70, -57, 65,
|
||||
-37, -11, -48, 21,
|
||||
-40, 17, -1, 44,
|
||||
-33, 6, -6, 33,
|
||||
-9, 0, -20, 34,
|
||||
-21, 69, -33, 57,
|
||||
-29, 33, -31, 35,
|
||||
-55, 12, -1, 49,
|
||||
-33, 27, -22, 35,
|
||||
-50, -33, -47, 17,
|
||||
-50, 54, 51, 94,
|
||||
-1, -5, -44, 35,
|
||||
-4, 22, -40, 45,
|
||||
-39, -66, -25, 24,
|
||||
-33, 1, -26, 20,
|
||||
-24, -23, -25, 12,
|
||||
-11, 21, -45, 44,
|
||||
-25, -45, -19, 17,
|
||||
-43, 105, -16, 82,
|
||||
5, -21, 1, 41,
|
||||
-16, 11, -33, 30,
|
||||
-13, -99, -4, 57,
|
||||
-37, 33, -15, 44,
|
||||
-25, 37, -63, 54,
|
||||
-36, 24, -31, 31,
|
||||
-53, -56, -38, 26,
|
||||
-41, -4, 4, 37,
|
||||
-33, 13, -30, 24,
|
||||
49, 52, -94, 114,
|
||||
-5, -30, -15, 23,
|
||||
1, 38, -40, 56,
|
||||
-23, 12, -36, 29,
|
||||
-17, 40, -47, 51,
|
||||
-37, -41, -39, 11,
|
||||
-49, 34, 0, 58,
|
||||
-18, -7, -4, 34,
|
||||
-16, 17, -27, 35,
|
||||
30, 5, -62, 65,
|
||||
4, 48, -68, 76,
|
||||
-43, 11, -11, 38,
|
||||
-18, 19, -15, 41,
|
||||
-23, -62, -39, 23,
|
||||
-42, 10, -2, 41,
|
||||
-21, -13, -13, 25,
|
||||
-9, 13, -47, 42,
|
||||
-23, -62, -24, 24,
|
||||
-44, 60, -21, 58,
|
||||
-18, -3, -52, 32,
|
||||
-22, 22, -36, 34,
|
||||
-75, 57, 16, 90,
|
||||
-19, 3, 10, 45,
|
||||
-29, 23, -38, 32,
|
||||
-5, -62, -51, 38,
|
||||
-51, 40, -18, 53,
|
||||
-42, 13, -24, 32,
|
||||
-34, 14, -20, 30,
|
||||
-56, -75, -26, 37,
|
||||
-26, 32, 15, 59,
|
||||
-26, 17, -29, 29,
|
||||
-7, 28, -52, 53,
|
||||
-12, -30, 5, 30,
|
||||
-5, -48, -5, 35,
|
||||
2, 2, -43, 40,
|
||||
21, 16, 16, 75,
|
||||
-25, -45, -32, 10,
|
||||
-43, 18, -10, 42,
|
||||
9, 0, -1, 52,
|
||||
-1, 7, -30, 36,
|
||||
19, -48, -4, 48,
|
||||
-28, 25, -29, 32,
|
||||
-22, 0, -31, 22,
|
||||
-32, 17, -10, 36,
|
||||
-64, -41, -62, 36,
|
||||
-52, 15, 16, 58,
|
||||
-30, -22, -32, 6,
|
||||
-7, 9, -38, 36};
|
||||
64
jni/libspeex/gain_table_lbr.c
Normal file
@@ -0,0 +1,64 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: gain_table_lbr.c
|
||||
Codebook for 3-tap pitch prediction gain (32 entries)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
const signed char gain_cdbk_lbr[128] = {
|
||||
-32, -32, -32, 0,
|
||||
-31, -58, -16, 22,
|
||||
-41, -24, -43, 14,
|
||||
-56, -22, -55, 29,
|
||||
-13, 33, -41, 47,
|
||||
-4, -39, -9, 29,
|
||||
-41, 15, -12, 38,
|
||||
-8, -15, -12, 31,
|
||||
1, 2, -44, 40,
|
||||
-22, -66, -42, 27,
|
||||
-38, 28, -23, 38,
|
||||
-21, 14, -37, 31,
|
||||
0, 21, -50, 52,
|
||||
-53, -71, -27, 33,
|
||||
-37, -1, -19, 25,
|
||||
-19, -5, -28, 22,
|
||||
6, 65, -44, 74,
|
||||
-33, -48, -33, 9,
|
||||
-40, 57, -14, 58,
|
||||
-17, 4, -45, 32,
|
||||
-31, 38, -33, 36,
|
||||
-23, 28, -40, 39,
|
||||
-43, 29, -12, 46,
|
||||
-34, 13, -23, 28,
|
||||
-16, 15, -27, 34,
|
||||
-14, -82, -15, 43,
|
||||
-31, 25, -32, 29,
|
||||
-21, 5, -5, 38,
|
||||
-47, -63, -51, 33,
|
||||
-46, 12, 3, 47,
|
||||
-28, -17, -29, 11,
|
||||
-10, 14, -40, 38};
|
||||
66
jni/libspeex/hexc_10_32_table.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: hexc_10_32_table.c
|
||||
Codebook for high-band excitation in SB-CELP mode (4000 bps)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
const signed char hexc_10_32_table[320] = {
|
||||
-3, -2, -1, 0, -4, 5, 35, -40, -9, 13,
|
||||
-44, 5, -27, -1, -7, 6, -11, 7, -8, 7,
|
||||
19, -14, 15, -4, 9, -10, 10, -8, 10, -9,
|
||||
-1, 1, 0, 0, 2, 5, -18, 22, -53, 50,
|
||||
1, -23, 50, -36, 15, 3, -13, 14, -10, 6,
|
||||
1, 5, -3, 4, -2, 5, -32, 25, 5, -2,
|
||||
-1, -4, 1, 11, -29, 26, -6, -15, 30, -18,
|
||||
0, 15, -17, 40, -41, 3, 9, -2, -2, 3,
|
||||
-3, -1, -5, 2, 21, -6, -16, -21, 23, 2,
|
||||
60, 15, 16, -16, -9, 14, 9, -1, 7, -9,
|
||||
0, 1, 1, 0, -1, -6, 17, -28, 54, -45,
|
||||
-1, 1, -1, -6, -6, 2, 11, 26, -29, -2,
|
||||
46, -21, 34, 12, -23, 32, -23, 16, -10, 3,
|
||||
66, 19, -20, 24, 7, 11, -3, 0, -3, -1,
|
||||
-50, -46, 2, -18, -3, 4, -1, -2, 3, -3,
|
||||
-19, 41, -36, 9, 11, -24, 21, -16, 9, -3,
|
||||
-25, -3, 10, 18, -9, -2, -5, -1, -5, 6,
|
||||
-4, -3, 2, -26, 21, -19, 35, -15, 7, -13,
|
||||
17, -19, 39, -43, 48, -31, 16, -9, 7, -2,
|
||||
-5, 3, -4, 9, -19, 27, -55, 63, -35, 10,
|
||||
26, -44, -2, 9, 4, 1, -6, 8, -9, 5,
|
||||
-8, -1, -3, -16, 45, -42, 5, 15, -16, 10,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
-16, 24, -55, 47, -38, 27, -19, 7, -3, 1,
|
||||
16, 27, 20, -19, 18, 5, -7, 1, -5, 2,
|
||||
-6, 8, -22, 0, -3, -3, 8, -1, 7, -8,
|
||||
1, -3, 5, 0, 17, -48, 58, -52, 29, -7,
|
||||
-2, 3, -10, 6, -26, 58, -31, 1, -6, 3,
|
||||
93, -29, 39, 3, 17, 5, 6, -1, -1, -1,
|
||||
27, 13, 10, 19, -7, -34, 12, 10, -4, 9,
|
||||
-76, 9, 8, -28, -2, -11, 2, -1, 3, 1,
|
||||
-83, 38, -39, 4, -16, -6, -2, -5, 5, -2,
|
||||
};
|
||||
162
jni/libspeex/hexc_table.c
Normal file
@@ -0,0 +1,162 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: hexc_table.c
|
||||
Codebook for high-band excitation in SB-CELP mode (8000 bps with sign)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
const signed char hexc_table[1024] = {
|
||||
-24, 21, -20, 5, -5, -7, 14, -10,
|
||||
2, -27, 16, -20, 0, -32, 26, 19,
|
||||
8, -11, -41, 31, 28, -27, -32, 34,
|
||||
42, 34, -17, 22, -10, 13, -29, 18,
|
||||
-12, -26, -24, 11, 22, 5, -5, -5,
|
||||
54, -68, -43, 57, -25, 24, 4, 4,
|
||||
26, -8, -12, -17, 54, 30, -45, 1,
|
||||
10, -15, 18, -41, 11, 68, -67, 37,
|
||||
-16, -24, -16, 38, -22, 6, -29, 30,
|
||||
66, -27, 5, 7, -16, 13, 2, -12,
|
||||
-7, -3, -20, 36, 4, -28, 9, 3,
|
||||
32, 48, 26, 39, 3, 0, 7, -21,
|
||||
-13, 5, -82, -7, 73, -20, 34, -9,
|
||||
-5, 1, -1, 10, -5, -10, -1, 9,
|
||||
1, -9, 10, 0, -14, 11, -1, -2,
|
||||
-1, 11, 20, 96, -81, -22, -12, -9,
|
||||
-58, 9, 24, -30, 26, -35, 27, -12,
|
||||
13, -18, 56, -59, 15, -7, 23, -15,
|
||||
-1, 6, -25, 14, -22, -20, 47, -11,
|
||||
16, 2, 38, -23, -19, -30, -9, 40,
|
||||
-11, 5, 4, -6, 8, 26, -21, -11,
|
||||
127, 4, 1, 6, -9, 2, -7, -2,
|
||||
-3, 7, -5, 10, -19, 7, -106, 91,
|
||||
-3, 9, -4, 21, -8, 26, -80, 8,
|
||||
1, -2, -10, -17, -17, -27, 32, 71,
|
||||
6, -29, 11, -23, 54, -38, 29, -22,
|
||||
39, 87, -31, -12, -20, 3, -2, -2,
|
||||
2, 20, 0, -1, -35, 27, 9, -6,
|
||||
-12, 3, -12, -6, 13, 1, 14, -22,
|
||||
-59, -15, -17, -25, 13, -7, 7, 3,
|
||||
0, 1, -7, 6, -3, 61, -37, -23,
|
||||
-23, -29, 38, -31, 27, 1, -8, 2,
|
||||
-27, 23, -26, 36, -34, 5, 24, -24,
|
||||
-6, 7, 3, -59, 78, -62, 44, -16,
|
||||
1, 6, 0, 17, 8, 45, 0, -110,
|
||||
6, 14, -2, 32, -77, -56, 62, -3,
|
||||
3, -13, 4, -16, 102, -15, -36, -1,
|
||||
9, -113, 6, 23, 0, 9, 9, 5,
|
||||
-8, -1, -14, 5, -12, 121, -53, -27,
|
||||
-8, -9, 22, -13, 3, 2, -3, 1,
|
||||
-2, -71, 95, 38, -19, 15, -16, -5,
|
||||
71, 10, 2, -32, -13, -5, 15, -1,
|
||||
-2, -14, -85, 30, 29, 6, 3, 2,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
2, -65, -56, -9, 18, 18, 23, -14,
|
||||
-2, 0, 12, -29, 26, -12, 1, 2,
|
||||
-12, -64, 90, -6, 4, 1, 5, -5,
|
||||
-110, -3, -31, 22, -29, 9, 0, 8,
|
||||
-40, -5, 21, -5, -5, 13, 10, -18,
|
||||
40, 1, 35, -20, 30, -28, 11, -6,
|
||||
19, 7, 14, 18, -64, 9, -6, 16,
|
||||
51, 68, 8, 16, 12, -8, 0, -9,
|
||||
20, -22, 25, 7, -4, -13, 41, -35,
|
||||
93, -18, -54, 11, -1, 1, -9, 4,
|
||||
-66, 66, -31, 20, -22, 25, -23, 11,
|
||||
10, 9, 19, 15, 11, -5, -31, -10,
|
||||
-23, -28, -6, -6, -3, -4, 5, 3,
|
||||
-28, 22, -11, -42, 25, -25, -16, 41,
|
||||
34, 47, -6, 2, 42, -19, -22, 5,
|
||||
-39, 32, 6, -35, 22, 17, -30, 8,
|
||||
-26, -11, -11, 3, -12, 33, 33, -37,
|
||||
21, -1, 6, -4, 3, 0, -5, 5,
|
||||
12, -12, 57, 27, -61, -3, 20, -17,
|
||||
2, 0, 4, 0, -2, -33, -58, 81,
|
||||
-23, 39, -10, -5, 2, 6, -7, 5,
|
||||
4, -3, -2, -13, -23, -72, 107, 15,
|
||||
-5, 0, -7, -3, -6, 5, -4, 15,
|
||||
47, 12, -31, 25, -16, 8, 22, -25,
|
||||
-62, -56, -18, 14, 28, 12, 2, -11,
|
||||
74, -66, 41, -20, -7, 16, -20, 16,
|
||||
-8, 0, -16, 4, -19, 92, 12, -59,
|
||||
-14, -39, 49, -25, -16, 23, -27, 19,
|
||||
-3, -33, 19, 85, -29, 6, -7, -10,
|
||||
16, -7, -12, 1, -6, 2, 4, -2,
|
||||
64, 10, -25, 41, -2, -31, 15, 0,
|
||||
110, 50, 69, 35, 28, 19, -10, 2,
|
||||
-43, -49, -56, -15, -16, 10, 3, 12,
|
||||
-1, -8, 1, 26, -12, -1, 7, -11,
|
||||
-27, 41, 25, 1, -11, -18, 22, -7,
|
||||
-1, -47, -8, 23, -3, -17, -7, 18,
|
||||
-125, 59, -5, 3, 18, 1, 2, 3,
|
||||
27, -35, 65, -53, 50, -46, 37, -21,
|
||||
-28, 7, 14, -37, -5, -5, 12, 5,
|
||||
-8, 78, -19, 21, -6, -16, 8, -7,
|
||||
5, 2, 7, 2, 10, -6, 12, -60,
|
||||
44, 11, -36, -32, 31, 0, 2, -2,
|
||||
2, 1, -3, 7, -10, 17, -21, 10,
|
||||
6, -2, 19, -2, 59, -38, -86, 38,
|
||||
8, -41, -30, -45, -33, 7, 15, 28,
|
||||
29, -7, 24, -40, 7, 7, 5, -2,
|
||||
9, 24, -23, -18, 6, -29, 30, 2,
|
||||
28, 49, -11, -46, 10, 43, -13, -9,
|
||||
-1, -3, -7, -7, -17, -6, 97, -33,
|
||||
-21, 3, 5, 1, 12, -43, -8, 28,
|
||||
7, -43, -7, 17, -20, 19, -1, 2,
|
||||
-13, 9, 54, 34, 9, -28, -11, -9,
|
||||
-17, 110, -59, 44, -26, 0, 3, -12,
|
||||
-47, 73, -34, -43, 38, -33, 16, -5,
|
||||
-46, -4, -6, -2, -25, 19, -29, 28,
|
||||
-13, 5, 14, 27, -40, -43, 4, 32,
|
||||
-13, -2, -35, -4, 112, -42, 9, -12,
|
||||
37, -28, 17, 14, -19, 35, -39, 23,
|
||||
3, -14, -1, -57, -5, 94, -9, 3,
|
||||
-39, 5, 30, -10, -32, 42, -13, -14,
|
||||
-97, -63, 30, -9, 1, -7, 12, 5,
|
||||
20, 17, -9, -36, -30, 25, 47, -9,
|
||||
-15, 12, -22, 98, -8, -50, 15, -27,
|
||||
21, -16, -11, 2, 12, -10, 10, -3,
|
||||
33, 36, -96, 0, -17, 31, -9, 9,
|
||||
3, -20, 13, -11, 8, -4, 10, -10,
|
||||
9, 1, 112, -70, -27, 5, -21, 2,
|
||||
-57, -3, -29, 10, 19, -21, 21, -10,
|
||||
-66, -3, 91, -35, 30, -12, 0, -7,
|
||||
59, -28, 26, 2, 14, -18, 1, 1,
|
||||
11, 17, 20, -54, -59, 27, 4, 29,
|
||||
32, 5, 19, 12, -4, 1, 7, -10,
|
||||
5, -2, 10, 0, 23, -5, 28, -104,
|
||||
46, 11, 16, 3, 29, 1, -8, -14,
|
||||
1, 7, -50, 88, -62, 26, 8, -17,
|
||||
-14, 50, 0, 32, -12, -3, -27, 18,
|
||||
-8, -5, 8, 3, -20, -11, 37, -12,
|
||||
9, 33, 46, -101, -1, -4, 1, 6,
|
||||
-1, 28, -42, -15, 16, 5, -1, -2,
|
||||
-55, 85, 38, -9, -4, 11, -2, -9,
|
||||
-6, 3, -20, -10, -77, 89, 24, -3,
|
||||
-104, -57, -26, -31, -20, -6, -9, 14,
|
||||
20, -23, 46, -15, -31, 28, 1, -15,
|
||||
-2, 6, -2, 31, 45, -76, 23, -25,
|
||||
};
|
||||
163
jni/libspeex/high_lsp_tables.c
Normal file
@@ -0,0 +1,163 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin
|
||||
File: high_lsp_tables.c
|
||||
Codebooks for high-band LSPs in SB-CELP mode
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
const signed char high_lsp_cdbk[512]={
|
||||
39,12,-14,-20,-29,-61,-67,-76,
|
||||
-32,-71,-67,68,77,46,34,5,
|
||||
-13,-48,-46,-72,-81,-84,-60,-58,
|
||||
-40,-28,82,93,68,45,29,3,
|
||||
-19,-47,-28,-43,-35,-30,-8,-13,
|
||||
-39,-91,-91,-123,-96,10,10,-6,
|
||||
-18,-55,-60,-91,-56,-36,-27,-16,
|
||||
-48,-75,40,28,-10,-28,35,9,
|
||||
37,19,1,-20,-31,-41,-18,-25,
|
||||
-35,-68,-80,45,27,-1,47,13,
|
||||
0,-29,-35,-57,-50,-79,-73,-38,
|
||||
-19,5,35,14,-10,-23,16,-8,
|
||||
5,-24,-40,-62,-23,-27,-22,-16,
|
||||
-18,-46,-72,-77,43,21,33,1,
|
||||
-80,-70,-70,-64,-56,-52,-39,-33,
|
||||
-31,-38,-19,-19,-15,32,33,-2,
|
||||
7,-15,-15,-24,-23,-33,-41,-56,
|
||||
-24,-57,5,89,64,41,27,5,
|
||||
-9,-47,-60,-97,-97,-124,-20,-9,
|
||||
-44,-73,31,29,-4,64,48,7,
|
||||
-35,-57,0,-3,-26,-47,-3,-6,
|
||||
-40,-76,-79,-48,12,81,55,10,
|
||||
9,-24,-43,-73,-57,-69,16,5,
|
||||
-28,-53,18,29,20,0,-4,-11,
|
||||
6,-13,23,7,-17,-35,-37,-37,
|
||||
-30,-68,-63,6,24,-9,-14,3,
|
||||
21,-13,-27,-57,-49,-80,-24,-41,
|
||||
-5,-16,-5,1,45,25,12,-7,
|
||||
3,-15,-6,-16,-15,-8,6,-13,
|
||||
-42,-81,-80,-87,14,1,-10,-3,
|
||||
-43,-69,-46,-24,-28,-29,36,6,
|
||||
-43,-56,-12,12,54,79,43,9,
|
||||
54,22,2,8,-12,-43,-46,-52,
|
||||
-38,-69,-89,-5,75,38,33,5,
|
||||
-13,-53,-62,-87,-89,-113,-99,-55,
|
||||
-34,-37,62,55,33,16,21,-2,
|
||||
-17,-46,-29,-38,-38,-48,-39,-42,
|
||||
-36,-75,-72,-88,-48,-30,21,2,
|
||||
-15,-57,-64,-98,-84,-76,25,1,
|
||||
-46,-80,-12,18,-7,3,34,6,
|
||||
38,31,23,4,-1,20,14,-15,
|
||||
-43,-78,-91,-24,14,-3,54,16,
|
||||
0,-27,-28,-44,-56,-83,-92,-89,
|
||||
-3,34,56,41,36,22,20,-8,
|
||||
-7,-35,-42,-62,-49,3,12,-10,
|
||||
-50,-87,-96,-66,92,70,38,9,
|
||||
-70,-71,-62,-42,-39,-43,-11,-7,
|
||||
-50,-79,-58,-50,-31,32,31,-6,
|
||||
-4,-25,7,-17,-38,-70,-58,-27,
|
||||
-43,-83,-28,59,36,20,31,2,
|
||||
-27,-71,-80,-109,-98,-75,-33,-32,
|
||||
-31,-2,33,15,-6,43,33,-5,
|
||||
0,-22,-10,-27,-34,-49,-11,-20,
|
||||
-41,-91,-100,-121,-39,57,41,10,
|
||||
-19,-50,-38,-59,-60,-70,-18,-20,
|
||||
-8,-31,-8,-15,1,-14,-26,-25,
|
||||
33,21,32,17,1,-19,-19,-26,
|
||||
-58,-81,-35,-22,45,30,11,-11,
|
||||
3,-26,-48,-87,-67,-83,-58,3,
|
||||
-1,-26,-20,44,10,25,39,5,
|
||||
-9,-35,-27,-38,7,10,4,-9,
|
||||
-42,-85,-102,-127,52,44,28,10,
|
||||
-47,-61,-40,-39,-17,-1,-10,-33,
|
||||
-42,-74,-48,21,-4,70,52,10};
|
||||
|
||||
|
||||
const signed char high_lsp_cdbk2[512]={
|
||||
-36,-62,6,-9,-10,-14,-56,23,
|
||||
1,-26,23,-48,-17,12,8,-7,
|
||||
23,29,-36,-28,-6,-29,-17,-5,
|
||||
40,23,10,10,-46,-13,36,6,
|
||||
4,-30,-29,62,32,-32,-1,22,
|
||||
-14,1,-4,-22,-45,2,54,4,
|
||||
-30,-57,-59,-12,27,-3,-31,8,
|
||||
-9,5,10,-14,32,66,19,9,
|
||||
2,-25,-37,23,-15,18,-38,-31,
|
||||
5,-9,-21,15,0,22,62,30,
|
||||
15,-12,-14,-46,77,21,33,3,
|
||||
34,29,-19,50,2,11,9,-38,
|
||||
-12,-37,62,1,-15,54,32,6,
|
||||
2,-24,20,35,-21,2,19,24,
|
||||
-13,55,4,9,39,-19,30,-1,
|
||||
-21,73,54,33,8,18,3,15,
|
||||
6,-19,-47,6,-3,-48,-50,1,
|
||||
26,20,8,-23,-50,65,-14,-55,
|
||||
-17,-31,-37,-28,53,-1,-17,-53,
|
||||
1,57,11,-8,-25,-30,-37,64,
|
||||
5,-52,-45,15,23,31,15,14,
|
||||
-25,24,33,-2,-44,-56,-18,6,
|
||||
-21,-43,4,-12,17,-37,20,-10,
|
||||
34,15,2,15,55,21,-11,-31,
|
||||
-6,46,25,16,-9,-25,-8,-62,
|
||||
28,17,20,-32,-29,26,30,25,
|
||||
-19,2,-16,-17,26,-51,2,50,
|
||||
42,19,-66,23,29,-2,3,19,
|
||||
-19,-37,32,15,6,30,-34,13,
|
||||
11,-5,40,31,10,-42,4,-9,
|
||||
26,-9,-70,17,-2,-23,20,-22,
|
||||
-55,51,-24,-31,22,-22,15,-13,
|
||||
3,-10,-28,-16,56,4,-63,11,
|
||||
-18,-15,-18,-38,-35,16,-7,34,
|
||||
-1,-21,-49,-47,9,-37,7,8,
|
||||
69,55,20,6,-33,-45,-10,-9,
|
||||
6,-9,12,71,15,-3,-42,-7,
|
||||
-24,32,-35,-2,-42,-17,-5,0,
|
||||
-2,-33,-54,13,-12,-34,47,23,
|
||||
19,55,7,-8,74,31,14,16,
|
||||
-23,-26,19,12,-18,-49,-28,-31,
|
||||
-20,2,-14,-20,-47,78,40,13,
|
||||
-23,-11,21,-6,18,1,47,5,
|
||||
38,35,32,46,22,8,13,16,
|
||||
-14,18,51,19,40,39,11,-26,
|
||||
-1,-17,47,2,-53,-15,31,-22,
|
||||
38,21,-15,-16,5,-33,53,15,
|
||||
-38,86,11,-3,-24,49,13,-4,
|
||||
-11,-18,28,20,-12,-27,-26,35,
|
||||
-25,-35,-3,-20,-61,30,10,-55,
|
||||
-12,-22,-52,-54,-14,19,-32,-12,
|
||||
45,15,-8,-48,-9,11,-32,8,
|
||||
-16,-34,-13,51,18,38,-2,-32,
|
||||
-17,22,-2,-18,-28,-70,59,27,
|
||||
-28,-19,-10,-20,-9,-9,-8,-21,
|
||||
21,-8,35,-2,45,-3,-9,12,
|
||||
0,30,7,-39,43,27,-38,-91,
|
||||
30,26,19,-55,-4,63,14,-17,
|
||||
13,9,13,2,7,4,6,61,
|
||||
72,-1,-17,29,-1,-22,-17,8,
|
||||
-28,-37,63,44,41,3,2,14,
|
||||
9,-6,75,-8,-7,-12,-15,-12,
|
||||
13,9,-4,30,-22,-65,15,0,
|
||||
-45,4,-4,1,5,22,11,23};
|
||||
481
jni/libspeex/include/Makefile
Normal file
@@ -0,0 +1,481 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# include/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ..
|
||||
|
||||
pkgdatadir = $(datadir)/speex
|
||||
pkglibdir = $(libdir)/speex
|
||||
pkgincludedir = $(includedir)/speex
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = /usr/bin/install -c
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = x86_64-unknown-linux-gnu
|
||||
subdir = include
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(mkdir_p)
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run aclocal-1.8
|
||||
AMDEP_FALSE = #
|
||||
AMDEP_TRUE =
|
||||
AMTAR = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run tar
|
||||
AR = ar
|
||||
AS = as
|
||||
AUTOCONF = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run automake-1.8
|
||||
AWK = gawk
|
||||
BUILD_KISS_FFT_FALSE =
|
||||
BUILD_KISS_FFT_TRUE = #
|
||||
BUILD_SMALLFT_FALSE = #
|
||||
BUILD_SMALLFT_TRUE =
|
||||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2 -fvisibility=hidden
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXXCPP = g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
DEPDIR = .deps
|
||||
DLLTOOL = dlltool
|
||||
DSYMUTIL =
|
||||
ECHO = echo
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EXEEXT =
|
||||
F77 =
|
||||
FFLAGS =
|
||||
FFT_CFLAGS =
|
||||
FFT_LIBS =
|
||||
FFT_PKGCONFIG =
|
||||
GREP = /bin/grep
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
|
||||
LDFLAGS =
|
||||
LIBOBJS =
|
||||
LIBS = -lm
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LN_S = ln -s
|
||||
LTLIBOBJS =
|
||||
MAINT = #
|
||||
MAINTAINER_MODE_FALSE =
|
||||
MAINTAINER_MODE_TRUE = #
|
||||
MAKEINFO = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run makeinfo
|
||||
NMEDIT =
|
||||
OBJDUMP = objdump
|
||||
OBJEXT = o
|
||||
OGG_CFLAGS =
|
||||
OGG_LIBS =
|
||||
PACKAGE = speex
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME =
|
||||
PACKAGE_STRING =
|
||||
PACKAGE_TARNAME =
|
||||
PACKAGE_VERSION =
|
||||
PATH_SEPARATOR = :
|
||||
PKG_CONFIG = /usr/bin/pkg-config
|
||||
RANLIB = ranlib
|
||||
SED = /bin/sed
|
||||
SET_MAKE =
|
||||
SHELL = /bin/bash
|
||||
SIZE16 = short
|
||||
SIZE32 = int
|
||||
SPEEX_LT_AGE = 5
|
||||
SPEEX_LT_CURRENT = 6
|
||||
SPEEX_LT_REVISION = 0
|
||||
SPEEX_VERSION = 1.2rc1
|
||||
STRIP = strip
|
||||
VERSION = 1.2rc1
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
ac_ct_F77 =
|
||||
am__fastdepCC_FALSE = #
|
||||
am__fastdepCC_TRUE =
|
||||
am__fastdepCXX_FALSE = #
|
||||
am__fastdepCXX_TRUE =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = x86_64-unknown-linux-gnu
|
||||
build_alias =
|
||||
build_cpu = x86_64
|
||||
build_os = linux-gnu
|
||||
build_vendor = unknown
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE}
|
||||
dvidir = ${docdir}
|
||||
exec_prefix = ${prefix}
|
||||
host = x86_64-unknown-linux-gnu
|
||||
host_alias =
|
||||
host_cpu = x86_64
|
||||
host_os = linux-gnu
|
||||
host_vendor = unknown
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${datarootdir}/info
|
||||
install_sh = /home/moxie/Downloads/speex-1.2rc1/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${datarootdir}/man
|
||||
mkdir_p = mkdir -p -- .
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
src =
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
SUBDIRS = speex
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu include/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: # $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| mkdir "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="../$(top_distdir)" \
|
||||
distdir="../$(distdir)/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
2
jni/libspeex/include/Makefile.am
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
SUBDIRS = speex
|
||||
481
jni/libspeex/include/Makefile.in
Normal file
@@ -0,0 +1,481 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = include
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(mkdir_p)
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_KISS_FFT_FALSE = @BUILD_KISS_FFT_FALSE@
|
||||
BUILD_KISS_FFT_TRUE = @BUILD_KISS_FFT_TRUE@
|
||||
BUILD_SMALLFT_FALSE = @BUILD_SMALLFT_FALSE@
|
||||
BUILD_SMALLFT_TRUE = @BUILD_SMALLFT_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FFT_CFLAGS = @FFT_CFLAGS@
|
||||
FFT_LIBS = @FFT_LIBS@
|
||||
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SIZE16 = @SIZE16@
|
||||
SIZE32 = @SIZE32@
|
||||
SPEEX_LT_AGE = @SPEEX_LT_AGE@
|
||||
SPEEX_LT_CURRENT = @SPEEX_LT_CURRENT@
|
||||
SPEEX_LT_REVISION = @SPEEX_LT_REVISION@
|
||||
SPEEX_VERSION = @SPEEX_VERSION@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
src = @src@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = speex
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu include/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| mkdir "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="../$(top_distdir)" \
|
||||
distdir="../$(distdir)/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
440
jni/libspeex/include/speex/Makefile
Normal file
@@ -0,0 +1,440 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# include/speex/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
|
||||
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||
#AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ../..
|
||||
|
||||
pkgdatadir = $(datadir)/speex
|
||||
pkglibdir = $(libdir)/speex
|
||||
pkgincludedir = $(includedir)/speex
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = /usr/bin/install -c
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = x86_64-unknown-linux-gnu
|
||||
subdir = include/speex
|
||||
DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/speex_config_types.h.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(mkdir_p)
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = speex_config_types.h
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__installdirs = "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"
|
||||
nodist_pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run aclocal-1.8
|
||||
AMDEP_FALSE = #
|
||||
AMDEP_TRUE =
|
||||
AMTAR = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run tar
|
||||
AR = ar
|
||||
AS = as
|
||||
AUTOCONF = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run automake-1.8
|
||||
AWK = gawk
|
||||
BUILD_KISS_FFT_FALSE =
|
||||
BUILD_KISS_FFT_TRUE = #
|
||||
BUILD_SMALLFT_FALSE = #
|
||||
BUILD_SMALLFT_TRUE =
|
||||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2 -fvisibility=hidden
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXXCPP = g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
DEPDIR = .deps
|
||||
DLLTOOL = dlltool
|
||||
DSYMUTIL =
|
||||
ECHO = echo
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EXEEXT =
|
||||
F77 =
|
||||
FFLAGS =
|
||||
FFT_CFLAGS =
|
||||
FFT_LIBS =
|
||||
FFT_PKGCONFIG =
|
||||
GREP = /bin/grep
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
|
||||
LDFLAGS =
|
||||
LIBOBJS =
|
||||
LIBS = -lm
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LN_S = ln -s
|
||||
LTLIBOBJS =
|
||||
MAINT = #
|
||||
MAINTAINER_MODE_FALSE =
|
||||
MAINTAINER_MODE_TRUE = #
|
||||
MAKEINFO = ${SHELL} /home/moxie/Downloads/speex-1.2rc1/missing --run makeinfo
|
||||
NMEDIT =
|
||||
OBJDUMP = objdump
|
||||
OBJEXT = o
|
||||
OGG_CFLAGS =
|
||||
OGG_LIBS =
|
||||
PACKAGE = speex
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME =
|
||||
PACKAGE_STRING =
|
||||
PACKAGE_TARNAME =
|
||||
PACKAGE_VERSION =
|
||||
PATH_SEPARATOR = :
|
||||
PKG_CONFIG = /usr/bin/pkg-config
|
||||
RANLIB = ranlib
|
||||
SED = /bin/sed
|
||||
SET_MAKE =
|
||||
SHELL = /bin/bash
|
||||
SIZE16 = short
|
||||
SIZE32 = int
|
||||
SPEEX_LT_AGE = 5
|
||||
SPEEX_LT_CURRENT = 6
|
||||
SPEEX_LT_REVISION = 0
|
||||
SPEEX_VERSION = 1.2rc1
|
||||
STRIP = strip
|
||||
VERSION = 1.2rc1
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
ac_ct_F77 =
|
||||
am__fastdepCC_FALSE = #
|
||||
am__fastdepCC_TRUE =
|
||||
am__fastdepCXX_FALSE = #
|
||||
am__fastdepCXX_TRUE =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = x86_64-unknown-linux-gnu
|
||||
build_alias =
|
||||
build_cpu = x86_64
|
||||
build_os = linux-gnu
|
||||
build_vendor = unknown
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE}
|
||||
dvidir = ${docdir}
|
||||
exec_prefix = ${prefix}
|
||||
host = x86_64-unknown-linux-gnu
|
||||
host_alias =
|
||||
host_cpu = x86_64
|
||||
host_os = linux-gnu
|
||||
host_vendor = unknown
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${datarootdir}/info
|
||||
install_sh = /home/moxie/Downloads/speex-1.2rc1/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${datarootdir}/man
|
||||
mkdir_p = mkdir -p -- .
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
src =
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
nodist_pkginclude_HEADERS = speex_config_types.h
|
||||
pkginclude_HEADERS = speex.h speex_bits.h speex_buffer.h speex_callbacks.h \
|
||||
speex_echo.h speex_header.h speex_jitter.h speex_preprocess.h speex_resampler.h \
|
||||
speex_stereo.h speex_types.h
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/speex/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu include/speex/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: # $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
speex_config_types.h: $(top_builddir)/config.status $(srcdir)/speex_config_types.h.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
|
||||
@list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(nodist_pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
$(nodist_pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-nodist_pkgincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
|
||||
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
$(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-pkgincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-nodist_pkgincludeHEADERS \
|
||||
install-pkgincludeHEADERS
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-nodist_pkgincludeHEADERS \
|
||||
uninstall-pkgincludeHEADERS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool ctags distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-nodist_pkgincludeHEADERS \
|
||||
install-pkgincludeHEADERS install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-info-am \
|
||||
uninstall-nodist_pkgincludeHEADERS uninstall-pkgincludeHEADERS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
9
jni/libspeex/include/speex/Makefile.am
Normal file
@@ -0,0 +1,9 @@
|
||||
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||
#AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
nodist_pkginclude_HEADERS = speex_config_types.h
|
||||
|
||||
pkginclude_HEADERS = speex.h speex_bits.h speex_buffer.h speex_callbacks.h \
|
||||
speex_echo.h speex_header.h speex_jitter.h speex_preprocess.h speex_resampler.h \
|
||||
speex_stereo.h speex_types.h
|
||||
|
||||
440
jni/libspeex/include/speex/Makefile.in
Normal file
@@ -0,0 +1,440 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Disable automatic dependency tracking if using other tools than gcc and gmake
|
||||
#AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = include/speex
|
||||
DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/speex_config_types.h.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(mkdir_p)
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = speex_config_types.h
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__installdirs = "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"
|
||||
nodist_pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(nodist_pkginclude_HEADERS) $(pkginclude_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_KISS_FFT_FALSE = @BUILD_KISS_FFT_FALSE@
|
||||
BUILD_KISS_FFT_TRUE = @BUILD_KISS_FFT_TRUE@
|
||||
BUILD_SMALLFT_FALSE = @BUILD_SMALLFT_FALSE@
|
||||
BUILD_SMALLFT_TRUE = @BUILD_SMALLFT_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FFT_CFLAGS = @FFT_CFLAGS@
|
||||
FFT_LIBS = @FFT_LIBS@
|
||||
FFT_PKGCONFIG = @FFT_PKGCONFIG@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SIZE16 = @SIZE16@
|
||||
SIZE32 = @SIZE32@
|
||||
SPEEX_LT_AGE = @SPEEX_LT_AGE@
|
||||
SPEEX_LT_CURRENT = @SPEEX_LT_CURRENT@
|
||||
SPEEX_LT_REVISION = @SPEEX_LT_REVISION@
|
||||
SPEEX_VERSION = @SPEEX_VERSION@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
src = @src@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
nodist_pkginclude_HEADERS = speex_config_types.h
|
||||
pkginclude_HEADERS = speex.h speex_bits.h speex_buffer.h speex_callbacks.h \
|
||||
speex_echo.h speex_header.h speex_jitter.h speex_preprocess.h speex_resampler.h \
|
||||
speex_stereo.h speex_types.h
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/speex/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu include/speex/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
speex_config_types.h: $(top_builddir)/config.status $(srcdir)/speex_config_types.h.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
|
||||
@list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(nodist_pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
$(nodist_pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-nodist_pkgincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(nodist_pkginclude_HEADERS)'; for p in $$list; do \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
|
||||
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
$(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-pkgincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-nodist_pkgincludeHEADERS \
|
||||
install-pkgincludeHEADERS
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-nodist_pkgincludeHEADERS \
|
||||
uninstall-pkgincludeHEADERS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool ctags distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-nodist_pkgincludeHEADERS \
|
||||
install-pkgincludeHEADERS install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-info-am \
|
||||
uninstall-nodist_pkgincludeHEADERS uninstall-pkgincludeHEADERS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
424
jni/libspeex/include/speex/speex.h
Normal file
@@ -0,0 +1,424 @@
|
||||
/* Copyright (C) 2002-2006 Jean-Marc Valin*/
|
||||
/**
|
||||
@file speex.h
|
||||
@brief Describes the different modes of the codec
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef SPEEX_H
|
||||
#define SPEEX_H
|
||||
/** @defgroup Codec Speex encoder and decoder
|
||||
* This is the Speex codec itself.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "speex/speex_bits.h"
|
||||
#include "speex/speex_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Values allowed for *ctl() requests */
|
||||
|
||||
/** Set enhancement on/off (decoder only) */
|
||||
#define SPEEX_SET_ENH 0
|
||||
/** Get enhancement state (decoder only) */
|
||||
#define SPEEX_GET_ENH 1
|
||||
|
||||
/*Would be SPEEX_SET_FRAME_SIZE, but it's (currently) invalid*/
|
||||
/** Obtain frame size used by encoder/decoder */
|
||||
#define SPEEX_GET_FRAME_SIZE 3
|
||||
|
||||
/** Set quality value */
|
||||
#define SPEEX_SET_QUALITY 4
|
||||
/** Get current quality setting */
|
||||
/* #define SPEEX_GET_QUALITY 5 -- Doesn't make much sense, does it? */
|
||||
|
||||
/** Set sub-mode to use */
|
||||
#define SPEEX_SET_MODE 6
|
||||
/** Get current sub-mode in use */
|
||||
#define SPEEX_GET_MODE 7
|
||||
|
||||
/** Set low-band sub-mode to use (wideband only)*/
|
||||
#define SPEEX_SET_LOW_MODE 8
|
||||
/** Get current low-band mode in use (wideband only)*/
|
||||
#define SPEEX_GET_LOW_MODE 9
|
||||
|
||||
/** Set high-band sub-mode to use (wideband only)*/
|
||||
#define SPEEX_SET_HIGH_MODE 10
|
||||
/** Get current high-band mode in use (wideband only)*/
|
||||
#define SPEEX_GET_HIGH_MODE 11
|
||||
|
||||
/** Set VBR on (1) or off (0) */
|
||||
#define SPEEX_SET_VBR 12
|
||||
/** Get VBR status (1 for on, 0 for off) */
|
||||
#define SPEEX_GET_VBR 13
|
||||
|
||||
/** Set quality value for VBR encoding (0-10) */
|
||||
#define SPEEX_SET_VBR_QUALITY 14
|
||||
/** Get current quality value for VBR encoding (0-10) */
|
||||
#define SPEEX_GET_VBR_QUALITY 15
|
||||
|
||||
/** Set complexity of the encoder (0-10) */
|
||||
#define SPEEX_SET_COMPLEXITY 16
|
||||
/** Get current complexity of the encoder (0-10) */
|
||||
#define SPEEX_GET_COMPLEXITY 17
|
||||
|
||||
/** Set bit-rate used by the encoder (or lower) */
|
||||
#define SPEEX_SET_BITRATE 18
|
||||
/** Get current bit-rate used by the encoder or decoder */
|
||||
#define SPEEX_GET_BITRATE 19
|
||||
|
||||
/** Define a handler function for in-band Speex request*/
|
||||
#define SPEEX_SET_HANDLER 20
|
||||
|
||||
/** Define a handler function for in-band user-defined request*/
|
||||
#define SPEEX_SET_USER_HANDLER 22
|
||||
|
||||
/** Set sampling rate used in bit-rate computation */
|
||||
#define SPEEX_SET_SAMPLING_RATE 24
|
||||
/** Get sampling rate used in bit-rate computation */
|
||||
#define SPEEX_GET_SAMPLING_RATE 25
|
||||
|
||||
/** Reset the encoder/decoder memories to zero*/
|
||||
#define SPEEX_RESET_STATE 26
|
||||
|
||||
/** Get VBR info (mostly used internally) */
|
||||
#define SPEEX_GET_RELATIVE_QUALITY 29
|
||||
|
||||
/** Set VAD status (1 for on, 0 for off) */
|
||||
#define SPEEX_SET_VAD 30
|
||||
|
||||
/** Get VAD status (1 for on, 0 for off) */
|
||||
#define SPEEX_GET_VAD 31
|
||||
|
||||
/** Set Average Bit-Rate (ABR) to n bits per seconds */
|
||||
#define SPEEX_SET_ABR 32
|
||||
/** Get Average Bit-Rate (ABR) setting (in bps) */
|
||||
#define SPEEX_GET_ABR 33
|
||||
|
||||
/** Set DTX status (1 for on, 0 for off) */
|
||||
#define SPEEX_SET_DTX 34
|
||||
/** Get DTX status (1 for on, 0 for off) */
|
||||
#define SPEEX_GET_DTX 35
|
||||
|
||||
/** Set submode encoding in each frame (1 for yes, 0 for no, setting to no breaks the standard) */
|
||||
#define SPEEX_SET_SUBMODE_ENCODING 36
|
||||
/** Get submode encoding in each frame */
|
||||
#define SPEEX_GET_SUBMODE_ENCODING 37
|
||||
|
||||
/*#define SPEEX_SET_LOOKAHEAD 38*/
|
||||
/** Returns the lookahead used by Speex */
|
||||
#define SPEEX_GET_LOOKAHEAD 39
|
||||
|
||||
/** Sets tuning for packet-loss concealment (expected loss rate) */
|
||||
#define SPEEX_SET_PLC_TUNING 40
|
||||
/** Gets tuning for PLC */
|
||||
#define SPEEX_GET_PLC_TUNING 41
|
||||
|
||||
/** Sets the max bit-rate allowed in VBR mode */
|
||||
#define SPEEX_SET_VBR_MAX_BITRATE 42
|
||||
/** Gets the max bit-rate allowed in VBR mode */
|
||||
#define SPEEX_GET_VBR_MAX_BITRATE 43
|
||||
|
||||
/** Turn on/off input/output high-pass filtering */
|
||||
#define SPEEX_SET_HIGHPASS 44
|
||||
/** Get status of input/output high-pass filtering */
|
||||
#define SPEEX_GET_HIGHPASS 45
|
||||
|
||||
/** Get "activity level" of the last decoded frame, i.e.
|
||||
how much damage we cause if we remove the frame */
|
||||
#define SPEEX_GET_ACTIVITY 47
|
||||
|
||||
|
||||
/* Preserving compatibility:*/
|
||||
/** Equivalent to SPEEX_SET_ENH */
|
||||
#define SPEEX_SET_PF 0
|
||||
/** Equivalent to SPEEX_GET_ENH */
|
||||
#define SPEEX_GET_PF 1
|
||||
|
||||
|
||||
|
||||
|
||||
/* Values allowed for mode queries */
|
||||
/** Query the frame size of a mode */
|
||||
#define SPEEX_MODE_FRAME_SIZE 0
|
||||
|
||||
/** Query the size of an encoded frame for a particular sub-mode */
|
||||
#define SPEEX_SUBMODE_BITS_PER_FRAME 1
|
||||
|
||||
|
||||
|
||||
/** Get major Speex version */
|
||||
#define SPEEX_LIB_GET_MAJOR_VERSION 1
|
||||
/** Get minor Speex version */
|
||||
#define SPEEX_LIB_GET_MINOR_VERSION 3
|
||||
/** Get micro Speex version */
|
||||
#define SPEEX_LIB_GET_MICRO_VERSION 5
|
||||
/** Get extra Speex version */
|
||||
#define SPEEX_LIB_GET_EXTRA_VERSION 7
|
||||
/** Get Speex version string */
|
||||
#define SPEEX_LIB_GET_VERSION_STRING 9
|
||||
|
||||
/*#define SPEEX_LIB_SET_ALLOC_FUNC 10
|
||||
#define SPEEX_LIB_GET_ALLOC_FUNC 11
|
||||
#define SPEEX_LIB_SET_FREE_FUNC 12
|
||||
#define SPEEX_LIB_GET_FREE_FUNC 13
|
||||
|
||||
#define SPEEX_LIB_SET_WARNING_FUNC 14
|
||||
#define SPEEX_LIB_GET_WARNING_FUNC 15
|
||||
#define SPEEX_LIB_SET_ERROR_FUNC 16
|
||||
#define SPEEX_LIB_GET_ERROR_FUNC 17
|
||||
*/
|
||||
|
||||
/** Number of defined modes in Speex */
|
||||
#define SPEEX_NB_MODES 3
|
||||
|
||||
/** modeID for the defined narrowband mode */
|
||||
#define SPEEX_MODEID_NB 0
|
||||
|
||||
/** modeID for the defined wideband mode */
|
||||
#define SPEEX_MODEID_WB 1
|
||||
|
||||
/** modeID for the defined ultra-wideband mode */
|
||||
#define SPEEX_MODEID_UWB 2
|
||||
|
||||
struct SpeexMode;
|
||||
|
||||
|
||||
/* Prototypes for mode function pointers */
|
||||
|
||||
/** Encoder state initialization function */
|
||||
typedef void *(*encoder_init_func)(const struct SpeexMode *mode);
|
||||
|
||||
/** Encoder state destruction function */
|
||||
typedef void (*encoder_destroy_func)(void *st);
|
||||
|
||||
/** Main encoding function */
|
||||
typedef int (*encode_func)(void *state, void *in, SpeexBits *bits);
|
||||
|
||||
/** Function for controlling the encoder options */
|
||||
typedef int (*encoder_ctl_func)(void *state, int request, void *ptr);
|
||||
|
||||
/** Decoder state initialization function */
|
||||
typedef void *(*decoder_init_func)(const struct SpeexMode *mode);
|
||||
|
||||
/** Decoder state destruction function */
|
||||
typedef void (*decoder_destroy_func)(void *st);
|
||||
|
||||
/** Main decoding function */
|
||||
typedef int (*decode_func)(void *state, SpeexBits *bits, void *out);
|
||||
|
||||
/** Function for controlling the decoder options */
|
||||
typedef int (*decoder_ctl_func)(void *state, int request, void *ptr);
|
||||
|
||||
|
||||
/** Query function for a mode */
|
||||
typedef int (*mode_query_func)(const void *mode, int request, void *ptr);
|
||||
|
||||
/** Struct defining a Speex mode */
|
||||
typedef struct SpeexMode {
|
||||
/** Pointer to the low-level mode data */
|
||||
const void *mode;
|
||||
|
||||
/** Pointer to the mode query function */
|
||||
mode_query_func query;
|
||||
|
||||
/** The name of the mode (you should not rely on this to identify the mode)*/
|
||||
const char *modeName;
|
||||
|
||||
/**ID of the mode*/
|
||||
int modeID;
|
||||
|
||||
/**Version number of the bitstream (incremented every time we break
|
||||
bitstream compatibility*/
|
||||
int bitstream_version;
|
||||
|
||||
/** Pointer to encoder initialization function */
|
||||
encoder_init_func enc_init;
|
||||
|
||||
/** Pointer to encoder destruction function */
|
||||
encoder_destroy_func enc_destroy;
|
||||
|
||||
/** Pointer to frame encoding function */
|
||||
encode_func enc;
|
||||
|
||||
/** Pointer to decoder initialization function */
|
||||
decoder_init_func dec_init;
|
||||
|
||||
/** Pointer to decoder destruction function */
|
||||
decoder_destroy_func dec_destroy;
|
||||
|
||||
/** Pointer to frame decoding function */
|
||||
decode_func dec;
|
||||
|
||||
/** ioctl-like requests for encoder */
|
||||
encoder_ctl_func enc_ctl;
|
||||
|
||||
/** ioctl-like requests for decoder */
|
||||
decoder_ctl_func dec_ctl;
|
||||
|
||||
} SpeexMode;
|
||||
|
||||
/**
|
||||
* Returns a handle to a newly created Speex encoder state structure. For now,
|
||||
* the "mode" argument can be &nb_mode or &wb_mode . In the future, more modes
|
||||
* may be added. Note that for now if you have more than one channels to
|
||||
* encode, you need one state per channel.
|
||||
*
|
||||
* @param mode The mode to use (either speex_nb_mode or speex_wb.mode)
|
||||
* @return A newly created encoder state or NULL if state allocation fails
|
||||
*/
|
||||
void *speex_encoder_init(const SpeexMode *mode);
|
||||
|
||||
/** Frees all resources associated to an existing Speex encoder state.
|
||||
* @param state Encoder state to be destroyed */
|
||||
void speex_encoder_destroy(void *state);
|
||||
|
||||
/** Uses an existing encoder state to encode one frame of speech pointed to by
|
||||
"in". The encoded bit-stream is saved in "bits".
|
||||
@param state Encoder state
|
||||
@param in Frame that will be encoded with a +-2^15 range. This data MAY be
|
||||
overwritten by the encoder and should be considered uninitialised
|
||||
after the call.
|
||||
@param bits Bit-stream where the data will be written
|
||||
@return 0 if frame needs not be transmitted (DTX only), 1 otherwise
|
||||
*/
|
||||
int speex_encode(void *state, float *in, SpeexBits *bits);
|
||||
|
||||
/** Uses an existing encoder state to encode one frame of speech pointed to by
|
||||
"in". The encoded bit-stream is saved in "bits".
|
||||
@param state Encoder state
|
||||
@param in Frame that will be encoded with a +-2^15 range
|
||||
@param bits Bit-stream where the data will be written
|
||||
@return 0 if frame needs not be transmitted (DTX only), 1 otherwise
|
||||
*/
|
||||
int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits);
|
||||
|
||||
/** Used like the ioctl function to control the encoder parameters
|
||||
*
|
||||
* @param state Encoder state
|
||||
* @param request ioctl-type request (one of the SPEEX_* macros)
|
||||
* @param ptr Data exchanged to-from function
|
||||
* @return 0 if no error, -1 if request in unknown, -2 for invalid parameter
|
||||
*/
|
||||
int speex_encoder_ctl(void *state, int request, void *ptr);
|
||||
|
||||
|
||||
/** Returns a handle to a newly created decoder state structure. For now,
|
||||
* the mode argument can be &nb_mode or &wb_mode . In the future, more modes
|
||||
* may be added. Note that for now if you have more than one channels to
|
||||
* decode, you need one state per channel.
|
||||
*
|
||||
* @param mode Speex mode (one of speex_nb_mode or speex_wb_mode)
|
||||
* @return A newly created decoder state or NULL if state allocation fails
|
||||
*/
|
||||
void *speex_decoder_init(const SpeexMode *mode);
|
||||
|
||||
/** Frees all resources associated to an existing decoder state.
|
||||
*
|
||||
* @param state State to be destroyed
|
||||
*/
|
||||
void speex_decoder_destroy(void *state);
|
||||
|
||||
/** Uses an existing decoder state to decode one frame of speech from
|
||||
* bit-stream bits. The output speech is saved written to out.
|
||||
*
|
||||
* @param state Decoder state
|
||||
* @param bits Bit-stream from which to decode the frame (NULL if the packet was lost)
|
||||
* @param out Where to write the decoded frame
|
||||
* @return return status (0 for no error, -1 for end of stream, -2 corrupt stream)
|
||||
*/
|
||||
int speex_decode(void *state, SpeexBits *bits, float *out);
|
||||
|
||||
/** Uses an existing decoder state to decode one frame of speech from
|
||||
* bit-stream bits. The output speech is saved written to out.
|
||||
*
|
||||
* @param state Decoder state
|
||||
* @param bits Bit-stream from which to decode the frame (NULL if the packet was lost)
|
||||
* @param out Where to write the decoded frame
|
||||
* @return return status (0 for no error, -1 for end of stream, -2 corrupt stream)
|
||||
*/
|
||||
int speex_decode_int(void *state, SpeexBits *bits, spx_int16_t *out);
|
||||
|
||||
/** Used like the ioctl function to control the encoder parameters
|
||||
*
|
||||
* @param state Decoder state
|
||||
* @param request ioctl-type request (one of the SPEEX_* macros)
|
||||
* @param ptr Data exchanged to-from function
|
||||
* @return 0 if no error, -1 if request in unknown, -2 for invalid parameter
|
||||
*/
|
||||
int speex_decoder_ctl(void *state, int request, void *ptr);
|
||||
|
||||
|
||||
/** Query function for mode information
|
||||
*
|
||||
* @param mode Speex mode
|
||||
* @param request ioctl-type request (one of the SPEEX_* macros)
|
||||
* @param ptr Data exchanged to-from function
|
||||
* @return 0 if no error, -1 if request in unknown, -2 for invalid parameter
|
||||
*/
|
||||
int speex_mode_query(const SpeexMode *mode, int request, void *ptr);
|
||||
|
||||
/** Functions for controlling the behavior of libspeex
|
||||
* @param request ioctl-type request (one of the SPEEX_LIB_* macros)
|
||||
* @param ptr Data exchanged to-from function
|
||||
* @return 0 if no error, -1 if request in unknown, -2 for invalid parameter
|
||||
*/
|
||||
int speex_lib_ctl(int request, void *ptr);
|
||||
|
||||
/** Default narrowband mode */
|
||||
extern const SpeexMode speex_nb_mode;
|
||||
|
||||
/** Default wideband mode */
|
||||
extern const SpeexMode speex_wb_mode;
|
||||
|
||||
/** Default "ultra-wideband" mode */
|
||||
extern const SpeexMode speex_uwb_mode;
|
||||
|
||||
/** List of all modes available */
|
||||
extern const SpeexMode * const speex_mode_list[SPEEX_NB_MODES];
|
||||
|
||||
/** Obtain one of the modes available */
|
||||
const SpeexMode * speex_lib_get_mode (int mode);
|
||||
|
||||
#ifndef WIN32
|
||||
/* We actually override the function in the narrowband case so that we can avoid linking in the wideband stuff */
|
||||
#define speex_lib_get_mode(mode) ((mode)==SPEEX_MODEID_NB ? &speex_nb_mode : speex_lib_get_mode (mode))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @}*/
|
||||
#endif
|
||||
174
jni/libspeex/include/speex/speex_bits.h
Normal file
@@ -0,0 +1,174 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin */
|
||||
/**
|
||||
@file speex_bits.h
|
||||
@brief Handles bit packing/unpacking
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef BITS_H
|
||||
#define BITS_H
|
||||
/** @defgroup SpeexBits SpeexBits: Bit-stream manipulations
|
||||
* This is the structure that holds the bit-stream when encoding or decoding
|
||||
* with Speex. It allows some manipulations as well.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Bit-packing data structure representing (part of) a bit-stream. */
|
||||
typedef struct SpeexBits {
|
||||
char *chars; /**< "raw" data */
|
||||
int nbBits; /**< Total number of bits stored in the stream*/
|
||||
int charPtr; /**< Position of the byte "cursor" */
|
||||
int bitPtr; /**< Position of the bit "cursor" within the current char */
|
||||
int owner; /**< Does the struct "own" the "raw" buffer (member "chars") */
|
||||
int overflow;/**< Set to one if we try to read past the valid data */
|
||||
int buf_size;/**< Allocated size for buffer */
|
||||
int reserved1; /**< Reserved for future use */
|
||||
void *reserved2; /**< Reserved for future use */
|
||||
} SpeexBits;
|
||||
|
||||
/** Initializes and allocates resources for a SpeexBits struct */
|
||||
void speex_bits_init(SpeexBits *bits);
|
||||
|
||||
/** Initializes SpeexBits struct using a pre-allocated buffer*/
|
||||
void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size);
|
||||
|
||||
/** Sets the bits in a SpeexBits struct to use data from an existing buffer (for decoding without copying data) */
|
||||
void speex_bits_set_bit_buffer(SpeexBits *bits, void *buff, int buf_size);
|
||||
|
||||
/** Frees all resources associated to a SpeexBits struct. Right now this does nothing since no resources are allocated, but this could change in the future.*/
|
||||
void speex_bits_destroy(SpeexBits *bits);
|
||||
|
||||
/** Resets bits to initial value (just after initialization, erasing content)*/
|
||||
void speex_bits_reset(SpeexBits *bits);
|
||||
|
||||
/** Rewind the bit-stream to the beginning (ready for read) without erasing the content */
|
||||
void speex_bits_rewind(SpeexBits *bits);
|
||||
|
||||
/** Initializes the bit-stream from the data in an area of memory */
|
||||
void speex_bits_read_from(SpeexBits *bits, char *bytes, int len);
|
||||
|
||||
/** Append bytes to the bit-stream
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @param bytes pointer to the bytes what will be appended
|
||||
* @param len Number of bytes of append
|
||||
*/
|
||||
void speex_bits_read_whole_bytes(SpeexBits *bits, char *bytes, int len);
|
||||
|
||||
/** Write the content of a bit-stream to an area of memory
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @param bytes Memory location where to write the bits
|
||||
* @param max_len Maximum number of bytes to write (i.e. size of the "bytes" buffer)
|
||||
* @return Number of bytes written to the "bytes" buffer
|
||||
*/
|
||||
int speex_bits_write(SpeexBits *bits, char *bytes, int max_len);
|
||||
|
||||
/** Like speex_bits_write, but writes only the complete bytes in the stream. Also removes the written bytes from the stream */
|
||||
int speex_bits_write_whole_bytes(SpeexBits *bits, char *bytes, int max_len);
|
||||
|
||||
/** Append bits to the bit-stream
|
||||
* @param bits Bit-stream to operate on
|
||||
* @param data Value to append as integer
|
||||
* @param nbBits number of bits to consider in "data"
|
||||
*/
|
||||
void speex_bits_pack(SpeexBits *bits, int data, int nbBits);
|
||||
|
||||
/** Interpret the next bits in the bit-stream as a signed integer
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @param nbBits Number of bits to interpret
|
||||
* @return A signed integer represented by the bits read
|
||||
*/
|
||||
int speex_bits_unpack_signed(SpeexBits *bits, int nbBits);
|
||||
|
||||
/** Interpret the next bits in the bit-stream as an unsigned integer
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @param nbBits Number of bits to interpret
|
||||
* @return An unsigned integer represented by the bits read
|
||||
*/
|
||||
unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits);
|
||||
|
||||
/** Returns the number of bytes in the bit-stream, including the last one even if it is not "full"
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @return Number of bytes in the stream
|
||||
*/
|
||||
int speex_bits_nbytes(SpeexBits *bits);
|
||||
|
||||
/** Same as speex_bits_unpack_unsigned, but without modifying the cursor position
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @param nbBits Number of bits to look for
|
||||
* @return Value of the bits peeked, interpreted as unsigned
|
||||
*/
|
||||
unsigned int speex_bits_peek_unsigned(SpeexBits *bits, int nbBits);
|
||||
|
||||
/** Get the value of the next bit in the stream, without modifying the
|
||||
* "cursor" position
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @return Value of the bit peeked (one bit only)
|
||||
*/
|
||||
int speex_bits_peek(SpeexBits *bits);
|
||||
|
||||
/** Advances the position of the "bit cursor" in the stream
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @param n Number of bits to advance
|
||||
*/
|
||||
void speex_bits_advance(SpeexBits *bits, int n);
|
||||
|
||||
/** Returns the number of bits remaining to be read in a stream
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
* @return Number of bits that can still be read from the stream
|
||||
*/
|
||||
int speex_bits_remaining(SpeexBits *bits);
|
||||
|
||||
/** Insert a terminator so that the data can be sent as a packet while auto-detecting
|
||||
* the number of frames in each packet
|
||||
*
|
||||
* @param bits Bit-stream to operate on
|
||||
*/
|
||||
void speex_bits_insert_terminator(SpeexBits *bits);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* @} */
|
||||
#endif
|
||||
68
jni/libspeex/include/speex/speex_buffer.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/* Copyright (C) 2007 Jean-Marc Valin
|
||||
|
||||
File: speex_buffer.h
|
||||
This is a very simple ring buffer implementation. It is not thread-safe
|
||||
so you need to do your own locking.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef SPEEX_BUFFER_H
|
||||
#define SPEEX_BUFFER_H
|
||||
|
||||
#include "speex/speex_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct SpeexBuffer_;
|
||||
typedef struct SpeexBuffer_ SpeexBuffer;
|
||||
|
||||
SpeexBuffer *speex_buffer_init(int size);
|
||||
|
||||
void speex_buffer_destroy(SpeexBuffer *st);
|
||||
|
||||
int speex_buffer_write(SpeexBuffer *st, void *data, int len);
|
||||
|
||||
int speex_buffer_writezeros(SpeexBuffer *st, int len);
|
||||
|
||||
int speex_buffer_read(SpeexBuffer *st, void *data, int len);
|
||||
|
||||
int speex_buffer_get_available(SpeexBuffer *st);
|
||||
|
||||
int speex_buffer_resize(SpeexBuffer *st, int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
134
jni/libspeex/include/speex/speex_callbacks.h
Normal file
@@ -0,0 +1,134 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin*/
|
||||
/**
|
||||
@file speex_callbacks.h
|
||||
@brief Describes callback handling and in-band signalling
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef SPEEX_CALLBACKS_H
|
||||
#define SPEEX_CALLBACKS_H
|
||||
/** @defgroup SpeexCallbacks Various definitions for Speex callbacks supported by the decoder.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "speex.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Total number of callbacks */
|
||||
#define SPEEX_MAX_CALLBACKS 16
|
||||
|
||||
/* Describes all the in-band requests */
|
||||
|
||||
/*These are 1-bit requests*/
|
||||
/** Request for perceptual enhancement (1 for on, 0 for off) */
|
||||
#define SPEEX_INBAND_ENH_REQUEST 0
|
||||
/** Reserved */
|
||||
#define SPEEX_INBAND_RESERVED1 1
|
||||
|
||||
/*These are 4-bit requests*/
|
||||
/** Request for a mode change */
|
||||
#define SPEEX_INBAND_MODE_REQUEST 2
|
||||
/** Request for a low mode change */
|
||||
#define SPEEX_INBAND_LOW_MODE_REQUEST 3
|
||||
/** Request for a high mode change */
|
||||
#define SPEEX_INBAND_HIGH_MODE_REQUEST 4
|
||||
/** Request for VBR (1 on, 0 off) */
|
||||
#define SPEEX_INBAND_VBR_QUALITY_REQUEST 5
|
||||
/** Request to be sent acknowledge */
|
||||
#define SPEEX_INBAND_ACKNOWLEDGE_REQUEST 6
|
||||
/** Request for VBR (1 for on, 0 for off) */
|
||||
#define SPEEX_INBAND_VBR_REQUEST 7
|
||||
|
||||
/*These are 8-bit requests*/
|
||||
/** Send a character in-band */
|
||||
#define SPEEX_INBAND_CHAR 8
|
||||
/** Intensity stereo information */
|
||||
#define SPEEX_INBAND_STEREO 9
|
||||
|
||||
/*These are 16-bit requests*/
|
||||
/** Transmit max bit-rate allowed */
|
||||
#define SPEEX_INBAND_MAX_BITRATE 10
|
||||
|
||||
/*These are 32-bit requests*/
|
||||
/** Acknowledge packet reception */
|
||||
#define SPEEX_INBAND_ACKNOWLEDGE 12
|
||||
|
||||
/** Callback function type */
|
||||
typedef int (*speex_callback_func)(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
/** Callback information */
|
||||
typedef struct SpeexCallback {
|
||||
int callback_id; /**< ID associated to the callback */
|
||||
speex_callback_func func; /**< Callback handler function */
|
||||
void *data; /**< Data that will be sent to the handler */
|
||||
void *reserved1; /**< Reserved for future use */
|
||||
int reserved2; /**< Reserved for future use */
|
||||
} SpeexCallback;
|
||||
|
||||
/** Handle in-band request */
|
||||
int speex_inband_handler(SpeexBits *bits, SpeexCallback *callback_list, void *state);
|
||||
|
||||
/** Standard handler for mode request (change mode, no questions asked) */
|
||||
int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
/** Standard handler for high mode request (change high mode, no questions asked) */
|
||||
int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
/** Standard handler for in-band characters (write to stderr) */
|
||||
int speex_std_char_handler(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
/** Default handler for user-defined requests: in this case, just ignore */
|
||||
int speex_default_user_handler(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
|
||||
|
||||
/** Standard handler for low mode request (change low mode, no questions asked) */
|
||||
int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
/** Standard handler for VBR request (Set VBR, no questions asked) */
|
||||
int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
/** Standard handler for enhancer request (Turn enhancer on/off, no questions asked) */
|
||||
int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
/** Standard handler for VBR quality request (Set VBR quality, no questions asked) */
|
||||
int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *data);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
||||
11
jni/libspeex/include/speex/speex_config_types.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef __SPEEX_TYPES_H__
|
||||
#define __SPEEX_TYPES_H__
|
||||
|
||||
/* these are filled in by configure */
|
||||
typedef short spx_int16_t;
|
||||
typedef unsigned short spx_uint16_t;
|
||||
typedef int spx_int32_t;
|
||||
typedef unsigned int spx_uint32_t;
|
||||
|
||||
#endif
|
||||
|
||||
11
jni/libspeex/include/speex/speex_config_types.h.in
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef __SPEEX_TYPES_H__
|
||||
#define __SPEEX_TYPES_H__
|
||||
|
||||
/* these are filled in by configure */
|
||||
typedef @SIZE16@ spx_int16_t;
|
||||
typedef unsigned @SIZE16@ spx_uint16_t;
|
||||
typedef @SIZE32@ spx_int32_t;
|
||||
typedef unsigned @SIZE32@ spx_uint32_t;
|
||||
|
||||
#endif
|
||||
|
||||
170
jni/libspeex/include/speex/speex_echo.h
Normal file
@@ -0,0 +1,170 @@
|
||||
/* Copyright (C) Jean-Marc Valin */
|
||||
/**
|
||||
@file speex_echo.h
|
||||
@brief Echo cancellation
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef SPEEX_ECHO_H
|
||||
#define SPEEX_ECHO_H
|
||||
/** @defgroup SpeexEchoState SpeexEchoState: Acoustic echo canceller
|
||||
* This is the acoustic echo canceller module.
|
||||
* @{
|
||||
*/
|
||||
#include "speex/speex_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Obtain frame size used by the AEC */
|
||||
#define SPEEX_ECHO_GET_FRAME_SIZE 3
|
||||
|
||||
/** Set sampling rate */
|
||||
#define SPEEX_ECHO_SET_SAMPLING_RATE 24
|
||||
/** Get sampling rate */
|
||||
#define SPEEX_ECHO_GET_SAMPLING_RATE 25
|
||||
|
||||
/* Can't set window sizes */
|
||||
/** Get size of impulse response (int32) */
|
||||
#define SPEEX_ECHO_GET_IMPULSE_RESPONSE_SIZE 27
|
||||
|
||||
/* Can't set window content */
|
||||
/** Get impulse response (int32[]) */
|
||||
#define SPEEX_ECHO_GET_IMPULSE_RESPONSE 29
|
||||
|
||||
/** Internal echo canceller state. Should never be accessed directly. */
|
||||
struct SpeexEchoState_;
|
||||
|
||||
/** @class SpeexEchoState
|
||||
* This holds the state of the echo canceller. You need one per channel.
|
||||
*/
|
||||
|
||||
/** Internal echo canceller state. Should never be accessed directly. */
|
||||
typedef struct SpeexEchoState_ SpeexEchoState;
|
||||
|
||||
/** Creates a new echo canceller state
|
||||
* @param frame_size Number of samples to process at one time (should correspond to 10-20 ms)
|
||||
* @param filter_length Number of samples of echo to cancel (should generally correspond to 100-500 ms)
|
||||
* @return Newly-created echo canceller state
|
||||
*/
|
||||
SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length);
|
||||
|
||||
/** Creates a new multi-channel echo canceller state
|
||||
* @param frame_size Number of samples to process at one time (should correspond to 10-20 ms)
|
||||
* @param filter_length Number of samples of echo to cancel (should generally correspond to 100-500 ms)
|
||||
* @param nb_mic Number of microphone channels
|
||||
* @param nb_speakers Number of speaker channels
|
||||
* @return Newly-created echo canceller state
|
||||
*/
|
||||
SpeexEchoState *speex_echo_state_init_mc(int frame_size, int filter_length, int nb_mic, int nb_speakers);
|
||||
|
||||
/** Destroys an echo canceller state
|
||||
* @param st Echo canceller state
|
||||
*/
|
||||
void speex_echo_state_destroy(SpeexEchoState *st);
|
||||
|
||||
/** Performs echo cancellation a frame, based on the audio sent to the speaker (no delay is added
|
||||
* to playback in this form)
|
||||
*
|
||||
* @param st Echo canceller state
|
||||
* @param rec Signal from the microphone (near end + far end echo)
|
||||
* @param play Signal played to the speaker (received from far end)
|
||||
* @param out Returns near-end signal with echo removed
|
||||
*/
|
||||
void speex_echo_cancellation(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out);
|
||||
|
||||
/** Performs echo cancellation a frame (deprecated) */
|
||||
void speex_echo_cancel(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out, spx_int32_t *Yout);
|
||||
|
||||
/** Perform echo cancellation using internal playback buffer, which is delayed by two frames
|
||||
* to account for the delay introduced by most soundcards (but it could be off!)
|
||||
* @param st Echo canceller state
|
||||
* @param rec Signal from the microphone (near end + far end echo)
|
||||
* @param out Returns near-end signal with echo removed
|
||||
*/
|
||||
void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out);
|
||||
|
||||
/** Let the echo canceller know that a frame was just queued to the soundcard
|
||||
* @param st Echo canceller state
|
||||
* @param play Signal played to the speaker (received from far end)
|
||||
*/
|
||||
void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play);
|
||||
|
||||
/** Reset the echo canceller to its original state
|
||||
* @param st Echo canceller state
|
||||
*/
|
||||
void speex_echo_state_reset(SpeexEchoState *st);
|
||||
|
||||
/** Used like the ioctl function to control the echo canceller parameters
|
||||
*
|
||||
* @param st Echo canceller state
|
||||
* @param request ioctl-type request (one of the SPEEX_ECHO_* macros)
|
||||
* @param ptr Data exchanged to-from function
|
||||
* @return 0 if no error, -1 if request in unknown
|
||||
*/
|
||||
int speex_echo_ctl(SpeexEchoState *st, int request, void *ptr);
|
||||
|
||||
|
||||
|
||||
struct SpeexDecorrState_;
|
||||
|
||||
typedef struct SpeexDecorrState_ SpeexDecorrState;
|
||||
|
||||
|
||||
/** Create a state for the channel decorrelation algorithm
|
||||
This is useful for multi-channel echo cancellation only
|
||||
* @param rate Sampling rate
|
||||
* @param channels Number of channels (it's a bit pointless if you don't have at least 2)
|
||||
* @param frame_size Size of the frame to process at ones (counting samples *per* channel)
|
||||
*/
|
||||
SpeexDecorrState *speex_decorrelate_new(int rate, int channels, int frame_size);
|
||||
|
||||
/** Remove correlation between the channels by modifying the phase and possibly
|
||||
adding noise in a way that is not (or little) perceptible.
|
||||
* @param st Decorrelator state
|
||||
* @param in Input audio in interleaved format
|
||||
* @param out Result of the decorrelation (out *may* alias in)
|
||||
* @param strength How much alteration of the audio to apply from 0 to 100.
|
||||
*/
|
||||
void speex_decorrelate(SpeexDecorrState *st, const spx_int16_t *in, spx_int16_t *out, int strength);
|
||||
|
||||
/** Destroy a Decorrelation state
|
||||
* @param st State to destroy
|
||||
*/
|
||||
void speex_decorrelate_destroy(SpeexDecorrState *st);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/** @}*/
|
||||
#endif
|
||||
94
jni/libspeex/include/speex/speex_header.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin */
|
||||
/**
|
||||
@file speex_header.h
|
||||
@brief Describes the Speex header
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SPEEX_HEADER_H
|
||||
#define SPEEX_HEADER_H
|
||||
/** @defgroup SpeexHeader SpeexHeader: Makes it easy to write/parse an Ogg/Speex header
|
||||
* This is the Speex header for the Ogg encapsulation. You don't need that if you just use RTP.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "speex/speex_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct SpeexMode;
|
||||
|
||||
/** Length of the Speex header identifier */
|
||||
#define SPEEX_HEADER_STRING_LENGTH 8
|
||||
|
||||
/** Maximum number of characters for encoding the Speex version number in the header */
|
||||
#define SPEEX_HEADER_VERSION_LENGTH 20
|
||||
|
||||
/** Speex header info for file-based formats */
|
||||
typedef struct SpeexHeader {
|
||||
char speex_string[SPEEX_HEADER_STRING_LENGTH]; /**< Identifies a Speex bit-stream, always set to "Speex " */
|
||||
char speex_version[SPEEX_HEADER_VERSION_LENGTH]; /**< Speex version */
|
||||
spx_int32_t speex_version_id; /**< Version for Speex (for checking compatibility) */
|
||||
spx_int32_t header_size; /**< Total size of the header ( sizeof(SpeexHeader) ) */
|
||||
spx_int32_t rate; /**< Sampling rate used */
|
||||
spx_int32_t mode; /**< Mode used (0 for narrowband, 1 for wideband) */
|
||||
spx_int32_t mode_bitstream_version; /**< Version ID of the bit-stream */
|
||||
spx_int32_t nb_channels; /**< Number of channels encoded */
|
||||
spx_int32_t bitrate; /**< Bit-rate used */
|
||||
spx_int32_t frame_size; /**< Size of frames */
|
||||
spx_int32_t vbr; /**< 1 for a VBR encoding, 0 otherwise */
|
||||
spx_int32_t frames_per_packet; /**< Number of frames stored per Ogg packet */
|
||||
spx_int32_t extra_headers; /**< Number of additional headers after the comments */
|
||||
spx_int32_t reserved1; /**< Reserved for future use, must be zero */
|
||||
spx_int32_t reserved2; /**< Reserved for future use, must be zero */
|
||||
} SpeexHeader;
|
||||
|
||||
/** Initializes a SpeexHeader using basic information */
|
||||
void speex_init_header(SpeexHeader *header, int rate, int nb_channels, const struct SpeexMode *m);
|
||||
|
||||
/** Creates the header packet from the header itself (mostly involves endianness conversion) */
|
||||
char *speex_header_to_packet(SpeexHeader *header, int *size);
|
||||
|
||||
/** Creates a SpeexHeader from a packet */
|
||||
SpeexHeader *speex_packet_to_header(char *packet, int size);
|
||||
|
||||
/** Frees the memory allocated by either speex_header_to_packet() or speex_packet_to_header() */
|
||||
void speex_header_free(void *ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
||||
197
jni/libspeex/include/speex/speex_jitter.h
Normal file
@@ -0,0 +1,197 @@
|
||||
/* Copyright (C) 2002 Jean-Marc Valin */
|
||||
/**
|
||||
@file speex_jitter.h
|
||||
@brief Adaptive jitter buffer for Speex
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef SPEEX_JITTER_H
|
||||
#define SPEEX_JITTER_H
|
||||
/** @defgroup JitterBuffer JitterBuffer: Adaptive jitter buffer
|
||||
* This is the jitter buffer that reorders UDP/RTP packets and adjusts the buffer size
|
||||
* to maintain good quality and low latency.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "speex/speex_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Generic adaptive jitter buffer state */
|
||||
struct JitterBuffer_;
|
||||
|
||||
/** Generic adaptive jitter buffer state */
|
||||
typedef struct JitterBuffer_ JitterBuffer;
|
||||
|
||||
/** Definition of an incoming packet */
|
||||
typedef struct _JitterBufferPacket JitterBufferPacket;
|
||||
|
||||
/** Definition of an incoming packet */
|
||||
struct _JitterBufferPacket {
|
||||
char *data; /**< Data bytes contained in the packet */
|
||||
spx_uint32_t len; /**< Length of the packet in bytes */
|
||||
spx_uint32_t timestamp; /**< Timestamp for the packet */
|
||||
spx_uint32_t span; /**< Time covered by the packet (same units as timestamp) */
|
||||
spx_uint16_t sequence; /**< RTP Sequence number if available (0 otherwise) */
|
||||
spx_uint32_t user_data; /**< Put whatever data you like here (it's ignored by the jitter buffer) */
|
||||
};
|
||||
|
||||
/** Packet has been retrieved */
|
||||
#define JITTER_BUFFER_OK 0
|
||||
/** Packet is lost or is late */
|
||||
#define JITTER_BUFFER_MISSING 1
|
||||
/** A "fake" packet is meant to be inserted here to increase buffering */
|
||||
#define JITTER_BUFFER_INSERTION 2
|
||||
/** There was an error in the jitter buffer */
|
||||
#define JITTER_BUFFER_INTERNAL_ERROR -1
|
||||
/** Invalid argument */
|
||||
#define JITTER_BUFFER_BAD_ARGUMENT -2
|
||||
|
||||
|
||||
/** Set minimum amount of extra buffering required (margin) */
|
||||
#define JITTER_BUFFER_SET_MARGIN 0
|
||||
/** Get minimum amount of extra buffering required (margin) */
|
||||
#define JITTER_BUFFER_GET_MARGIN 1
|
||||
/* JITTER_BUFFER_SET_AVAILABLE_COUNT wouldn't make sense */
|
||||
|
||||
/** Get the amount of available packets currently buffered */
|
||||
#define JITTER_BUFFER_GET_AVAILABLE_COUNT 3
|
||||
/** Included because of an early misspelling (will remove in next release) */
|
||||
#define JITTER_BUFFER_GET_AVALIABLE_COUNT 3
|
||||
|
||||
/** Assign a function to destroy unused packet. When setting that, the jitter
|
||||
buffer no longer copies packet data. */
|
||||
#define JITTER_BUFFER_SET_DESTROY_CALLBACK 4
|
||||
/** */
|
||||
#define JITTER_BUFFER_GET_DESTROY_CALLBACK 5
|
||||
|
||||
/** Tell the jitter buffer to only adjust the delay in multiples of the step parameter provided */
|
||||
#define JITTER_BUFFER_SET_DELAY_STEP 6
|
||||
/** */
|
||||
#define JITTER_BUFFER_GET_DELAY_STEP 7
|
||||
|
||||
/** Tell the jitter buffer to only do concealment in multiples of the size parameter provided */
|
||||
#define JITTER_BUFFER_SET_CONCEALMENT_SIZE 8
|
||||
#define JITTER_BUFFER_GET_CONCEALMENT_SIZE 9
|
||||
|
||||
/** Absolute max amount of loss that can be tolerated regardless of the delay. Typical loss
|
||||
should be half of that or less. */
|
||||
#define JITTER_BUFFER_SET_MAX_LATE_RATE 10
|
||||
#define JITTER_BUFFER_GET_MAX_LATE_RATE 11
|
||||
|
||||
/** Equivalent cost of one percent late packet in timestamp units */
|
||||
#define JITTER_BUFFER_SET_LATE_COST 12
|
||||
#define JITTER_BUFFER_GET_LATE_COST 13
|
||||
|
||||
|
||||
/** Initialises jitter buffer
|
||||
*
|
||||
* @param step_size Starting value for the size of concleanment packets and delay
|
||||
adjustment steps. Can be changed at any time using JITTER_BUFFER_SET_DELAY_STEP
|
||||
and JITTER_BUFFER_GET_CONCEALMENT_SIZE.
|
||||
* @return Newly created jitter buffer state
|
||||
*/
|
||||
JitterBuffer *jitter_buffer_init(int step_size);
|
||||
|
||||
/** Restores jitter buffer to its original state
|
||||
*
|
||||
* @param jitter Jitter buffer state
|
||||
*/
|
||||
void jitter_buffer_reset(JitterBuffer *jitter);
|
||||
|
||||
/** Destroys jitter buffer
|
||||
*
|
||||
* @param jitter Jitter buffer state
|
||||
*/
|
||||
void jitter_buffer_destroy(JitterBuffer *jitter);
|
||||
|
||||
/** Put one packet into the jitter buffer
|
||||
*
|
||||
* @param jitter Jitter buffer state
|
||||
* @param packet Incoming packet
|
||||
*/
|
||||
void jitter_buffer_put(JitterBuffer *jitter, const JitterBufferPacket *packet);
|
||||
|
||||
/** Get one packet from the jitter buffer
|
||||
*
|
||||
* @param jitter Jitter buffer state
|
||||
* @param packet Returned packet
|
||||
* @param desired_span Number of samples (or units) we wish to get from the buffer (no guarantee)
|
||||
* @param current_timestamp Timestamp for the returned packet
|
||||
*/
|
||||
int jitter_buffer_get(JitterBuffer *jitter, JitterBufferPacket *packet, spx_int32_t desired_span, spx_int32_t *start_offset);
|
||||
|
||||
/** Used right after jitter_buffer_get() to obtain another packet that would have the same timestamp.
|
||||
* This is mainly useful for media where a single "frame" can be split into several packets.
|
||||
*
|
||||
* @param jitter Jitter buffer state
|
||||
* @param packet Returned packet
|
||||
*/
|
||||
int jitter_buffer_get_another(JitterBuffer *jitter, JitterBufferPacket *packet);
|
||||
|
||||
/** Get pointer timestamp of jitter buffer
|
||||
*
|
||||
* @param jitter Jitter buffer state
|
||||
*/
|
||||
int jitter_buffer_get_pointer_timestamp(JitterBuffer *jitter);
|
||||
|
||||
/** Advance by one tick
|
||||
*
|
||||
* @param jitter Jitter buffer state
|
||||
*/
|
||||
void jitter_buffer_tick(JitterBuffer *jitter);
|
||||
|
||||
/** Telling the jitter buffer about the remaining data in the application buffer
|
||||
* @param jitter Jitter buffer state
|
||||
* @param rem Amount of data buffered by the application (timestamp units)
|
||||
*/
|
||||
void jitter_buffer_remaining_span(JitterBuffer *jitter, spx_uint32_t rem);
|
||||
|
||||
/** Used like the ioctl function to control the jitter buffer parameters
|
||||
*
|
||||
* @param jitter Jitter buffer state
|
||||
* @param request ioctl-type request (one of the JITTER_BUFFER_* macros)
|
||||
* @param ptr Data exchanged to-from function
|
||||
* @return 0 if no error, -1 if request in unknown
|
||||
*/
|
||||
int jitter_buffer_ctl(JitterBuffer *jitter, int request, void *ptr);
|
||||
|
||||
int jitter_buffer_update_delay(JitterBuffer *jitter, JitterBufferPacket *packet, spx_int32_t *start_offset);
|
||||
|
||||
/* @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
219
jni/libspeex/include/speex/speex_preprocess.h
Normal file
@@ -0,0 +1,219 @@
|
||||
/* Copyright (C) 2003 Epic Games
|
||||
Written by Jean-Marc Valin */
|
||||
/**
|
||||
* @file speex_preprocess.h
|
||||
* @brief Speex preprocessor. The preprocess can do noise suppression,
|
||||
* residual echo suppression (after using the echo canceller), automatic
|
||||
* gain control (AGC) and voice activity detection (VAD).
|
||||
*/
|
||||
/*
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef SPEEX_PREPROCESS_H
|
||||
#define SPEEX_PREPROCESS_H
|
||||
/** @defgroup SpeexPreprocessState SpeexPreprocessState: The Speex preprocessor
|
||||
* This is the Speex preprocessor. The preprocess can do noise suppression,
|
||||
* residual echo suppression (after using the echo canceller), automatic
|
||||
* gain control (AGC) and voice activity detection (VAD).
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "speex/speex_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** State of the preprocessor (one per channel). Should never be accessed directly. */
|
||||
struct SpeexPreprocessState_;
|
||||
|
||||
/** State of the preprocessor (one per channel). Should never be accessed directly. */
|
||||
typedef struct SpeexPreprocessState_ SpeexPreprocessState;
|
||||
|
||||
|
||||
/** Creates a new preprocessing state. You MUST create one state per channel processed.
|
||||
* @param frame_size Number of samples to process at one time (should correspond to 10-20 ms). Must be
|
||||
* the same value as that used for the echo canceller for residual echo cancellation to work.
|
||||
* @param sampling_rate Sampling rate used for the input.
|
||||
* @return Newly created preprocessor state
|
||||
*/
|
||||
SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate);
|
||||
|
||||
/** Destroys a preprocessor state
|
||||
* @param st Preprocessor state to destroy
|
||||
*/
|
||||
void speex_preprocess_state_destroy(SpeexPreprocessState *st);
|
||||
|
||||
/** Preprocess a frame
|
||||
* @param st Preprocessor state
|
||||
* @param x Audio sample vector (in and out). Must be same size as specified in speex_preprocess_state_init().
|
||||
* @return Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on.
|
||||
*/
|
||||
int speex_preprocess_run(SpeexPreprocessState *st, spx_int16_t *x);
|
||||
|
||||
/** Preprocess a frame (deprecated, use speex_preprocess_run() instead)*/
|
||||
int speex_preprocess(SpeexPreprocessState *st, spx_int16_t *x, spx_int32_t *echo);
|
||||
|
||||
/** Update preprocessor state, but do not compute the output
|
||||
* @param st Preprocessor state
|
||||
* @param x Audio sample vector (in only). Must be same size as specified in speex_preprocess_state_init().
|
||||
*/
|
||||
void speex_preprocess_estimate_update(SpeexPreprocessState *st, spx_int16_t *x);
|
||||
|
||||
/** Used like the ioctl function to control the preprocessor parameters
|
||||
* @param st Preprocessor state
|
||||
* @param request ioctl-type request (one of the SPEEX_PREPROCESS_* macros)
|
||||
* @param ptr Data exchanged to-from function
|
||||
* @return 0 if no error, -1 if request in unknown
|
||||
*/
|
||||
int speex_preprocess_ctl(SpeexPreprocessState *st, int request, void *ptr);
|
||||
|
||||
|
||||
|
||||
/** Set preprocessor denoiser state */
|
||||
#define SPEEX_PREPROCESS_SET_DENOISE 0
|
||||
/** Get preprocessor denoiser state */
|
||||
#define SPEEX_PREPROCESS_GET_DENOISE 1
|
||||
|
||||
/** Set preprocessor Automatic Gain Control state */
|
||||
#define SPEEX_PREPROCESS_SET_AGC 2
|
||||
/** Get preprocessor Automatic Gain Control state */
|
||||
#define SPEEX_PREPROCESS_GET_AGC 3
|
||||
|
||||
/** Set preprocessor Voice Activity Detection state */
|
||||
#define SPEEX_PREPROCESS_SET_VAD 4
|
||||
/** Get preprocessor Voice Activity Detection state */
|
||||
#define SPEEX_PREPROCESS_GET_VAD 5
|
||||
|
||||
/** Set preprocessor Automatic Gain Control level (float) */
|
||||
#define SPEEX_PREPROCESS_SET_AGC_LEVEL 6
|
||||
/** Get preprocessor Automatic Gain Control level (float) */
|
||||
#define SPEEX_PREPROCESS_GET_AGC_LEVEL 7
|
||||
|
||||
/** Set preprocessor dereverb state */
|
||||
#define SPEEX_PREPROCESS_SET_DEREVERB 8
|
||||
/** Get preprocessor dereverb state */
|
||||
#define SPEEX_PREPROCESS_GET_DEREVERB 9
|
||||
|
||||
/** Set preprocessor dereverb level */
|
||||
#define SPEEX_PREPROCESS_SET_DEREVERB_LEVEL 10
|
||||
/** Get preprocessor dereverb level */
|
||||
#define SPEEX_PREPROCESS_GET_DEREVERB_LEVEL 11
|
||||
|
||||
/** Set preprocessor dereverb decay */
|
||||
#define SPEEX_PREPROCESS_SET_DEREVERB_DECAY 12
|
||||
/** Get preprocessor dereverb decay */
|
||||
#define SPEEX_PREPROCESS_GET_DEREVERB_DECAY 13
|
||||
|
||||
/** Set probability required for the VAD to go from silence to voice */
|
||||
#define SPEEX_PREPROCESS_SET_PROB_START 14
|
||||
/** Get probability required for the VAD to go from silence to voice */
|
||||
#define SPEEX_PREPROCESS_GET_PROB_START 15
|
||||
|
||||
/** Set probability required for the VAD to stay in the voice state (integer percent) */
|
||||
#define SPEEX_PREPROCESS_SET_PROB_CONTINUE 16
|
||||
/** Get probability required for the VAD to stay in the voice state (integer percent) */
|
||||
#define SPEEX_PREPROCESS_GET_PROB_CONTINUE 17
|
||||
|
||||
/** Set maximum attenuation of the noise in dB (negative number) */
|
||||
#define SPEEX_PREPROCESS_SET_NOISE_SUPPRESS 18
|
||||
/** Get maximum attenuation of the noise in dB (negative number) */
|
||||
#define SPEEX_PREPROCESS_GET_NOISE_SUPPRESS 19
|
||||
|
||||
/** Set maximum attenuation of the residual echo in dB (negative number) */
|
||||
#define SPEEX_PREPROCESS_SET_ECHO_SUPPRESS 20
|
||||
/** Get maximum attenuation of the residual echo in dB (negative number) */
|
||||
#define SPEEX_PREPROCESS_GET_ECHO_SUPPRESS 21
|
||||
|
||||
/** Set maximum attenuation of the residual echo in dB when near end is active (negative number) */
|
||||
#define SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE 22
|
||||
/** Get maximum attenuation of the residual echo in dB when near end is active (negative number) */
|
||||
#define SPEEX_PREPROCESS_GET_ECHO_SUPPRESS_ACTIVE 23
|
||||
|
||||
/** Set the corresponding echo canceller state so that residual echo suppression can be performed (NULL for no residual echo suppression) */
|
||||
#define SPEEX_PREPROCESS_SET_ECHO_STATE 24
|
||||
/** Get the corresponding echo canceller state */
|
||||
#define SPEEX_PREPROCESS_GET_ECHO_STATE 25
|
||||
|
||||
/** Set maximal gain increase in dB/second (int32) */
|
||||
#define SPEEX_PREPROCESS_SET_AGC_INCREMENT 26
|
||||
|
||||
/** Get maximal gain increase in dB/second (int32) */
|
||||
#define SPEEX_PREPROCESS_GET_AGC_INCREMENT 27
|
||||
|
||||
/** Set maximal gain decrease in dB/second (int32) */
|
||||
#define SPEEX_PREPROCESS_SET_AGC_DECREMENT 28
|
||||
|
||||
/** Get maximal gain decrease in dB/second (int32) */
|
||||
#define SPEEX_PREPROCESS_GET_AGC_DECREMENT 29
|
||||
|
||||
/** Set maximal gain in dB (int32) */
|
||||
#define SPEEX_PREPROCESS_SET_AGC_MAX_GAIN 30
|
||||
|
||||
/** Get maximal gain in dB (int32) */
|
||||
#define SPEEX_PREPROCESS_GET_AGC_MAX_GAIN 31
|
||||
|
||||
/* Can't set loudness */
|
||||
/** Get loudness */
|
||||
#define SPEEX_PREPROCESS_GET_AGC_LOUDNESS 33
|
||||
|
||||
/* Can't set gain */
|
||||
/** Get current gain (int32 percent) */
|
||||
#define SPEEX_PREPROCESS_GET_AGC_GAIN 35
|
||||
|
||||
/* Can't set spectrum size */
|
||||
/** Get spectrum size for power spectrum (int32) */
|
||||
#define SPEEX_PREPROCESS_GET_PSD_SIZE 37
|
||||
|
||||
/* Can't set power spectrum */
|
||||
/** Get power spectrum (int32[] of squared values) */
|
||||
#define SPEEX_PREPROCESS_GET_PSD 39
|
||||
|
||||
/* Can't set noise size */
|
||||
/** Get spectrum size for noise estimate (int32) */
|
||||
#define SPEEX_PREPROCESS_GET_NOISE_PSD_SIZE 41
|
||||
|
||||
/* Can't set noise estimate */
|
||||
/** Get noise estimate (int32[] of squared values) */
|
||||
#define SPEEX_PREPROCESS_GET_NOISE_PSD 43
|
||||
|
||||
/* Can't set speech probability */
|
||||
/** Get speech probability in last frame (int32). */
|
||||
#define SPEEX_PREPROCESS_GET_PROB 45
|
||||
|
||||
/** Set preprocessor Automatic Gain Control level (int32) */
|
||||
#define SPEEX_PREPROCESS_SET_AGC_TARGET 46
|
||||
/** Get preprocessor Automatic Gain Control level (int32) */
|
||||
#define SPEEX_PREPROCESS_GET_AGC_TARGET 47
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @}*/
|
||||
#endif
|
||||
340
jni/libspeex/include/speex/speex_resampler.h
Normal file
@@ -0,0 +1,340 @@
|
||||
/* Copyright (C) 2007 Jean-Marc Valin
|
||||
|
||||
File: speex_resampler.h
|
||||
Resampling code
|
||||
|
||||
The design goals of this code are:
|
||||
- Very fast algorithm
|
||||
- Low memory requirement
|
||||
- Good *perceptual* quality (and not best SNR)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SPEEX_RESAMPLER_H
|
||||
#define SPEEX_RESAMPLER_H
|
||||
|
||||
#ifdef OUTSIDE_SPEEX
|
||||
|
||||
/********* WARNING: MENTAL SANITY ENDS HERE *************/
|
||||
|
||||
/* If the resampler is defined outside of Speex, we change the symbol names so that
|
||||
there won't be any clash if linking with Speex later on. */
|
||||
|
||||
/* #define RANDOM_PREFIX your software name here */
|
||||
#ifndef RANDOM_PREFIX
|
||||
#error "Please define RANDOM_PREFIX (above) to something specific to your project to prevent symbol name clashes"
|
||||
#endif
|
||||
|
||||
#define CAT_PREFIX2(a,b) a ## b
|
||||
#define CAT_PREFIX(a,b) CAT_PREFIX2(a, b)
|
||||
|
||||
#define speex_resampler_init CAT_PREFIX(RANDOM_PREFIX,_resampler_init)
|
||||
#define speex_resampler_init_frac CAT_PREFIX(RANDOM_PREFIX,_resampler_init_frac)
|
||||
#define speex_resampler_destroy CAT_PREFIX(RANDOM_PREFIX,_resampler_destroy)
|
||||
#define speex_resampler_process_float CAT_PREFIX(RANDOM_PREFIX,_resampler_process_float)
|
||||
#define speex_resampler_process_int CAT_PREFIX(RANDOM_PREFIX,_resampler_process_int)
|
||||
#define speex_resampler_process_interleaved_float CAT_PREFIX(RANDOM_PREFIX,_resampler_process_interleaved_float)
|
||||
#define speex_resampler_process_interleaved_int CAT_PREFIX(RANDOM_PREFIX,_resampler_process_interleaved_int)
|
||||
#define speex_resampler_set_rate CAT_PREFIX(RANDOM_PREFIX,_resampler_set_rate)
|
||||
#define speex_resampler_get_rate CAT_PREFIX(RANDOM_PREFIX,_resampler_get_rate)
|
||||
#define speex_resampler_set_rate_frac CAT_PREFIX(RANDOM_PREFIX,_resampler_set_rate_frac)
|
||||
#define speex_resampler_get_ratio CAT_PREFIX(RANDOM_PREFIX,_resampler_get_ratio)
|
||||
#define speex_resampler_set_quality CAT_PREFIX(RANDOM_PREFIX,_resampler_set_quality)
|
||||
#define speex_resampler_get_quality CAT_PREFIX(RANDOM_PREFIX,_resampler_get_quality)
|
||||
#define speex_resampler_set_input_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_set_input_stride)
|
||||
#define speex_resampler_get_input_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_get_input_stride)
|
||||
#define speex_resampler_set_output_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_set_output_stride)
|
||||
#define speex_resampler_get_output_stride CAT_PREFIX(RANDOM_PREFIX,_resampler_get_output_stride)
|
||||
#define speex_resampler_get_input_latency CAT_PREFIX(RANDOM_PREFIX,_resampler_get_input_latency)
|
||||
#define speex_resampler_get_output_latency CAT_PREFIX(RANDOM_PREFIX,_resampler_get_output_latency)
|
||||
#define speex_resampler_skip_zeros CAT_PREFIX(RANDOM_PREFIX,_resampler_skip_zeros)
|
||||
#define speex_resampler_reset_mem CAT_PREFIX(RANDOM_PREFIX,_resampler_reset_mem)
|
||||
#define speex_resampler_strerror CAT_PREFIX(RANDOM_PREFIX,_resampler_strerror)
|
||||
|
||||
#define spx_int16_t short
|
||||
#define spx_int32_t int
|
||||
#define spx_uint16_t unsigned short
|
||||
#define spx_uint32_t unsigned int
|
||||
|
||||
#else /* OUTSIDE_SPEEX */
|
||||
|
||||
#include "speex/speex_types.h"
|
||||
|
||||
#endif /* OUTSIDE_SPEEX */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SPEEX_RESAMPLER_QUALITY_MAX 10
|
||||
#define SPEEX_RESAMPLER_QUALITY_MIN 0
|
||||
#define SPEEX_RESAMPLER_QUALITY_DEFAULT 4
|
||||
#define SPEEX_RESAMPLER_QUALITY_VOIP 3
|
||||
#define SPEEX_RESAMPLER_QUALITY_DESKTOP 5
|
||||
|
||||
enum {
|
||||
RESAMPLER_ERR_SUCCESS = 0,
|
||||
RESAMPLER_ERR_ALLOC_FAILED = 1,
|
||||
RESAMPLER_ERR_BAD_STATE = 2,
|
||||
RESAMPLER_ERR_INVALID_ARG = 3,
|
||||
RESAMPLER_ERR_PTR_OVERLAP = 4,
|
||||
|
||||
RESAMPLER_ERR_MAX_ERROR
|
||||
};
|
||||
|
||||
struct SpeexResamplerState_;
|
||||
typedef struct SpeexResamplerState_ SpeexResamplerState;
|
||||
|
||||
/** Create a new resampler with integer input and output rates.
|
||||
* @param nb_channels Number of channels to be processed
|
||||
* @param in_rate Input sampling rate (integer number of Hz).
|
||||
* @param out_rate Output sampling rate (integer number of Hz).
|
||||
* @param quality Resampling quality between 0 and 10, where 0 has poor quality
|
||||
* and 10 has very high quality.
|
||||
* @return Newly created resampler state
|
||||
* @retval NULL Error: not enough memory
|
||||
*/
|
||||
SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels,
|
||||
spx_uint32_t in_rate,
|
||||
spx_uint32_t out_rate,
|
||||
int quality,
|
||||
int *err);
|
||||
|
||||
/** Create a new resampler with fractional input/output rates. The sampling
|
||||
* rate ratio is an arbitrary rational number with both the numerator and
|
||||
* denominator being 32-bit integers.
|
||||
* @param nb_channels Number of channels to be processed
|
||||
* @param ratio_num Numerator of the sampling rate ratio
|
||||
* @param ratio_den Denominator of the sampling rate ratio
|
||||
* @param in_rate Input sampling rate rounded to the nearest integer (in Hz).
|
||||
* @param out_rate Output sampling rate rounded to the nearest integer (in Hz).
|
||||
* @param quality Resampling quality between 0 and 10, where 0 has poor quality
|
||||
* and 10 has very high quality.
|
||||
* @return Newly created resampler state
|
||||
* @retval NULL Error: not enough memory
|
||||
*/
|
||||
SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels,
|
||||
spx_uint32_t ratio_num,
|
||||
spx_uint32_t ratio_den,
|
||||
spx_uint32_t in_rate,
|
||||
spx_uint32_t out_rate,
|
||||
int quality,
|
||||
int *err);
|
||||
|
||||
/** Destroy a resampler state.
|
||||
* @param st Resampler state
|
||||
*/
|
||||
void speex_resampler_destroy(SpeexResamplerState *st);
|
||||
|
||||
/** Resample a float array. The input and output buffers must *not* overlap.
|
||||
* @param st Resampler state
|
||||
* @param channel_index Index of the channel to process for the multi-channel
|
||||
* base (0 otherwise)
|
||||
* @param in Input buffer
|
||||
* @param in_len Number of input samples in the input buffer. Returns the
|
||||
* number of samples processed
|
||||
* @param out Output buffer
|
||||
* @param out_len Size of the output buffer. Returns the number of samples written
|
||||
*/
|
||||
int speex_resampler_process_float(SpeexResamplerState *st,
|
||||
spx_uint32_t channel_index,
|
||||
const float *in,
|
||||
spx_uint32_t *in_len,
|
||||
float *out,
|
||||
spx_uint32_t *out_len);
|
||||
|
||||
/** Resample an int array. The input and output buffers must *not* overlap.
|
||||
* @param st Resampler state
|
||||
* @param channel_index Index of the channel to process for the multi-channel
|
||||
* base (0 otherwise)
|
||||
* @param in Input buffer
|
||||
* @param in_len Number of input samples in the input buffer. Returns the number
|
||||
* of samples processed
|
||||
* @param out Output buffer
|
||||
* @param out_len Size of the output buffer. Returns the number of samples written
|
||||
*/
|
||||
int speex_resampler_process_int(SpeexResamplerState *st,
|
||||
spx_uint32_t channel_index,
|
||||
const spx_int16_t *in,
|
||||
spx_uint32_t *in_len,
|
||||
spx_int16_t *out,
|
||||
spx_uint32_t *out_len);
|
||||
|
||||
/** Resample an interleaved float array. The input and output buffers must *not* overlap.
|
||||
* @param st Resampler state
|
||||
* @param in Input buffer
|
||||
* @param in_len Number of input samples in the input buffer. Returns the number
|
||||
* of samples processed. This is all per-channel.
|
||||
* @param out Output buffer
|
||||
* @param out_len Size of the output buffer. Returns the number of samples written.
|
||||
* This is all per-channel.
|
||||
*/
|
||||
int speex_resampler_process_interleaved_float(SpeexResamplerState *st,
|
||||
const float *in,
|
||||
spx_uint32_t *in_len,
|
||||
float *out,
|
||||
spx_uint32_t *out_len);
|
||||
|
||||
/** Resample an interleaved int array. The input and output buffers must *not* overlap.
|
||||
* @param st Resampler state
|
||||
* @param in Input buffer
|
||||
* @param in_len Number of input samples in the input buffer. Returns the number
|
||||
* of samples processed. This is all per-channel.
|
||||
* @param out Output buffer
|
||||
* @param out_len Size of the output buffer. Returns the number of samples written.
|
||||
* This is all per-channel.
|
||||
*/
|
||||
int speex_resampler_process_interleaved_int(SpeexResamplerState *st,
|
||||
const spx_int16_t *in,
|
||||
spx_uint32_t *in_len,
|
||||
spx_int16_t *out,
|
||||
spx_uint32_t *out_len);
|
||||
|
||||
/** Set (change) the input/output sampling rates (integer value).
|
||||
* @param st Resampler state
|
||||
* @param in_rate Input sampling rate (integer number of Hz).
|
||||
* @param out_rate Output sampling rate (integer number of Hz).
|
||||
*/
|
||||
int speex_resampler_set_rate(SpeexResamplerState *st,
|
||||
spx_uint32_t in_rate,
|
||||
spx_uint32_t out_rate);
|
||||
|
||||
/** Get the current input/output sampling rates (integer value).
|
||||
* @param st Resampler state
|
||||
* @param in_rate Input sampling rate (integer number of Hz) copied.
|
||||
* @param out_rate Output sampling rate (integer number of Hz) copied.
|
||||
*/
|
||||
void speex_resampler_get_rate(SpeexResamplerState *st,
|
||||
spx_uint32_t *in_rate,
|
||||
spx_uint32_t *out_rate);
|
||||
|
||||
/** Set (change) the input/output sampling rates and resampling ratio
|
||||
* (fractional values in Hz supported).
|
||||
* @param st Resampler state
|
||||
* @param ratio_num Numerator of the sampling rate ratio
|
||||
* @param ratio_den Denominator of the sampling rate ratio
|
||||
* @param in_rate Input sampling rate rounded to the nearest integer (in Hz).
|
||||
* @param out_rate Output sampling rate rounded to the nearest integer (in Hz).
|
||||
*/
|
||||
int speex_resampler_set_rate_frac(SpeexResamplerState *st,
|
||||
spx_uint32_t ratio_num,
|
||||
spx_uint32_t ratio_den,
|
||||
spx_uint32_t in_rate,
|
||||
spx_uint32_t out_rate);
|
||||
|
||||
/** Get the current resampling ratio. This will be reduced to the least
|
||||
* common denominator.
|
||||
* @param st Resampler state
|
||||
* @param ratio_num Numerator of the sampling rate ratio copied
|
||||
* @param ratio_den Denominator of the sampling rate ratio copied
|
||||
*/
|
||||
void speex_resampler_get_ratio(SpeexResamplerState *st,
|
||||
spx_uint32_t *ratio_num,
|
||||
spx_uint32_t *ratio_den);
|
||||
|
||||
/** Set (change) the conversion quality.
|
||||
* @param st Resampler state
|
||||
* @param quality Resampling quality between 0 and 10, where 0 has poor
|
||||
* quality and 10 has very high quality.
|
||||
*/
|
||||
int speex_resampler_set_quality(SpeexResamplerState *st,
|
||||
int quality);
|
||||
|
||||
/** Get the conversion quality.
|
||||
* @param st Resampler state
|
||||
* @param quality Resampling quality between 0 and 10, where 0 has poor
|
||||
* quality and 10 has very high quality.
|
||||
*/
|
||||
void speex_resampler_get_quality(SpeexResamplerState *st,
|
||||
int *quality);
|
||||
|
||||
/** Set (change) the input stride.
|
||||
* @param st Resampler state
|
||||
* @param stride Input stride
|
||||
*/
|
||||
void speex_resampler_set_input_stride(SpeexResamplerState *st,
|
||||
spx_uint32_t stride);
|
||||
|
||||
/** Get the input stride.
|
||||
* @param st Resampler state
|
||||
* @param stride Input stride copied
|
||||
*/
|
||||
void speex_resampler_get_input_stride(SpeexResamplerState *st,
|
||||
spx_uint32_t *stride);
|
||||
|
||||
/** Set (change) the output stride.
|
||||
* @param st Resampler state
|
||||
* @param stride Output stride
|
||||
*/
|
||||
void speex_resampler_set_output_stride(SpeexResamplerState *st,
|
||||
spx_uint32_t stride);
|
||||
|
||||
/** Get the output stride.
|
||||
* @param st Resampler state copied
|
||||
* @param stride Output stride
|
||||
*/
|
||||
void speex_resampler_get_output_stride(SpeexResamplerState *st,
|
||||
spx_uint32_t *stride);
|
||||
|
||||
/** Get the latency in input samples introduced by the resampler.
|
||||
* @param st Resampler state
|
||||
*/
|
||||
int speex_resampler_get_input_latency(SpeexResamplerState *st);
|
||||
|
||||
/** Get the latency in output samples introduced by the resampler.
|
||||
* @param st Resampler state
|
||||
*/
|
||||
int speex_resampler_get_output_latency(SpeexResamplerState *st);
|
||||
|
||||
/** Make sure that the first samples to go out of the resamplers don't have
|
||||
* leading zeros. This is only useful before starting to use a newly created
|
||||
* resampler. It is recommended to use that when resampling an audio file, as
|
||||
* it will generate a file with the same length. For real-time processing,
|
||||
* it is probably easier not to use this call (so that the output duration
|
||||
* is the same for the first frame).
|
||||
* @param st Resampler state
|
||||
*/
|
||||
int speex_resampler_skip_zeros(SpeexResamplerState *st);
|
||||
|
||||
/** Reset a resampler so a new (unrelated) stream can be processed.
|
||||
* @param st Resampler state
|
||||
*/
|
||||
int speex_resampler_reset_mem(SpeexResamplerState *st);
|
||||
|
||||
/** Returns the English meaning for an error code
|
||||
* @param err Error code
|
||||
* @return English string
|
||||
*/
|
||||
const char *speex_resampler_strerror(int err);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||