Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5361 | serge | 1 | /* |
2 | * Copyright © <2010>, Intel Corporation. |
||
3 | * |
||
4 | * This program is licensed under the terms and conditions of the |
||
5 | * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at |
||
6 | * http://www.opensource.org/licenses/eclipse-1.0.php. |
||
7 | * |
||
8 | */ |
||
9 | ////////// AVC ILDB filter horizontal UV /////////////////////////////////////////////////////// |
||
10 | // |
||
11 | // This filter code prepares the src data and control data for ILDB filtering on all horizontal edges of UV. |
||
12 | // |
||
13 | // It sssumes the data for horizontal de-blocking is already transposed. |
||
14 | // |
||
15 | // Chroma: |
||
16 | // |
||
17 | // +-------+-------+ H0 Edge |
||
18 | // | | | |
||
19 | // | | | |
||
20 | // | | | |
||
21 | // +-------+-------+ H1 Edge |
||
22 | // | | | |
||
23 | // | | | |
||
24 | // | | | |
||
25 | // +-------+-------+ |
||
26 | // |
||
27 | ///////////////////////////////////////////////////////////////////////////// |
||
28 | |||
29 | #if defined(_DEBUG) |
||
30 | mov (1) EntrySignatureC:w 0xBBBC:w |
||
31 | #endif |
||
32 | |||
33 | //=============== Chroma deblocking ================ |
||
34 | |||
35 | //---------- Deblock U external top edge ---------- |
||
36 | and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterTopMbEdgeFlag:w // Check for FilterTopMbEdgeFlag |
||
37 | // (f0.0) jmpi BYPASS_EXT_TOP_EDGE_UV |
||
38 | |||
39 | // Get horizontal border edge control data. |
||
40 | |||
41 | //***** Need to take every other bit to form U maskA and mask B |
||
42 | // Get Luma maskA and maskB |
||
43 | shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMapA_ExtTopHorz0]<0;1,0>:uw RRampW(0) |
||
44 | shr (16) TempRow1(0)<1> r[ECM_AddrReg, wEdgeCntlMapB_ExtTopHorz0]<0;1,0>:uw RRampW(0) |
||
45 | |||
46 | (f0.0) jmpi ILDB_LABEL(BYPASS_EXT_TOP_EDGE_UV) |
||
47 | |||
48 | // Extract UV MaskA and MaskB from every other bit of Y masks |
||
49 | and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w |
||
50 | and.nz.f0.1 (8) null:w TempRow1(0)<16;8,2> 1:w |
||
51 | |||
52 | //---------- Deblock U external edge ---------- |
||
53 | // p1 = Prev MB U row 0 |
||
54 | // p0 = Prev MB U row 1 |
||
55 | // q0 = Cur MB U row 0 |
||
56 | // q1 = Cur MB U row 1 |
||
57 | // mov (1) P_AddrReg:w PREV_MB_U_BASE:w { NoDDClr } |
||
58 | mov (1) P_AddrReg:w TOP_MB_U_BASE:w { NoDDClr } |
||
59 | mov (1) Q_AddrReg:w SRC_MB_U_BASE:w { NoDDChk } |
||
60 | |||
61 | // alpha = bAlphaTop0_Cb, beta = bBetaTop0_Cb |
||
62 | mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaTop0_Cb]<2;2,1>:ub { NoDDClr } |
||
63 | // tc0 has bTc0_h03_0_Cb + bTc0_h02_0_Cb + bTc0_h01_0_Cb + bTc0_h00_0_Cb |
||
64 | mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h00_0_Cb]<4;4,1>:ub { NoDDChk } |
||
65 | |||
66 | // UV MaskA and MaskB |
||
67 | mov (2) MaskA<1>:uw f0.0<2;2,1>:uw |
||
68 | |||
69 | CALL(FILTER_UV, 1) |
||
70 | |||
71 | //---------- Deblock V external top edge ---------- |
||
72 | // p1 = Prev MB V row 0 |
||
73 | // p0 = Prev MB V row 1 |
||
74 | // q0 = Cur MB V row 0 |
||
75 | // q1 = Cur MB V row 1 |
||
76 | // mov (1) P_AddrReg:w PREV_MB_V_BASE:w { NoDDClr } |
||
77 | mov (1) P_AddrReg:w TOP_MB_V_BASE:w { NoDDClr } |
||
78 | mov (1) Q_AddrReg:w SRC_MB_V_BASE:w { NoDDChk } |
||
79 | |||
80 | // alpha = bAlphaTop0_Cr, beta = bBetaTop0_Cr |
||
81 | mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaTop0_Cr]<2;2,1>:ub { NoDDClr } |
||
82 | |||
83 | // tc0 has bTc0_h03_0_Cr + bTc0_h02_0_Cr + bTc0_h01_0_Cr + bTc0_h00_0_Cr |
||
84 | mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h00_0_Cr]<4;4,1>:ub { NoDDChk } |
||
85 | |||
86 | // UV MaskA and MaskB |
||
87 | mov (2) f0.0<1>:uw MaskA<2;2,1>:uw |
||
88 | |||
89 | CALL(FILTER_UV, 1) |
||
90 | |||
91 | ILDB_LABEL(BYPASS_EXT_TOP_EDGE_UV): |
||
92 | |||
93 | // Set EdgeCntlMap2 = 0, so it always uses bS < 4 algorithm. |
||
94 | |||
95 | // Bypass deblocking if FilterInternal4x4EdgesFlag = 0 |
||
96 | // and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FilterInternal4x4EdgesFlag:w // Check for FilterInternal4x4EdgesFlag |
||
97 | // (f0.0) jmpi BYPASS_4x4_DEBLOCK_H |
||
98 | |||
99 | //---------- Deblock U internal horz middle edge ---------- |
||
100 | |||
101 | //***** Need to take every other bit to form U maskA |
||
102 | // Get Luma maskA and maskB |
||
103 | shr (16) TempRow0(0)<1> r[ECM_AddrReg, wEdgeCntlMap_IntMidHorz]<0;1,0>:uw RRampW(0) |
||
104 | |||
105 | // p1 = Cur MB U row 2 |
||
106 | // p0 = Cur MB U row 3 |
||
107 | // q0 = Cur MB U row 4 |
||
108 | // q1 = Cur MB U row 5 |
||
109 | mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDClr } // Skip 2 U rows and 2 V rows |
||
110 | mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_U_BASE:w { NoDDChk } |
||
111 | |||
112 | // alpha = bAlphaInternal_Cb, beta = bBetaInternal_Cb |
||
113 | mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaInternal_Cb]<2;2,1>:ub { NoDDClr } |
||
114 | // tc0 has bTc0_h23_Cb + bTc0_h22_Cb + bTc0_h21_Cb + bTc0_h20_Cb |
||
115 | mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h20_Cb]<4;4,1>:ub { NoDDChk } |
||
116 | |||
117 | // Extract UV MaskA and MaskB from every other bit of Y masks |
||
118 | and.nz.f0.0 (8) null:w TempRow0(0)<16;8,2> 1:w |
||
119 | |||
120 | // UV MaskA and MaskB |
||
121 | mov (1) f0.1:uw 0:w |
||
122 | mov (1) MaskB:uw 0:w { NoDDClr } |
||
123 | mov (1) MaskA:uw f0.0:uw { NoDDChk } |
||
124 | |||
125 | CALL(FILTER_UV, 1) |
||
126 | |||
127 | //---------- Deblock V internal horz middle edge ---------- |
||
128 | // p1 = Cur MB V row 2 |
||
129 | // p0 = Cur MB V row 3 |
||
130 | // q0 = Cur MB V row 4 |
||
131 | // q1 = Cur MB V row 5 |
||
132 | mov (1) P_AddrReg:w 4*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDClr } // Skip 2 U rows and 2 V rows |
||
133 | mov (1) Q_AddrReg:w 8*UV_ROW_WIDTH+SRC_MB_V_BASE:w { NoDDChk } |
||
134 | |||
135 | // alpha = bAlphaInternal_Cr, beta = bBetaInternal_Cr |
||
136 | mov (2) alpha<1>:w r[ECM_AddrReg, bAlphaInternal_Cr]<2;2,1>:ub { NoDDClr } |
||
137 | // tc0 has bTc0_h23_Cr + bTc0_h22_Cr + bTc0_h21_Cr + bTc0_h20_Cr |
||
138 | mov (4) tc0<1>:ub r[ECM_AddrReg, bTc0_h20_Cr]<4;4,1>:ub { NoDDChk } |
||
139 | |||
140 | // UV MaskA and MaskB |
||
141 | mov (2) f0.0<1>:uw MaskA<2;2,1>:uw |
||
142 | |||
143 | CALL(FILTER_UV, 1) |
||
144 | |||
145 | //BYPASS_4x4_DEBLOCK_H:2;2,1>1>4;4,1>1>2;2,1>1>16;8,2>4;4,1>1>2;2,1>1>0;1,0>1>>2;2,1>1>4;4,1>1>2;2,1>1>2;2,1>1>4;4,1>1>2;2,1>1>16;8,2>16;8,2>0;1,0>1>0;1,0>1>2010> |