Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5361 | serge | 1 | /* |
2 | * Copyright 2000-2011 Intel Corporation All Rights Reserved |
||
3 | * |
||
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
||
5 | * you may not use this file except in compliance with the License. |
||
6 | * You may obtain a copy of the License at |
||
7 | * |
||
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
||
9 | * |
||
10 | * Unless required by applicable law or agreed to in writing, software |
||
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
||
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||
13 | * See the License for the specific language governing permissions and |
||
14 | * limitations under the License. |
||
15 | */ |
||
16 | // 97 // Total instruction count |
||
17 | // 1 // Total kernel count |
||
18 | |||
19 | .kernel PA_DNDI_PA |
||
20 | .code |
||
21 | |||
22 | |||
23 | |||
24 | // FileName: DNDI_PL_Core.asm |
||
25 | // Author: Tatiya, Rupesh |
||
26 | |||
27 | |||
28 | |||
29 | // FileName: DNDI_Core.asm |
||
30 | // Author: Vivek Kumar |
||
31 | // Description: Tasks for DN+DI case (16x4 block) |
||
32 | |||
33 | |||
34 | |||
35 | |||
36 | // Module name: common.inc |
||
37 | // |
||
38 | // Common header file for all Video-Processing kernels |
||
39 | // |
||
40 | |||
41 | .default_execution_size (16) |
||
42 | .default_register_type :ub |
||
43 | |||
44 | .reg_count_total 128 |
||
45 | .reg_count_payload 7 |
||
46 | |||
47 | //========== Common constants ========== |
||
48 | |||
49 | |||
50 | //========== Macros ========== |
||
51 | |||
52 | |||
53 | //Fast Jump, For more details see "Set_Layer_N.asm" |
||
54 | |||
55 | |||
56 | //========== Defines ==================== |
||
57 | |||
58 | //========== Static Parameters (Common To All) ========== |
||
59 | //r1 |
||
60 | |||
61 | |||
62 | //r2 |
||
63 | |||
64 | // e.g. byte0 byte1 byte2 |
||
65 | // YUYV 0 1 3 |
||
66 | // YVYU 0 3 1 |
||
67 | |||
68 | //Color Pipe (IECP) parameters |
||
69 | |||
70 | |||
71 | //ByteCopy |
||
72 | |||
73 | |||
74 | //r4 |
||
75 | |||
76 | // e.g. byte0 byte1 byte2 |
||
77 | // YUYV 0 1 3 |
||
78 | // YVYU 0 3 1 |
||
79 | |||
80 | |||
81 | //========== Inline parameters (Common To All) =========== |
||
82 | |||
83 | |||
84 | //============== Binding Index Table=========== |
||
85 | //Common between DNDI and DNUV |
||
86 | |||
87 | |||
88 | //================= Common Message Descriptor ===== |
||
89 | // Message descriptor for thread spawning |
||
90 | // Message Descriptors |
||
91 | // = 000 0001 (min message len 1 ) 0,0000 (resp len 0 -add later) |
||
92 | // 0000,0000,0000 |
||
93 | // 0001(Spawn a root thread),0001 (Root thread spawn thread) |
||
94 | // = 0x02000011 |
||
95 | // Thread Spawner Message Descriptor |
||
96 | |||
97 | |||
98 | // Message descriptor for atomic operation add |
||
99 | // Message Descriptors |
||
100 | // = 000 0110 (min message len 6 ) 0,0000 (resp len 0 -add later) |
||
101 | // 1(header present)001,10(typed atomic operation)0(return enabled)0(slot group, low 8 bits),0111 (AOP_Add) |
||
102 | // 0000,0000 (Binding table index, added later) |
||
103 | // = 0x02000011 |
||
104 | |||
105 | // Atomic Operation Add Message Descriptor |
||
106 | |||
107 | |||
108 | // Message descriptor for dataport media write |
||
109 | // Message Descriptors |
||
110 | // = 000 0001 (min message len 1 - add later) 00000 (resp len 0) |
||
111 | // 1 (header present 1) 0 1010 (media block write) 000000 |
||
112 | // 00000000 (binding table index - set later) |
||
113 | // = 0x020A8000 |
||
114 | |||
115 | |||
116 | // Message Length defines |
||
117 | |||
118 | |||
119 | // Response Length defines |
||
120 | |||
121 | |||
122 | // Block Width and Height Size defines |
||
123 | |||
124 | |||
125 | // Extended Message Descriptors |
||
126 | |||
127 | |||
128 | // Common message descriptors: |
||
129 | |||
130 | |||
131 | //===================== Math Function Control =================================== |
||
132 | |||
133 | |||
134 | //============ Message Registers =============== |
||
135 | // buf4 starts from r28 |
||
136 | |||
137 | |||
138 | //#define mMSGHDR_EOT r43 // Dummy Message Register for EOT |
||
139 | |||
140 | |||
141 | .declare mubMSGPAYLOAD Base=r30 ElementSize=1 SrcRegion=<16;16,1> Type=ub |
||
142 | .declare muwMSGPAYLOAD Base=r30 ElementSize=2 SrcRegion=<16;16,1> Type=uw |
||
143 | .declare mudMSGPAYLOAD Base=r30 ElementSize=4 SrcRegion=<8;8,1> Type=ud |
||
144 | .declare mfMSGPAYLOAD Base=r30 ElementSize=4 SrcRegion=<8;8,1> Type=f |
||
145 | |||
146 | //=================== End of thread instruction =========================== |
||
147 | |||
148 | |||
149 | //=====================Pointers Used===================================== |
||
150 | |||
151 | |||
152 | //======================================================================= |
||
153 | |||
154 | |||
155 | //r9-r17 |
||
156 | // Define temp space for any usages |
||
157 | |||
158 | |||
159 | // Common Buffers |
||
160 | |||
161 | |||
162 | // temp space for rotation |
||
163 | |||
164 | .declare fROBUF Base=r9.0 ElementSize=4 SrcRegion=<8;8,1> DstRegion=<1> Type=f |
||
165 | |||
166 | .declare udROBUF Base=r9.0 ElementSize=4 SrcRegion=<8;8,1> DstRegion=<1> Type=ud |
||
167 | |||
168 | .declare uwROBUF Base=r9.0 ElementSize=2 SrcRegion=<16;16,1> DstRegion=<1> Type=uw |
||
169 | |||
170 | .declare ubROBUF Base=r9.0 ElementSize=1 SrcRegion=<16;16,1> DstRegion=<1> Type=ub |
||
171 | |||
172 | .declare ub4ROBUF Base=r9.0 ElementSize=1 SrcRegion=<32;8,4> DstRegion=<4> Type=ub |
||
173 | |||
174 | |||
175 | // End of common.inc |
||
176 | |||
177 | |||
178 | // FileName: DNDI.inc |
||
179 | // Author: Vivek Kumar |
||
180 | // Description: Include file for DN, DI and DNDI |
||
181 | // Inputs: DI_ENABLE, DN_ENABLE, DN_PLANAR, DN_PACKED |
||
182 | |||
183 | |||
184 | |||
185 | |||
186 | // End of common.inc |
||
187 | |||
188 | |||
189 | //Interface: |
||
190 | //Static Parameters: |
||
191 | //r1 |
||
192 | |||
193 | |||
194 | //====================== Binding table (Explicit To DNDI)========================================= |
||
195 | |||
196 | |||
197 | .declare mudMSGHDR_DNDI Base=r18 ElementSize=4 Type=ud |
||
198 | .declare mdMSGHDR_DNDI Base=r18 ElementSize=4 Type=d |
||
199 | .declare mwMSGHDR_DNDI Base=r18 ElementSize=2 Type=w |
||
200 | |||
201 | |||
202 | .declare mudMSGHDR_STMM Base=r20 ElementSize=4 Type=ud |
||
203 | |||
204 | |||
205 | .declare mudMSGHDR_HIST Base=r22 ElementSize=4 Type=ud |
||
206 | |||
207 | |||
208 | .declare mudMSGHDR_ENC_STATS Base=r24 ElementSize=4 Type=ud |
||
209 | .declare muwMSGHDR_ENC_STATS Base=r24 ElementSize=2 Type=uw |
||
210 | .declare mubMSGHDR_ENC_STATS Base=r24 ElementSize=1 Type=ub |
||
211 | |||
212 | |||
213 | .declare mudMSGHDR_DN_OUT Base=r31.0 ElementSize=4 Type=ud |
||
214 | .declare mdMSGHDR_DN_OUT Base=r31.0 ElementSize=4 Type=d |
||
215 | .declare mubMSGHDR_DN_OUT Base=r31.0 ElementSize=1 Type=ub |
||
216 | |||
217 | |||
218 | .declare mudMSGHDR_UVCOPY Base=r36 ElementSize=4 Type=ud |
||
219 | .declare mdMSGHDR_UVCOPY Base=r36 ElementSize=4 Type=d |
||
220 | .declare mudMSGHDR_UCOPY Base=r36 ElementSize=4 Type=ud |
||
221 | .declare mudMSGHDR_VCOPY Base=r38 ElementSize=4 Type=ud |
||
222 | |||
223 | |||
224 | .declare mudMSGHDR_DI_OUT1 Base=r18.0 ElementSize=4 Type=ud |
||
225 | .declare mubMSGHDR_DI_OUT1 Base=r18.0 ElementSize=1 Type=ub |
||
226 | |||
227 | |||
228 | .declare mudMSGHDR_DI_OUT2 Base=r23.0 ElementSize=4 Type=ud |
||
229 | .declare mubMSGHDR_DI_OUT2 Base=r23.0 ElementSize=1 Type=ub |
||
230 | |||
231 | //r45 |
||
232 | //Use r45 as message header, so no need to "mov" the data. |
||
233 | |||
234 | .declare mudDN_Y_OUT Base=r45.0 ElementSize=4 SrcRegion=<8;8,1> DstRegion=<1> Type=ud |
||
235 | |||
236 | // Message response (Denoised & DI-ed pixels & statistics); Use buffer 5 |
||
237 | .declare udDNDI_RESP Base=r46.0 ElementSize=4 SrcRegion=<8;8,1> DstRegion=<1> Type=ud |
||
238 | .declare uwDNDI_RESP Base=r46.0 ElementSize=2 SrcRegion=<16;16,1> DstRegion=<1> Type=uw |
||
239 | .declare ubDNDI_RESP Base=r46.0 ElementSize=1 SrcRegion=<16;16,1> DstRegion=<1> Type=ub |
||
240 | |||
241 | // Message response (UV Copy); Use buffer 5 |
||
242 | .declare udDNDI_UV_RESP Base=r58.0 ElementSize=4 SrcRegion=<8;8,1> DstRegion=<1> Type=ud |
||
243 | .declare ubDNDI_UV_RESP Base=r58.0 ElementSize=1 SrcRegion=<16;16,1> DstRegion=<1> Type=ub |
||
244 | |||
245 | //Temp GRFs: For 42X to 422 Conversion |
||
246 | .declare uwDNDI_UVCOPY_TEMP Base=r10.0 ElementSize=2 SrcRegion=<16;16,1> DstRegion=<1> Type=uw //8 GRFs |
||
247 | .declare ubDNDI_UVCOPY_TEMP Base=r10.0 ElementSize=1 SrcRegion=<16;16,1> DstRegion=<1> Type=ub //8 GRFs |
||
248 | //--------------------------------------------------------------------------- |
||
249 | // Message descriptors |
||
250 | //--------------------------------------------------------------------------- |
||
251 | // Extended message descriptor |
||
252 | // Message descriptor for sampler read |
||
253 | // = 000 0010 (message len 2) 00000 (resp len - set later, 12 or 5 or 11) |
||
254 | // 1 (header present 1) 0 11 (SIMD32/64 mode) |
||
255 | // 1000 (message type) 0000 (DI state index) |
||
256 | // 00000000 (binding table index - set later) |
||
257 | // = 0x040b8000 |
||
258 | |||
259 | |||
260 | // Attention: The Message Length is The Number of GRFs with Data Only, without the Header |
||
261 | |||
262 | |||
263 | //--------------------------------------------------------------------------- |
||
264 | // VDI Return Data format |
||
265 | //--------------------------------------------------------------------------- |
||
266 | // Defines for DI enabled |
||
267 | |||
268 | |||
269 | // Defines for DI disabled |
||
270 | |||
271 | |||
272 | |||
273 | // FileName: DNDI_Command.asm |
||
274 | // Author: Vivek Kumar |
||
275 | // Description: Sends a message to the VDI to process one DN (16x8) or DNDI (16x4) block |
||
276 | |||
277 | // Prepare the DNDI send command |
||
278 | mov (8) mudMSGHDR_DNDI(0)<1> r0.0<8;8,1>:ud // message header |
||
279 | mov (1) mwMSGHDR_DNDI(1,4)<1> r7.0<0;1,0>:w { NoDDClr } // horizontal origin // Do we need to add offset here? -vK |
||
280 | mov (1) mwMSGHDR_DNDI(1,12)<1> r7.1<0;1,0>:w { NoDDChk } // vertical origin // Can these 2 be combined? - vK |
||
281 | |||
282 | send (8) udDNDI_RESP(0)<1> r18 0x2 0x4CE8003:ud |
||
283 | |||
284 | // On Gen6, with VDI walker, use the XY pair returned rather than programmed above |
||
285 | // VDI_RETURNED_XY is ordered XY in case of walker enables and the same as programmed in case of walker disabled |
||
286 | mov (2) r7.0<1>:w uwDNDI_RESP(9,14)<2;2,1> // horizontal/Vertial origin in W.14 and W.15 |
||
287 | |||
288 | |||
289 | |||
290 | // FileName: DI_STMM_Save.asm |
||
291 | // Author: Vivek Kumar |
||
292 | // Description: Saves DI STMM Data to statistics surface in case of DI enabled (for 16x4 block) |
||
293 | |||
294 | // Write STMM to memory |
||
295 | mov (8) mudMSGHDR_STMM(0)<1> r0.0<8;8,1>:ud // message header |
||
296 | mov (8) mudMSGHDR_STMM(1)<1> udDNDI_RESP(8,0) // Move STMM to MRF |
||
297 | |||
298 | shr (1) mudMSGHDR_STMM(0,0)<1> r7.0<0;1,0>:w 1:w { NoDDClr } // X origin / 2 |
||
299 | mov (1) mudMSGHDR_STMM(0,1)<1> r7.1<0;1,0>:w { NoDDClr, NoDDChk } // Y origin |
||
300 | mov (1) mudMSGHDR_STMM(0,2)<1> 0x30007:ud { NoDDChk } // block width and height (8x4) |
||
301 | |||
302 | send (8) null<1>:d r20 0x5 0x40A8021:ud |
||
303 | |||
304 | |||
305 | |||
306 | // FileName: DN_Hist_Save.asm |
||
307 | // Author: Vivek Kumar |
||
308 | // Description: Saves DN history data to statistics surface |
||
309 | |||
310 | // Write denoise history to memory |
||
311 | mov (8) r27<1>:ud r0.0<8;8,1>:ud // message header |
||
312 | |||
313 | mov (1) mudMSGHDR_HIST(1)<1> udDNDI_RESP(9,0)<0;1,0> // Move denoise history to MRF (4x1) |
||
314 | |||
315 | |||
316 | shr (2) r27.0<1>:ud r7.0<2;2,1>:w 2:w // X,Y origin / 4 |
||
317 | add (1) r27.0<1>:ud r27.0<0;1,0>:ud r1.12<0;1,0>:uw { NoDDClr } // Add pitch to X origin |
||
318 | mov (1) r27.2<1>:ud 0x3:ud { NoDDChk } // block width and height |
||
319 | |||
320 | mov (8) mudMSGHDR_HIST(0)<1> r27.0<8;8,1>:ud |
||
321 | send (8) null<1>:d r22 0x5 0x40A8021:ud |
||
322 | |||
323 | |||
324 | |||
325 | // FileName: DNDI_Enc_Stats_Save.asm |
||
326 | // Author: Vivek Kumar |
||
327 | // Description: Saves Encoder Statistics data to statistics surface in case of DI enabled (for 16x4 block) |
||
328 | |||
329 | // Write encoder statistics to memory |
||
330 | //Currently enable this only on Gen6 validation |
||
331 | mov (8) mudMSGHDR_ENC_STATS(1)<1> 0x0:ud // Init payload MRF |
||
332 | mov (8) mudMSGHDR_ENC_STATS(0)<1> r0.0<8;8,1>:ud // message header |
||
333 | |||
334 | shr (1) mudMSGHDR_ENC_STATS(0,0)<1> r7.0<0;1,0>:w 1:w { NoDDClr } //enable the flag after testing on si { NoDDClr } // X origin / 2 |
||
335 | mul (1) acc0.1<1>:ud r7.1<0;1,0>:w 3:w // Y origin * 3 |
||
336 | shr (1) mudMSGHDR_ENC_STATS(0,1)<1> acc0.1<0;1,0>:ud 2:w { NoDDClr, NoDDChk } //enable the flag after testing on si { NoDDClr, NoDDChk } // Y origin * 3/4 |
||
337 | mov (1) mudMSGHDR_ENC_STATS(0,2)<1> 0x20007:ud { NoDDChk } //enable the flag after testing on si { NoDDChk } // block width and height (8x3) |
||
338 | add (2) mudMSGHDR_ENC_STATS(0,0)<1> mudMSGHDR_ENC_STATS(0,0)<2;2,1> r1.12<2;2,1>:uw // Add pitch to X,Y origin |
||
339 | |||
340 | |||
341 | //Data block for Encoder Statistics |
||
342 | //---------------------------------------------------- |
||
343 | //| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Bytes |
||
344 | //---------------------------------------------------- |
||
345 | //| BNE | MCNT | FCNT | TCNT | X | X | X | X | |
||
346 | //---------------------------------------------------- |
||
347 | //| DcTpT | SVCM | DcBpT | DcTpB | |
||
348 | //---------------------------------------------------- |
||
349 | //| SHCM | STAD | DcTcB | DcBpB | |
||
350 | //---------------------------------------------------- |
||
351 | mov (1) mudMSGHDR_ENC_STATS(1,0)<1> udDNDI_RESP(9,1)<0;1,0> { NoDDClr } // Move encoder statistics to MRF |
||
352 | mov (2) mudMSGHDR_ENC_STATS(1,3)<2> udDNDI_RESP(9,3)<2;2,1> { NoDDClr, NoDDChk } // Move encoder statistics to MRF |
||
353 | mov (2) mudMSGHDR_ENC_STATS(1,2)<2> udDNDI_RESP(9,5)<2;2,1> { NoDDChk } // Move encoder statistics to MRF |
||
354 | |||
355 | |||
356 | send (8) null<1>:d r24 0x5 0x40A8021:ud |
||
357 | |||
358 | |||
359 | |||
360 | // FileName: DN_Save_PA_16x4.asm |
||
361 | // Author: Vivek Kumar |
||
362 | // Description: Save one 16x4 blocks of DN output in Packed format for reference |
||
363 | |||
364 | |||
365 | // check top/bottom field first |
||
366 | cmp.e.f0.0 (1) null<1>:w r1.28<0;1,0>:ub 1:w |
||
367 | |||
368 | add (4) a0.4<1>:uw r4.0<4;4,1>:ub 1024:w // Initial Y,U,V offset in YUV422 block; it starts at m14 |
||
369 | |||
370 | mov (8) mudMSGHDR_DN_OUT(0)<1> r0<8;8,1>:ud // message header |
||
371 | shl (1) mdMSGHDR_DN_OUT(0,0)<1> r7.0<0;1,0>:w 1:w { NoDDClr } // X origin * 2 (422 output) |
||
372 | mov (1) mdMSGHDR_DN_OUT(0,1)<1> r7.1<0;1,0>:w { NoDDClr, NoDDChk } // Y origin |
||
373 | mov (1) mudMSGHDR_DN_OUT(0,2)<1> 0x3001F:ud { NoDDChk } // block width and height (32x8) |
||
374 | |||
375 | (f0.0) jmpi (1) TOP_FIELD_FIRST |
||
376 | |||
377 | BOTTOM_FIELD_FIRST: |
||
378 | mov (16) r[a0.4, 0]<2>:ub ubDNDI_RESP(10,0) { NoDDClr } // 2nd field luma from current frame (line 0,2) |
||
379 | mov (16) r[a0.4, 32]<2>:ub ubDNDI_RESP(4,16) { NoDDClr } // 1st field luma from current frame (line 1,3) |
||
380 | mov (16) r[a0.4, 64]<2>:ub ubDNDI_RESP(10,16) { NoDDClr } // 2nd field luma from current frame (line 0,2) |
||
381 | mov (16) r[a0.4, 96]<2>:ub ubDNDI_RESP(5,16) { NoDDClr } // 1st field luma from current frame (line 1,3) |
||
382 | mov (8) r[a0.5, 0]<4>:ub ubDNDI_RESP(11,1)<16;8,2> { NoDDClr, NoDDChk } // 2nd field U from current frame (line 0,2) |
||
383 | mov (8) r[a0.5, 32]<4>:ub ubDNDI_RESP(6,17)<16;8,2> { NoDDClr, NoDDChk } // 1st field U from current frame (line 1,3) |
||
384 | mov (8) r[a0.5, 64]<4>:ub ubDNDI_RESP(11,17)<16;8,2> { NoDDClr, NoDDChk } // 2nd field U from current frame (line 0,2) |
||
385 | mov (8) r[a0.5, 96]<4>:ub ubDNDI_RESP(7,17)<16;8,2> { NoDDClr, NoDDChk } // 1st field U from current frame (line 1,3) |
||
386 | mov (8) r[a0.6, 0]<4>:ub ubDNDI_RESP(11,0)<16;8,2> { NoDDChk } // 2nd field V from current frame (line 0,2) |
||
387 | mov (8) r[a0.6, 32]<4>:ub ubDNDI_RESP(6,16)<16;8,2> { NoDDChk } // 1st field U from current frame (line 1,3) |
||
388 | mov (8) r[a0.6, 64]<4>:ub ubDNDI_RESP(11,16)<16;8,2> { NoDDChk } // 2nd field V from current frame (line 0,2) |
||
389 | mov (8) r[a0.6, 96]<4>:ub ubDNDI_RESP(7,16)<16;8,2> { NoDDChk } // 1st field U from current frame (line 1,3) |
||
390 | jmpi (1) SAVE_DN_CURR |
||
391 | |||
392 | TOP_FIELD_FIRST: |
||
393 | mov (16) r[a0.4, 0]<2>:ub ubDNDI_RESP(4,0) { NoDDClr } // 1st field luma from current frame (line 0,2) |
||
394 | mov (16) r[a0.4, 32]<2>:ub ubDNDI_RESP(10,0) { NoDDClr } // 2nd field luma from current frame (line 1,3) |
||
395 | mov (16) r[a0.4, 64]<2>:ub ubDNDI_RESP(5,0) { NoDDClr } // 1st field luma from current frame (line 0,2) |
||
396 | mov (16) r[a0.4, 96]<2>:ub ubDNDI_RESP(10,16) { NoDDClr } // 2nd field luma from current frame (line 1,3) |
||
397 | mov (8) r[a0.5, 0]<4>:ub ubDNDI_RESP(6,1)<16;8,2> { NoDDClr, NoDDChk } // 1st field U from current frame (line 0,2) |
||
398 | mov (8) r[a0.5, 32]<4>:ub ubDNDI_RESP(11,1)<16;8,2> { NoDDClr, NoDDChk } // 2nd field U from current frame (line 1,3) |
||
399 | mov (8) r[a0.5, 64]<4>:ub ubDNDI_RESP(7,1)<16;8,2> { NoDDClr, NoDDChk } // 1st field U from current frame (line 0,2) |
||
400 | mov (8) r[a0.5, 96]<4>:ub ubDNDI_RESP(11,17)<16;8,2> { NoDDClr, NoDDChk } // 2nd field U from current frame (line 1,3) |
||
401 | mov (8) r[a0.6, 0]<4>:ub ubDNDI_RESP(6,0)<16;8,2> { NoDDChk } // 1st field V from current frame (line 0,2) |
||
402 | mov (8) r[a0.6, 32]<4>:ub ubDNDI_RESP(11,0)<16;8,2> { NoDDChk } // 2nd field V from current frame (line 1,3) |
||
403 | mov (8) r[a0.6, 64]<4>:ub ubDNDI_RESP(7,0)<16;8,2> { NoDDChk } // 1st field V from current frame (line 0,2) |
||
404 | mov (8) r[a0.6, 96]<4>:ub ubDNDI_RESP(11,16)<16;8,2> { NoDDChk } // 2nd field V from current frame (line 1,3) |
||
405 | |||
406 | SAVE_DN_CURR: |
||
407 | //send out data through data port |
||
408 | send (8) null<1>:d r31.0 0x5 0xA0A8018:ud |
||
409 | |||
410 | |||
411 | |||
412 | // FileName: DI_Save_PA_16x4.asm |
||
413 | // Author: Vivek Kumar |
||
414 | // Description: Save two 16x4 blocks of DI output in Packed format |
||
415 | |||
416 | |||
417 | add (4) a0.4<1>:uw r2.28<4;4,1>:ub 608:w // Initial Y,U,V offset in YUV422 block; it starts at m20 |
||
418 | |||
419 | mov (8) r27.0<1>:ud r0.0<8;8,1>:ud |
||
420 | shl (1) r27.0<1>:d r7.0<0;1,0>:w 1:w { NoDDClr } // H. block origin need to be doubled |
||
421 | mov (1) r27.1<1>:d r7.1<0;1,0>:w { NoDDClr, NoDDChk } // Block origin |
||
422 | mov (1) r27.2<1>:ud 0x3001F:ud { NoDDChk } // Block width and height (32x8) |
||
423 | |||
424 | //prepare the message headers |
||
425 | mov (8) r18.0<1>:ud r27<8;8,1>:ud |
||
426 | mov (8) r23.0<1>:ud r27<8;8,1>:ud |
||
427 | |||
428 | // Pack 2nd field Y |
||
429 | mov (16) r[a0.4, 0]<2> ubDNDI_RESP(0,0) { NoDDClr } |
||
430 | mov (16) r[a0.4, 32]<2> ubDNDI_RESP(0,16) { NoDDClr } |
||
431 | mov (16) r[a0.4, 64]<2> ubDNDI_RESP(0,32) { NoDDClr } |
||
432 | mov (16) r[a0.4, 96]<2> ubDNDI_RESP(0,48) { NoDDClr } |
||
433 | // Pack 2nd field U |
||
434 | mov (8) r[a0.5, 0]<4> ubDNDI_RESP(2,1)<16;8,2> { NoDDClr, NoDDChk } //U pixels |
||
435 | mov (8) r[a0.5, 32]<4> ubDNDI_RESP(2,17)<16;8,2> { NoDDClr, NoDDChk } //U pixels |
||
436 | mov (8) r[a0.5, 64]<4> ubDNDI_RESP(2,33)<16;8,2> { NoDDClr, NoDDChk } //U pixels |
||
437 | mov (8) r[a0.5, 96]<4> ubDNDI_RESP(2,49)<16;8,2> { NoDDClr, NoDDChk } //U pixels |
||
438 | // Pack 2nd field V |
||
439 | mov (8) r[a0.6, 0]<4> ubDNDI_RESP(2,0)<16;8,2> { NoDDChk } //Vpixels |
||
440 | mov (8) r[a0.6, 32]<4> ubDNDI_RESP(2,16)<16;8,2> { NoDDChk } //Vpixels |
||
441 | mov (8) r[a0.6, 64]<4> ubDNDI_RESP(2,32)<16;8,2> { NoDDChk } //Vpixels |
||
442 | mov (8) r[a0.6, 96]<4> ubDNDI_RESP(2,48)<16;8,2> { NoDDChk } //Vpixels |
||
443 | |||
444 | // Pack 1st field Y |
||
445 | mov (16) r[a0.4, 160]<2> ubDNDI_RESP(4,0) { NoDDClr } |
||
446 | mov (16) r[a0.4, 192]<2> ubDNDI_RESP(4,16) { NoDDClr } |
||
447 | mov (16) r[a0.4, 224]<2> ubDNDI_RESP(4,32) { NoDDClr } |
||
448 | mov (16) r[a0.4, 256]<2> ubDNDI_RESP(4,48) { NoDDClr } |
||
449 | // Pack 1st field U |
||
450 | mov (8) r[a0.5, 160]<4> ubDNDI_RESP(6,1)<16;8,2> { NoDDClr, NoDDChk } //U pixels |
||
451 | mov (8) r[a0.5, 192]<4> ubDNDI_RESP(6,17)<16;8,2> { NoDDClr, NoDDChk } //U pixels |
||
452 | mov (8) r[a0.5, 224]<4> ubDNDI_RESP(6,33)<16;8,2> { NoDDClr, NoDDChk } //U pixels |
||
453 | mov (8) r[a0.5, 256]<4> ubDNDI_RESP(6,49)<16;8,2> { NoDDClr, NoDDChk } //U pixels |
||
454 | // Pack 1st field V |
||
455 | mov (8) r[a0.6, 160]<4> ubDNDI_RESP(6,0)<16;8,2> { NoDDChk } //Vpixels |
||
456 | mov (8) r[a0.6, 192]<4> ubDNDI_RESP(6,16)<16;8,2> { NoDDChk } //Vpixels |
||
457 | mov (8) r[a0.6, 224]<4> ubDNDI_RESP(6,32)<16;8,2> { NoDDChk } //Vpixels |
||
458 | mov (8) r[a0.6, 256]<4> ubDNDI_RESP(6,48)<16;8,2> { NoDDChk } //Vpixels |
||
459 | |||
460 | //save the previous frame |
||
461 | send (8) null<1>:d r18.0 0x5 0xA0A801B:ud |
||
462 | |||
463 | //save the current frame |
||
464 | send (8) null<1>:d r23.0 0x5 0xA0A801E:ud |
||
465 | |||
466 | |||
467 | |||
468 | //End of Thread message |
||
469 | |||
470 | mov (8) r127<1>:ud r0.0<8;8,1>:ud |
||
471 | send (1) null<1>:d r127 0x27 0x02000010 |
||
472 | |||
473 | |||
474 | .end_code |
||
475 | .end_kernel1>8;8,1>1>1>1>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>2>2>2>2>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>2>2>2>2>8;8,1>1>8;8,1>1>1>0;1,0>1>0;1,0>1>8;8,1>1>4;4,1>1>1>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>2>2>2>2>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>16;8,2>4>2>2>2>2>1>0;1,0>1>0;1,0>1>8;8,1>1>4;4,1>1>0;1,0>1>1>2;2,1>2>2;2,1>2>0;1,0>1>2;2,1>2;2,1>1>1>0;1,0>1>0;1,0>1>0;1,0>1>8;8,1>1>1>1>8;8,1>1>1>0;1,0>0;1,0>1>2;2,1>1>0;1,0>1>8;8,1>1>1>1>0;1,0>1>0;1,0>1>1>8;8,1>1>2;2,1>1>1>0;1,0>1>0;1,0>1>8;8,1>1>1>16;16,1>1>16;16,1>1>16;16,1>1>8;8,1>1>16;16,1>1>16;16,1>1>8;8,1>1>8;8,1>4>32;8,4>1>16;16,1>1>16;16,1>1>8;8,1>1>8;8,1>8;8,1>8;8,1>16;16,1>16;16,1> |