Debian Codegraph @

src/shaders/h264/ildb/AVC_ILDB.inc

raw
1 /*
2 * Copyright © <2010>, 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
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
14 * of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * This file was originally licensed under the following license
25 *
26 * Licensed under the Apache License, Version 2.0 (the "License");
27 * you may not use this file except in compliance with the License.
28 * You may obtain a copy of the License at
29 *
30 * http://www.apache.org/licenses/LICENSE-2.0
31 *
32 * Unless required by applicable law or agreed to in writing, software
33 * distributed under the License is distributed on an "AS IS" BASIS,
34 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35 * See the License for the specific language governing permissions and
36 * limitations under the License.
37 *
38 */
39 #if !defined(__AVC_ILDB_HEADER__) // Make sure this file is only included once
40 #define __AVC_ILDB_HEADER__
41
42 // Module name: AVC_ILDB.inc
43
44 #undef ORIX
45 #undef ORIY
46
47 //========== Root thread input parameters ==================================================
48 #define RootParam r1 // :w
49 #define MBsCntX r1.0 // :w, MB count per row
50 #define MBsCntY r1.1 // :w, MB count per col
51 //#define PicType r1.2 // :w, Picture type
52 #define MaxThreads r1.3 // :w, Max Thread limit
53 #define EntrySignature r1.4 // :w, Debug flag
54 #define BitFields r1.5 // :uw
55 #define MbaffFlag BIT0 // :w, mbaff flag, bit 0 in BitFields
56 #define BotFieldFlag BIT1 // :w, bottom field flag, bit 1 in BitFields
57 #define CntlDataExpFlag BIT2 // :w, Control Data Expansion Flag, bit 2 in BitFields
58 #define RampConst r1.12 // 8 :ub, Ramp constant, r1.12 - r1.19:ub
59 #define StepToNextMB r1.20 // :b, 2 bytes
60 #define Minus2Minus1 r1.22 // :b, 2 bytes
61 // next one starts at r1.11:w
62
63 #define TopFieldFlag 0xFFFD // :w, top field flag, used to set bit1 to 0.
64
65
66 //========== Root Locals =============================================================
67
68 // Variables in root kernel for launching child therad
69 #define ChildParam r2.0 // :w
70 //Not used #define URBOffset r2.3 // :w, Each row occupies 4 URB entries. All children in the same row use the same set of URB entries
71 #define CurCol r2.10 // :w, current col
72 #define CurColB r2.20 // :b, current col
73 #define CurRow r2.11 // :w, current row
74 #define CurRowB r2.22 // :b, current row
75 #define LastCol r2.12 // :w, last col
76 #define LastRow r2.13 // :w, last row
77
78 // Root local constants during spawning process
79 #define Col_Boundary r3.0 // :w,
80 #define Row_Boundary r3.1 // :w,
81 //#define TotalBlocks r3.2 // :w, Total blocks in the frame
82 #define URB_EntriesPerMB_2 r3.3 // :w, = URB entries per MB, but in differnt form
83 #define URBOffsetUVBase r3.4 // :w, UV Base offset in URB
84
85 #define Temp1_D r3.6 // :d:
86 #define Temp1_W r3.12 // :w, Temp1
87 #define Temp1_B r3.24 // :b, = Temp1_W
88 #define Temp2_W r3.13 // :w, Temp2
89 #define Temp2_B r3.26 // :b, = Temp2_W
90
91 // Root local variables
92 #define JumpTable r4 // :d, jump table
93 #define JUMPTABLE_BASE 4*32
94 #define JumpAddr a0.7
95
96 #define TopRowForScan r5.0 // :w, track the top row for scan. All rows above this row is deblocked already.
97
98
99 // Child Thread R0 Header Field
100 #define MRF0 m0
101 #define CT_R0Hdr m1
102
103 /*
104 .declare GatewayAperture Base=r50.0 ElementSize=4 SrcRegion=REGION(8,1) Type=ud
105 #define GatewayApertureB 1600 // r50 byte offset from r0.0
106
107 // Chroma root thread updates luma root's ThreadLimit at r10.0:w via gateway
108 #define ThreadLimit r62.0 // :w, thread limit //r56.0
109 #define THREAD_LIMIT_OFFSET 0x01800000 // Offset from r50 to r56 = 12*32 = 384 = 0x0180. 0x180 << 16 = 0x01800000
110 //#define THREAD_LIMIT_OFFSET 0x00C00000 // Offset from r50 to r56 = 6*32 = 192 = 0x00C0. 0xC0 << 16 = 0x00C00000
111 */
112
113 // Gateway size is 16 GRF. 68 rows of MBs takes 9 GRFs (r6 - r14)
114 // For CTG: Expended to support 1280 rows of pixel (80 rows of MBs). It requires 10 GRFs (r6 - r15)
115 .declare GatewayAperture Base=r6.0 ElementSize=4 SrcRegion=REGION(8,1) Type=ud
116 #define GatewayApertureB 192 // r0.0 byte offset from r0.0
117
118 // Chroma root thread updates luma root's ThreadLimit at r10.0:w via gateway
119 #define ThreadLimit r18.0 // :w, thread limit
120 #define THREAD_LIMIT_OFFSET 0x01800000 // Offset from r50 to r56 = 12*32 = 384 = 0x0180. 0x180 << 16 = 0x01800000
121 #define TotalBlocks r18.1 // :w, Total blocks in the frame
122
123 // Root local variables
124 #define ChildThreadsID r19.0 // :w, Child thread ID, unique to each child
125 #define OutstandingThreads r20.0 // :w, Outstanding threads
126 #define ProcessedMBs r20.1 // :w, # of MBs processed
127
128 #define URBOffset r21.0 // :w, Each row occupies 4 URB entries. All children in the same row use the same set of URB entries
129
130 //=================================================================================
131
132 #define ScoreBd_Size 128 //96 // size of Status[] or ProcCol[]
133
134 #define ScoreBd_Idx 2
135 //#define Saved_Col 0
136
137 #define StatusAddr a0.4 // :w, point to r50
138 //=================================================================================
139
140
141 // Gateway payload
142 #define GatewayPayload r48.0 // :ud
143 #define GatewayPayloadKey r48.8 // :uw
144 #define DispatchID r48.20 // :ub
145 #define RegBase_GatewaySize r48.5 // :ud, used in open a gateway
146 #define Offset_Length r48.5 // :ud, used in forwardmsg back to root
147 #define EUID_TID r48.9 // :uw, used in forwardmsg back to root
148
149 // Gateway response
150 #define GatewayResponse r49.0 // :ud, one GRF
151
152 #define URBWriteMsgDesc a0.0 // Used in URB write, :ud
153 #define URBWriteMsgDescLow a0.0 // Used in URB write, :uw
154 #define URBWriteMsgDescHigh a0.1 // Used in URB write, :uw
155
156 .declare WritebackResponse Base=r50 ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 1 GRF for write backs
157
158
159 /////////////////////////////////////////////////////////////////////////////////////////////
160 // IDesc Order Offset
161 //
162 // 0) luma root 0 from luma root
163 // 1) luma child 16 from luma root
164 // 2) chroma root 32 from luma root
165 // 3) chroma child 16 from chroma root
166
167 // 4) luma field root 0 from luma field root
168 // 5) luma field child 16 from luma field root
169 // 6) chroma field root 32 from luma field root
170 // 7) chroma field child 16 from chroma field root
171
172 // 8) luma Mbaff root 0 from luma Mbaff root
173 // 9) luma Mbaff child 16 from luma Mbaff root
174 // 10) chroma Mbaff root 32 from luma Mbaff root
175 // 11) chroma Mbaff child 16 from chroma Mbaff root
176
177 // IDesc offset within non-mbaff or mbaff mode
178 #define CHROMA_ROOT_OFFSET 32 // Offset from luma root to chroma root
179 #define CHILD_OFFSET 16 // Offset from luma root to luma child,
180 // and from chroma root to chroma child
181 /////////////////////////////////////////////////////////////////////////////////////////////
182
183
184 //========== End of Root Variables ======================================================
185
186
187 //========== Child thread input parameters ==============================================
188 //#define MBsCntX r1.0 // :w, MB count per row (same as root)
189 //#define MBsCntY r1.1 // :w, MB count per col (same as root)
190 //#define PicTypeC r1.2 // :w, Picture type same as root thread (same as root)
191 #define URBOffsetC r1.3 // :w,
192 #define EntrySignatureC r1.4 // :w, Debug field (same as root)
193 //#define BitFields r1.5 // :w (same as root)
194 //#define MbaffFlag BIT0 // :w, mbaff flag, bit 0 in BitFields
195 //#define BotFieldFlag BIT1 // :w, bottom field flag, bit 1 in BitFields
196 //#define CntlDataExpFlag BIT2 // :w, Control Data Expansion Flag, bit 2 in BitFields
197 #define RampConstC r1.12 // 8 :ub, Ramp constant, r1.12 - r1.19:ub.
198 #define ORIX r1.10 // :w, carry over from root r1 in MB count
199 #define ORIY r1.11 // :w, carry over from root r1 in MB count
200 #define LastColC r1.12 // :w, last col
201 #define LastRowC r1.13 // :w, last row
202
203 .declare GatewayApertureC Base=r1.0 ElementSize=4 SrcRegion=REGION(8,1) Type=ud
204 #define GatewayApertureCBase 32 // r1 byte offset from r0.0
205
206
207 //========== Child Variables ============================================================
208
209 // Mbaff Alpha, Beta, Tc0 vectors for an edge
210 .declare Mbaff_ALPHA Base=r14.0 ElementSize=2 SrcRegion=REGION(8,1) Type=uw // r14
211 .declare Mbaff_BETA Base=r15.0 ElementSize=2 SrcRegion=REGION(8,1) Type=uw // r15
212 .declare Mbaff_TC0 Base=r16.0 ElementSize=2 SrcRegion=REGION(8,1) Type=uw // r16
213 .declare RRampW Base=r17.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w // r17
214
215 .declare Mbaff_ALPHA2 Base=r45.0 ElementSize=2 SrcRegion=REGION(8,1) Type=uw // alpha2 = (alpha >> 2) + 2
216
217
218 #define ORIX_CUR r46.0 // :w, current block origin X in bytes
219 #define ORIY_CUR r46.1 // :w, current block origin Y in bytes
220 #define ORIX_LEFT r46.2 // :w, left block origin X in bytes
221 #define ORIY_LEFT r46.3 // :w, left block origin Y in bytes
222 #define ORIX_TOP r46.4 // :w, top block origin X in bytes
223 #define ORIY_TOP r46.5 // :w, top block origin Y in bytes
224 //#define FilterSampleFlag r46.6 // :uw,
225 #define CTemp0_W r46.7 // :w, child Temp0
226
227 #define alpha r46.8 // :w, Scaler version for non Mbaff
228 #define beta r46.9 // :w, Scaler version for non Mbaff
229 #define tc0 r46.20 // 4 :ub, r46.20 ~ r46.23, Scaler version for non Mbaff
230 #define MaskA r46.12 // :uw
231 #define MaskB r46.13 // :uw
232
233 // Child control flags
234 #define DualFieldMode r47.0 // Cur MB is frame based, above MB is field based in mbaff mode
235 // :uw, 0 = not in dual field mode, 1 = in dual field mode, filter both top and bot fields
236 #define GateWayOffsetC r47.1 // :w, Gateway offset for child writing into root space
237 #define CntrlDataOffsetY r47.1 // :ud, MB control data data offset
238 #define alpha2 r47.4 // :uw, alpha2 = (alpha >> 2) + 2
239
240 #define VertEdgePattern r47.5 // :uw,
241
242 #define CTemp1_W r47.6 // :w, child Temp1
243 #define CTemp1_B r47.12 // :b, = child Temp1_W
244 #define CTemp2_W r47.7 // :w, child Temp2
245 #define CTemp2_B r47.14 // :b, = child Temp2_W
246
247 // Used in child
248 #define ECM_AddrReg a0.4 // Edge Control Map register
249 #define P_AddrReg a0.6 // point to P samples in left or top MB
250 #define Q_AddrReg a0.7 // point to Q samples in cur MB
251
252
253 .declare RTempD Base=r26.0 ElementSize=4 SrcRegion=REGION(8,1) Type=d // r26-27
254 .declare RTempB Base=r26.0 ElementSize=1 SrcRegion=REGION(8,4) Type=ub // r26-27
255 .declare RTempW Base=r26.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w // r26-27
256 #define LEFT_TEMP_D RTempD
257 #define LEFT_TEMP_B RTempB
258 #define LEFT_TEMP_W RTempW
259
260 .declare TempRow0 Base=r26.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
261 .declare TempRow0B Base=r26.0 ElementSize=1 SrcRegion=REGION(8,2) Type=ub
262 .declare TempRow1 Base=r27.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
263 .declare TempRow1B Base=r27.0 ElementSize=1 SrcRegion=REGION(8,2) Type=ub
264
265 .declare CUR_TEMP_D Base=r28.0 ElementSize=4 SrcRegion=REGION(8,1) Type=d // 8 GRFs
266 .declare CUR_TEMP_B Base=r28.0 ElementSize=1 SrcRegion=REGION(8,4) Type=ub
267 .declare CUR_TEMP_W Base=r28.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
268
269 #define FilterSampleFlag r28.0 // :uw,
270
271 .declare A Base=r28.0 ElementSize=2 SrcRegion=REGION(16,1) Type=w
272 .declare BB Base=r29.0 ElementSize=2 SrcRegion=REGION(16,1) Type=w
273
274 .declare TempRow3 Base=r30.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
275 .declare TempRow3B Base=r30.0 ElementSize=1 SrcRegion=REGION(8,2) Type=ub
276
277 .declare tc0_exp Base=r30.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
278 .declare tc8 Base=r30.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
279
280 .declare tc_exp Base=r31.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
281 .declare tx_exp_8 Base=r31.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
282
283 .declare q0_p0 Base=r32.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
284 .declare ABS_q0_p0 Base=r33.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
285
286 .declare ap Base=r34.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
287 .declare aq Base=r35.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
288
289 // These buffers have the src data for each edge to be beblocked.
290 // They have modified pixels from previous edges.
291 //
292 // Y:
293 // +----+----+----+----+----+----+----+----+
294 // | p3 | p2 | P1 | p0 | q0 | q1 | q2 | q3 |
295 // +----+----+----+----+----+----+----+----+
296 //
297 // p3 = r[P_AddrReg, 0]<16;16,1>
298 // p2 = r[P_AddrReg, 16]<16;16,1>
299 // p1 = r[P_AddrReg, 32]<16;16,1>
300 // p0 = r[P_AddrReg, 48]<16;16,1>
301 // q0 = r[Q_AddrReg, 0]<16;16,1>
302 // q1 = r[Q_AddrReg, 16]<16;16,1>
303 // q2 = r[Q_AddrReg, 32]<16;16,1>
304 // q3 = r[Q_AddrReg, 48]<16;16,1>
305
306 .declare p0123_W Base=r36.0 ElementSize=2 SrcRegion=REGION(16,1) Type=uw // r36, r37
307 .declare q0123_W Base=r38.0 ElementSize=2 SrcRegion=REGION(16,1) Type=uw // r38, r39
308 .declare p3 Base=r36.0 ElementSize=1 SrcRegion=REGION(8,1) Type=ub
309 .declare p2 Base=r36.16 ElementSize=1 SrcRegion=REGION(8,1) Type=ub
310 .declare p1 Base=r37.0 ElementSize=1 SrcRegion=REGION(8,1) Type=ub
311 .declare p0 Base=r37.16 ElementSize=1 SrcRegion=REGION(8,1) Type=ub
312 .declare q0 Base=r38.0 ElementSize=1 SrcRegion=REGION(8,1) Type=ub
313 .declare q1 Base=r38.16 ElementSize=1 SrcRegion=REGION(8,1) Type=ub
314 .declare q2 Base=r39.0 ElementSize=1 SrcRegion=REGION(8,1) Type=ub
315 .declare q3 Base=r39.16 ElementSize=1 SrcRegion=REGION(8,1) Type=ub
316
317 .declare TempRow2 Base=r38.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
318
319 // Temp space for mbaff dual field mode
320 #define ABOVE_CUR_MB_BASE 40*GRFWIB // Byte offset to r40
321 .declare ABOVE_CUR_MB_YW Base=r40 ElementSize=2 SrcRegion=REGION(8,1) Type=uw
322 .declare ABOVE_CUR_MB_UW Base=r40 ElementSize=2 SrcRegion=REGION(8,1) Type=uw
323
324 .declare P0_plus_P1 Base=r41.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
325 .declare Q0_plus_Q1 Base=r42.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
326
327 .declare P2_plus_P3 Base=r43.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
328 .declare Q2_plus_Q3 Base=r44.0 ElementSize=2 SrcRegion=REGION(8,1) Type=w
329
330
331 //////////////////////////////////////////////////////////////////////////////////////////
332 // MB control data reference
333
334 // Expanded control data is in r18 - r25
335 .declare CNTRL_DATA_D Base=r18 ElementSize=4 SrcRegion=REGION(8,1) Type=ud // For read, 8 GRFs
336 #define CNTRL_DATA_BASE 18*GRFWIB // Base offset to r18
337
338 // Bit mask for extracting bits
339 #define MbaffFrameFlag 0x01
340 #define FieldModeCurrentMbFlag 0x02
341 #define FieldModeLeftMbFlag 0x04
342 #define FieldModeAboveMbFlag 0x08
343 #define FilterInternal8x8EdgesFlag 0x10
344 #define FilterInternal4x4EdgesFlag 0x20
345 #define FilterLeftMbEdgeFlag 0x40
346 #define FilterTopMbEdgeFlag 0x80
347
348 #define DISABLE_ILDB_FLAG 0x01
349
350 // Exact bit pattern for left and cur MB coding mode (frame vs. field)
351 #define LEFT_FRAME_CUR_FRAME 0x00
352 #define LEFT_FRAME_CUR_FIELD 0x02
353 #define LEFT_FIELD_CUR_FRAME 0x04
354 #define LEFT_FIELD_CUR_FIELD 0x06
355
356 // Exact bit pattern for above and cur MB coding mode (frame vs. field)
357 #define ABOVE_FRAME_CUR_FRAME 0x00
358 #define ABOVE_FRAME_CUR_FIELD 0x02
359 #define ABOVE_FIELD_CUR_FRAME 0x08
360 #define ABOVE_FIELD_CUR_FIELD 0x0A
361
362
363
364 //========== MB control data field offset in byte ==========
365
366 #if !defined(_APPLE)
367
368 // GRF0 - GRF1 holds original control data
369
370 // GRF0
371 #define HorizOrigin 0
372 #define VertOrigin 1
373 #define BitFlags 2 // Bit flags
374
375 #define bbSinternalLeftVert 4 // Internal left vertical bS, 2 bits per bS for 4 Y pixels and 2 U/V pixels
376 #define bbSinternalMidVert 5 // Internal mid vertical bS
377 #define bbSinternalRightVert 6 // Internal right vertical bS
378 #define bbSinternalTopHorz 7 // Internal top horizontal bS
379
380 #define bbSinternalMidHorz 8 // Internal mid horizontal bS
381 #define bbSinternalBotHorz 9 // Internal bottom horizontal bS
382 #define wbSLeft0 10 // External left vertical bS (0), 4 bits per bS for 4 Y pixels and 2 U/V pixels, and byte 11
383
384 #define wbSLeft1 12 // External left vertical bS (1), and byte 13
385 #define wbSTop0 14 // External top horizontal bS (0), and byte 15
386
387 #define wbSTop1 16 // Externaltop horizontal bS (1), and byte 17
388 #define bIndexAinternal_Y 18 // Internal index A for Y
389 #define bIndexBinternal_Y 19 // Internal index B for Y
390
391 #define bIndexAleft0_Y 20 // Left index A for Y (0)
392 #define bIndexBleft0_Y 21 // Left index B for Y (0)
393 #define bIndexAleft1_Y 22 // Left index A for Y (1)
394 #define bIndexBleft1_Y 23 // Left index B for Y (1)
395
396 #define bIndexAtop0_Y 24 // Top index A for Y (0)
397 #define bIndexBtop0_Y 25 // Top index B for Y (0)
398 #define bIndexAtop1_Y 26 // Top index A for Y (1)
399 #define bIndexBtop1_Y 27 // Top index B for Y (1)
400
401 #define bIndexAinternal_Cb 28 // Internal index A for Cb
402 #define bIndexBinternal_Cb 29 // Internal index B for Cb
403 #define bIndexAleft0_Cb 30 // Left index A for Cb (0)
404 #define bIndexBleft0_Cb 31 // Left index B for Cb (0)
405
406 // GRF1
407 #define bIndexAleft1_Cb 32 // Left index A for Cb (1)
408 #define bIndexBleft1_Cb 33 // Left index B for Cb (1)
409 #define bIndexAtop0_Cb 34 // Top index A for Cb (0)
410 #define bIndexBtop0_Cb 35 // Top index B for Cb (0)
411
412 #define bIndexAtop1_Cb 36 // Top index A for Cb (1)
413 #define bIndexBtop1_Cb 37 // Top index B for Cb (1)
414 #define bIndexAinternal_Cr 38 // Internal index A for Cr
415 #define bIndexBinternal_Cr 39 // Internal index B for Cr
416
417 #define bIndexAleft0_Cr 40 // Left index A for Cr (0)
418 #define bIndexBleft0_Cr 41 // Left index B for Cr (0)
419 #define bIndexAleft1_Cr 42 // Left index A for Cr (1)
420 #define bIndexBleft1_Cr 43 // Left index B for Cr (1)
421
422 #define bIndexAtop0_Cr 44 // Top index A for Cr (0)
423 #define bIndexBtop0_Cr 45 // Top index B for Cr (0)
424 #define bIndexAtop1_Cr 46 // Top index A for Cr (1)
425 #define bIndexBtop1_Cr 47 // Top index B for Cr (1)
426
427 #define ExtBitFlags 48 // Extended bit flags, such as disable ILDB bits
428
429 // Offset 49 - 63 not used
430
431
432 //===== GRF2 - GRF7 hold expanded control data =====
433
434 // GRF2
435 #define wEdgeCntlMap_IntLeftVert 64 // Derived from bbSinternalLeftVert, 1 bit per pixel
436 #define wEdgeCntlMap_IntMidVert 66 // Derived from bbSinternalLeftVert
437
438 #define wEdgeCntlMap_IntRightVert 68 // Derived from bbSinternalRightVert
439 #define wEdgeCntlMap_IntTopHorz 70 // Derived from bbSinternalTopHorz, 1bit per pixel
440
441 #define wEdgeCntlMap_IntMidHorz 72 // Derived from bbSinternalMidHorz
442 #define wEdgeCntlMap_IntBotHorz 74 // Derived from bbSinternalBotHorz
443
444 // Offset 76 - 79 not used
445
446 #define wEdgeCntlMapA_ExtLeftVert0 80 // Derived from wbSLeft0, 1bit per pixel
447 #define wEdgeCntlMapB_ExtLeftVert0 82 // Derived from wbSLeft0
448
449 #define wEdgeCntlMapA_ExtTopHorz0 84 // Derived from wbSTop0, 1bit per pixel
450 #define wEdgeCntlMapB_ExtTopHorz0 86 // Derived from wbSTop0
451
452 #define wEdgeCntlMapA_ExtLeftVert1 88 // Derived from wbSLeft1, 1bit per pixel
453 #define wEdgeCntlMapB_ExtLeftVert1 90 // Derived from wbSLeft1
454
455 #define wEdgeCntlMapA_ExtTopHorz1 92 // Derived from wbSTop1, 1bit per pixel
456 #define wEdgeCntlMapB_ExtTopHorz1 94 // Derived from wbSTop1
457
458
459 // GRF3
460 #define bTc0_v00_0_Y 96 // Derived from bSv00_0 and bIndexAleft0_Y, 4 pixels per tc0
461 #define bTc0_v10_0_Y 97 // Derived from bSv10_0 and bIndexAleft0_Y
462 #define bTc0_v20_0_Y 98 // Derived from bSv20_0 and bIndexAleft0_Y
463 #define bTc0_v30_0_Y 99 // Derived from bSv30_0 and bIndexAleft0_Y
464
465 #define bTc0_v01_Y 100 // Derived from bSv01 and bIndexAinternal_Y
466 #define bTc0_v11_Y 101 // Derived from bSv11 and bIndexAinternal_Y
467 #define bTc0_v21_Y 102 // Derived from bSv21 and bIndexAinternal_Y
468 #define bTc0_v31_Y 103 // Derived from bSv31 and bIndexAinternal_Y
469
470 #define bTc0_v02_Y 104 // Derived from bSv02 and bIndexAinternal_Y
471 #define bTc0_v12_Y 105 // Derived from bSv12 and bIndexAinternal_Y
472 #define bTc0_v22_Y 106 // Derived from bSv22 and bIndexAinternal_Y
473 #define bTc0_v32_Y 107 // Derived from bSv32 and bIndexAinternal_Y
474
475 #define bTc0_v03_Y 108 // Derived from bSv03 and bIndexAinternal_Y
476 #define bTc0_v13_Y 109 // Derived from bSv13 and bIndexAinternal_Y
477 #define bTc0_v23_Y 110 // Derived from bSv23 and bIndexAinternal_Y
478 #define bTc0_v33_Y 111 // Derived from bSv33 and bIndexAinternal_Y
479
480 #define bTc0_h00_0_Y 112 // Derived from bSh00_0 and bIndexAleft0_Y
481 #define bTc0_h01_0_Y 113 // Derived from bSh01_0 and bIndexAleft0_Y
482 #define bTc0_h02_0_Y 114 // Derived from bSh02_0 and bIndexAleft0_Y
483 #define bTc0_h03_0_Y 115 // Derived from bSh03_0 and bIndexAleft0_Y
484
485 #define bTc0_h10_Y 116 // Derived from bSh10 and bIndexAinternal_Y
486 #define bTc0_h11_Y 117 // Derived from bSh11 and bIndexAinternal_Y
487 #define bTc0_h12_Y 118 // Derived from bSh12 and bIndexAinternal_Y
488 #define bTc0_h13_Y 119 // Derived from bSh13 and bIndexAinternal_Y
489
490 #define bTc0_h20_Y 120 // Derived from bSh20 and bIndexAinternal_Y
491 #define bTc0_h21_Y 121 // Derived from bSh21 and bIndexAinternal_Y
492 #define bTc0_h22_Y 122 // Derived from bSh22 and bIndexAinternal_Y
493 #define bTc0_h23_Y 123 // Derived from bSh23 and bIndexAinternal_Y
494
495 #define bTc0_h30_Y 124 // Derived from bSh30 and bIndexAinternal_Y
496 #define bTc0_h31_Y 125 // Derived from bSh31 and bIndexAinternal_Y
497 #define bTc0_h32_Y 126 // Derived from bSh32 and bIndexAinternal_Y
498 #define bTc0_h33_Y 127 // Derived from bSh33 and bIndexAinternal_Y
499
500 // GRF4
501 #define bAlphaLeft0_Y 128 // Derived from bIndexAleft0_Y
502 #define bBetaLeft0_Y 129 // Derived from bIndexBleft0_Y
503 #define bAlphaTop0_Y 130 // Derived from bIndexAtop0_Y
504 #define bBetaTop0_Y 131 // Derived from bIndexBtop0_Y
505
506 #define bAlphaInternal_Y 132 // Derived from bIndexAinternal_Y
507 #define bBetaInternal_Y 133 // Derived from bIndexBinternal_Y
508 // Offset 134 - 135 not used
509
510 // Offset 136 - 143 not used
511 #define bAlphaLeft1_Y 144 // Derived from bIndexAleft1_Y Used in Mbaff mode only
512 #define bBetaLeft1_Y 145 // Derived from bIndexBleft1_Y Used in Mbaff mode only
513 #define bAlphaTop1_Y 146 // Derived from bIndexAtop1_Y Used in Mbaff mode only
514 #define bBetaTop1_Y 147 // Derived from bIndexBtop1_Y Used in Mbaff mode only
515
516 // Offset 148 - 151 not used
517 #define bTc0_v00_1_Y 152 // Derived from bSv00_1 and bIndexAleft1_Y Used in Mbaff mode only
518 #define bTc0_v10_1_Y 153 // Derived from bSv10_1 and bIndexAleft1_Y Used in Mbaff mode only
519 #define bTc0_v20_1_Y 154 // Derived from bSv20_1 and bIndexAleft1_Y Used in Mbaff mode only
520 #define bTc0_v30_1_Y 155 // Derived from bSv30_1 and bIndexAleft1_Y Used in Mbaff mode only
521
522 #define bTc0_h00_1_Y 156 // Derived from bSh00_1 and bIndexAleft1_Y Used in Mbaff mode only
523 #define bTc0_h01_1_Y 157 // Derived from bSh01_1 and bIndexAleft1_Y Used in Mbaff mode only
524 #define bTc0_h02_1_Y 158 // Derived from bSh02_1 and bIndexAleft1_Y Used in Mbaff mode only
525 #define bTc0_h03_1_Y 159 // Derived from bSh03_1 and bIndexAleft1_Y Used in Mbaff mode only
526
527
528 // GRF5
529 #define bTc0_v00_0_Cb 160 // Derived from bSv00_0 and bIndexAleft0_Cb, 2 pixels per tc0 Left0
530 #define bTc0_v10_0_Cb 161 // Derived from bSv10_0 and bIndexAleft0_Cb
531 #define bTc0_v20_0_Cb 162 // Derived from bSv20_0 and bIndexAleft0_Cb
532 #define bTc0_v30_0_Cb 163 // Derived from bSv30_0 and bIndexAleft0_Cb
533
534 #define bTc0_v02_Cb 164 // Derived from bSv02 and bIndexAinternal_Cb MidVert
535 #define bTc0_v12_Cb 165 // Derived from bSv12 and bIndexAinternal_Cb
536 #define bTc0_v22_Cb 166 // Derived from bSv22 and bIndexAinternal_Cb
537 #define bTc0_v32_Cb 167 // Derived from bSv32 and bIndexAinternal_Cb
538
539 #define bTc0_h00_0_Cb 168 // Derived from bSh00_0 and bIndexAleft0_Cb Top0
540 #define bTc0_h01_0_Cb 169 // Derived from bSh01_0 and bIndexAleft0_Cb
541 #define bTc0_h02_0_Cb 170 // Derived from bSh02_0 and bIndexAleft0_Cb
542 #define bTc0_h03_0_Cb 171 // Derived from bSh03_0 and bIndexAleft0_Cb
543
544 #define bTc0_h20_Cb 172 // Derived from bSh20 and bIndexAinternal_Cb MidHorz
545 #define bTc0_h21_Cb 173 // Derived from bSh21 and bIndexAinternal_Cb
546 #define bTc0_h22_Cb 174 // Derived from bSh22 and bIndexAinternal_Cb
547 #define bTc0_h23_Cb 175 // Derived from bSh23 and bIndexAinternal_Cb
548
549 #define bTc0_v00_0_Cr 176 // Derived from bSv00_0 and bIndexAleft0_Cr, 2 pixels per tc0 Left0
550 #define bTc0_v10_0_Cr 177 // Derived from bSv10_0 and bIndexAleft0_Cr
551 #define bTc0_v20_0_Cr 178 // Derived from bSv20_0 and bIndexAleft0_Cr
552 #define bTc0_v30_0_Cr 179 // Derived from bSv30_0 and bIndexAleft0_Cr
553
554 #define bTc0_v02_Cr 180 // Derived from bSv02 and bIndexAinternal_Cr Mid Vert
555 #define bTc0_v12_Cr 181 // Derived from bSv12 and bIndexAinternal_Cr
556 #define bTc0_v22_Cr 182 // Derived from bSv22 and bIndexAinternal_Cr
557 #define bTc0_v32_Cr 183 // Derived from bSv32 and bIndexAinternal_Cr
558
559 #define bTc0_h00_0_Cr 184 // Derived from bSh00_0 and bIndexAleft0_Cr, 2 pixels per tc0 Top0
560 #define bTc0_h01_0_Cr 185 // Derived from bSh01_0 and bIndexAleft0_Cr
561 #define bTc0_h02_0_Cr 186 // Derived from bSh02_0 and bIndexAleft0_Cr
562 #define bTc0_h03_0_Cr 187 // Derived from bSh03_0 and bIndexAleft0_Cr
563
564 #define bTc0_h20_Cr 188 // Derived from bSh20 and bIndexAinternal_Cr Mid Horz
565 #define bTc0_h21_Cr 189 // Derived from bSh21 and bIndexAinternal_Cr
566 #define bTc0_h22_Cr 190 // Derived from bSh22 and bIndexAinternal_Cr
567 #define bTc0_h23_Cr 191 // Derived from bSh23 and bIndexAinternal_Cr
568
569 // GRF6
570 #define bAlphaLeft0_Cb 192 // Derived from bIndexAleft0_Cb
571 #define bBetaLeft0_Cb 193 // Derived from bIndexBleft0_Cb
572 #define bAlphaTop0_Cb 194 // Derived from bIndexAtop0_Cb
573 #define bBetaTop0_Cb 195 // Derived from bIndexBtop0_Cb
574
575 #define bAlphaInternal_Cb 196 // Derived from bIndexAinternal_Cb
576 #define bBetaInternal_Cb 197 // Derived from bIndexBinternal_Cb
577 // Offset 198 - 199 not used
578
579 #define bAlphaLeft0_Cr 200 // Derived from bIndexAleft0_Cr
580 #define bBetaLeft0_Cr 201 // Derived from bIndexBleft0_Cr
581 #define bAlphaTop0_Cr 202 // Derived from bIndexAtop0_Cr
582 #define bBetaTop0_Cr 203 // Derived from bIndexBtop0_Cr
583
584 #define bAlphaInternal_Cr 204 // Derived from bIndexAinternal_Cr
585 #define bBetaInternal_Cr 205 // Derived from bIndexBinternal_Cr
586 // Offset 206 - 223 not used
587
588 // GRF7
589 #define bAlphaLeft1_Cb 224 // Derived from bIndexAleft1_Cb Used in Mbaff mode only
590 #define bBetaLeft1_Cb 225 // Derived from bIndexBleft1_Cb Used in Mbaff mode only
591 #define bAlphaTop1_Cb 226 // Derived from bIndexAtop1_Cb Used in Mbaff mode only
592 #define bBetaTop1_Cb 227 // Derived from bIndexBtop1_Cb Used in Mbaff mode only
593
594 // Offset 228 - 231 not used
595
596 #define bTc0_v00_1_Cb 232 // Derived from bSv00_1 and bIndexAleft1_Cb Used in Mbaff mode only
597 #define bTc0_v10_1_Cb 233 // Derived from bSv10_1 and bIndexAleft1_Cb Used in Mbaff mode only
598 #define bTc0_v20_1_Cb 234 // Derived from bSv20_1 and bIndexAleft1_Cb Used in Mbaff mode only
599 #define bTc0_v30_1_Cb 235 // Derived from bSv30_1 and bIndexAleft1_Cb Used in Mbaff mode only
600
601 #define bTc0_h00_1_Cb 236 // Derived from bSh00_1 and bIndexAleft1_Cb Used in Mbaff mode only
602 #define bTc0_h01_1_Cb 237 // Derived from bSh01_1 and bIndexAleft1_Cb Used in Mbaff mode only
603 #define bTc0_h02_1_Cb 238 // Derived from bSh02_1 and bIndexAleft1_Cb Used in Mbaff mode only
604 #define bTc0_h03_1_Cb 239 // Derived from bSh03_1 and bIndexAleft1_Cb Used in Mbaff mode only
605
606 #define bAlphaLeft1_Cr 240 // Derived from bIndexAleft1_Cr Used in Mbaff mode only
607 #define bBetaLeft1_Cr 241 // Derived from bIndexBleft1_Cr Used in Mbaff mode only
608 #define bAlphaTop1_Cr 242 // Derived from bIndexAtop1_Cr Used in Mbaff mode only
609 #define bBetaTop1_Cr 243 // Derived from bIndexBtop1_Cr Used in Mbaff mode only
610
611 // Offset 244 - 247 not used
612
613 #define bTc0_v00_1_Cr 248 // Derived from bSv00_1 and bIndexAleft1_Cr Used in Mbaff mode only
614 #define bTc0_v10_1_Cr 249 // Derived from bSv10_1 and bIndexAleft1_Cr Used in Mbaff mode only
615 #define bTc0_v20_1_Cr 250 // Derived from bSv20_1 and bIndexAleft1_Cr Used in Mbaff mode only
616 #define bTc0_v30_1_Cr 251 // Derived from bSv30_1 and bIndexAleft1_Cr Used in Mbaff mode only
617
618 #define bTc0_h00_1_Cr 252 // Derived from bSh00_1 and bIndexAleft1_Cr Used in Mbaff mode only
619 #define bTc0_h01_1_Cr 253 // Derived from bSh01_1 and bIndexAleft1_Cr Used in Mbaff mode only
620 #define bTc0_h02_1_Cr 254 // Derived from bSh02_1 and bIndexAleft1_Cr Used in Mbaff mode only
621 #define bTc0_h03_1_Cr 255 // Derived from bSh03_1 and bIndexAleft1_Cr Used in Mbaff mode only
622
623
624 #else // _APPLE is defined
625
626 //******** Crestline for Apple, progressive only, 88 bytes **********
627
628 // GRF0
629 #define HorizOrigin 0
630 #define VertOrigin 1
631 #define BitFlags 2 // Bit flags
632
633 #define wEdgeCntlMap_IntLeftVert 4 // Derived from bbSinternalLeftVert, 1 bit per pixel
634 #define wEdgeCntlMap_IntMidVert 6 // Derived from bbSinternalLeftVert
635 #define wEdgeCntlMap_IntRightVert 8 // Derived from bbSinternalRightVert
636 #define wEdgeCntlMap_IntTopHorz 10 // Derived from bbSinternalTopHorz, 1bit per pixel
637 #define wEdgeCntlMap_IntMidHorz 12 // Derived from bbSinternalMidHorz
638 #define wEdgeCntlMap_IntBotHorz 14 // Derived from bbSinternalBotHorz
639 #define wEdgeCntlMapA_ExtLeftVert0 16 // Derived from wbSLeft0, 1bit per pixel
640 #define wEdgeCntlMapB_ExtLeftVert0 18 // Derived from wbSLeft0
641 #define wEdgeCntlMapA_ExtTopHorz0 20 // Derived from wbSTop0, 1bit per pixel
642 #define wEdgeCntlMapB_ExtTopHorz0 22 // Derived from wbSTop0
643
644 #define bAlphaLeft0_Y 24 // Derived from bIndexAleft0_Y
645 #define bBetaLeft0_Y 25 // Derived from bIndexBleft0_Y
646 #define bAlphaTop0_Y 26 // Derived from bIndexAtop0_Y
647 #define bBetaTop0_Y 27 // Derived from bIndexBtop0_Y
648 #define bAlphaInternal_Y 28 // Derived from bIndexAinternal_Y
649 #define bBetaInternal_Y 29 // Derived from bIndexBinternal_Y
650
651 // GRF1
652 #define bTc0_v00_0_Y 32 // Derived from bSv00_0 and bIndexAleft0_Y, 4 pixels per tc0
653 #define bTc0_v10_0_Y 33 // Derived from bSv10_0 and bIndexAleft0_Y
654 #define bTc0_v20_0_Y 34 // Derived from bSv20_0 and bIndexAleft0_Y
655 #define bTc0_v30_0_Y 35 // Derived from bSv30_0 and bIndexAleft0_Y
656 #define bTc0_v01_Y 36 // Derived from bSv01 and bIndexAinternal_Y
657 #define bTc0_v11_Y 37 // Derived from bSv11 and bIndexAinternal_Y
658 #define bTc0_v21_Y 38 // Derived from bSv21 and bIndexAinternal_Y
659 #define bTc0_v31_Y 39 // Derived from bSv31 and bIndexAinternal_Y
660 #define bTc0_v02_Y 40 // Derived from bSv02 and bIndexAinternal_Y
661 #define bTc0_v12_Y 41 // Derived from bSv12 and bIndexAinternal_Y
662 #define bTc0_v22_Y 42 // Derived from bSv22 and bIndexAinternal_Y
663 #define bTc0_v32_Y 43 // Derived from bSv32 and bIndexAinternal_Y
664 #define bTc0_v03_Y 44 // Derived from bSv03 and bIndexAinternal_Y
665 #define bTc0_v13_Y 45 // Derived from bSv13 and bIndexAinternal_Y
666 #define bTc0_v23_Y 46 // Derived from bSv23 and bIndexAinternal_Y
667 #define bTc0_v33_Y 47 // Derived from bSv33 and bIndexAinternal_Y
668
669 #define bTc0_h00_0_Y 48 // Derived from bSh00_0 and bIndexAleft0_Y
670 #define bTc0_h01_0_Y 49 // Derived from bSh01_0 and bIndexAleft0_Y
671 #define bTc0_h02_0_Y 50 // Derived from bSh02_0 and bIndexAleft0_Y
672 #define bTc0_h03_0_Y 51 // Derived from bSh03_0 and bIndexAleft0_Y
673 #define bTc0_h10_Y 52 // Derived from bSh10 and bIndexAinternal_Y
674 #define bTc0_h11_Y 53 // Derived from bSh11 and bIndexAinternal_Y
675 #define bTc0_h12_Y 54 // Derived from bSh12 and bIndexAinternal_Y
676 #define bTc0_h13_Y 55 // Derived from bSh13 and bIndexAinternal_Y
677 #define bTc0_h20_Y 56 // Derived from bSh20 and bIndexAinternal_Y
678 #define bTc0_h21_Y 57 // Derived from bSh21 and bIndexAinternal_Y
679 #define bTc0_h22_Y 58 // Derived from bSh22 and bIndexAinternal_Y
680 #define bTc0_h23_Y 59 // Derived from bSh23 and bIndexAinternal_Y
681 #define bTc0_h30_Y 60 // Derived from bSh30 and bIndexAinternal_Y
682 #define bTc0_h31_Y 61 // Derived from bSh31 and bIndexAinternal_Y
683 #define bTc0_h32_Y 62 // Derived from bSh32 and bIndexAinternal_Y
684 #define bTc0_h33_Y 63 // Derived from bSh33 and bIndexAinternal_Y
685
686 // GRF2,
687 #define bTc0_v00_0_Cb 64 // Derived from bSv00_0 and bIndexAleft0_Cb, 2 pixels per tc0 Left0
688 #define bTc0_v10_0_Cb 65 // Derived from bSv10_0 and bIndexAleft0_Cb
689 #define bTc0_v20_0_Cb 66 // Derived from bSv20_0 and bIndexAleft0_Cb
690 #define bTc0_v30_0_Cb 67 // Derived from bSv30_0 and bIndexAleft0_Cb
691 #define bTc0_v02_Cb 68 // Derived from bSv02 and bIndexAinternal_Cb MidVert
692 #define bTc0_v12_Cb 69 // Derived from bSv12 and bIndexAinternal_Cb
693 #define bTc0_v22_Cb 70 // Derived from bSv22 and bIndexAinternal_Cb
694 #define bTc0_v32_Cb 71 // Derived from bSv32 and bIndexAinternal_Cb
695 #define bTc0_h00_0_Cb 72 // Derived from bSh00_0 and bIndexAleft0_Cb Top0
696 #define bTc0_h01_0_Cb 73 // Derived from bSh01_0 and bIndexAleft0_Cb
697 #define bTc0_h02_0_Cb 74 // Derived from bSh02_0 and bIndexAleft0_Cb
698 #define bTc0_h03_0_Cb 75 // Derived from bSh03_0 and bIndexAleft0_Cb
699 #define bTc0_h20_Cb 76 // Derived from bSh20 and bIndexAinternal_Cb MidHorz
700 #define bTc0_h21_Cb 77 // Derived from bSh21 and bIndexAinternal_Cb
701 #define bTc0_h22_Cb 78 // Derived from bSh22 and bIndexAinternal_Cb
702 #define bTc0_h23_Cb 79 // Derived from bSh23 and bIndexAinternal_Cb
703
704 #define bAlphaLeft0_Cb 80 // Derived from bIndexAleft0_Cb
705 #define bBetaLeft0_Cb 81 // Derived from bIndexBleft0_Cb
706 #define bAlphaTop0_Cb 82 // Derived from bIndexAtop0_Cb
707 #define bBetaTop0_Cb 83 // Derived from bIndexBtop0_Cb
708 #define bAlphaInternal_Cb 84 // Derived from bIndexAinternal_Cb
709 #define bBetaInternal_Cb 85 // Derived from bIndexBinternal_Cb
710
711 #define ExtBitFlags 86 // Extended bit flags, such as disable ILDB bits
712
713 // Shared between Cb and Cr
714 #define bTc0_v00_0_Cr bTc0_v00_0_Cb
715 #define bTc0_v10_0_Cr bTc0_v10_0_Cb
716 #define bTc0_v20_0_Cr bTc0_v20_0_Cb
717 #define bTc0_v30_0_Cr bTc0_v30_0_Cb
718 #define bTc0_v02_Cr bTc0_v02_Cb
719 #define bTc0_v12_Cr bTc0_v12_Cb
720 #define bTc0_v22_Cr bTc0_v22_Cb
721 #define bTc0_v32_Cr bTc0_v32_Cb
722 #define bTc0_h00_0_Cr bTc0_h00_0_Cb
723 #define bTc0_h01_0_Cr bTc0_h01_0_Cb
724 #define bTc0_h02_0_Cr bTc0_h02_0_Cb
725 #define bTc0_h03_0_Cr bTc0_h03_0_Cb
726 #define bTc0_h20_Cr bTc0_h20_Cb
727 #define bTc0_h21_Cr bTc0_h21_Cb
728 #define bTc0_h22_Cr bTc0_h22_Cb
729 #define bTc0_h23_Cr bTc0_h23_Cb
730
731 #define bAlphaLeft0_Cr bAlphaLeft0_Cb
732 #define bBetaLeft0_Cr bBetaLeft0_Cb
733 #define bAlphaTop0_Cr bAlphaTop0_Cb
734 #define bBetaTop0_Cr bBetaTop0_Cb
735 #define bAlphaInternal_Cr bAlphaInternal_Cb
736 #define bBetaInternal_Cr bBetaInternal_Cb
737
738
739 #endif
740
741
742 //========== End of Child Variables ===============================================================
743
744 #if !defined(COMBINED_KERNEL)
745 #define ILDB_LABEL(x) x // No symbol extension for standalone kernels
746 #endif
747
748 #endif // !defined(__AVC_ILDB_HEADER__)