~gma500/emgd/trunk

« back to all changes in this revision

Viewing changes to libva/libva-0.31.0/i965_drv_video/shaders/mpeg2/vld/addidct.g4i

  • Committer: José Bernardo Bandos
  • Date: 2010-08-28 16:04:10 UTC
  • Revision ID: jbs@jbs-laptop-20100828160410-nw5zohdn37oupdv2
First step to add emgd drivers from meego

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright © 2008 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 "Software"),
6
 
 * to deal in the Software without restriction, including without limitation
7
 
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
 
 * and/or sell copies of the Software, and to permit persons to whom the
9
 
 * Software is furnished to do so, subject to the following conditions:
10
 
 *
11
 
 * The above copyright notice and this permission notice (including the next
12
 
 * paragraph) shall be included in all copies or substantial portions of the
13
 
 * Software.
14
 
 *
15
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18
 
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
 
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
 
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
 
 * SOFTWARE.
22
 
 *
23
 
 * Author:
24
 
 *    Zou Nan hai <nanhai.zou@intel.com>
25
 
 *    Yan Li <li.l.yan@intel.com>
26
 
 *    Liu Xi bin<xibin.liu@intel.com>
27
 
 */
28
 
/* GRF allocation:
29
 
   g1~g30: constant buffer
30
 
           g1~g2:intra IQ matrix
31
 
           g3~g4:non intra IQ matrix
32
 
           g5~g20:IDCT table
33
 
   g31:    thread payload 
34
 
   g32:    message descriptor for reading reference data
35
 
   g58~g81:reference data
36
 
   g82:    thread payload backup
37
 
   g83~g106:IDCT data                           */
38
 
mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};          //restore x and y
39
 
 
40
 
and.nz (1) null g82.2<1,1,1>UW 0x20UW {align1};       //dct_type
41
 
(f0) jmpi field_dct;
42
 
 
43
 
add (16) g58.0<1>W g83.0<16,16,1>W g58.0<16,16,2>UB {align1};
44
 
add (16) g59.0<1>W g84.0<16,16,1>W g59.0<16,16,2>UB {align1};
45
 
add (16) g60.0<1>W g85.0<16,16,1>W g60.0<16,16,2>UB {align1};
46
 
add (16) g61.0<1>W g86.0<16,16,1>W g61.0<16,16,2>UB {align1};
47
 
add (16) g62.0<1>W g87.0<16,16,1>W g62.0<16,16,2>UB {align1};
48
 
add (16) g63.0<1>W g88.0<16,16,1>W g63.0<16,16,2>UB {align1};
49
 
add (16) g64.0<1>W g89.0<16,16,1>W g64.0<16,16,2>UB {align1};
50
 
add (16) g65.0<1>W g90.0<16,16,1>W g65.0<16,16,2>UB {align1};
51
 
add (16) g66.0<1>W g91.0<16,16,1>W g66.0<16,16,2>UB {align1};
52
 
add (16) g67.0<1>W g92.0<16,16,1>W g67.0<16,16,2>UB {align1};
53
 
add (16) g68.0<1>W g93.0<16,16,1>W g68.0<16,16,2>UB {align1};
54
 
add (16) g69.0<1>W g94.0<16,16,1>W g69.0<16,16,2>UB {align1};
55
 
add (16) g70.0<1>W g95.0<16,16,1>W g70.0<16,16,2>UB {align1};
56
 
add (16) g71.0<1>W g96.0<16,16,1>W g71.0<16,16,2>UB {align1};
57
 
add (16) g72.0<1>W g97.0<16,16,1>W g72.0<16,16,2>UB {align1};
58
 
add (16) g73.0<1>W g98.0<16,16,1>W g73.0<16,16,2>UB {align1};
59
 
jmpi write_back;
60
 
 
61
 
field_dct:
62
 
add (16) g58.0<1>W g83.0<16,16,1>W g58.0<16,16,2>UB {align1};
63
 
add (16) g59.0<1>W g91.0<16,16,1>W g59.0<16,16,2>UB {align1};
64
 
