You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.3KB

  1. /*
  2. * ARM NEON optimised DSP functions for G722 coding
  3. * Copyright (c) 2015 Peter Meerwald <pmeerw@pmeerw.net>
  4. *
  5. * This file is part of Libav.
  6. *
  7. * Libav is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * Libav is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with Libav; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include "libavutil/arm/asm.S"
  22. function ff_g722_apply_qmf_neon, export=1, align=4
  23. movrel r3, qmf_coeffs
  24. vld1.s16 {d2,d3,d4}, [r0]! /* load prev_samples */
  25. vld1.s16 {d16,d17,d18}, [r3,:64]! /* load qmf_coeffs */
  26. vmull.s16 q0, d2, d16
  27. vmlal.s16 q0, d3, d17
  28. vmlal.s16 q0, d4, d18
  29. vld1.s16 {d5,d6,d7}, [r0]! /* load prev_samples */
  30. vld1.s16 {d19,d20,d21}, [r3,:64]! /* load qmf_coeffs */
  31. vmlal.s16 q0, d5, d19
  32. vmlal.s16 q0, d6, d20
  33. vmlal.s16 q0, d7, d21
  34. vadd.s32 d0, d1, d0
  35. vrev64.32 d0, d0
  36. vst1.s32 {d0}, [r1]
  37. bx lr
  38. endfunc
  39. const qmf_coeffs, align=4
  40. .hword 3
  41. .hword -11
  42. .hword -11
  43. .hword 53
  44. .hword 12
  45. .hword -156
  46. .hword 32
  47. .hword 362
  48. .hword -210
  49. .hword -805
  50. .hword 951
  51. .hword 3876
  52. .hword 3876
  53. .hword 951
  54. .hword -805
  55. .hword -210
  56. .hword 362
  57. .hword 32
  58. .hword -156
  59. .hword 12
  60. .hword 53
  61. .hword -11
  62. .hword -11
  63. .hword 3
  64. endconst