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.

62 lines
2.2KB

  1. /*
  2. * Copyright (c) 2010 Mans Rullgard <mans@mansr.com>
  3. *
  4. * This file is part of Libav.
  5. *
  6. * Libav is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * Libav is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with Libav; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include "libavutil/arm/asm.S"
  21. function ff_dca_lfe_fir_neon, export=1
  22. push {r4-r6,lr}
  23. add r4, r0, r3, lsl #2 @ out2
  24. add r5, r2, #256*4-16 @ cf1
  25. sub r1, r1, #12
  26. cmp r3, #32
  27. ite eq
  28. moveq r6, #256/32
  29. movne r6, #256/64
  30. NOVFP vldr s0, [sp, #16] @ scale
  31. mov lr, #-16
  32. 1:
  33. vmov.f32 q2, #0.0 @ v0
  34. vmov.f32 q3, #0.0 @ v1
  35. mov r12, r6
  36. 2:
  37. vld1.32 {q8}, [r2,:128]! @ cf0
  38. vld1.32 {q9}, [r5,:128], lr @ cf1
  39. vld1.32 {q1}, [r1], lr @ in
  40. subs r12, r12, #4
  41. vrev64.32 q10, q8
  42. vmla.f32 q3, q1, q9
  43. vmla.f32 d4, d2, d21
  44. vmla.f32 d5, d3, d20
  45. bne 2b
  46. add r1, r1, r6, lsl #2
  47. subs r3, r3, #1
  48. vadd.f32 d4, d4, d5
  49. vadd.f32 d6, d6, d7
  50. vpadd.f32 d4, d4, d6
  51. vmul.f32 d5, d4, d0[0]
  52. vst1.32 {d5[0]}, [r0,:32]!
  53. vst1.32 {d5[1]}, [r4,:32]!
  54. bne 1b
  55. pop {r4-r6,pc}
  56. endfunc