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.

60 lines
1.9KB

  1. /*
  2. * Copyright (c) 2008 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. .macro transpose_8x8 r0, r1, r2, r3, r4, r5, r6, r7
  21. vtrn.32 \r0, \r4
  22. vtrn.32 \r1, \r5
  23. vtrn.32 \r2, \r6
  24. vtrn.32 \r3, \r7
  25. vtrn.16 \r0, \r2
  26. vtrn.16 \r1, \r3
  27. vtrn.16 \r4, \r6
  28. vtrn.16 \r5, \r7
  29. vtrn.8 \r0, \r1
  30. vtrn.8 \r2, \r3
  31. vtrn.8 \r4, \r5
  32. vtrn.8 \r6, \r7
  33. .endm
  34. .macro transpose_4x4 r0, r1, r2, r3
  35. vtrn.16 \r0, \r2
  36. vtrn.16 \r1, \r3
  37. vtrn.8 \r0, \r1
  38. vtrn.8 \r2, \r3
  39. .endm
  40. .macro swap4 r0, r1, r2, r3, r4, r5, r6, r7
  41. vswp \r0, \r4
  42. vswp \r1, \r5
  43. vswp \r2, \r6
  44. vswp \r3, \r7
  45. .endm
  46. .macro transpose16_4x4 r0, r1, r2, r3, r4, r5, r6, r7
  47. vtrn.32 \r0, \r2
  48. vtrn.32 \r1, \r3
  49. vtrn.32 \r4, \r6
  50. vtrn.32 \r5, \r7
  51. vtrn.16 \r0, \r1
  52. vtrn.16 \r2, \r3
  53. vtrn.16 \r4, \r5
  54. vtrn.16 \r6, \r7
  55. .endm