add (16) g60.0<1>W g84.0<16,16,1>W g60.0<16,16,2>UB {align1};
65
 
add (16) g61.0<1>W g92.0<16,16,1>W g61.0<16,16,2>UB {align1};
66
 
add (16) g62.0<1>W g85.0<16,16,1>W g62.0<16,16,2>UB {align1};
67
 
add (16) g63.0<1>W g93.0<16,16,1>W g63.0<16,16,2>UB {align1};
68
 
add (16) g64.0<1>W g86.0<16,16,1>W g64.0<16,16,2>UB {align1};
69
 
add (16) g65.0<1>W g94.0<16,16,1>W g65.0<16,16,2>UB {align1};
70
 
add (16) g66.0<1>W g87.0<16,16,1>W g66.0<16,16,2>UB {align1};
71
 
add (16) g67.0<1>W g95.0<16,16,1>W g67.0<16,16,2>UB {align1};
72
 
add (16) g68.0<1>W g88.0<16,16,1>W g68.0<16,16,2>UB {align1};
73
 
add (16) g69.0<1>W g96.0<16,16,1>W g69.0<16,16,2>UB {align1};
74
 
add (16) g70.0<1>W g89.0<16,16,1>W g70.0<16,16,2>UB {align1};
75
 
add (16) g71.0<1>W g97.0<16,16,1>W g71.0<16,16,2>UB {align1};
76
 
add (16) g72.0<1>W g90.0<16,16,1>W g72.0<16,16,2>UB {align1};
77
 
add (16) g73.0<1>W g98.0<16,16,1>W g73.0<16,16,2>UB {align1};
78
 
 
79
 
write_back:
80
 
mov (1) g31.8<1>UD 0x00F000FUD {align1};
81
 
mov.sat (16) g58.0<2>UB g58.0<16,16,1>W {align1};
82
 
mov.sat (16) g59.0<2>UB g59.0<16,16,1>W {align1};
83
 
mov.sat (16) g60.0<2>UB g60.0<16,16,1>W {align1};
84
 
mov.sat (16) g61.0<2>UB g61.0<16,16,1>W {align1};
85
 
mov.sat (16) g62.0<2>UB g62.0<16,16,1>W {align1};
86
 
mov.sat (16) g63.0<2>UB g63.0<16,16,1>W {align1};
87
 
mov.sat (16) g64.0<2>UB g64.0<16,16,1>W {align1};
88
 
mov.sat (16) g65.0<2>UB g65.0<16,16,1>W {align1};
89
 
mov.sat (16) g66.0<2>UB g66.0<16,16,1>W {align1};
90
 
mov.sat (16) g67.0<2>UB g67.0<16,16,1>W {align1};
91
 
mov.sat (16) g68.0<2>UB g68.0<16,16,1>W {align1};
92
 
mov.sat (16) g69.0<2>UB g69.0<16,16,1>W {align1};
93
 
mov.sat (16) g70.0<2>UB g70.0<16,16,1>W {align1};
94
 
mov.sat (16) g71.0<2>UB g71.0<16,16,1>W {align1};
95
 
mov.sat (16) g72.0<2>UB g72.0<16,16,1>W {align1};
96
 
mov.sat (16) g73.0<2>UB g73.0<16,16,1>W {align1};
97
 
 
98
 
mov (16) m1.0<1>UB  g58.0<16,16,2>UB {align1};
99
 
mov (16) m1.16<1>UB g59.0<16,16,2>UB {align1};
100
 
mov (16) m2.0<1>UB  g60.0<16,16,2>UB {align1};
101
 
mov (16) m2.16<1>UB g61.0<16,16,2>UB {align1};
102
 
mov (16) m3.0<1>UB  g62.0<16,16,2>UB {align1};
103
 
mov (16) m3.16<1>UB g63.0<16,16,2>UB {align1};
104
 
mov (16) m4.0<1>UB  g64.0<16,16,2>UB {align1};
105
 
mov (16) m4.16<1>UB g65.0<16,16,2>UB {align1};
106
 
