mdct_arm.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Copyright (c) 2015 Xiph.Org Foundation
  2. Written by Viswanath Puttagunta */
  3. /**
  4. @file arm_mdct.h
  5. @brief ARM Neon Intrinsic optimizations for mdct using NE10 library
  6. */
  7. /*
  8. Redistribution and use in source and binary forms, with or without
  9. modification, are permitted provided that the following conditions
  10. are met:
  11. - Redistributions of source code must retain the above copyright
  12. notice, this list of conditions and the following disclaimer.
  13. - Redistributions in binary form must reproduce the above copyright
  14. notice, this list of conditions and the following disclaimer in the
  15. documentation and/or other materials provided with the distribution.
  16. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  17. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  18. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  19. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  20. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  21. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  22. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  23. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  24. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  25. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  26. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. */
  28. #if !defined(MDCT_ARM_H)
  29. #define MDCT_ARM_H
  30. #include "mdct.h"
  31. #if defined(HAVE_ARM_NE10)
  32. /** Compute a forward MDCT and scale by 4/N, trashes the input array */
  33. void clt_mdct_forward_neon(const mdct_lookup *l, kiss_fft_scalar *in,
  34. kiss_fft_scalar * OPUS_RESTRICT out,
  35. const opus_val16 *window, int overlap,
  36. int shift, int stride, int arch);
  37. void clt_mdct_backward_neon(const mdct_lookup *l, kiss_fft_scalar *in,
  38. kiss_fft_scalar * OPUS_RESTRICT out,
  39. const opus_val16 *window, int overlap,
  40. int shift, int stride, int arch);
  41. #if !defined(OPUS_HAVE_RTCD)
  42. #define OVERRIDE_OPUS_MDCT (1)
  43. #define clt_mdct_forward(_l, _in, _out, _window, _int, _shift, _stride, _arch) \
  44. clt_mdct_forward_neon(_l, _in, _out, _window, _int, _shift, _stride, _arch)
  45. #define clt_mdct_backward(_l, _in, _out, _window, _int, _shift, _stride, _arch) \
  46. clt_mdct_backward_neon(_l, _in, _out, _window, _int, _shift, _stride, _arch)
  47. #endif /* OPUS_HAVE_RTCD */
  48. #endif /* HAVE_ARM_NE10 */
  49. #endif