idct_neon.asm 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ;
  2. ; Copyright (c) 2016 The WebM project authors. All Rights Reserved.
  3. ;
  4. ; Use of this source code is governed by a BSD-style license
  5. ; that can be found in the LICENSE file in the root of the source
  6. ; tree. An additional intellectual property rights grant can be found
  7. ; in the file PATENTS. All contributing project authors may
  8. ; be found in the AUTHORS file in the root of the source tree.
  9. ;
  10. INCLUDE ./vpx_config.asm
  11. ; Helper functions used to load tran_low_t into int16, narrowing if
  12. ; necessary.
  13. ; $dst0..3 are d registers with the pairs assumed to be contiguous in
  14. ; non-high-bitdepth builds. q0-q3 are used as temporaries in high-bitdepth.
  15. MACRO
  16. LOAD_TRAN_LOW_TO_S16 $dst0, $dst1, $dst2, $dst3, $src
  17. IF CONFIG_VP9_HIGHBITDEPTH
  18. vld1.s32 {q0,q1}, [$src]!
  19. vld1.s32 {q2,q3}, [$src]!
  20. vmovn.i32 $dst0, q0
  21. vmovn.i32 $dst1, q1
  22. vmovn.i32 $dst2, q2
  23. vmovn.i32 $dst3, q3
  24. ELSE
  25. vld1.s16 {$dst0-$dst1,$dst2-$dst3}, [$src]!
  26. ENDIF
  27. MEND
  28. ; $dst0..3 are d registers. q0-q3 are used as temporaries in high-bitdepth.
  29. MACRO
  30. LOAD_TRAN_LOW_TO_S16X2 $dst0, $dst1, $dst2, $dst3, $src
  31. IF CONFIG_VP9_HIGHBITDEPTH
  32. vld2.s32 {q0,q1}, [$src]!
  33. vld2.s32 {q2,q3}, [$src]!
  34. vmovn.i32 $dst0, q0
  35. vmovn.i32 $dst1, q2
  36. vmovn.i32 $dst2, q1
  37. vmovn.i32 $dst3, q3
  38. ELSE
  39. vld2.s16 {$dst0,$dst1,$dst2,$dst3}, [$src]!
  40. ENDIF
  41. MEND
  42. END