Advertisement
Guest User

Untitled

a guest
Jan 29th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. | +;******************************************************************************
  2. | +;* UtVideo DSP SIMD optimizations
  3. | +;*
  4. | +;* Copyright (C) 2016 Paul B Mahol
  5. | +;*
  6. | +;* This file is part of FFmpeg.
  7. | +;*
  8. | +;* FFmpeg 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. | +;* FFmpeg 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 FFmpeg; if not, write to the Free Software
  20. | +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. | +;******************************************************************************
  22. | +
  23. | +%include "libavutil/x86/x86util.asm"
  24. | +
  25. | +SECTION_RODATA
  26. | +
  27. | +pd_128: times 4 dd 128
  28. | +
  29. | +SECTION .text
  30. | +
  31. | +INIT_XMM sse2
  32. | +cglobal restore_median, 7, 7, 10, src, step, stride, width, height, slices, cmask
  33. | + not cmaskq
  34. | +%define slice r7q
  35. | +%define slice_startq r8q
  36. | +%define slice_heightq r9q
  37. | + xor slice, slice
  38. | +.loop:
  39. | + mov slice_startq, slice
  40. | + imul slice_startq, heightq
  41. | + mov eaxq, slice_startq
  42. | + idiv slicesq
  43. | + mov slice_startq, eaxq
  44. | + and slice_startq, cmaskq
  45. | + add slice, 1
  46. | + cmp slice, slicesq
  47. | + jb .loop
  48. | + REP_RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement