Subversion Repositories Kolibri OS

Rev

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
//  120    // Total instruction count
17
//    1    // Total kernel count
18
 
19
.kernel PL3_DNDI_422CP
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	0x4BE8003: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_Load_UV_IMC3_16x4.asm
361
// Author:		Vivek Kumar
362
// Description:	Read UV for 16x4 block through DATAPORT
363
 
364
 
365
 
366
// FileName:	UVCopy_Load_16x4.asm
367
// Author:		Vivek Kumar
368
// Description:	Read UV for 16x4 block through DATAPORT
369
 
370
 
371
	add (2)		r27.0<1>:d			r7.0<2;2,1>:w				r4.4<2;2,1>:w				// Source Y Block origin
372
	asr (2)  	r27.0<1>:d     		r27.0<2;2,1>:d       	1:w   						{ NoDDClr }		// U/V block origin should be half of Y's
373
	mov (1)		r27.2<1>:ud			0x10007:ud  					 	{ NoDDChk }		// U/V block width and height (8x2)
374
    mov (8)     r36<1>:ud    	r27.0<8;8,1>:ud
375
    mov (8)     r38<1>:ud     r27.0<8;8,1>:ud
376
	send (8)	udDNDI_UV_RESP(0)<1>	r36	0x4	0x2190001:ud
377
	send (8)	udDNDI_UV_RESP(1)<1>	r38	0x4	0x2190002:ud
378
 
379
 
380
 
381
// FileName:	DN_Save_Y_16x4.asm
382
// Author:		Vivek Kumar
383
// Description:	Save one 16x4 blocks of Y channel of DN output for reference
384
 
385
 
386
 // check top/bottom field first
387
cmp.e.f0.0 (1)  null<1>:w               r1.28<0;1,0>:ub     1:w
388
 
389
mov (8)		mudMSGHDR_DN_OUT(0)<1>		r0<8;8,1>:ud            						// message header
390
mov (2)     mdMSGHDR_DN_OUT(0,0)<1>		r7.0<2;2,1>:w  				{ NoDDClr }        	// X origin * 2 (422 output)
391
mov (1)     mudMSGHDR_DN_OUT(0,2)<1>	0x3000F:ud		{ NoDDChk }        	// block width and height (32x8)
392
 
393
(f0.0) jmpi (1) TOP_FIELD_FIRST
394
 
395
BOTTOM_FIELD_FIRST:
396
 
397
	mov (4)     mudMSGHDR_DN_OUT(1,0)<1>    udDNDI_RESP(10,0)<4;4,1> 	{ NoDDClr }		// 2nd field luma from current frame (line 0,2)
398
	mov (4)     mudMSGHDR_DN_OUT(1,4)<1>   	udDNDI_RESP(4,4)<4;4,1> 		{ NoDDChk }		// 1st field luma from current frame (line 1,3)
399
	mov (4)     mudMSGHDR_DN_OUT(2,0)<1>    udDNDI_RESP(10,4)<4;4,1> 	{ NoDDClr }		// 2nd field luma from current frame (line 0,2)
400
	mov (4)     mudMSGHDR_DN_OUT(2,4)<1>   udDNDI_RESP(5,4)<4;4,1> 		{ NoDDChk }		// 1st field luma from current frame (line 1,3)
401
 
402
	jmpi (1) SAVE_DN_CURR
403
 
404
TOP_FIELD_FIRST:
405
	mov (4)     mudMSGHDR_DN_OUT(1,0)<1>    udDNDI_RESP(4,0)<4;4,1> 		{ NoDDClr }		// 2nd field luma from current frame (line 0,2)
406
	mov (4)     mudMSGHDR_DN_OUT(1,4)<1>   	udDNDI_RESP(10,0)<4;4,1> 	{ NoDDChk }		// 1st field luma from current frame (line 1,3)
407
	mov (4)     mudMSGHDR_DN_OUT(2,0)<1>    udDNDI_RESP(5,0)<4;4,1> 		{ NoDDClr }		// 2nd field luma from current frame (line 0,2)
408
	mov (4)     mudMSGHDR_DN_OUT(2,4)<1>   udDNDI_RESP(10,4)<4;4,1> 	{ NoDDChk }		// 1st field luma from current frame (line 1,3)
409
 
410
SAVE_DN_CURR:
411
//send out data through data port
412
send (8)    null<1>:d    r31.0		0x5    0x60A8018:ud
413
 
