Leaked source code of windows server 2003
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.

128 lines
3.8 KiB

  1. /* *************************************************************************
  2. ** INTEL Corporation Proprietary Information
  3. **
  4. ** This listing is supplied under the terms of a license
  5. ** agreement with INTEL Corporation and may not be copied
  6. ** nor disclosed except in accordance with the terms of
  7. ** that agreement.
  8. **
  9. ** Copyright (c) 1995, 1996 Intel Corporation.
  10. ** All Rights Reserved.
  11. **
  12. ** *************************************************************************
  13. */
  14. //////////////////////////////////////////////////////////////////////////
  15. // $Author: AKASAI $
  16. // $Date: 15 Mar 1996 09:00:42 $
  17. // $Archive: S:\h26x\src\dec\d1cpysp.cpv $
  18. // $Header: S:\h26x\src\dec\d1cpysp.cpv 1.3 15 Mar 1996 09:00:42 AKASAI $
  19. // $Log: S:\h26x\src\dec\d1cpysp.cpv $
  20. //
  21. // Rev 1.3 15 Mar 1996 09:00:42 AKASAI
  22. //
  23. // Added 1996 to copyright.
  24. //
  25. // Rev 1.2 14 Mar 1996 16:58:08 AKASAI
  26. // Changed code, basically a re-write for optimization of code
  27. // space and to use DWORD reads.
  28. // Added pragma for gather MB processing into one code segment.
  29. //
  30. // Rev 1.1 01 Nov 1995 13:38:38 AKASAI
  31. //
  32. // Made changes to enable Log, Header... fields.
  33. //
  34. //////////////////////////////////////////////////////////////////////////
  35. // ROUTINE NAME: BlockCopySpecial
  36. // FILE NAME: d1cpysp.cpp
  37. //
  38. // BlockCopySpecial reads reference in DWORDS and writes DWORDS. Read of
  39. // DWORD is ok because LoopFilter buffer should be DWORD aligned.
  40. //
  41. // Input U8 *reference (Loop Filtered Buffer)
  42. // Output U8 *output (Output buffer)
  43. //
  44. // Registers used: eax, ebx, ecx, edx, edi
  45. //
  46. // Assumption: reference uses pitch of 8 and output use pitch of PITCH
  47. //
  48. //////////////////////////////////////////////////////////////////////////
  49. #include "precomp.h"
  50. #pragma code_seg("IACODE2")
  51. __declspec(naked)
  52. void BlockCopySpecial (U32 uDstBlock,U32 uSrcBlock)
  53. {
  54. __asm {
  55. mov eax, [esp+8] // eax gets Base addr of uSrcBlock
  56. push edi
  57. mov edi, [esp+8] // edi gets Base addr of uDstBlock
  58. push ebx
  59. mov ebx, PITCH
  60. mov ecx, [eax] // ref[0][0]
  61. mov edx, 4[eax] // ref[0][4]
  62. mov 0[edi], ecx // row 0, bytes 0-3
  63. mov ecx, [eax+8] // ref[1][0]
  64. mov 4[edi], edx // row 0, bytes 4-7
  65. add edi, ebx
  66. mov edx, 4[eax+8] // ref[1][4]
  67. mov 0[edi], ecx // row 1, bytes 0-3
  68. mov ecx, [eax+16] // ref[2][0]
  69. mov 4[edi], edx // row 1, bytes 4-7
  70. add edi, ebx
  71. mov edx, 4[eax+16] // ref[2][4]
  72. ; agi
  73. mov 0[edi], ecx // row 2, bytes 0-3
  74. mov ecx, [eax+24] // ref[3][0]
  75. mov 4[edi], edx // row 2, bytes 4-7
  76. add edi, ebx
  77. mov edx, 4[eax+24] // ref[3][4]
  78. ; agi
  79. mov 0[edi], ecx // row 3, bytes 0-3
  80. mov ecx, [eax+32] // ref[4][0]
  81. mov 4[edi],edx // row 3, bytes 4-7
  82. add edi, ebx
  83. mov edx, 4[eax+32] // ref[4][4]
  84. ; agi
  85. mov 0[edi], ecx // row 4, bytes 0-3
  86. mov ecx, [eax+40] // ref[5][0]
  87. mov 4[edi], edx // row 4, bytes 4-7
  88. add edi, ebx
  89. mov edx, 4[eax+40] // ref[5][4]
  90. ; agi
  91. mov 0[edi], ecx // row 5, bytes 0-3
  92. mov ecx, [eax+48] // ref[6][0]
  93. mov 4[edi], edx // row 5, bytes 4-7
  94. add edi, ebx
  95. mov edx, 4[eax+48] // ref[6][4]
  96. ; agi
  97. mov 0[edi], ecx // row 6, bytes 0-3
  98. mov ecx, [eax+56] // ref[7][0]
  99. mov 4[edi], edx // row 6, bytes 4-7
  100. add edi, ebx
  101. mov edx, 4[eax+56] // ref[7][4]
  102. ; agi
  103. mov 0[edi], ecx // row 7, bytes 0-3
  104. mov 4[edi], edx // row 7, bytes 4-7
  105. pop ebx
  106. pop edi
  107. ret
  108. } // end of asm
  109. } // End of BlockCopySpecial
  110. #pragma code_seg()