celt_lpc_sse.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* Copyright (c) 2014, Cisco Systems, INC
  2. Written by XiangMingZhu WeiZhou MinPeng YanWang
  3. Redistribution and use in source and binary forms, with or without
  4. modification, are permitted provided that the following conditions
  5. are met:
  6. - Redistributions of source code must retain the above copyright
  7. notice, this list of conditions and the following disclaimer.
  8. - Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in the
  10. documentation and/or other materials provided with the distribution.
  11. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  12. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  13. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  14. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  15. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  16. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  17. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  18. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  19. LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  20. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  21. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. */
  23. #ifndef CELT_LPC_SSE_H
  24. #define CELT_LPC_SSE_H
  25. #ifdef HAVE_CONFIG_H
  26. #include "config.h"
  27. #endif
  28. #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT)
  29. #define OVERRIDE_CELT_FIR
  30. void celt_fir_sse4_1(
  31. const opus_val16 *x,
  32. const opus_val16 *num,
  33. opus_val16 *y,
  34. int N,
  35. int ord,
  36. opus_val16 *mem,
  37. int arch);
  38. #if defined(OPUS_X86_PRESUME_SSE4_1)
  39. #define celt_fir(x, num, y, N, ord, mem, arch) \
  40. ((void)arch, celt_fir_sse4_1(x, num, y, N, ord, mem, arch))
  41. #else
  42. extern void (*const CELT_FIR_IMPL[OPUS_ARCHMASK + 1])(
  43. const opus_val16 *x,
  44. const opus_val16 *num,
  45. opus_val16 *y,
  46. int N,
  47. int ord,
  48. opus_val16 *mem,
  49. int arch);
  50. # define celt_fir(x, num, y, N, ord, mem, arch) \
  51. ((*CELT_FIR_IMPL[(arch) & OPUS_ARCHMASK])(x, num, y, N, ord, mem, arch))
  52. #endif
  53. #endif
  54. #endif