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.

52 lines
1.8KB

  1. /*
  2. * ARM NEON optimised Format Conversion Utils
  3. * Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
  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 "config.h"
  22. #include "libavutil/arm/asm.S"
  23. function ff_int32_to_float_fmul_scalar_neon, export=1
  24. VFP vdup.32 q0, d0[0]
  25. VFP len .req r2
  26. NOVFP vdup.32 q0, r2
  27. NOVFP len .req r3
  28. vld1.32 {q1},[r1,:128]!
  29. vcvt.f32.s32 q3, q1
  30. vld1.32 {q2},[r1,:128]!
  31. vcvt.f32.s32 q8, q2
  32. 1: subs len, len, #8
  33. pld [r1, #16]
  34. vmul.f32 q9, q3, q0
  35. vmul.f32 q10, q8, q0
  36. beq 2f
  37. vld1.32 {q1},[r1,:128]!
  38. vcvt.f32.s32 q3, q1
  39. vld1.32 {q2},[r1,:128]!
  40. vcvt.f32.s32 q8, q2
  41. vst1.32 {q9}, [r0,:128]!
  42. vst1.32 {q10},[r0,:128]!
  43. b 1b
  44. 2: vst1.32 {q9}, [r0,:128]!
  45. vst1.32 {q10},[r0,:128]!
  46. bx lr
  47. .unreq len
  48. endfunc