Advertisement
Guest User

Untitled

a guest
Nov 15th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. C code :
  2. for (y = 0; y < height; y++) {
  3. for (x = 0; x < width; x++)
  4. dst[x] = src[x] << (14 - BIT_DEPTH);
  5. src += srcstride;
  6. dst += dststride;
  7. }
  8. asm :
  9.  
  10. ; r0 : *dst
  11. ; r1 : dststride
  12. ; r2 : *src
  13. ; r3 : srcstride
  14. ; r4 : width
  15. ; r5 : height
  16.  
  17. cglobal put_hevc_mc_pixels_8, 9, 12
  18. pxor xmm0,xmm0 ;set register at zero
  19. mov r6,0 ;height
  20. ;8 by 8
  21. mc_pixels_h: ;for height
  22. mov r7,0 ;width
  23.  
  24. mc_pixels_w: ;for width
  25. mov r9,0
  26. mov r9,[r2+r7]
  27. shl r9,6
  28. mov [r0+r7],r9
  29. inc r7
  30. cmp r7, r4 ;cmp width
  31. jl mc_pixels_w ;width loop
  32. add r0,r1 ;dst += dststride
  33. add r2,r3 ;src += srcstride
  34. inc r6
  35. cmp r6,r5 ;cmp height
  36. jl mc_pixels_h ;height loop
  37. REP_RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement