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.

50 lines
1.8KB

  1. ;************************************************************************
  2. ;* VC3/DNxHD SIMD functions
  3. ;* Copyright (c) 2007 Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
  4. ;* Copyright (c) 2014 Tiancheng "Timothy" Gu <timothygu99@gmail.com>
  5. ;*
  6. ;* This file is part of Libav.
  7. ;*
  8. ;* Libav is free software; you can redistribute it and/or
  9. ;* modify it under the terms of the GNU Lesser General Public
  10. ;* License as published by the Free Software Foundation; either
  11. ;* version 2.1 of the License, or (at your option) any later version.
  12. ;*
  13. ;* Libav is distributed in the hope that it will be useful,
  14. ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. ;* Lesser General Public License for more details.
  17. ;*
  18. ;* You should have received a copy of the GNU Lesser General Public
  19. ;* License along with Libav; if not, write to the Free Software
  20. ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. ;******************************************************************************
  22. %include "libavutil/x86/x86util.asm"
  23. section .text
  24. ; void get_pixels_8x4_sym_sse2(int16_t *block, const uint8_t *pixels,
  25. ; ptrdiff_t line_size)
  26. INIT_XMM sse2
  27. cglobal get_pixels_8x4_sym, 3,3,5, block, pixels, linesize
  28. pxor m4, m4
  29. movq m0, [pixelsq]
  30. add pixelsq, linesizeq
  31. movq m1, [pixelsq]
  32. movq m2, [pixelsq+linesizeq]
  33. movq m3, [pixelsq+linesizeq*2]
  34. punpcklbw m0, m4
  35. punpcklbw m1, m4
  36. punpcklbw m2, m4
  37. punpcklbw m3, m4
  38. mova [blockq ], m0
  39. mova [blockq+16 ], m1
  40. mova [blockq+32 ], m2
  41. mova [blockq+48 ], m3
  42. mova [blockq+64 ], m3
  43. mova [blockq+80 ], m2
  44. mova [blockq+96 ], m1
  45. mova [blockq+112], m0
  46. RET