mathutil.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*****************************************************************************/
  2. /* BroadVoice(R)16 (BV16) Fixed-Point ANSI-C Source Code */
  3. /* Revision Date: November 13, 2009 */
  4. /* Version 1.1 */
  5. /*****************************************************************************/
  6. /*****************************************************************************/
  7. /* Copyright 2000-2009 Broadcom Corporation */
  8. /* */
  9. /* This software is provided under the GNU Lesser General Public License, */
  10. /* version 2.1, as published by the Free Software Foundation ("LGPL"). */
  11. /* This program is distributed in the hope that it will be useful, but */
  12. /* WITHOUT ANY SUPPORT OR WARRANTY; without even the implied warranty of */
  13. /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LGPL for */
  14. /* more details. A copy of the LGPL is available at */
  15. /* http://www.broadcom.com/licenses/LGPLv2.1.php, */
  16. /* or by writing to the Free Software Foundation, Inc., */
  17. /* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  18. /*****************************************************************************/
  19. /*****************************************************************************
  20. fixmath.h : Common Fixed-Point Library:
  21. $Log$
  22. ******************************************************************************/
  23. Word32 Pow2( /* Q0 output */
  24. Word16 int_comp, /* Q0 Integer part */
  25. Word16 frac_comp /* Q15 frac_compal part */
  26. );
  27. void Log2(
  28. Word32 x, /* (i) input */
  29. Word16 *int_comp, /* Q0 integer part */
  30. Word16 *frac_comp /* Q15 fractional part */
  31. );
  32. void sqrt_i(Word16 x_man, Word16 x_exp, Word16 *y_man, Word16 *y_exp);
  33. Word16 sqrts(Word16 x);
  34. extern Word16 tabsqrt[];
  35. extern Word16 tablog[];
  36. extern Word16 tabpow[];
  37. extern Word16 costable[];
  38. extern Word16 acosslope[];