414
 
415
 
416
// FileName:    DI_Save_422CP_16x4.asm
417
// Author:      Vivek Kumar
418
// Description: Save two 16x4 blocks of DI output in 422 format to Color Pipe (IECP)
419
 
420
 
421
.declare mubMSGHDR_DI_OUT1_1  Base=r18.0      ElementSize=1  Type=ub
422
 
423
 
424
.declare mubMSGHDR_DI_OUT1_2  Base=r21.0      ElementSize=1  Type=ub
425
 
426
 
427
.declare mubMSGHDR_DI_OUT2_1  Base=r24.0      ElementSize=1  Type=ub
428
 
429
 
430
.declare mubMSGHDR_DI_OUT2_2  Base=r27.0      ElementSize=1  Type=ub
431
 
432
 
433
mov (8) r27.0<1>:ud     r0.0<8;8,1>:ud
434
shl (1) r27.0<1>:ud     r7.0<0;1,0>:w            1:w  { NoDDClr }          // H. block origin need to be doubled
435
mov (1) r27.1<1>:ud     r7.1<0;1,0>:w                 { NoDDClr, NoDDChk }       // Block origin
436
mov (1) r27.2<1>:ud     0x3000F:ud        { NoDDClr, NoDDChk }       // Block width and height (16x8)
437
 
438
//M0.3  - 0 - CP Enable, 1 - Area of Interest, 3:2 Message Format(TBD), 4:3 - Ignored, 31:5 CP state pointer
439
//Compose area-of-interest bit + color pipe state pointer
440
or (1)  r27.3<1>:ud     r2.4<0;1,0>:ud     r7.26<0;1,0>:b     { NoDDChk }
441
 
442
//prepare the message headers
443
mov (8) r18.0<1>:ud       r27<8;8,1>:ud
444
mov (8) r24.0<1>:ud       r27<8;8,1>:ud
445
 
446
 
447
// Pack 2nd field Y; First 8x4 block
448
	mov (8)		mubMSGHDR_DI_OUT1_1(1)<2>			ubDNDI_RESP(0,0)<8;8,1>			{ NoDDClr } 	// copy line of Y directly to memory as optimization
449
	mov (8)		mubMSGHDR_DI_OUT1_1(1,16)<2>		ubDNDI_RESP(0,16)<8;8,1>			{ NoDDClr, NoDDChk } 	// copy line of Y directly to memory as optimization
450
	mov (8)		mubMSGHDR_DI_OUT1_1(2)<2>			ubDNDI_RESP(0,32)<8;8,1>			{ NoDDClr } 	// copy line of Y directly to memory as optimization
451
	mov (8)		mubMSGHDR_DI_OUT1_1(2,16)<2>		ubDNDI_RESP(0,48)<8;8,1>			{ NoDDClr, NoDDChk } 	// copy line of Y directly to memory as optimization
452
 
453
// Pack 2nd field U, V; First 8x4 block
454
	mov (4)     mubMSGHDR_DI_OUT1_1(1,1)<4>   		ubDNDI_RESP(2,1)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
455
	mov (4)     mubMSGHDR_DI_OUT1_1(1,17)<4>   	ubDNDI_RESP(2,17)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
456
 
457
	mov (4)     mubMSGHDR_DI_OUT1_1(1,3)<4>	  	ubDNDI_RESP(2,0)<8;4,2>			{ NoDDChk }    	// copy line of V directly to memory as optimization
458
	mov (4)     mubMSGHDR_DI_OUT1_1(1,19)<4>   	ubDNDI_RESP(2,16)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
459
	mov (4)     mubMSGHDR_DI_OUT1_1(2,1)<4>   		ubDNDI_RESP(2,33)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
460
	mov (4)     mubMSGHDR_DI_OUT1_1(2,17)<4>   	ubDNDI_RESP(2,49)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
461
 
462
	mov (4)     mubMSGHDR_DI_OUT1_1(2,3)<4>	  	ubDNDI_RESP(2,32)<8;4,2>			{ NoDDChk }    	// copy line of V directly to memory as optimization
463
	mov (4)     mubMSGHDR_DI_OUT1_1(2,19)<4>   	ubDNDI_RESP(2,48)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
464
 
465
 
466
// Pack 2nd field Y; Second 8x4 block
467
mov	(8)	r21.0<1>:ud		r18.0<8;8,1>:ud
468
add	(1)	r21.0<1>:ud		r21.0<0;1,0>:w		0x10:w
469
 
