Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Copyright © 2006-2013 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
  20.  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  21.  * IN THE SOFTWARE.
  22.  *
  23.  * Authors:
  24.  *    Wang Zhenyu <zhenyu.z.wang@intel.com>
  25.  *    Keith Packard <keithp@keithp.com>
  26.  */
  27.  
  28. /*
  29.  * Input parameters
  30.  */
  31.  
  32. /* Destination X/Y */
  33. define(`dst_x_uw',  `g1.8<2,4,0>UW')
  34. define(`dst_y_uw',  `g1.10<2,4,0>UW')
  35. define(`screen_x0', `g1.0<0,1,0>F')
  36. define(`screen_y0', `g1.4<0,1,0>F')
  37.  
  38. /* UV flag */
  39. define(`interleaved_uv', `g2.0<0,1,0>UW')
  40.  
  41. /* Source transformation parameters */
  42. define(`src_du_dx', `g6.0<0,1,0>F')
  43. define(`src_du_dy', `g6.4<0,1,0>F')
  44. define(`src_uo',    `g6.12<0,1,0>F')
  45. define(`src_dv_dx', `g6.16<0,1,0>F')
  46. define(`src_dv_dy', `g6.20<0,1,0>F')
  47. define(`src_vo',    `g6.28<0,1,0>F')
  48. define(`src_dw_dx', `g7.0<0,1,0>F')
  49. define(`src_dw_dy', `g7.4<0,1,0>F')
  50. define(`src_wo',    `g7.12<0,1,0>F')
  51.  
  52. define(`mask_du_dx', `g8.0<0,1,0>F')
  53. define(`mask_du_dy', `g8.4<0,1,0>F')
  54. define(`mask_uo',    `g8.12<0,1,0>F')
  55. define(`mask_dv_dx', `g8.16<0,1,0>F')
  56. define(`mask_dv_dy', `g8.20<0,1,0>F')
  57. define(`mask_vo',    `g8.28<0,1,0>F')
  58. define(`mask_dw_dx', `g9.0<0,1,0>F')
  59. define(`mask_dw_dy', `g9.4<0,1,0>F')
  60. define(`mask_wo',    `g9.12<0,1,0>F')
  61.  
  62. /* Attribute for snb+ */
  63. define(`a0_a_x',`g10.0<0,1,0>F')
  64. define(`a0_a_y',`g10.16<0,1,0>F')
  65.  
  66. /*
  67.  * Local variables. Pairs must be aligned on even reg boundry
  68.  */
  69.  
  70. /* this holds the X dest coordinates */
  71. define(`dst_x',     `g42')
  72. define(`dst_x_0',   `dst_x')
  73. define(`dst_x_1',   `g43')
  74.  
  75. /* this holds the Y dest coordinates */
  76. define(`dst_y',     `g44')
  77. define(`dst_y_0',   `dst_y')
  78. define(`dst_y_1',   `g45')
  79.  
  80. /* When computing x * dn/dx, use this */
  81. define(`temp_x',    `g30')
  82. define(`temp_x_0',  `temp_x')
  83. define(`temp_x_1',  `g31')
  84.  
  85. /* When computing y * dn/dy, use this */
  86. define(`temp_y',    `g28')
  87. define(`temp_y_0',  temp_y)
  88. define(`temp_y_1',  `g29')
  89.  
  90. /* when loading x/y, use these to hold them in UW format */
  91. define(`temp_x_uw', temp_x)
  92. define(`temp_y_uw', temp_y)
  93.  
  94. /* compute source and mask u/v to this pair to send to sampler */
  95. define(`src_msg',   `m1')
  96. define(`src_msg_ind',`1')
  97. define(`src_u',     `m2')
  98. define(`src_v',     `m4')
  99. define(`src_w',     `g12')
  100. define(`src_w_0',   `src_w')
  101. define(`src_w_1',   `g13')
  102.  
  103. define(`mask_msg',  `m7')
  104. define(`mask_msg_ind',`7')
  105. define(`mask_u',    `m8')
  106. define(`mask_v',    `m10')
  107. define(`mask_w',    `src_w')
  108. define(`mask_w_0',  `src_w_0')
  109. define(`mask_w_1',  `src_w_1')
  110.  
  111. /* sample src to these registers */
  112. define(`src_sample_base',       `g14')
  113.  
  114. define(`src_sample_r',          `g14')
  115. define(`src_sample_r_01',       `g14')
  116. define(`src_sample_r_23',       `g15')
  117.  
  118. define(`src_sample_g',          `g16')
  119. define(`src_sample_g_01',       `g16')
  120. define(`src_sample_g_23',       `g17')
  121.  
  122. define(`src_sample_b',          `g18')
  123. define(`src_sample_b_01',       `g18')
  124. define(`src_sample_b_23',       `g19')
  125.  
  126. define(`src_sample_a',          `g20')
  127. define(`src_sample_a_01',       `g20')
  128. define(`src_sample_a_23',       `g21')
  129.  
  130. /* sample mask to these registers */
  131. define(`mask_sample_base',      `g22')
  132.    
  133. define(`mask_sample_r',         `g22')
  134. define(`mask_sample_r_01',      `g22')
  135. define(`mask_sample_r_23',      `g23')
  136.    
  137. define(`mask_sample_g',         `g24')
  138. define(`mask_sample_g_01',      `g24')
  139. define(`mask_sample_g_23',      `g25')
  140.    
  141. define(`mask_sample_b',         `g26')
  142. define(`mask_sample_b_01',      `g26')
  143. define(`mask_sample_b_23',      `g27')
  144.    
  145. define(`mask_sample_a',         `g28')
  146. define(`mask_sample_a_01',      `g28')
  147. define(`mask_sample_a_23',      `g29')
  148.  
  149. /* Color Balance to these registers */
  150. define(`color_balance_base',    `g32')
  151.  
  152. define(`color_balance_r',       `g32')
  153. define(`color_balance_r_01',    `g32')
  154. define(`color_balance_r_23',    `g33')
  155.  
  156. define(`color_balance_g',       `g34')
  157. define(`color_balance_g_01',    `g34')
  158. define(`color_balance_g_23',    `g35')
  159.  
  160. define(`color_balance_b',       `g36')
  161. define(`color_balance_b_01',    `g37')
  162. define(`color_balance_b_23',    `g37')
  163.  
  164. define(`color_balance_a',       `g38')
  165. define(`color_balance_a_01',    `g39')
  166. define(`color_balance_a_23',    `g39')
  167.  
  168. /* data port SIMD16 send registers */
  169.  
  170. define(`data_port_msg_0',       `m0')
  171. define(`data_port_msg_0_ind',   `0')
  172. define(`data_port_msg_1',       `m1')
  173. define(`data_port_r_01',        `m2')
  174. define(`data_port_g_01',        `m3')
  175. define(`data_port_b_01',        `m4')
  176. define(`data_port_a_01',        `m5')
  177.  
  178. define(`data_port_r_23',        `m6')
  179. define(`data_port_g_23',        `m7')
  180. define(`data_port_b_23',        `m8')
  181. define(`data_port_a_23',        `m9')
  182.  
  183.