math_helper.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* ----------------------------------------------------------------------
  2. * Copyright (C) 2010 ARM Limited. All rights reserved.
  3. *
  4. * $Date: 29. November 2010
  5. * $Revision: V1.0.3
  6. *
  7. * Project: CMSIS DSP Library
  8. *
  9. * Title: math_helper.h
  10. *
  11. *
  12. * Description: Prototypes of all helper functions required.
  13. *
  14. * Target Processor: Cortex-M4/Cortex-M3
  15. *
  16. * Version 1.0.3 2010/11/29
  17. * Re-organized the CMSIS folders and updated documentation.
  18. *
  19. * Version 1.0.2 2010/11/11
  20. * Documentation updated.
  21. *
  22. * Version 1.0.1 2010/10/05
  23. * Production release and review comments incorporated.
  24. *
  25. * Version 1.0.0 2010/09/20
  26. * Production release and review comments incorporated.
  27. *
  28. * Version 0.0.7 2010/06/10
  29. * Misra-C changes done
  30. * -------------------------------------------------------------------- */
  31. #ifndef MATH_HELPER_H
  32. #define MATH_HELPER_H
  33. #include "arm_math.h"
  34. float arm_snr_f32(float *pRef, float *pTest, uint32_t buffSize);
  35. double arm_snr_f64(double *pRef, double *pTest, uint32_t buffSize);
  36. void arm_float_to_q12_20(float *pIn, q31_t * pOut, uint32_t numSamples);
  37. void arm_provide_guard_bits_q15(q15_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
  38. void arm_provide_guard_bits_q31(q31_t *input_buf, uint32_t blockSize, uint32_t guard_bits);
  39. void arm_float_to_q14(float *pIn, q15_t *pOut, uint32_t numSamples);
  40. void arm_float_to_q29(float *pIn, q31_t *pOut, uint32_t numSamples);
  41. void arm_float_to_q28(float *pIn, q31_t *pOut, uint32_t numSamples);
  42. void arm_float_to_q30(float *pIn, q31_t *pOut, uint32_t numSamples);
  43. void arm_clip_f32(float *pIn, uint32_t numSamples);
  44. uint32_t arm_calc_guard_bits(uint32_t num_adds);
  45. void arm_apply_guard_bits (float32_t * pIn, uint32_t numSamples, uint32_t guard_bits);
  46. uint32_t arm_compare_fixed_q15(q15_t *pIn, q15_t * pOut, uint32_t numSamples);
  47. uint32_t arm_compare_fixed_q31(q31_t *pIn, q31_t *pOut, uint32_t numSamples);
  48. uint32_t arm_calc_2pow(uint32_t guard_bits);
  49. #endif