summaryrefslogtreecommitdiff
path: root/xvmc/shader/mc/field_forward_igd.g4a
blob: 61719ed28a2cb2e5a2884b2f6b9dab966b02645a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* GRF allocation:
   g1~g30: constant buffer
           g1~g2:intra IQ matrix
           g3~g4:non intra IQ matrix
           g5~g20:IDCT table
   g31:    thread payload 
   g58~g81:reference data
   g82:    thread payload backup
   g84~g107:IDCT data
   g115:   message descriptor for reading reference data   */
mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
mov (1) g126.8<1>UD ip {align1};
add (1) ip g21.0<1,1,1>UD 0x50UD {align1};                  //jump to the lib to do IDCT

/*field 0 of Y*/
asr (2) g31.14<1>W g82.14<2,2,1>W 1W {align1};
add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
and.nz (1) null g82.31<1,1,1>UB 0x1UW {align1};             //motion vertical field select
(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
mov (1) g115.16<1>UW 0UW {align1};           	//0:forward 1:backward
mov (1) a0.0<1>UD 0x0A4EUD {align1};        	//g82.14,motion vector
mov (1) g126.8<1>UD ip {align1};
add (1) ip g21.0<1,1,1>UD 0x20UD {align1};   	//jump to the lib to read reference data 

mov (8) g58.0<1>UD g32.0<8,8,1>UD {align1};
mov (8) g60.0<1>UD g33.0<8,8,1>UD {align1};
mov (8) g62.0<1>UD g34.0<8,8,1>UD {align1};
mov (8) g64.0<1>UD g35.0<8,8,1>UD {align1};
mov (8) g66.0<1>UD g36.0<8,8,1>UD {align1};
mov (8) g68.0<1>UD g37.0<8,8,1>UD {align1};
mov (8) g70.0<1>UD g38.0<8,8,1>UD {align1};
mov (8) g72.0<1>UD g39.0<8,8,1>UD {align1};

/*field 1 of Y*/
asr (2) g31.14<1>W g82.22<2,2,1>W 1W {align1};
add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
and.nz (1) null g82.31<1,1,1>UB 0x4UW {align1};
(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
mov (1) a0.0<1>UD 0x0A56UD {align1};        //g82.22,motion vector
mov (1) g126.8<1>UD ip {align1};
add (1) ip g21.0<1,1,1>UD 0x20UD {align1};   //jump to the lib to read reference data 

mov (8) g59.0<1>UD g32.0<8,8,1>UD {align1};
mov (8) g61.0<1>UD g33.0<8,8,1>UD {align1};
mov (8) g63.0<1>UD g34.0<8,8,1>UD {align1};
mov (8) g65.0<1>UD g35.0<8,8,1>UD {align1};
mov (8) g67.0<1>UD g36.0<8,8,1>UD {align1};
mov (8) g69.0<1>UD g37.0<8,8,1>UD {align1};
mov (8) g71.0<1>UD g38.0<8,8,1>UD {align1};
mov (8) g73.0<1>UD g39.0<8,8,1>UD {align1};

/*field 0 of UV*/
shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};

asr (2) g31.14<1>W g82.14<2,2,1>W 2W {align1};
add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
and.nz (1) null g82.31<1,1,1>UB 0x1UW {align1};
(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
mov (1) a0.0<1>UD 0x0A4EUD {align1};         //g82.14,motion vector
mov (1) g126.8<1>UD ip {align1};
add (1) ip g21.0<1,1,1>UD 0x30UD {align1};   //jump to the lib to read reference data 

mov (16) g74.0<1>UW g32.0<8,8,1>UW {align1 compr};
mov (16) g76.0<1>UW g34.0<8,8,1>UW {align1 compr};
mov (16) g78.0<1>UW g36.0<8,8,1>UW {align1 compr};
mov (16) g80.0<1>UW g38.0<8,8,1>UW {align1 compr};

/*field 1 of UV*/
asr (2) g31.14<1>W g82.22<2,2,1>W 2W {align1};
add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
and.nz (1) null g82.31<1,1,1>UB 0x4UW {align1};
(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
mov (1) a0.0<1>UD 0x0A56UD {align1};         //g82.22,motion vector
mov (1) g126.8<1>UD ip {align1};
add (1) ip g21.0<1,1,1>UD 0x30UD {align1};   //jump to the lib to read reference data 

mov (16) g74.16<1>UW g32.0<8,8,1>UW {align1 compr};
mov (16) g76.16<1>UW g34.0<8,8,1>UW {align1 compr};
mov (16) g78.16<1>UW g36.0<8,8,1>UW {align1 compr};
mov (16) g80.16<1>UW g38.0<8,8,1>UW {align1 compr};

add (1) ip g21.0<1,1,1>UD 0x40UD {align1};          //jump to the lib to add the reference and idct data