Changeset 6129 for pjproject/trunk/third_party/speex/libspeex/math_approx.h
- Timestamp:
- Jan 9, 2020 9:05:50 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/speex/libspeex/math_approx.h
r2002 r6129 8 8 modification, are permitted provided that the following conditions 9 9 are met: 10 10 11 11 - Redistributions of source code must retain the above copyright 12 12 notice, this list of conditions and the following disclaimer. 13 13 14 14 - Redistributions in binary form must reproduce the above copyright 15 15 notice, this list of conditions and the following disclaimer in the 16 16 documentation and/or other materials provided with the distribution. 17 17 18 18 - Neither the name of the Xiph.org Foundation nor the names of its 19 19 contributors may be used to endorse or promote products derived from 20 20 this software without specific prior written permission. 21 21 22 22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 23 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT … … 169 169 } 170 170 x = SUB16(16384,x); 171 171 172 172 x = x >> 1; 173 173 sq = MULT16_16_Q13(x, ADD16(A1, MULT16_16_Q13(x, ADD16(A2, MULT16_16_Q13(x, (A3)))))); 174 174 ret = spx_sqrt(SHL32(EXTEND32(sq),13)); 175 175 176 176 /*ret = spx_sqrt(67108864*(-1.6129e-04 + 2.0104e+00*f + 2.7373e-01*f*f + 1.8136e-01*f*f*f));*/ 177 177 if (s) … … 209 209 { 210 210 spx_word16_t x2; 211 211 212 212 x2 = MULT16_16_P15(x,x); 213 213 return ADD16(1,MIN16(32766,ADD32(SUB16(L1,x2), MULT16_16_P15(x2, ADD32(L2, MULT16_16_P15(x2, ADD32(L3, MULT16_16_P15(L4, x2))))))));
Note: See TracChangeset
for help on using the changeset viewer.