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
//    2    // Total instruction count
17
//    1    // Total kernel count
18
 
19
 
20
 
21
// Module name: common.inc
22
//
23
// Common header file for all Video-Processing kernels
24
//
25
 
26
.default_execution_size (16)
27
.default_register_type  :ub
28
 
29
.reg_count_total        128
30
.reg_count_payload      7
31
 
32
//========== Common constants ==========
33
 
34
 
35
//========== Macros ==========
36
 
37
 
38
//Fast Jump, For more details see "Set_Layer_N.asm"
39
 
40
 
41
//========== Defines ====================
42
 
43
//========== Static Parameters (Common To All) ==========
44
//r1
45
 
46
 
47
//r2
48
 
49
                                    //  e.g.            byte0   byte1  byte2
50
                                    // YUYV               0       1      3
51
                                    // YVYU               0       3      1
52
 
53
//Color Pipe (IECP) parameters
54
 
55
 
56
//ByteCopy
57
 
58
 
59
//r4
60
 
61
                                    //  e.g.              byte0           byte1           byte2
62
                                    // YUYV                 0               1               3
63
                                    // YVYU                 0               3               1
64
 
65
 
66
//========== Inline parameters (Common To All) ===========
67
 
68
 
69
//============== Binding Index Table===========
70
//Common between DNDI and DNUV
71
 
72
 
73
//================= Common Message Descriptor =====
74
// Message descriptor for thread spawning
75
// Message Descriptors
76
//                = 000 0001 (min message len 1 ) 0,0000 (resp len 0   -add later)
77
//                  0000,0000,0000
78
//                  0001(Spawn a root thread),0001 (Root thread spawn thread)
79
//                = 0x02000011
80
// Thread Spawner Message Descriptor
81
 
82
 
83
// Message descriptor for atomic operation add
84
// Message Descriptors
85
//                = 000 0110 (min message len 6 ) 0,0000 (resp len 0   -add later)
86
//                  1(header present)001,10(typed atomic operation)0(return enabled)0(slot group, low 8 bits),0111 (AOP_Add)
87
//                  0000,0000 (Binding table index, added later)
88
//                = 0x02000011
89
 
90
// Atomic Operation Add Message Descriptor
91
 
92
 
93
// Message descriptor for dataport media write
94
        // Message Descriptors
95
                //                = 000 0001 (min message len 1 - add later) 00000 (resp len 0)
96
                //                  1 (header present 1) 0 1010 (media block write) 000000
97
                //                  00000000 (binding table index - set later)
98
                //                = 0x020A8000
99
 
100
 
101
// Message Length defines
102
 
103
 
104
// Response Length defines
105
 
106
 
107
// Block Width and Height Size defines
108
 
109
 
110
// Extended Message Descriptors
111
 
112
 
113
// Common message descriptors:
114
 
115
 
116
//===================== Math Function Control ===================================
117
 
118
 
119
//============ Message Registers ===============
120
                             // buf4 starts from r28
121
 
122
 
123
//#define mMSGHDR_EOT  r43    // Dummy Message Register for EOT
124
 
125
 
126
.declare    mubMSGPAYLOAD  Base=r30 ElementSize=1 SrcRegion=<16;16,1> Type=ub
127
.declare    muwMSGPAYLOAD  Base=r30 ElementSize=2 SrcRegion=<16;16,1> Type=uw
128
.declare    mudMSGPAYLOAD  Base=r30 ElementSize=4 SrcRegion=<8;8,1> Type=ud
129
.declare    mfMSGPAYLOAD   Base=r30 ElementSize=4 SrcRegion=<8;8,1> Type=f
130
 
131
//=================== End of thread instruction ===========================
132
 
133
 
134
//=====================Pointers Used=====================================
135
 
136
 
137
//=======================================================================
138
 
139
 
140
//r9-r17
141
// Define temp space for any usages
142
 
143
 
144
// Common Buffers
145
 
146
 
147
// temp space for rotation
148
 
149
.declare fROBUF		  Base=r9.0		ElementSize=4		SrcRegion=<8;8,1>		  DstRegion=<1>		Type=f
150
 
151
.declare udROBUF		Base=r9.0		ElementSize=4		SrcRegion=<8;8,1>		  DstRegion=<1>		Type=ud
152
 
153
.declare uwROBUF		Base=r9.0		ElementSize=2		SrcRegion=<16;16,1>		DstRegion=<1>		Type=uw
154
 
155
.declare ubROBUF		Base=r9.0		ElementSize=1		SrcRegion=<16;16,1>		DstRegion=<1>		Type=ub
156
 
157
.declare ub4ROBUF 	Base=r9.0		ElementSize=1		SrcRegion=<32;8,4>		DstRegion=<4>		Type=ub
158
 
159
 
160
// End of common.inc
161
 
162
 
163
//End of Thread message
164
 
165
mov (8) r127<1>:ud r0.0<8;8,1>:ud
166
 send (1) null<1>:d r127 0x27 0x02000010