1 #include <gtest/gtest.h>
2 #include "cpu.h"
3 #include "cpu_core.h"
4 #include "get_intra_predictor.h"
5 #include "typedefs.h"
6 #include "ls_defines.h"
7 #include "macros.h"
8
9 using namespace WelsDec;
10 #define GENERATE_4x4_UT(pred, ref, ASM, CPUFLAGS) \
11 TEST(DecoderIntraPredictionTest, pred) { \
12 const int32_t kiStride = 32; \
13 int32_t iRunTimes = 1000; \
14 ENFORCE_STACK_ALIGN_1D (uint8_t, pPredBuffer, 12 * kiStride, 4); \
15 ENFORCE_STACK_ALIGN_1D (uint8_t, pRefBuffer, 12 * kiStride, 4); \
16 if (ASM) {\
17 int32_t iNumberofCPUCore = 1; \
18 uint32_t uiCPUFlags = WelsCPUFeatureDetect( &iNumberofCPUCore); \
19 if ((uiCPUFlags & CPUFLAGS) == 0) {\
20 return; \
21 } \
22 }\
23 while(iRunTimes--) {\
24 for (int i = 0; i < 12; i++) {\
25 pRefBuffer[kiStride * 3 + i] = pPredBuffer[kiStride * 3 + i] = rand() & 255; \
26 pRefBuffer[i * kiStride + 3] = pPredBuffer[i * kiStride + 3] = rand() & 255; \
27 } \
28 pred (&pPredBuffer[kiStride * 4 + 4], kiStride); \
29 ref (&pRefBuffer[kiStride * 4 + 4], kiStride); \
30 bool ok = true; \
31 for (int i = 0; i < 4; i++) \
32 for (int j = 0; j < 4; j++) \
33 if (pPredBuffer[(i+4) * kiStride + j + 4] != pRefBuffer[(i+4) * kiStride + j + 4]) { \
34 ok = false; \
35 break; \
36 } \
37 EXPECT_EQ(ok, true);\
38 } \
39 }
40
41 #define PREDV(size) \
42 void LumaI##size##x##size##PredV(uint8_t *pPred, const int32_t kiStride) {\
43 int i; \
44 for (i = 0; i < size; i++) {\
45 memcpy(pPred + i * kiStride, pPred - kiStride, size * sizeof(uint8_t)); \
46 } \
47 }
48
49 #define PREDH(size) \
50 void LumaI##size##x##size##PredH(uint8_t *pPred, const int32_t kiStride) {\
51 for (int i = 0; i < size; i++) { \
52 memset(pPred + i * kiStride, pPred[i * kiStride - 1], size * sizeof(uint8_t));\
53 }\
54 }
55
56 #define PREDDC(size, log) \
57 void LumaI##size##x##size##PredDC(uint8_t *pPred, const int32_t kiStride) {\
58 int iSum = size; \
59 for (int i = 0; i < size; i ++) \
60 iSum += pPred[-1 + i * kiStride] + pPred[i - kiStride]; \
61 uint8_t uiMean = iSum >>(log+1);\
62 for (int i = 0; i < size; i ++) \
63 memset(pPred + i * kiStride, uiMean, size * sizeof(uint8_t)); \
64 }
65
66 #define PREDDCLeft(size, log) \
67 void LumaI##size##x##size##PredDCLeft(uint8_t *pPred, const int32_t kiStride) {\
68 int iSum = size/2; \
69 for (int i = 0; i < size; i ++) \
70 iSum += pPred[-1 + i * kiStride]; \
71 uint8_t uiMean = iSum >>(log);\
72 for (int i = 0; i < size; i ++) \
73 memset(pPred + i * kiStride, uiMean, size * sizeof(uint8_t)); \
74 }
75
76 #define PREDDCTop(size, log) \
77 void LumaI##size##x##size##PredDCTop(uint8_t *pPred, const int32_t kiStride) {\
78 int iSum = size/2; \
79 for (int i = 0; i < size; i ++) \
80 iSum += pPred[i - kiStride]; \
81 uint8_t uiMean = iSum >>(log);\
82 for (int i = 0; i < size; i ++) \
83 memset(pPred + i * kiStride, uiMean, size * sizeof(uint8_t)); \
84 }
85
86 #define PREDDCNone(size, log) \
87 void LumaI##size##x##size##PredDCNone(uint8_t *pPred, const int32_t kiStride) {\
88 uint8_t uiMean = 128;\
89 for (int i = 0; i < size; i ++) \
90 memset(pPred + i * kiStride, uiMean, size * sizeof(uint8_t)); \
91 }
92
93
94 /*down pLeft*/
WelsI4x4LumaPredDDL_ref(uint8_t * pPred,const int32_t kiStride)95 void WelsI4x4LumaPredDDL_ref (uint8_t* pPred, const int32_t kiStride) {
96 const int32_t kiStride2 = kiStride << 1;
97 const int32_t kiStride3 = kiStride + kiStride2;
98 /*get pTop*/
99 uint8_t* ptop = &pPred[-kiStride];
100 const uint8_t kuiT0 = *ptop;
101 const uint8_t kuiT1 = * (ptop + 1);
102 const uint8_t kuiT2 = * (ptop + 2);
103 const uint8_t kuiT3 = * (ptop + 3);
104 const uint8_t kuiT4 = * (ptop + 4);
105 const uint8_t kuiT5 = * (ptop + 5);
106 const uint8_t kuiT6 = * (ptop + 6);
107 const uint8_t kuiT7 = * (ptop + 7);
108 const uint8_t kuiDDL0 = (2 + kuiT0 + kuiT2 + (kuiT1 << 1)) >> 2; // kDDL0
109 const uint8_t kuiDDL1 = (2 + kuiT1 + kuiT3 + (kuiT2 << 1)) >> 2; // kDDL1
110 const uint8_t kuiDDL2 = (2 + kuiT2 + kuiT4 + (kuiT3 << 1)) >> 2; // kDDL2
111 const uint8_t kuiDDL3 = (2 + kuiT3 + kuiT5 + (kuiT4 << 1)) >> 2; // kDDL3
112 const uint8_t kuiDDL4 = (2 + kuiT4 + kuiT6 + (kuiT5 << 1)) >> 2; // kDDL4
113 const uint8_t kuiDDL5 = (2 + kuiT5 + kuiT7 + (kuiT6 << 1)) >> 2; // kDDL5
114 const uint8_t kuiDDL6 = (2 + kuiT6 + kuiT7 + (kuiT7 << 1)) >> 2; // kDDL6
115 const uint8_t kuiList[8] = { kuiDDL0, kuiDDL1, kuiDDL2, kuiDDL3, kuiDDL4, kuiDDL5, kuiDDL6, 0 };
116
117 ST32 (pPred , LD32 (kuiList));
118 ST32 (pPred + kiStride , LD32 (kuiList + 1));
119 ST32 (pPred + kiStride2, LD32 (kuiList + 2));
120 ST32 (pPred + kiStride3, LD32 (kuiList + 3));
121 }
122
123 /*down pLeft*/
WelsI4x4LumaPredDDLTop_ref(uint8_t * pPred,const int32_t kiStride)124 void WelsI4x4LumaPredDDLTop_ref (uint8_t* pPred, const int32_t kiStride) {
125 const int32_t kiStride2 = kiStride << 1;
126 const int32_t kiStride3 = kiStride + kiStride2;
127 /*get pTop*/
128 uint8_t* ptop = &pPred[-kiStride];
129 const uint8_t kuiT0 = *ptop;
130 const uint8_t kuiT1 = * (ptop + 1);
131 const uint8_t kuiT2 = * (ptop + 2);
132 const uint8_t kuiT3 = * (ptop + 3);
133 const uint16_t kuiT01 = 1 + kuiT0 + kuiT1;
134 const uint16_t kuiT12 = 1 + kuiT1 + kuiT2;
135 const uint16_t kuiT23 = 1 + kuiT2 + kuiT3;
136 const uint16_t kuiT33 = 1 + (kuiT3 << 1);
137 const uint8_t kuiDLT0 = (kuiT01 + kuiT12) >> 2; // kDLT0
138 const uint8_t kuiDLT1 = (kuiT12 + kuiT23) >> 2; // kDLT1
139 const uint8_t kuiDLT2 = (kuiT23 + kuiT33) >> 2; // kDLT2
140 const uint8_t kuiDLT3 = kuiT33 >> 1; // kDLT3
141 const uint8_t kuiList[8] = { kuiDLT0, kuiDLT1, kuiDLT2, kuiDLT3, kuiDLT3, kuiDLT3, kuiDLT3 , kuiDLT3 };
142
143 ST32 (pPred, LD32 (kuiList));
144 ST32 (pPred + kiStride, LD32 (kuiList + 1));
145 ST32 (pPred + kiStride2, LD32 (kuiList + 2));
146 ST32 (pPred + kiStride3, LD32 (kuiList + 3));
147 }
148
149
150 /*down right*/
WelsI4x4LumaPredDDR_ref(uint8_t * pPred,const int32_t kiStride)151 void WelsI4x4LumaPredDDR_ref (uint8_t* pPred, const int32_t kiStride) {
152 const int32_t kiStride2 = kiStride << 1;
153 const int32_t kiStride3 = kiStride + kiStride2;
154 uint8_t* ptopleft = &pPred[- (kiStride + 1)];
155 uint8_t* pleft = &pPred[-1];
156 const uint8_t kuiLT = *ptopleft;
157 /*get pLeft and pTop*/
158 const uint8_t kuiL0 = *pleft;
159 const uint8_t kuiL1 = * (pleft + kiStride);
160 const uint8_t kuiL2 = * (pleft + kiStride2);
161 const uint8_t kuiL3 = * (pleft + kiStride3);
162 const uint8_t kuiT0 = * (ptopleft + 1);
163 const uint8_t kuiT1 = * (ptopleft + 2);
164 const uint8_t kuiT2 = * (ptopleft + 3);
165 const uint8_t kuiT3 = * (ptopleft + 4);
166 const uint16_t kuiTL0 = 1 + kuiLT + kuiL0;
167 const uint16_t kuiLT0 = 1 + kuiLT + kuiT0;
168 const uint16_t kuiT01 = 1 + kuiT0 + kuiT1;
169 const uint16_t kuiT12 = 1 + kuiT1 + kuiT2;
170 const uint16_t kuiT23 = 1 + kuiT2 + kuiT3;
171 const uint16_t kuiL01 = 1 + kuiL0 + kuiL1;
172 const uint16_t kuiL12 = 1 + kuiL1 + kuiL2;
173 const uint16_t kuiL23 = 1 + kuiL2 + kuiL3;
174 const uint8_t kuiDDR0 = (kuiTL0 + kuiLT0) >> 2; // kuiDDR0
175 const uint8_t kuiDDR1 = (kuiLT0 + kuiT01) >> 2; // kuiDDR1
176 const uint8_t kuiDDR2 = (kuiT01 + kuiT12) >> 2; // kuiDDR2
177 const uint8_t kuiDDR3 = (kuiT12 + kuiT23) >> 2; // kuiDDR3
178 const uint8_t kuiDDR4 = (kuiTL0 + kuiL01) >> 2; // kuiDDR4
179 const uint8_t kuiDDR5 = (kuiL01 + kuiL12) >> 2; // kuiDDR5
180 const uint8_t kuiDDR6 = (kuiL12 + kuiL23) >> 2; // kuiDDR6
181 const uint8_t kuiList[8] = { kuiDDR6, kuiDDR5, kuiDDR4, kuiDDR0, kuiDDR1, kuiDDR2, kuiDDR3, 0 };
182
183 ST32 (pPred , LD32 (kuiList + 3));
184 ST32 (pPred + kiStride , LD32 (kuiList + 2));
185 ST32 (pPred + kiStride2, LD32 (kuiList + 1));
186 ST32 (pPred + kiStride3, LD32 (kuiList));
187 }
188
189
190 /*vertical pLeft*/
WelsI4x4LumaPredVL_ref(uint8_t * pPred,const int32_t kiStride)191 void WelsI4x4LumaPredVL_ref (uint8_t* pPred, const int32_t kiStride) {
192 const int32_t kiStride2 = kiStride << 1;
193 const int32_t kiStride3 = kiStride + kiStride2;
194 uint8_t* ptopleft = &pPred[- (kiStride + 1)];
195 /*get pTop*/
196 const uint8_t kuiT0 = * (ptopleft + 1);
197 const uint8_t kuiT1 = * (ptopleft + 2);
198 const uint8_t kuiT2 = * (ptopleft + 3);
199 const uint8_t kuiT3 = * (ptopleft + 4);
200 const uint8_t kuiT4 = * (ptopleft + 5);
201 const uint8_t kuiT5 = * (ptopleft + 6);
202 const uint8_t kuiT6 = * (ptopleft + 7);
203 const uint16_t kuiT01 = 1 + kuiT0 + kuiT1;
204 const uint16_t kuiT12 = 1 + kuiT1 + kuiT2;
205 const uint16_t kuiT23 = 1 + kuiT2 + kuiT3;
206 const uint16_t kuiT34 = 1 + kuiT3 + kuiT4;
207 const uint16_t kuiT45 = 1 + kuiT4 + kuiT5;
208 const uint16_t kuiT56 = 1 + kuiT5 + kuiT6;
209 const uint8_t kuiVL0 = kuiT01 >> 1; // kuiVL0
210 const uint8_t kuiVL1 = kuiT12 >> 1; // kuiVL1
211 const uint8_t kuiVL2 = kuiT23 >> 1; // kuiVL2
212 const uint8_t kuiVL3 = kuiT34 >> 1; // kuiVL3
213 const uint8_t kuiVL4 = kuiT45 >> 1; // kuiVL4
214 const uint8_t kuiVL5 = (kuiT01 + kuiT12) >> 2; // kuiVL5
215 const uint8_t kuiVL6 = (kuiT12 + kuiT23) >> 2; // kuiVL6
216 const uint8_t kuiVL7 = (kuiT23 + kuiT34) >> 2; // kuiVL7
217 const uint8_t kuiVL8 = (kuiT34 + kuiT45) >> 2; // kuiVL8
218 const uint8_t kuiVL9 = (kuiT45 + kuiT56) >> 2; // kuiVL9
219 const uint8_t kuiList[10] = { kuiVL0, kuiVL1, kuiVL2, kuiVL3, kuiVL4, kuiVL5, kuiVL6, kuiVL7, kuiVL8, kuiVL9 };
220
221 ST32 (pPred, LD32 (kuiList));
222 ST32 (pPred + kiStride, LD32 (kuiList + 5));
223 ST32 (pPred + kiStride2, LD32 (kuiList + 1));
224 ST32 (pPred + kiStride3, LD32 (kuiList + 6));
225 }
226
227 /*vertical pLeft*/
WelsI4x4LumaPredVLTop_ref(uint8_t * pPred,const int32_t kiStride)228 void WelsI4x4LumaPredVLTop_ref (uint8_t* pPred, const int32_t kiStride) {
229 const int32_t kiStride2 = kiStride << 1;
230 const int32_t kiStride3 = kiStride + kiStride2;
231 uint8_t* ptopleft = &pPred[- (kiStride + 1)];
232 /*get pTop*/
233 const uint8_t kuiT0 = * (ptopleft + 1);
234 const uint8_t kuiT1 = * (ptopleft + 2);
235 const uint8_t kuiT2 = * (ptopleft + 3);
236 const uint8_t kuiT3 = * (ptopleft + 4);
237 const uint16_t kuiT01 = 1 + kuiT0 + kuiT1;
238 const uint16_t kuiT12 = 1 + kuiT1 + kuiT2;
239 const uint16_t kuiT23 = 1 + kuiT2 + kuiT3;
240 const uint16_t kuiT33 = 1 + (kuiT3 << 1);
241 const uint8_t kuiVL0 = kuiT01 >> 1;
242 const uint8_t kuiVL1 = kuiT12 >> 1;
243 const uint8_t kuiVL2 = kuiT23 >> 1;
244 const uint8_t kuiVL3 = kuiT33 >> 1;
245 const uint8_t kuiVL4 = (kuiT01 + kuiT12) >> 2;
246 const uint8_t kuiVL5 = (kuiT12 + kuiT23) >> 2;
247 const uint8_t kuiVL6 = (kuiT23 + kuiT33) >> 2;
248 const uint8_t kuiVL7 = kuiVL3;
249 const uint8_t kuiList[10] = { kuiVL0, kuiVL1, kuiVL2, kuiVL3, kuiVL3, kuiVL4, kuiVL5, kuiVL6, kuiVL7, kuiVL7 };
250
251 ST32 (pPred , LD32 (kuiList));
252 ST32 (pPred + kiStride , LD32 (kuiList + 5));
253 ST32 (pPred + kiStride2, LD32 (kuiList + 1));
254 ST32 (pPred + kiStride3, LD32 (kuiList + 6));
255 }
256
257
258 /*vertical right*/
WelsI4x4LumaPredVR_ref(uint8_t * pPred,const int32_t kiStride)259 void WelsI4x4LumaPredVR_ref (uint8_t* pPred, const int32_t kiStride) {
260 const int32_t kiStride2 = kiStride << 1;
261 const int32_t kiStride3 = kiStride + kiStride2;
262 const uint8_t kuiLT = pPred[-kiStride - 1];
263 /*get pLeft and pTop*/
264 const uint8_t kuiL0 = pPred[ - 1];
265 const uint8_t kuiL1 = pPred[kiStride - 1];
266 const uint8_t kuiL2 = pPred[kiStride2 - 1];
267 const uint8_t kuiT0 = pPred[ -kiStride];
268 const uint8_t kuiT1 = pPred[1 - kiStride];
269 const uint8_t kuiT2 = pPred[2 - kiStride];
270 const uint8_t kuiT3 = pPred[3 - kiStride];
271 const uint8_t kuiVR0 = (1 + kuiLT + kuiT0) >> 1; // kuiVR0
272 const uint8_t kuiVR1 = (1 + kuiT0 + kuiT1) >> 1; // kuiVR1
273 const uint8_t kuiVR2 = (1 + kuiT1 + kuiT2) >> 1; // kuiVR2
274 const uint8_t kuiVR3 = (1 + kuiT2 + kuiT3) >> 1; // kuiVR3
275 const uint8_t kuiVR4 = (2 + kuiL0 + (kuiLT << 1) + kuiT0) >> 2; // kuiVR4
276 const uint8_t kuiVR5 = (2 + kuiLT + (kuiT0 << 1) + kuiT1) >> 2; // kuiVR5
277 const uint8_t kuiVR6 = (2 + kuiT0 + (kuiT1 << 1) + kuiT2) >> 2; // kuiVR6
278 const uint8_t kuiVR7 = (2 + kuiT1 + (kuiT2 << 1) + kuiT3) >> 2; // kuiVR7
279 const uint8_t kuiVR8 = (2 + kuiLT + (kuiL0 << 1) + kuiL1) >> 2; // kuiVR8
280 const uint8_t kuiVR9 = (2 + kuiL0 + (kuiL1 << 1) + kuiL2) >> 2; // kuiVR9
281 const uint8_t kuiList[10] = { kuiVR8, kuiVR0, kuiVR1, kuiVR2, kuiVR3, kuiVR9, kuiVR4, kuiVR5, kuiVR6, kuiVR7 };
282
283 ST32 (pPred , LD32 (kuiList + 1));
284 ST32 (pPred + kiStride , LD32 (kuiList + 6));
285 ST32 (pPred + kiStride2, LD32 (kuiList));
286 ST32 (pPred + kiStride3, LD32 (kuiList + 5));
287 }
288
289 /*horizontal up*/
WelsI4x4LumaPredHU_ref(uint8_t * pPred,const int32_t kiStride)290 void WelsI4x4LumaPredHU_ref (uint8_t* pPred, const int32_t kiStride) {
291 const int32_t kiStride2 = kiStride << 1;
292 const int32_t kiStride3 = kiStride + kiStride2;
293 /*get pLeft*/
294 const uint8_t kuiL0 = pPred[ - 1];
295 const uint8_t kuiL1 = pPred[kiStride - 1];
296 const uint8_t kuiL2 = pPred[kiStride2 - 1];
297 const uint8_t kuiL3 = pPred[kiStride3 - 1];
298 const uint16_t kuiL01 = 1 + kuiL0 + kuiL1;
299 const uint16_t kuiL12 = 1 + kuiL1 + kuiL2;
300 const uint16_t kuiL23 = 1 + kuiL2 + kuiL3;
301 const uint8_t kuiHU0 = kuiL01 >> 1;
302 const uint8_t kuiHU1 = (kuiL01 + kuiL12) >> 2;
303 const uint8_t kuiHU2 = kuiL12 >> 1;
304 const uint8_t kuiHU3 = (kuiL12 + kuiL23) >> 2;
305 const uint8_t kuiHU4 = kuiL23 >> 1;
306 const uint8_t kuiHU5 = (1 + kuiL23 + (kuiL3 << 1)) >> 2;
307 const uint8_t kuiList[10] = { kuiHU0, kuiHU1, kuiHU2, kuiHU3, kuiHU4, kuiHU5, kuiL3, kuiL3, kuiL3, kuiL3 };
308
309 ST32 (pPred , LD32 (kuiList));
310 ST32 (pPred + kiStride , LD32 (kuiList + 2));
311 ST32 (pPred + kiStride2, LD32 (kuiList + 4));
312 ST32 (pPred + kiStride3, LD32 (kuiList + 6));
313 }
314
315 /*horizontal down*/
WelsI4x4LumaPredHD_ref(uint8_t * pPred,const int32_t kiStride)316 void WelsI4x4LumaPredHD_ref (uint8_t* pPred, const int32_t kiStride) {
317 const int32_t kiStride2 = kiStride << 1;
318 const int32_t kiStride3 = kiStride + kiStride2;
319 const uint8_t kuiLT = pPred[- (kiStride + 1)];
320 /*get pLeft and pTop*/
321 const uint8_t kuiL0 = pPred[-1 ];
322 const uint8_t kuiL1 = pPred[-1 + kiStride ];
323 const uint8_t kuiL2 = pPred[-1 + kiStride2];
324 const uint8_t kuiL3 = pPred[-1 + kiStride3];
325 const uint8_t kuiT0 = pPred[-kiStride ];
326 const uint8_t kuiT1 = pPred[-kiStride + 1 ];
327 const uint8_t kuiT2 = pPred[-kiStride + 2 ];
328 const uint16_t kuiTL0 = 1 + kuiLT + kuiL0;
329 const uint16_t kuiLT0 = 1 + kuiLT + kuiT0;
330 const uint16_t kuiT01 = 1 + kuiT0 + kuiT1;
331 const uint16_t kuiT12 = 1 + kuiT1 + kuiT2;
332 const uint16_t kuiL01 = 1 + kuiL0 + kuiL1;
333 const uint16_t kuiL12 = 1 + kuiL1 + kuiL2;
334 const uint16_t kuiL23 = 1 + kuiL2 + kuiL3;
335 const uint8_t kuiHD0 = kuiTL0 >> 1;
336 const uint8_t kuiHD1 = (kuiTL0 + kuiLT0) >> 2;
337 const uint8_t kuiHD2 = (kuiLT0 + kuiT01) >> 2;
338 const uint8_t kuiHD3 = (kuiT01 + kuiT12) >> 2;
339 const uint8_t kuiHD4 = kuiL01 >> 1;
340 const uint8_t kuiHD5 = (kuiTL0 + kuiL01) >> 2;
341 const uint8_t kuiHD6 = kuiL12 >> 1;
342 const uint8_t kuiHD7 = (kuiL01 + kuiL12) >> 2;
343 const uint8_t kuiHD8 = kuiL23 >> 1;
344 const uint8_t kuiHD9 = (kuiL12 + kuiL23) >> 2;
345 const uint8_t kuiList[10] = { kuiHD8, kuiHD9, kuiHD6, kuiHD7, kuiHD4, kuiHD5, kuiHD0, kuiHD1, kuiHD2, kuiHD3 };
346
347 ST32 (pPred , LD32 (kuiList + 6));
348 ST32 (pPred + kiStride , LD32 (kuiList + 4));
349 ST32 (pPred + kiStride2, LD32 (kuiList + 2));
350 ST32 (pPred + kiStride3, LD32 (kuiList));
351 }
352 // Unit test for Luma 4x4 cases
353 PREDV (4)
354 GENERATE_4x4_UT (WelsI4x4LumaPredV_c, LumaI4x4PredV, 0, 0)
355
356 PREDH (4)
357 GENERATE_4x4_UT (WelsI4x4LumaPredH_c, LumaI4x4PredH, 0, 0)
358
359 PREDDC (4, 2)
360 GENERATE_4x4_UT (WelsI4x4LumaPredDc_c, LumaI4x4PredDC, 0, 0)
361
362 PREDDCLeft (4, 2)
363 GENERATE_4x4_UT (WelsI4x4LumaPredDcLeft_c, LumaI4x4PredDCLeft, 0, 0)
364
365 PREDDCTop (4, 2)
366 GENERATE_4x4_UT (WelsI4x4LumaPredDcTop_c, LumaI4x4PredDCTop, 0, 0)
367
368 PREDDCNone (4, 2)
369 GENERATE_4x4_UT (WelsI4x4LumaPredDcNA_c, LumaI4x4PredDCNone, 0, 0)
370 GENERATE_4x4_UT (WelsI4x4LumaPredDDL_c, WelsI4x4LumaPredDDL_ref, 0, 0)
371 GENERATE_4x4_UT (WelsI4x4LumaPredDDLTop_c, WelsI4x4LumaPredDDLTop_ref, 0, 0)
372 GENERATE_4x4_UT (WelsI4x4LumaPredDDR_c, WelsI4x4LumaPredDDR_ref, 0, 0)
373 GENERATE_4x4_UT (WelsI4x4LumaPredVR_c, WelsI4x4LumaPredVR_ref, 0, 0)
374 GENERATE_4x4_UT (WelsI4x4LumaPredVL_c, WelsI4x4LumaPredVL_ref, 0, 0)
375 GENERATE_4x4_UT (WelsI4x4LumaPredVLTop_c, WelsI4x4LumaPredVLTop_ref, 0, 0)
376 GENERATE_4x4_UT (WelsI4x4LumaPredHU_c, WelsI4x4LumaPredHU_ref, 0, 0)
377 GENERATE_4x4_UT (WelsI4x4LumaPredHD_c, WelsI4x4LumaPredHD_ref, 0, 0)
378
379 #define GENERATE_8x8_UT(pred, ref, ASM, CPUFLAGS) \
380 TEST(DecoderIntraPredictionTest, pred) {\
381 const int32_t kiStride = 32; \
382 int iRunTimes = 1000; \
383 ENFORCE_STACK_ALIGN_1D (uint8_t, pRefBuffer, 18 * kiStride, 16); \
384 ENFORCE_STACK_ALIGN_1D (uint8_t, pPredBuffer, 18 * kiStride, 16); \
385 if (ASM) { \
386 int32_t iTmp = 1; \
387 uint32_t uiCPUFlags = WelsCPUFeatureDetect(&iTmp); \
388 if ((uiCPUFlags & CPUFLAGS) == 0) {\
389 return; \
390 } \
391 } \
392 while(iRunTimes--) {\
393 for (int i = 0; i < 17; i ++) {\
394 pRefBuffer[kiStride + i] = pPredBuffer[kiStride + i] = rand() & 255; \
395 pRefBuffer[(i+1) * kiStride - 1] = pPredBuffer[(i+1) * kiStride - 1] = rand() & 255; \
396 }\
397 pred(&pPredBuffer[2*kiStride], kiStride); \
398 ref(&pRefBuffer[2*kiStride], kiStride); \
399 bool ok = true; \
400 for (int i = 0; i < 8; i ++)\
401 for(int j = 0; j < 8; j ++)\
402 if (pPredBuffer[(i+2) * kiStride + j] != pRefBuffer[(i+2) * kiStride + j]) {\
403 ok = false; \
404 break; \
405 } \
406 EXPECT_EQ(ok, true); \
407 } \
408 }
409
WelsIChromaPredPlane_ref(uint8_t * pPred,const int32_t kiStride)410 void WelsIChromaPredPlane_ref (uint8_t* pPred, const int32_t kiStride) {
411 int32_t a = 0, b = 0, c = 0, H = 0, V = 0;
412 int32_t i, j;
413 uint8_t* pTop = &pPred[-kiStride];
414 uint8_t* pLeft = &pPred[-1];
415
416 for (i = 0 ; i < 4 ; i ++) {
417 H += (i + 1) * (pTop[4 + i] - pTop[2 - i]);
418 V += (i + 1) * (pLeft[ (4 + i) * kiStride] - pLeft[ (2 - i) * kiStride]);
419 }
420
421 a = (pLeft[7 * kiStride] + pTop[7]) << 4;
422 b = (17 * H + 16) >> 5;
423 c = (17 * V + 16) >> 5;
424
425 for (i = 0 ; i < 8 ; i ++) {
426 for (j = 0 ; j < 8 ; j ++) {
427 int32_t iTmp = (a + b * (j - 3) + c * (i - 3) + 16) >> 5;
428 pPred[j] = (iTmp < 0) ? 0 : ((iTmp > 255) ? 255 : iTmp);
429 }
430 pPred += kiStride;
431 }
432 }
433
434
WelsIChromaPredDc_ref(uint8_t * pPred,const int32_t kiStride)435 void WelsIChromaPredDc_ref (uint8_t* pPred, const int32_t kiStride) {
436 const int32_t kiL1 = kiStride - 1;
437 const int32_t kiL2 = kiL1 + kiStride;
438 const int32_t kiL3 = kiL2 + kiStride;
439 const int32_t kiL4 = kiL3 + kiStride;
440 const int32_t kiL5 = kiL4 + kiStride;
441 const int32_t kiL6 = kiL5 + kiStride;
442 const int32_t kiL7 = kiL6 + kiStride;
443 /*caculate the kMean value*/
444 const uint8_t kuiM1 = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] +
445 pPred[-1] + pPred[kiL1] + pPred[kiL2] + pPred[kiL3] + 4) >> 3 ;
446 const uint32_t kuiSum2 = pPred[4 - kiStride] + pPred[5 - kiStride] + pPred[6 - kiStride] + pPred[7 - kiStride];
447 const uint32_t kuiSum3 = pPred[kiL4] + pPred[kiL5] + pPred[kiL6] + pPred[kiL7];
448 const uint8_t kuiM2 = (kuiSum2 + 2) >> 2;
449 const uint8_t kuiM3 = (kuiSum3 + 2) >> 2;
450 const uint8_t kuiM4 = (kuiSum2 + kuiSum3 + 4) >> 3;
451 const uint8_t kuiMUP[8] = {kuiM1, kuiM1, kuiM1, kuiM1, kuiM2, kuiM2, kuiM2, kuiM2};
452 const uint8_t kuiMDown[8] = {kuiM3, kuiM3, kuiM3, kuiM3, kuiM4, kuiM4, kuiM4, kuiM4};
453 const uint64_t kuiUP64 = LD64 (kuiMUP);
454 const uint64_t kuiDN64 = LD64 (kuiMDown);
455
456 ST64 (pPred , kuiUP64);
457 ST64 (pPred + kiL1 + 1, kuiUP64);
458 ST64 (pPred + kiL2 + 1, kuiUP64);
459 ST64 (pPred + kiL3 + 1, kuiUP64);
460 ST64 (pPred + kiL4 + 1, kuiDN64);
461 ST64 (pPred + kiL5 + 1, kuiDN64);
462 ST64 (pPred + kiL6 + 1, kuiDN64);
463 ST64 (pPred + kiL7 + 1, kuiDN64);
464 }
465
WelsIChromaPredDcLeft_ref(uint8_t * pPred,const int32_t kiStride)466 void WelsIChromaPredDcLeft_ref (uint8_t* pPred, const int32_t kiStride) {
467 const int32_t kiL1 = -1 + kiStride;
468 const int32_t kiL2 = kiL1 + kiStride;
469 const int32_t kiL3 = kiL2 + kiStride;
470 const int32_t kiL4 = kiL3 + kiStride;
471 const int32_t kiL5 = kiL4 + kiStride;
472 const int32_t kiL6 = kiL5 + kiStride;
473 const int32_t kiL7 = kiL6 + kiStride;
474 /*caculate the kMean value*/
475 const uint8_t kuiMUP = (pPred[-1] + pPred[kiL1] + pPred[kiL2] + pPred[kiL3] + 2) >> 2 ;
476 const uint8_t kuiMDown = (pPred[kiL4] + pPred[kiL5] + pPred[kiL6] + pPred[kiL7] + 2) >> 2;
477 const uint64_t kuiUP64 = 0x0101010101010101ULL * kuiMUP;
478 const uint64_t kuiDN64 = 0x0101010101010101ULL * kuiMDown;
479
480 ST64 (pPred , kuiUP64);
481 ST64 (pPred + kiL1 + 1, kuiUP64);
482 ST64 (pPred + kiL2 + 1, kuiUP64);
483 ST64 (pPred + kiL3 + 1, kuiUP64);
484 ST64 (pPred + kiL4 + 1, kuiDN64);
485 ST64 (pPred + kiL5 + 1, kuiDN64);
486 ST64 (pPred + kiL6 + 1, kuiDN64);
487 ST64 (pPred + kiL7 + 1, kuiDN64);
488 }
489
WelsIChromaPredDcTop_ref(uint8_t * pPred,const int32_t kiStride)490 void WelsIChromaPredDcTop_ref (uint8_t* pPred, const int32_t kiStride) {
491 int32_t iTmp = (kiStride << 3) - kiStride;
492 /*caculate the kMean value*/
493 const uint8_t kuiM1 = (pPred[-kiStride] + pPred[1 - kiStride] + pPred[2 - kiStride] + pPred[3 - kiStride] + 2) >> 2;
494 const uint8_t kuiM2 = (pPred[4 - kiStride] + pPred[5 - kiStride] + pPred[6 - kiStride] + pPred[7 - kiStride] + 2) >> 2;
495 const uint8_t kuiM[8] = {kuiM1, kuiM1, kuiM1, kuiM1, kuiM2, kuiM2, kuiM2, kuiM2};
496
497 uint8_t i = 7;
498
499 do {
500 ST64 (pPred + iTmp, LD64 (kuiM));
501
502 iTmp -= kiStride;
503 } while (i-- > 0);
504 }
505 PREDV (8)
506 PREDH (8)
507 PREDDCNone (8, 3)
508 GENERATE_8x8_UT (WelsIChromaPredDcNA_c, LumaI8x8PredDCNone, 0, 0)
509 GENERATE_8x8_UT (WelsIChromaPredPlane_c, WelsIChromaPredPlane_ref, 0, 0)
510 GENERATE_8x8_UT (WelsIChromaPredDc_c, WelsIChromaPredDc_ref, 0, 0)
511 GENERATE_8x8_UT (WelsIChromaPredDcTop_c, WelsIChromaPredDcTop_ref, 0, 0)
512 GENERATE_8x8_UT (WelsIChromaPredDcLeft_c, WelsIChromaPredDcLeft_ref, 0, 0)
513 GENERATE_8x8_UT (WelsIChromaPredH_c, LumaI8x8PredH, 0, 0)
514 GENERATE_8x8_UT (WelsIChromaPredV_c, LumaI8x8PredV, 0, 0)
515 #define GENERATE_16x16_UT(pred, ref, ASM, CPUFLAGS) \
516 TEST(DecoderIntraPredictionTest, pred) {\
517 const int32_t kiStride = 32; \
518 int32_t iRunTimes = 1000; \
519 ENFORCE_STACK_ALIGN_1D (uint8_t, pRefBuffer, 18 * kiStride, 16); \
520 ENFORCE_STACK_ALIGN_1D (uint8_t, pPredBuffer, 18 * kiStride, 16); \
521 if (ASM) { \
522 int32_t iTmp = 1; \
523 uint32_t uiCPUFlags = WelsCPUFeatureDetect( &iTmp); \
524 if ((uiCPUFlags & CPUFLAGS) == 0) {\
525 return ; \
526 } \
527 }\
528 while(iRunTimes--) {\
529 for (int i = 0; i < 17; i ++) {\
530 pRefBuffer[kiStride + i] = pPredBuffer[kiStride + i] = rand() & 255; \
531 pRefBuffer[(i+1) * kiStride - 1] = pPredBuffer[(i+1) * kiStride - 1] = rand() & 255; \
532 }\
533 pred(&pPredBuffer[2*kiStride], kiStride); \
534 ref(&pRefBuffer[2*kiStride], kiStride); \
535 bool ok = true; \
536 for (int i = 0; i < 16; i ++)\
537 for(int j = 0; j < 16; j ++)\
538 if (pPredBuffer[(i+2) * kiStride + j] != pRefBuffer[(i+2) * kiStride + j]) {\
539 ok = false; \
540 break; \
541 } \
542 EXPECT_EQ(ok, true); \
543 } \
544 }
WelsI16x16LumaPredPlane_ref(uint8_t * pPred,const int32_t kiStride)545 void WelsI16x16LumaPredPlane_ref (uint8_t* pPred, const int32_t kiStride) {
546 int32_t a = 0, b = 0, c = 0, H = 0, V = 0;
547 int32_t i, j;
548 uint8_t* pTop = &pPred[-kiStride];
549 uint8_t* pLeft = &pPred[-1];
550
551 for (i = 0 ; i < 8 ; i ++) {
552 H += (i + 1) * (pTop[8 + i] - pTop[6 - i]);
553 V += (i + 1) * (pLeft[ (8 + i) * kiStride] - pLeft[ (6 - i) * kiStride]);
554 }
555
556 a = (pLeft[15 * kiStride] + pTop[15]) << 4;
557 b = (5 * H + 32) >> 6;
558 c = (5 * V + 32) >> 6;
559
560 for (i = 0 ; i < 16 ; i ++) {
561 for (j = 0 ; j < 16 ; j ++) {
562 int32_t iTmp = (a + b * (j - 7) + c * (i - 7) + 16) >> 5;
563 pPred[j] = (iTmp < 0) ? 0 : ((iTmp > 255) ? 255 : iTmp);
564 }
565 pPred += kiStride;
566 }
567 }
568
569 PREDV (16)
570 PREDH (16)
571 PREDDC (16, 4)
572 PREDDCTop (16, 4)
573 PREDDCLeft (16, 4)
574 PREDDCNone (16, 4)
575
576 GENERATE_16x16_UT (WelsI16x16LumaPredDcNA_c, LumaI16x16PredDCNone, 0, 0)
577 GENERATE_16x16_UT (WelsI16x16LumaPredPlane_c, WelsI16x16LumaPredPlane_ref, 0, 0)
578 GENERATE_16x16_UT (WelsI16x16LumaPredDcLeft_c, LumaI16x16PredDCLeft, 0, 0)
579 GENERATE_16x16_UT (WelsI16x16LumaPredDcTop_c, LumaI16x16PredDCTop, 0, 0)
580 GENERATE_16x16_UT (WelsI16x16LumaPredDc_c, LumaI16x16PredDC, 0, 0)
581 GENERATE_16x16_UT (WelsI16x16LumaPredH_c, LumaI16x16PredH, 0, 0)
582 GENERATE_16x16_UT (WelsI16x16LumaPredV_c, LumaI16x16PredV, 0, 0)
583 #if defined(X86_ASM)
584 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredH_sse2, LumaI4x4PredH, 1, WELS_CPU_SSE2)
585 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredDDR_mmx, WelsI4x4LumaPredDDR_ref, 1, WELS_CPU_MMX)
586 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredHD_mmx, WelsI4x4LumaPredHD_ref, 1, WELS_CPU_MMX)
587 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredHU_mmx, WelsI4x4LumaPredHU_ref, 1, WELS_CPU_MMX)
588 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredVR_mmx, WelsI4x4LumaPredVR_ref, 1, WELS_CPU_MMX)
589 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredDDL_mmx, WelsI4x4LumaPredDDL_ref, 1, WELS_CPU_MMX)
590 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredVL_mmx, WelsI4x4LumaPredVL_ref, 1, WELS_CPU_MMX)
591 GENERATE_8x8_UT (WelsDecoderIChromaPredDcTop_sse2, WelsIChromaPredDcTop_ref, 1, WELS_CPU_SSE2)
592 GENERATE_8x8_UT (WelsDecoderIChromaPredDc_sse2, WelsIChromaPredDc_ref, 1, WELS_CPU_SSE2)
593 GENERATE_8x8_UT (WelsDecoderIChromaPredPlane_sse2, WelsIChromaPredPlane_ref, 1, WELS_CPU_SSE2)
594 GENERATE_8x8_UT (WelsDecoderIChromaPredH_mmx, LumaI8x8PredH, 1, WELS_CPU_MMX)
595 GENERATE_8x8_UT (WelsDecoderIChromaPredV_mmx, LumaI8x8PredV, 1, WELS_CPU_MMX)
596 GENERATE_8x8_UT (WelsDecoderIChromaPredDcLeft_mmx, WelsIChromaPredDcLeft_ref, 1, WELS_CPU_MMX)
597 GENERATE_8x8_UT (WelsDecoderIChromaPredDcNA_mmx, LumaI8x8PredDCNone, 1, WELS_CPU_MMX)
598 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredPlane_sse2, WelsI16x16LumaPredPlane_ref, 1, WELS_CPU_SSE2)
599 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredH_sse2, LumaI16x16PredH, 1, WELS_CPU_SSE2)
600 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredV_sse2, LumaI16x16PredV, 1, WELS_CPU_SSE2)
601 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDc_sse2, LumaI16x16PredDC, 1, WELS_CPU_SSE2)
602 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDcTop_sse2, LumaI16x16PredDCTop, 1, WELS_CPU_SSE2)
603 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDcNA_sse2, LumaI16x16PredDCNone, 1, WELS_CPU_SSE2)
604 #endif
605
606 #if defined(HAVE_NEON)
607 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredV_neon, LumaI16x16PredV, 1, WELS_CPU_NEON)
608 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredH_neon, LumaI16x16PredH, 1, WELS_CPU_NEON)
609 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDc_neon, LumaI16x16PredDC, 1, WELS_CPU_NEON)
610 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredPlane_neon, WelsI16x16LumaPredPlane_ref, 1, WELS_CPU_NEON)
611
612 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredV_neon, LumaI4x4PredV, 1, WELS_CPU_NEON)
613 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredH_neon, LumaI4x4PredH, 1, WELS_CPU_NEON)
614 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredDDL_neon, WelsI4x4LumaPredDDL_ref, 1, WELS_CPU_NEON)
615 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredDDR_neon, WelsI4x4LumaPredDDR_ref, 1, WELS_CPU_NEON)
616 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredVL_neon, WelsI4x4LumaPredVL_ref, 1, WELS_CPU_NEON)
617 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredVR_neon, WelsI4x4LumaPredVR_ref, 1, WELS_CPU_NEON)
618 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredHU_neon, WelsI4x4LumaPredHU_ref, 1, WELS_CPU_NEON)
619 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredHD_neon, WelsI4x4LumaPredHD_ref, 1, WELS_CPU_NEON)
620
621 GENERATE_8x8_UT (WelsDecoderIChromaPredV_neon, LumaI8x8PredV, 1, WELS_CPU_NEON)
622 GENERATE_8x8_UT (WelsDecoderIChromaPredH_neon, LumaI8x8PredH, 1, WELS_CPU_NEON)
623 GENERATE_8x8_UT (WelsDecoderIChromaPredDc_neon, WelsIChromaPredDc_ref, 1, WELS_CPU_NEON)
624 GENERATE_8x8_UT (WelsDecoderIChromaPredPlane_neon, WelsIChromaPredPlane_ref, 1, WELS_CPU_NEON)
625 #endif
626
627 #if defined(HAVE_NEON_AARCH64)
628 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredV_AArch64_neon, LumaI16x16PredV, 1, WELS_CPU_NEON)
629 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredH_AArch64_neon, LumaI16x16PredH, 1, WELS_CPU_NEON)
630 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDc_AArch64_neon, LumaI16x16PredDC, 1, WELS_CPU_NEON)
631 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDcTop_AArch64_neon, LumaI16x16PredDCTop, 1, WELS_CPU_NEON)
632 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDcLeft_AArch64_neon, LumaI16x16PredDCLeft, 1, WELS_CPU_NEON)
633 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredPlane_AArch64_neon, WelsI16x16LumaPredPlane_ref, 1, WELS_CPU_NEON)
634
635 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredH_AArch64_neon, LumaI4x4PredH, 1, WELS_CPU_NEON)
636 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredDDL_AArch64_neon, WelsI4x4LumaPredDDL_ref, 1, WELS_CPU_NEON)
637 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredDDLTop_AArch64_neon, WelsI4x4LumaPredDDLTop_ref, 1, WELS_CPU_NEON)
638 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredVL_AArch64_neon, WelsI4x4LumaPredVL_ref, 1, WELS_CPU_NEON)
639 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredVLTop_AArch64_neon, WelsI4x4LumaPredVLTop_ref, 1, WELS_CPU_NEON)
640 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredVR_AArch64_neon, WelsI4x4LumaPredVR_ref, 1, WELS_CPU_NEON)
641 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredHU_AArch64_neon, WelsI4x4LumaPredHU_ref, 1, WELS_CPU_NEON)
642 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredHD_AArch64_neon, WelsI4x4LumaPredHD_ref, 1, WELS_CPU_NEON)
643 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredDc_AArch64_neon, LumaI4x4PredDC, 1, WELS_CPU_NEON)
644 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredDcTop_AArch64_neon, LumaI4x4PredDCTop, 1, WELS_CPU_NEON)
645
646 GENERATE_8x8_UT (WelsDecoderIChromaPredV_AArch64_neon, LumaI8x8PredV, 1, WELS_CPU_NEON)
647 GENERATE_8x8_UT (WelsDecoderIChromaPredH_AArch64_neon, LumaI8x8PredH, 1, WELS_CPU_NEON)
648 GENERATE_8x8_UT (WelsDecoderIChromaPredDc_AArch64_neon, WelsIChromaPredDc_ref, 1, WELS_CPU_NEON)
649 GENERATE_8x8_UT (WelsDecoderIChromaPredPlane_AArch64_neon, WelsIChromaPredPlane_ref, 1, WELS_CPU_NEON)
650 GENERATE_8x8_UT (WelsDecoderIChromaPredDcTop_AArch64_neon, WelsIChromaPredDcTop_ref, 1, WELS_CPU_NEON)
651 #endif
652
653 #if defined(HAVE_MMI)
654 GENERATE_4x4_UT (WelsDecoderI4x4LumaPredH_mmi, LumaI4x4PredH, 1, WELS_CPU_MMI)
655 GENERATE_8x8_UT (WelsDecoderIChromaPredDcTop_mmi, WelsIChromaPredDcTop_ref, 1, WELS_CPU_MMI)
656 GENERATE_8x8_UT (WelsDecoderIChromaPredDc_mmi, WelsIChromaPredDc_ref, 1, WELS_CPU_MMI)
657 GENERATE_8x8_UT (WelsDecoderIChromaPredPlane_mmi, WelsIChromaPredPlane_ref, 1, WELS_CPU_MMI)
658 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredPlane_mmi, WelsI16x16LumaPredPlane_ref, 1, WELS_CPU_MMI)
659 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredH_mmi, LumaI16x16PredH, 1, WELS_CPU_MMI)
660 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredV_mmi, LumaI16x16PredV, 1, WELS_CPU_MMI)
661 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDc_mmi, LumaI16x16PredDC, 1, WELS_CPU_MMI)
662 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDcTop_mmi, LumaI16x16PredDCTop, 1, WELS_CPU_MMI)
663 GENERATE_16x16_UT (WelsDecoderI16x16LumaPredDcNA_mmi, LumaI16x16PredDCNone, 1, WELS_CPU_MMI)
664 #endif
665