470
	mov (8)		mubMSGHDR_DI_OUT1_2(1)<2>			ubDNDI_RESP(0,8)<8;8,1>			{ NoDDClr } 	// copy line of Y directly to memory as optimization
471
	mov (8)		mubMSGHDR_DI_OUT1_2(1,16)<2>		ubDNDI_RESP(0,24)<8;8,1>		{ NoDDClr, NoDDChk } 	// copy line of Y directly to memory as optimization
472
	mov (8)		mubMSGHDR_DI_OUT1_2(2)<2>			ubDNDI_RESP(0,40)<8;8,1>			{ NoDDClr } 	// copy line of Y directly to memory as optimization
473
	mov (8)		mubMSGHDR_DI_OUT1_2(2,16)<2>		ubDNDI_RESP(0,56)<8;8,1>		{ NoDDClr, NoDDChk } 	// copy line of Y directly to memory as optimization
474
 
475
// Pack 2nd field U, V; Second 8x4 block
476
	mov (4)     mubMSGHDR_DI_OUT1_2(1,1)<4>   		ubDNDI_RESP(2,9)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
477
	mov (4)     mubMSGHDR_DI_OUT1_2(1,17)<4>		ubDNDI_RESP(2,25)<8;4,2>	{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
478
 
479
	mov (4)     mubMSGHDR_DI_OUT1_2(1,3)<4>   		ubDNDI_RESP(2,8)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
480
	mov (4)     mubMSGHDR_DI_OUT1_2(1,19)<4>		ubDNDI_RESP(2,24)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
481
	mov (4)     mubMSGHDR_DI_OUT1_2(2,1)<4>   		ubDNDI_RESP(2,41)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
482
	mov (4)     mubMSGHDR_DI_OUT1_2(2,17)<4>		ubDNDI_RESP(2,57)<8;4,2>	{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
483
 
484
	mov (4)     mubMSGHDR_DI_OUT1_2(2,3)<4>   		ubDNDI_RESP(2,40)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
485
	mov (4)     mubMSGHDR_DI_OUT1_2(2,19)<4>		ubDNDI_RESP(2,56)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
486
 
487
send (8)    null<1>:d    r18.0   0x5     0x60A801B:ud
488
send (8)    null<1>:d    r21.0   0x5     0x60A801B:ud
489
 
490
// Pack 1st field Y; 1st 8x4 block
491
	mov (8)		mubMSGHDR_DI_OUT2_1(1)<2>			ubDNDI_RESP(4,0)<8;8,1>			{ NoDDClr } 	// copy line of Y directly to memory as optimization
492
	mov (8)		mubMSGHDR_DI_OUT2_1(1,16)<2>		ubDNDI_RESP(4,16)<8;8,1>			{ NoDDClr, NoDDChk } 	// copy line of Y directly to memory as optimization
493
	mov (8)		mubMSGHDR_DI_OUT2_1(2)<2>			ubDNDI_RESP(4,32)<8;8,1>			{ NoDDClr } 	// copy line of Y directly to memory as optimization
494
	mov (8)		mubMSGHDR_DI_OUT2_1(2,16)<2>		ubDNDI_RESP(4,48)<8;8,1>			{ NoDDClr, NoDDChk } 	// copy line of Y directly to memory as optimization
495
 
496
// Pack 1st field U,V; 1st 8x4 block
497
	mov (4)     mubMSGHDR_DI_OUT2_1(1,1)<4>   		ubDNDI_RESP(6,1)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
498
	mov (4)     mubMSGHDR_DI_OUT2_1(1,17)<4>   	ubDNDI_RESP(6,17)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
499
 
500
	mov (4)     mubMSGHDR_DI_OUT2_1(1,3)<4>	  	ubDNDI_RESP(6,0)<8;4,2>		    { NoDDChk }    	// copy line of V directly to memory as optimization
501
	mov (4)     mubMSGHDR_DI_OUT2_1(1,19)<4>   	ubDNDI_RESP(6,16)<8;4,2>	    { NoDDChk }    	// copy line of V directly to memory as optimization
502
	mov (4)     mubMSGHDR_DI_OUT2_1(2,1)<4>   		ubDNDI_RESP(6,33)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
503
	mov (4)     mubMSGHDR_DI_OUT2_1(2,17)<4>   	ubDNDI_RESP(6,49)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
504
 
505
	mov (4)     mubMSGHDR_DI_OUT2_1(2,3)<4>	  	ubDNDI_RESP(6,32)<8;4,2>		    { NoDDChk }    	// copy line of V directly to memory as optimization
506
	mov (4)     mubMSGHDR_DI_OUT2_1(2,19)<4>   	ubDNDI_RESP(6,48)<8;4,2>	    { NoDDChk }    	// copy line of V directly to memory as optimization
507
 
508
// Pack 1st field Y; 2nd 8x4 block
509
mov	(8)	r27.0<1>:ud		r24.0<8;8,1>:ud
510
add	(1)	r27.0<1>:ud		r27.0<0;1,0>:w		0x10:w
511
 
512
	mov (8)		mubMSGHDR_DI_OUT2_2(1)<2>			ubDNDI_RESP(4,8)<8;8,1>			{ NoDDClr } 	// copy line of Y directly to memory as optimization
513
	mov (8)		mubMSGHDR_DI_OUT2_2(1,16)<2>		ubDNDI_RESP(4,24)<8;8,1>		{ NoDDClr, NoDDChk } 	// copy line of Y directly to memory as optimization
514
	mov (8)		mubMSGHDR_DI_OUT2_2(2)<2>			ubDNDI_RESP(4,40)<8;8,1>			{ NoDDClr } 	// copy line of Y directly to memory as optimization
515
	mov (8)		mubMSGHDR_DI_OUT2_2(2,16)<2>		ubDNDI_RESP(4,56)<8;8,1>		{ NoDDClr, NoDDChk } 	// copy line of Y directly to memory as optimization
516
 
517
// Pack 1st field U, V; 2nd 8x4 block
518
	mov (4)     mubMSGHDR_DI_OUT2_2(1,1)<4>   		ubDNDI_RESP(6,9)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
519
	mov (4)     mubMSGHDR_DI_OUT2_2(1,17)<4>		ubDNDI_RESP(6,25)<8;4,2>	{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
520
 
521
	mov (4)     mubMSGHDR_DI_OUT2_2(1,3)<4>   		ubDNDI_RESP(6,8)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
522
	mov (4)     mubMSGHDR_DI_OUT2_2(1,19)<4>		ubDNDI_RESP(6,24)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
523
	mov (4)     mubMSGHDR_DI_OUT2_2(2,1)<4>   		ubDNDI_RESP(6,41)<8;4,2>		{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
524
	mov (4)     mubMSGHDR_DI_OUT2_2(2,17)<4>		ubDNDI_RESP(6,57)<8;4,2>	{ NoDDClr, NoDDChk } 	// copy line of U directly to memory as optimization
525
 
526
	mov (4)     mubMSGHDR_DI_OUT2_2(2,3)<4>   		ubDNDI_RESP(6,40)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
527
	mov (4)     mubMSGHDR_DI_OUT2_2(2,19)<4>		ubDNDI_RESP(6,56)<8;4,2>		{ NoDDChk }    	// copy line of V directly to memory as optimization
528
 
529
send (8)    null<1>:d    r24.0     0x5     0x60A801E:ud
530
send (8)    null<1>:d    r27.0     0x5     0x60A801E:ud
531
 
532
 
533
 
534
// FileName:	DN_Save_UV_IMC3_16x4.asm
535
// Author:		Vivek Kumar
536
// Description:	Save UV for 16x4 block through DATAPORT
537
 
538
 
539
 
540
// FileName:	UVCopy_Save_16x4.asm
541
// Author:		Vivek Kumar
542
// Description:	Save UV for 16x4 block through DATAPORT
543
 
544
 
545
//Reuse the header from Load component
546
 
547
 
548
	mov (4)		mudMSGHDR_UCOPY(1)<1>		udDNDI_UV_RESP(0)<4;4,1>
549
	mov (4)		mudMSGHDR_VCOPY(1)<1>		udDNDI_UV_RESP(1)<4;4,1>
550
    send (4)    null<1>:d    r36	0x5    0x40A8019:ud
551
    send (4)    null<1>:d    r38	0x5    0x40A801A:ud
552
 
553
 
554
 
555
//End of Thread message
556
 
557
mov (8) r127<1>:ud r0.0<8;8,1>:ud
558
 send (1) null<1>:d r127 0x27 0x02000010
559
 
560
 
561
.end_code
562
.end_kernel