Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Copyright © 2009 Intel Corporation
  3.  *
  4.  * Permission is hereby granted, free of charge, to any person obtaining a
  5.  * copy of this software and associated documentation files (the "Software"),
  6.  * to deal in the Software without restriction, including without limitation
  7.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8.  * and/or sell copies of the Software, and to permit persons to whom the
  9.  * Software is furnished to do so, subject to the following conditions:
  10.  *
  11.  * The above copyright notice and this permission notice (including the next
  12.  * paragraph) shall be included in all copies or substantial portions of the
  13.  * Software.
  14.  *
  15.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  18.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  21.  * SOFTWARE.
  22.  *
  23.  * Author:
  24.  *    Zou Nan hai <nanhai.zou@intel.com>
  25.  *    Yan Li <li.l.yan@intel.com>
  26.  *    Liu Xi bin<xibin.liu@intel.com>
  27.  */
  28. /* GRF allocation:
  29.    g1~g30: constant buffer
  30.            g1~g2:intra IQ matrix
  31.            g3~g4:non intra IQ matrix
  32.            g5~g20:IDCT table
  33.    g31:    thread payload
  34.    g58~g81:reference data
  35.    g82:    thread payload backup
  36.    g83~g106:IDCT data
  37.    g115:   message descriptor for reading reference data   */
  38. mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
  39. mov(2) g31.0<1>UD g82.12<2,2,1>UW {align1};
  40. mov (1) g126.8<1>UD ip {align1};
  41. mov (1) ip g21.0<1,1,1>UD {align1};
  42.  
  43. /*field 0 of Y*/
  44. asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
  45. shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
  46. add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
  47. and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
  48. and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1};
  49. (f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
  50. define(`surface',`7')
  51. define(`mv1',`g82.20')
  52. define(`mv2',`g82.22')
  53. include(`motion_field_y.g4i')
  54. mov (8) g58.0<1>UD g32.0<8,8,1>UD {align1};
  55. mov (8) g60.0<1>UD g33.0<8,8,1>UD {align1};
  56. mov (8) g62.0<1>UD g34.0<8,8,1>UD {align1};
  57. mov (8) g64.0<1>UD g35.0<8,8,1>UD {align1};
  58. mov (8) g66.0<1>UD g36.0<8,8,1>UD {align1};
  59. mov (8) g68.0<1>UD g37.0<8,8,1>UD {align1};
  60. mov (8) g70.0<1>UD g38.0<8,8,1>UD {align1};
  61. mov (8) g72.0<1>UD g39.0<8,8,1>UD {align1};
  62.  
  63. /*field 1 of Y*/
  64. asr (2) g31.14<1>W g82.28<2,2,1>W 1W {align1};
  65. shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
  66. add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
  67. and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
  68. and.nz (1) null g82.2<1,1,1>UW 0x8000UW {align1};
  69. (f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
  70. define(`surface',`7')
  71. define(`mv1',`g82.28')
  72. define(`mv2',`g82.30')
  73. include(`motion_field_y.g4i')
  74. mov (8) g59.0<1>UD g32.0<8,8,1>UD {align1};
  75. mov (8) g61.0<1>UD g33.0<8,8,1>UD {align1};
  76. mov (8) g63.0<1>UD g34.0<8,8,1>UD {align1};
  77. mov (8) g65.0<1>UD g35.0<8,8,1>UD {align1};
  78. mov (8) g67.0<1>UD g36.0<8,8,1>UD {align1};
  79. mov (8) g69.0<1>UD g37.0<8,8,1>UD {align1};
  80. mov (8) g71.0<1>UD g38.0<8,8,1>UD {align1};
  81. mov (8) g73.0<1>UD g39.0<8,8,1>UD {align1};
  82.  
  83. /*field 0 of UV*/
  84. shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
  85. asr (2) g82.20<1>W g82.20<2,2,1>W 1W {align1};
  86. asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
  87. shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
  88. add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
  89. and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1};
  90. (f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
  91. define(`surface_u', `8')
  92. define(`surface_v', `9')
  93. define(`mv1',`g82.20')
  94. define(`mv2',`g82.22')
  95. include(`motion_field_uv.g4i')
  96. mov (8) g74.0<1>UW g32.0<8,8,1>UW {align1};
  97. mov (8) g75.0<1>UW g33.0<8,8,1>UW {align1};
  98. mov (8) g76.0<1>UW g34.0<8,8,1>UW {align1};
  99. mov (8) g77.0<1>UW g35.0<8,8,1>UW {align1};
  100. mov (8) g78.0<1>UW g36.0<8,8,1>UW {align1};
  101. mov (8) g79.0<1>UW g37.0<8,8,1>UW {align1};
  102. mov (8) g80.0<1>UW g38.0<8,8,1>UW {align1};
  103. mov (8) g81.0<1>UW g39.0<8,8,1>UW {align1};
  104.  
  105. /*field 1 of UV*/
  106. asr (2) g82.28<1>W g82.28<2,2,1>W 1W {align1};
  107. asr (2) g31.14<1>W g82.28<2,2,1>W 1W {align1};
  108. shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
  109. add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
  110. and.nz (1) null g82.2<1,1,1>UW 0x8000UW {align1};
  111. (f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
  112. define(`mv1',`g82.28')
  113. define(`mv2',`g82.30')
  114. include(`motion_field_uv.g4i')
  115. mov (8) g74.16<1>UW g32.0<8,8,1>UW {align1};
  116. mov (8) g75.16<1>UW g33.0<8,8,1>UW {align1};
  117. mov (8) g76.16<1>UW g34.0<8,8,1>UW {align1};
  118. mov (8) g77.16<1>UW g35.0<8,8,1>UW {align1};
  119. mov (8) g78.16<1>UW g36.0<8,8,1>UW {align1};
  120. mov (8) g79.16<1>UW g37.0<8,8,1>UW {align1};
  121. mov (8) g80.16<1>UW g38.0<8,8,1>UW {align1};
  122. mov (8) g81.16<1>UW g39.0<8,8,1>UW {align1};
  123.  
  124. include(`addidct.g4i')
  125. send (16) 0 acc0<1>UW g0<8,8,1>UW
  126.         thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
  127.