Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5361 | serge | 1 | /* |
2 | * Copyright © <2010>, Intel Corporation. |
||
3 | * |
||
4 | * This program is licensed under the terms and conditions of the |
||
5 | * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at |
||
6 | * http://www.opensource.org/licenses/eclipse-1.0.php. |
||
7 | * |
||
8 | */ |
||
9 | // Modual name: ME_header.inc |
||
10 | // |
||
11 | // Global symbols define |
||
12 | // |
||
13 | |||
14 | /* |
||
15 | * Constant |
||
16 | */ |
||
17 | define(`VME_MESSAGE_TYPE_INTER', `1') |
||
18 | define(`VME_MESSAGE_TYPE_INTRA', `2') |
||
19 | define(`VME_MESSAGE_TYPE_MIXED', `3') |
||
20 | |||
21 | define(`BLOCK_32X1', `0x0000001F') |
||
22 | define(`BLOCK_4X16', `0x000F0003') |
||
23 | |||
24 | define(`LUMA_INTRA_16x16_DISABLE', `0x1') |
||
25 | define(`LUMA_INTRA_8x8_DISABLE', `0x2') |
||
26 | define(`LUMA_INTRA_4x4_DISABLE', `0x4') |
||
27 | |||
28 | define(`INTRA_PRED_AVAIL_FLAG_AE', `0x60') |
||
29 | define(`INTRA_PRED_AVAIL_FLAG_B', `0x10') |
||
30 | define(`INTRA_PRED_AVAIL_FLAG_C', `0x8') |
||
31 | define(`INTRA_PRED_AVAIL_FLAG_D', `0x4') |
||
32 | |||
33 | define(`BIND_IDX_VME', `0') |
||
34 | define(`BIND_IDX_VME_REF0', `1') |
||
35 | define(`BIND_IDX_VME_REF1', `2') |
||
36 | define(`BIND_IDX_OUTPUT', `3') |
||
37 | define(`BIND_IDX_INEP', `4') |
||
38 | |||
39 | define(`SUB_PEL_MODE_INTEGER', `0x00000000') |
||
40 | define(`SUB_PEL_MODE_HALF', `0x00001000') |
||
41 | define(`SUB_PEL_MODE_QUARTER', `0x00003000') |
||
42 | |||
43 | define(`INTER_SAD_NONE', `0x00000000') |
||
44 | define(`INTER_SAD_HAAR', `0x00200000') |
||
45 | |||
46 | define(`INTRA_SAD_NONE', `0x00000000') |
||
47 | define(`INTRA_SAD_HAAR', `0x00800000') |
||
48 | |||
49 | define(`INTER_PART_MASK', `0x00000000') |
||
50 | |||
51 | define(`SEARCH_CTRL_SINGLE', `0x00000000') |
||
52 | define(`SEARCH_CTRL_DUAL_START', `0x00000100') |
||
53 | define(`SEARCH_CTRL_DUAL_RECORD', `0x00000300') |
||
54 | define(`SEARCH_CTRL_DUAL_REFERENCE', `0x00000700') |
||
55 | |||
56 | define(`REF_REGION_SIZE', `0x2830:UW') |
||
57 | define(`MIN_REF_REGION_SIZE', `0x2020:UW') |
||
58 | |||
59 | define(`BI_SUB_MB_PART_MASK', `0x0c000000') |
||
60 | define(`MAX_NUM_MV', `0x00000020') |
||
61 | define(`FB_PRUNING_ENABLE', `0x40000000') |
||
62 | |||
63 | define(`SEARCH_PATH_LEN', `0x00003030') |
||
64 | define(`START_CENTER', `0x30000000') |
||
65 | |||
66 | define(`ADAPTIVE_SEARCH_ENABLE', `0x00000002') |
||
67 | define(`INTRA_PREDICTORE_MODE', `0x11111111:UD') |
||
68 | |||
69 | define(`INTER_VME_OUTPUT_IN_OWS', `10') |
||
70 | define(`INTER_VME_OUTPUT_MV_IN_OWS', `8') |
||
71 | |||
72 | define(`INTRAMBFLAG_MASK', `0x00002000') |
||
73 | define(`MVSIZE_UW_BASE', `0x0040') |
||
74 | define(`MFC_MV32_BIT_SHIFT', `5') |
||
75 | define(`CBP_DC_YUV_UW', `0x000E') |
||
76 | |||
77 | #ifdef DEV_SNB |
||
78 | |||
79 | define(`MV32_BIT_MASK', `0x0010') |
||
80 | define(`MV32_BIT_SHIFT', `4') |
||
81 | |||
82 | define(`OBW_CACHE_TYPE', `5') |
||
83 | |||
84 | #else |
||
85 | |||
86 | define(`MV32_BIT_MASK', `0x0020') |
||
87 | define(`MV32_BIT_SHIFT', `5') |
||
88 | |||
89 | define(`OBW_CACHE_TYPE', `10') |
||
90 | |||
91 | #endif |
||
92 | |||
93 | define(`OBW_MESSAGE_TYPE', `8') |
||
94 | |||
95 | define(`OBW_BIND_IDX', `BIND_IDX_OUTPUT') |
||
96 | |||
97 | define(`OBW_CONTROL_0', `0') /* 1 OWord, low 128 bits */ |
||
98 | define(`OBW_CONTROL_1', `1') /* 1 OWord, high 128 bits */ |
||
99 | define(`OBW_CONTROL_2', `2') /* 2 OWords */ |
||
100 | define(`OBW_CONTROL_3', `3') /* 4 OWords */ |
||
101 | define(`OBW_CONTROL_4', `4') /* 8 OWords */ |
||
102 | |||
103 | #ifdef DEV_SNB |
||
104 | |||
105 | define(`OBW_WRITE_COMMIT_CATEGORY', `1') /* write commit on Sandybrige */ |
||
106 | |||
107 | #else |
||
108 | |||
109 | define(`OBW_WRITE_COMMIT_CATEGORY', `0') /* category on Ivybridge */ |
||
110 | |||
111 | #endif |
||
112 | |||
113 | |||
114 | define(`OBW_HEADER_PRESENT', `1') |
||
115 | |||
116 | /* GRF registers |
||
117 | * r0 header |
||
118 | * r1~r4 constant buffer (reserved) |
||
119 | * r5 inline data |
||
120 | * r6~r11 reserved |
||
121 | * r12 write back of VME message |
||
122 | * r13 write back of Oword Block Write |
||
123 | */ |
||
124 | /* |
||
125 | * GRF 0 -- header |
||
126 | */ |
||
127 | define(`thread_id_ub', `r0.20<0,1,0>:UB') /* thread id in payload */ |
||
128 | |||
129 | /* |
||
130 | * GRF 1~4 -- Constant Buffer (reserved) |
||
131 | */ |
||
132 | |||
133 | /* |
||
134 | * GRF 5 -- inline data |
||
135 | */ |
||
136 | define(`inline_reg0', `r5') |
||
137 | define(`w_in_mb_uw', `inline_reg0.2') |
||
138 | define(`orig_xy_ub', `inline_reg0.0') |
||
139 | define(`orig_x_ub', `inline_reg0.0') /* in macroblock */ |
||
140 | define(`orig_y_ub', `inline_reg0.1') |
||
141 | define(`transform_8x8_ub', `inline_reg0.4') |
||
142 | define(`slice_edge_ub', `inline_reg0.4') |
||
143 | define(`num_macroblocks', `inline_reg0.6') |
||
144 | define(`quality_level_ub', `inline_reg0.8') |
||
145 | |||
146 | /* |
||
147 | * GRF 6~11 -- reserved |
||
148 | */ |
||
149 | |||
150 | /* |
||
151 | * GRF 12~15 -- write back for VME message |
||
152 | */ |
||
153 | define(`vme_wb', `r12') |
||
154 | define(`vme_wb0', `r12') |
||
155 | define(`vme_wb1', `r13') |
||
156 | define(`vme_wb2', `r14') |
||
157 | define(`vme_wb3', `r15') |
||
158 | |||
159 | #ifdef DEV_SNB |
||
160 | /* |
||
161 | * GRF 16 -- write back for Oword Block Write message with write commit bit |
||
162 | */ |
||
163 | define(`obw_wb', `r16') |
||
164 | define(`obw_wb_length', `1') |
||
165 | |||
166 | #else |
||
167 | |||
168 | /* |
||
169 | * GRF 16 -- write back for VME message |
||
170 | */ |
||
171 | define(`vme_wb4', `r16') |
||
172 | define(`obw_wb', `null<1>:W') |
||
173 | define(`obw_wb_length', `0') |
||
174 | |||
175 | #endif |
||
176 | |||
177 | /* |
||
178 | * GRF 18~21 -- Intra Neighbor Edge Pixels |
||
179 | */ |
||
180 | define(`INEP_ROW', `r18') |
||
181 | define(`INEP_COL0', `r20') |
||
182 | define(`INEP_COL1', `r21') |
||
183 | |||
184 | /* |
||
185 | * temporary registers |
||
186 | */ |
||
187 | define(`tmp_reg0', `r32') |
||
188 | define(`read0_header', `tmp_reg0') |
||
189 | define(`tmp_reg1', `r33') |
||
190 | define(`read1_header', `tmp_reg1') |
||
191 | define(`tmp_reg2', `r34') |
||
192 | define(`vme_m0', `tmp_reg2') |
||
193 | define(`tmp_reg3', `r35') |
||
194 | define(`vme_m1', `tmp_reg3') |
||
195 | define(`intra_flag', `vme_m1.28') |
||
196 | define(`intra_part_mask_ub', `vme_m1.28') |
||
197 | define(`mb_intra_struct_ub', `vme_m1.29') |
||
198 | define(`tmp_reg4', `r36') |
||
199 | define(`obw_m0', `tmp_reg4') |
||
200 | define(`tmp_reg5', `r37') |
||
201 | define(`obw_m1', `tmp_reg5') |
||
202 | define(`tmp_reg6', `r38') |
||
203 | define(`obw_m2', `tmp_reg6') |
||
204 | define(`tmp_reg7', `r39') |
||
205 | define(`obw_m3', `tmp_reg7') |
||
206 | define(`tmp_reg8', `r40') |
||
207 | define(`obw_m4', `tmp_reg8') |
||
208 | define(`tmp_reg9', `r41') |
||
209 | define(`tmp_x_w', `tmp_reg9.0') |
||
210 | define(`tmp_rega', `r42') |
||
211 | define(`tmp_ud0', `tmp_rega.0') |
||
212 | define(`tmp_ud1', `tmp_rega.4') |
||
213 | define(`tmp_ud2', `tmp_rega.8') |
||
214 | define(`tmp_ud3', `tmp_rega.12') |
||
215 | define(`tmp_uw0', `tmp_rega.0') |
||
216 | define(`tmp_uw1', `tmp_rega.2') |
||
217 | define(`tmp_uw2', `tmp_rega.4') |
||
218 | define(`tmp_uw3', `tmp_rega.6') |
||
219 | define(`tmp_uw4', `tmp_rega.8') |
||
220 | define(`tmp_uw5', `tmp_rega.10') |
||
221 | define(`tmp_uw6', `tmp_rega.12') |
||
222 | define(`tmp_uw7', `tmp_rega.14') |
||
223 | |||
224 | /* |
||
225 | * MRF registers |
||
226 | */ |
||
227 | #ifdef DEV_SNB |
||
228 | |||
229 | define(`msg_ind', `0') |
||
230 | define(`msg_reg0', `m0') /* m0 */ |
||
231 | define(`msg_reg1', `m1') /* m1 */ |
||
232 | define(`msg_reg2', `m2') /* m2 */ |
||
233 | define(`msg_reg3', `m3') /* m3 */ |
||
234 | define(`msg_reg4', `m4') /* m4 */ |
||
235 | |||
236 | #else |
||
237 | |||
238 | define(`msg_ind', `64') |
||
239 | define(`msg_reg0', `g64') |
||
240 | define(`msg_reg1', `g65') |
||
241 | define(`msg_reg2', `g66') |
||
242 | define(`msg_reg3', `g67') |
||
243 | define(`msg_reg4', `g68') |
||
244 | |||
245 | #endif |
||
246 | |||
247 | /* |
||
248 | * VME message payload |
||
249 | */ |
||
250 | |||
251 | #ifdef DEV_SNB |
||
252 | |||
253 | define(`vme_msg_length', `4') |
||
254 | define(`vme_inter_wb_length', `4') |
||
255 | |||
256 | #else |
||
257 | |||
258 | define(`vme_msg_length', `5') |
||
259 | define(`vme_inter_wb_length', `6') |
||
260 | |||
261 | #endif |
||
262 | |||
263 | define(`vme_intra_wb_length', `1') |
||
264 | |||
265 | define(`vme_msg_ind', `msg_ind') |
||
266 | define(`vme_msg_0', `msg_reg0') |
||
267 | define(`vme_msg_1', `msg_reg1') |
||
268 | define(`vme_msg_2', `msg_reg2') |
||
269 | |||
270 | #ifdef DEV_SNB |
||
271 | |||
272 | define(`vme_msg_3', `vme_msg_2') |
||
273 | define(`vme_msg_4', `msg_reg3') |
||
274 | |||
275 | #else |
||
276 | |||
277 | define(`vme_msg_3', `msg_reg3') |
||
278 | define(`vme_msg_4', `msg_reg4') |
||
279 | |||
280 | #endif |
||
281 | |||
282 | define(`DEFAULT_QUALITY_LEVEL', `0x01') |
||
283 | define(`HIGH_QUALITY_LEVEL', `DEFAULT_QUALITY_LEVEL') |
||
284 | define(`LOW_QUALITY_LEVEL', `0x02')1>0,1,0>2010> |