mov (16) m5.0<1>UB  g66.0<16,16,2>UB {align1};
107
 
mov (16) m5.16<1>UB g67.0<16,16,2>UB {align1};
108
 
mov (16) m6.0<1>UB  g68.0<16,16,2>UB {align1};
109
 
mov (16) m6.16<1>UB g69.0<16,16,2>UB {align1};
110
 
mov (16) m7.0<1>UB  g70.0<16,16,2>UB {align1};
111
 
mov (16) m7.16<1>UB g71.0<16,16,2>UB {align1};
112
 
mov (16) m8.0<1>UB  g72.0<16,16,2>UB {align1};
113
 
mov (16) m8.16<1>UB g73.0<16,16,2>UB {align1};
114
 
send (16) 0 acc0<1>UW g31<8,8,1>UW write(0,0,2,0) mlen 9 rlen 0 {align1};
115
 
 
116
 
//U
117
 
mov (1) g31.8<1>UD 0x0070007UD  { align1 };
118
 
shr (2) g31.0<1>UD g31.0<2,2,1>UD 1D {align1};
119
 
add (16) g74.0<1>W g99.0<16,16,1>W g74.0<16,16,1>UW {align1};
120
 
add (16) g75.0<1>W g100.0<16,16,1>W g75.0<16,16,1>UW {align1};
121
 
add (16) g76.0<1>W g101.0<16,16,1>W g76.0<16,16,1>UW {align1};
122
 
add (16) g77.0<1>W g102.0<16,16,1>W g77.0<16,16,1>UW {align1};
123
 
mov.sat (16) g74.0<2>UB g74.0<16,16,1>W {align1};
124
 
mov.sat (16) g75.0<2>UB g75.0<16,16,1>W {align1};
125
 
mov.sat (16) g76.0<2>UB g76.0<16,16,1>W {align1};
126
 
mov.sat (16) g77.0<2>UB g77.0<16,16,1>W {align1};
127
 
 
128
 
mov (16) m1.0<1>UB g74.0<16,16,2>UB {align1};
129
 
mov (16) m1.16<1>UB g75.0<16,16,2>UB {align1};
130
 
mov (16) m2.0<1>UB g76.0<16,16,2>UB {align1};
131
 
mov (16) m2.16<1>UB g77.0<16,16,2>UB {align1};
132
 
send (16) 0 acc0<1>UW g31<8,8,1>UW write(1, 0, 2, 0) mlen 3 rlen 0 { align1 };
133
 
 
134
 
//V
135
 
add (16) g78.0<1>UW g103.0<16,16,1>W g78.0<16,16,1>UW {align1};
136
 
add (16) g79.0<1>UW g104.0<16,16,1>W g79.0<16,16,1>UW {align1};
137
 
add (16) g80.0<1>UW g105.0<16,16,1>W g80.0<16,16,1>UW {align1};
138
 
add (16) g81.0<1>UW g106.0<16,16,1>W g81.0<16,16,1>UW {align1};
139
 
mov.sat (16) g78.0<2>UB g78.0<16,16,1>W {align1};
140
 
mov.sat (16) g79.0<2>UB g79.0<16,16,1>W {align1};
141
 
mov.sat (16) g80.0<2>UB g80.0<16,16,1>W {align1};
142
 
mov.sat (16) g81.0<2>UB g81.0<16,16,1>W {align1};
143
 
 
144
 
mov (16) m1.0<1>UB g78.0<16,16,2>UB {align1};
145
 
mov (16) m1.16<1>UB g79.0<16,16,2>UB {align1};
146
 
mov (16) m2.0<1>UB g80.0<16,16,2>UB {align1};
147
 
mov (16) m2.16<1>UB g81.0<16,16,2>UB {align1};
148
 
send (16) 0 acc0<1>UW g31<8,8,1>UW write(2, 0, 2, 0) mlen 3 rlen 0 { align1 };
149
 
 
150
 
send (16) 0 acc0<1>UW g0<8,8,1>UW
151
 
        thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
152