History

Add Transform 8x8 support Add Intra 8x8 support Add no_deblocking support inside T8x8 Add CABAC parse support Add static data sheet for dequant Fix bugs and clean/astyle the code Remove build warnings Modify the UT cases Fix the ParseNalHeader bug

Haibo committed 11 years ago

Commit e9916c71 parent 473f2e325 files · +1808 −270Browse files

Showing the changes to codec/decoder/core/src/deblocking.cpp (1 of 25 files). Show all

Unified · Split

codec/decoder/core/src/deblocking.cpp+191−70
@@ -136,6 +136,19 @@ static const uint8_t g_kuiTableBIdx[2][8] = { · 135 unmodified lines
136 },136 },
137};137};
138 138
139static const uint8_t g_kuiTableB8x8Idx[2][16] = {
140 {
141 0, 1, 4, 5, 8, 9, 12, 13, // 0 1 | 2 3
142 2, 3, 6, 7, 10, 11, 14, 15 // 4 5 | 6 7
143 }, // ------------
144 // 8 9 | 10 11
145 {
146 // 12 13 | 14 15
147 0, 1, 4, 5, 2, 3, 6, 7,
148 8, 9, 12, 13, 10, 11, 14, 15
149 },
150};
151
139#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \152#define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
140{\153{\
141 tc[0] = g_kiTc0Table(iIndexA)[pBS[0]] + bChroma;\154 tc[0] = g_kiTc0Table(iIndexA)[pBS[0]] + bChroma;\
@@ -170,7 +183,22 @@ void inline DeblockingBSInsideMBAvsbase (int8_t* pNnzTab, uint8_t nBS[2][4][4], · 28 unmodified lines
170 nBS[0][2][3] = (pNnzTab[13] | pNnzTab[14]) << iLShiftFactor;183 nBS[0][2][3] = (pNnzTab[13] | pNnzTab[14]) << iLShiftFactor;
171 nBS[0][3][3] = (pNnzTab[14] | pNnzTab[15]) << iLShiftFactor;184 nBS[0][3][3] = (pNnzTab[14] | pNnzTab[15]) << iLShiftFactor;
172 * (uint32_t*)nBS[1][3] = (uiNnz32b2 | uiNnz32b3) << iLShiftFactor;185 * (uint32_t*)nBS[1][3] = (uiNnz32b2 | uiNnz32b3) << iLShiftFactor;
186}
187
188void inline DeblockingBSInsideMBAvsbase8x8 (int8_t* pNnzTab, uint8_t nBS[2][4][4], int32_t iLShiftFactor) {
189 int8_t i8x8NnzTab[4];
190 for (int32_t i = 0; i < 4; i++) {
191 int32_t iBlkIdx = i << 2;
192 i8x8NnzTab[i] = (pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 1]] |
193 pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 2]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 3]]);
194 }
173 195
196 //vertical
197 nBS[0][2][0] = nBS[0][2][1] = (i8x8NnzTab[0] | i8x8NnzTab[1]) << iLShiftFactor;
198 nBS[0][2][2] = nBS[0][2][3] = (i8x8NnzTab[2] | i8x8NnzTab[3]) << iLShiftFactor;
199 //horizontal
200 nBS[1][2][0] = nBS[1][2][1] = (i8x8NnzTab[0] | i8x8NnzTab[2]) << iLShiftFactor;
201 nBS[1][2][2] = nBS[1][2][3] = (i8x8NnzTab[1] | i8x8NnzTab[3]) << iLShiftFactor;
174}202}
175 203
176void static inline DeblockingBSInsideMBNormal (PDqLayer pCurDqLayer, uint8_t nBS[2][4][4], int8_t* pNnzTab,204void static inline DeblockingBSInsideMBNormal (PDqLayer pCurDqLayer, uint8_t nBS[2][4][4], int8_t* pNnzTab,
@@ -179,73 +207,148 @@ void static inline DeblockingBSInsideMBNormal (PDqLayer pCurDqLayer, uint8_t nBS · 2 unmodified lines
179 int8_t* iRefIndex = pCurDqLayer->pRefIndex[LIST_0][iMbXy];207 int8_t* iRefIndex = pCurDqLayer->pRefIndex[LIST_0][iMbXy];
180 ENFORCE_STACK_ALIGN_1D (uint8_t, uiBsx4, 4, 4);208 ENFORCE_STACK_ALIGN_1D (uint8_t, uiBsx4, 4, 4);
181 209
182 uiNnz32b0 = * (uint32_t*) (pNnzTab + 0);210 int8_t i8x8NnzTab[4];
183 uiNnz32b1 = * (uint32_t*) (pNnzTab + 4);
184 uiNnz32b2 = * (uint32_t*) (pNnzTab + 8);
185 uiNnz32b3 = * (uint32_t*) (pNnzTab + 12);
186 211
187 for (int i = 0; i < 3; i++)212 if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
188 uiBsx4[i] = pNnzTab[i] | pNnzTab[i + 1];213 for (int32_t i = 0; i < 4; i++) {
189 nBS[0][1][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 1, 0);214 int32_t iBlkIdx = i << 2;
190 nBS[0][2][0] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 2, 1);215 i8x8NnzTab[i] = (pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 1]] |
191 nBS[0][3][0] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 3, 2);216 pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 2]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 3]]);
192 217 }
193 for (int i = 0; i < 3; i++)218 //vertical
194 uiBsx4[i] = pNnzTab[4 + i] | pNnzTab[4 + i + 1];219 nBS[0][2][0] = nBS[0][2][1] = BS_EDGE ((i8x8NnzTab[0] | i8x8NnzTab[1]), iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy],
195 nBS[0][1][1] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 5, 4);220 g_kuiMbCountScan4Idx[1 << 2], g_kuiMbCountScan4Idx[0]);
196 nBS[0][2][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 6, 5);221 nBS[0][2][2] = nBS[0][2][3] = BS_EDGE ((i8x8NnzTab[2] | i8x8NnzTab[3]), iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy],
197 nBS[0][3][1] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 7, 6);222 g_kuiMbCountScan4Idx[3 << 2], g_kuiMbCountScan4Idx[2 << 2]);
198 223
199 for (int i = 0; i < 3; i++)224 //horizontal
200 uiBsx4[i] = pNnzTab[8 + i] | pNnzTab[8 + i + 1];225 nBS[1][2][0] = nBS[1][2][1] = BS_EDGE ((i8x8NnzTab[0] | i8x8NnzTab[2]), iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy],
201 nBS[0][1][2] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 9, 8);226 g_kuiMbCountScan4Idx[2 << 2], g_kuiMbCountScan4Idx[0]);
202 nBS[0][2][2] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 10, 9);227 nBS[1][2][2] = nBS[1][2][3] = BS_EDGE ((i8x8NnzTab[1] | i8x8NnzTab[3]), iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy],
203 nBS[0][3][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 11, 10);228 g_kuiMbCountScan4Idx[3 << 2], g_kuiMbCountScan4Idx[1 << 2]);
204 229 } else {
205 for (int i = 0; i < 3; i++)230 uiNnz32b0 = * (uint32_t*) (pNnzTab + 0);
206 uiBsx4[i] = pNnzTab[12 + i] | pNnzTab[12 + i + 1];231 uiNnz32b1 = * (uint32_t*) (pNnzTab + 4);
207 nBS[0][1][3] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 13, 12);232 uiNnz32b2 = * (uint32_t*) (pNnzTab + 8);
208 nBS[0][2][3] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 14, 13);233 uiNnz32b3 = * (uint32_t*) (pNnzTab + 12);
209 nBS[0][3][3] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 15, 14);234
210 235 for (int i = 0; i < 3; i++)
211 // horizontal236 uiBsx4[i] = pNnzTab[i] | pNnzTab[i + 1];
212 * (uint32_t*)uiBsx4 = (uiNnz32b0 | uiNnz32b1);237 nBS[0][1][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 1, 0);
213 nBS[1][1][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 4, 0);238 nBS[0][2][0] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 2, 1);
214 nBS[1][1][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 5, 1);239 nBS[0][3][0] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 3, 2);
215 nBS[1][1][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 6, 2);240
216 nBS[1][1][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 7, 3);241 for (int i = 0; i < 3; i++)
217 242 uiBsx4[i] = pNnzTab[4 + i] | pNnzTab[4 + i + 1];
218 * (uint32_t*)uiBsx4 = (uiNnz32b1 | uiNnz32b2);243 nBS[0][1][1] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 5, 4);
219 nBS[1][2][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 8, 4);244 nBS[0][2][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 6, 5);
220 nBS[1][2][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 9, 5);245 nBS[0][3][1] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 7, 6);
221 nBS[1][2][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 10, 6);246
222 nBS[1][2][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 11, 7);247 for (int i = 0; i < 3; i++)
223 248 uiBsx4[i] = pNnzTab[8 + i] | pNnzTab[8 + i + 1];
224 * (uint32_t*)uiBsx4 = (uiNnz32b2 | uiNnz32b3);249 nBS[0][1][2] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 9, 8);
225 nBS[1][3][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 12, 8);250 nBS[0][2][2] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 10, 9);
226 nBS[1][3][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 13, 9);251 nBS[0][3][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 11, 10);
227 nBS[1][3][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 14, 10);252
228 nBS[1][3][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 15, 11);253 for (int i = 0; i < 3; i++)
254 uiBsx4[i] = pNnzTab[12 + i] | pNnzTab[12 + i + 1];
255 nBS[0][1][3] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 13, 12);
256 nBS[0][2][3] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 14, 13);
257 nBS[0][3][3] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 15, 14);
258
259 // horizontal
260 * (uint32_t*)uiBsx4 = (uiNnz32b0 | uiNnz32b1);
261 nBS[1][1][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 4, 0);
262 nBS[1][1][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 5, 1);
263 nBS[1][1][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 6, 2);
264 nBS[1][1][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 7, 3);
265
266 * (uint32_t*)uiBsx4 = (uiNnz32b1 | uiNnz32b2);
267 nBS[1][2][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 8, 4);
268 nBS[1][2][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 9, 5);
269 nBS[1][2][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 10, 6);
270 nBS[1][2][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 11, 7);
271
272 * (uint32_t*)uiBsx4 = (uiNnz32b2 | uiNnz32b3);
273 nBS[1][3][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 12, 8);
274 nBS[1][3][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 13, 9);
275 nBS[1][3][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 14, 10);
276 nBS[1][3][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 15, 11);
277 }
229}278}
230 279
231uint32_t DeblockingBsMarginalMBAvcbase (PDqLayer pCurDqLayer, int32_t iEdge, int32_t iNeighMb, int32_t iMbXy) {280uint32_t DeblockingBsMarginalMBAvcbase (PDqLayer pCurDqLayer, int32_t iEdge, int32_t iNeighMb, int32_t iMbXy) {
232 int32_t i;281 int32_t i, j;
233 uint32_t uiBSx4;282 uint32_t uiBSx4;
234 //uint8_t* bS = static_cast<uint8_t*>(&uiBSx4);
235 uint8_t* pBS = (uint8_t*) (&uiBSx4);283 uint8_t* pBS = (uint8_t*) (&uiBSx4);
236 const uint8_t* pBIdx = &g_kuiTableBIdx[iEdge][0];284 const uint8_t* pBIdx = &g_kuiTableBIdx[iEdge][0];
237 const uint8_t* pBnIdx = &g_kuiTableBIdx[iEdge][4];285 const uint8_t* pBnIdx = &g_kuiTableBIdx[iEdge][4];
238 286 const uint8_t* pB8x8Idx = &g_kuiTableB8x8Idx[iEdge][0];
239 for (i = 0; i < 4; i++) {287 const uint8_t* pBn8x8Idx = &g_kuiTableB8x8Idx[iEdge][8];
240 if (pCurDqLayer->pNzc[iMbXy][*pBIdx] | pCurDqLayer->pNzc[iNeighMb][*pBnIdx]) {288
241 pBS[i] = 2;289 if (pCurDqLayer->pTransformSize8x8Flag[iMbXy] && pCurDqLayer->pTransformSize8x8Flag[iNeighMb]) {
242 } else {290 for (i = 0; i < 2; i++) {
243 pBS[i] = MB_BS_MV (pCurDqLayer->pRefIndex[LIST_0], pCurDqLayer->pMv[LIST_0], iMbXy, iNeighMb, *pBIdx,291 uint8_t uiNzc = 0;
244 *pBnIdx);292 for (j = 0; uiNzc == 0 && j < 4; j++) {
293 uiNzc |= (pCurDqLayer->pNzc[iMbXy][* (pB8x8Idx + j)] | pCurDqLayer->pNzc[iNeighMb][* (pBn8x8Idx + j)]);
294 }
295 if (uiNzc) {
296 pBS[i << 1] = pBS[1 + (i << 1)] = 2;
297 } else {
298 pBS[i << 1] = pBS[1 + (i << 1)] = MB_BS_MV (pCurDqLayer->pRefIndex[LIST_0], pCurDqLayer->pMv[LIST_0], iMbXy, iNeighMb,
299 *pB8x8Idx, *pBn8x8Idx);
300 }
301 pB8x8Idx += 4;
302 pBn8x8Idx += 4;
303 }
304 } else if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
305 for (i = 0; i < 2; i++) {
306 uint8_t uiNzc = 0;
307 for (j = 0; uiNzc == 0 && j < 4; j++) {
308 uiNzc |= pCurDqLayer->pNzc[iMbXy][* (pB8x8Idx + j)];
309 }
310 for (j = 0; j < 2; j++) {
311 if (uiNzc | pCurDqLayer->pNzc[iNeighMb][*pBnIdx]) {
312 pBS[j + (i << 1)] = 2;
313 } else {
314 pBS[j + (i << 1)] = MB_BS_MV (pCurDqLayer->pRefIndex[LIST_0], pCurDqLayer->pMv[LIST_0], iMbXy, iNeighMb, *pB8x8Idx,
315 *pBnIdx);
316 }
317 pBnIdx++;
318 }
319 pB8x8Idx += 4;
320 }
321 } else if (pCurDqLayer->pTransformSize8x8Flag[iNeighMb]) {
322 for (i = 0; i < 2; i++) {
323 uint8_t uiNzc = 0;
324 for (j = 0; uiNzc == 0 && j < 4; j++) {
325 uiNzc |= pCurDqLayer->pNzc[iNeighMb][* (pBn8x8Idx + j)];
326 }
327 for (j = 0; j < 2; j++) {
328 if (uiNzc | pCurDqLayer->pNzc[iMbXy][*pBIdx]) {
329 pBS[j + (i << 1)] = 2;
330 } else {
331 pBS[j + (i << 1)] = MB_BS_MV (pCurDqLayer->pRefIndex[LIST_0], pCurDqLayer->pMv[LIST_0], iMbXy, iNeighMb, *pBIdx,
332 *pBn8x8Idx);
333 }
334 pBIdx++;
335 }
336 pBn8x8Idx += 4;
337 }
338 } else {
339 // only 4x4 transform
340 for (i = 0; i < 4; i++) {
341 if (pCurDqLayer->pNzc[iMbXy][*pBIdx] | pCurDqLayer->pNzc[iNeighMb][*pBnIdx]) {
342 pBS[i] = 2;
343 } else {
344 pBS[i] = MB_BS_MV (pCurDqLayer->pRefIndex[LIST_0], pCurDqLayer->pMv[LIST_0], iMbXy, iNeighMb, *pBIdx,
345 *pBnIdx);
346 }
347 pBIdx++;
348 pBnIdx++;
245 }349 }
246 pBIdx++;
247 pBnIdx++;
248 }350 }
351
249 return uiBSx4;352 return uiBSx4;
250}353}
251int32_t DeblockingAvailableNoInterlayer (PDqLayer pCurDqLayer, int32_t iFilterIdc) {354int32_t DeblockingAvailableNoInterlayer (PDqLayer pCurDqLayer, int32_t iFilterIdc) {
@@ -501,7 +604,7 @@ void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_ · 249 unmodified lines
501 pFilter->iChromaQP[0] = pCurChromaQp[0];604 pFilter->iChromaQP[0] = pCurChromaQp[0];
502 pFilter->iChromaQP[1] = pCurChromaQp[1];605 pFilter->iChromaQP[1] = pCurChromaQp[1];
503 606
504 if (* (uint32_t*)nBS[0][1] != 0) {607 if (* (uint32_t*)nBS[0][1] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
505 FilteringEdgeLumaV (pFilter, &pDestY[1 << 2], iLineSize, nBS[0][1]);608 FilteringEdgeLumaV (pFilter, &pDestY[1 << 2], iLineSize, nBS[0][1]);
506 }609 }
507 610
@@ -510,7 +613,7 @@ void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_ · 2 unmodified lines
510 FilteringEdgeChromaV (pFilter, &pDestCb[2 << 1], &pDestCr[2 << 1], iLineSizeUV, nBS[0][2]);613 FilteringEdgeChromaV (pFilter, &pDestCb[2 << 1], &pDestCr[2 << 1], iLineSizeUV, nBS[0][2]);
511 }614 }
512 615
513 if (* (uint32_t*)nBS[0][3] != 0) {616 if (* (uint32_t*)nBS[0][3] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
514 FilteringEdgeLumaV (pFilter, &pDestY[3 << 2], iLineSize, nBS[0][3]);617 FilteringEdgeLumaV (pFilter, &pDestY[3 << 2], iLineSize, nBS[0][3]);
515 }618 }
516 619
@@ -536,7 +639,7 @@ void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_ · 19 unmodified lines
536 pFilter->iChromaQP[0] = pCurChromaQp[0];639 pFilter->iChromaQP[0] = pCurChromaQp[0];
537 pFilter->iChromaQP[1] = pCurChromaQp[1];640 pFilter->iChromaQP[1] = pCurChromaQp[1];
538 641
539 if (* (uint32_t*)nBS[1][1] != 0) {642 if (* (uint32_t*)nBS[1][1] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
540 FilteringEdgeLumaH (pFilter, &pDestY[ (1 << 2)*iLineSize], iLineSize, nBS[1][1]);643 FilteringEdgeLumaH (pFilter, &pDestY[ (1 << 2)*iLineSize], iLineSize, nBS[1][1]);
541 }644 }
542 645
@@ -546,7 +649,7 @@ void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_ · 3 unmodified lines
546 nBS[1][2]);649 nBS[1][2]);
547 }650 }
548 651
549 if (* (uint32_t*)nBS[1][3] != 0) {652 if (* (uint32_t*)nBS[1][3] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
550 FilteringEdgeLumaH (pFilter, &pDestY[ (3 << 2)*iLineSize], iLineSize, nBS[1][3]);653 FilteringEdgeLumaH (pFilter, &pDestY[ (3 << 2)*iLineSize], iLineSize, nBS[1][3]);
551 }654 }
552}655}
@@ -581,9 +684,16 @@ void FilteringEdgeLumaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int3 · 28 unmodified lines
581 iBeta);684 iBeta);
582 if (iAlpha | iBeta) {685 if (iAlpha | iBeta) {
583 TC0_TBL_LOOKUP (iTc, iIndexA, uiBSx4, 0);686 TC0_TBL_LOOKUP (iTc, iIndexA, uiBSx4, 0);
584 pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[1 << 2], iLineSize, iAlpha, iBeta, iTc);687
688 if (!pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
689 pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[1 << 2], iLineSize, iAlpha, iBeta, iTc);
690 }
691
585 pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[2 << 2], iLineSize, iAlpha, iBeta, iTc);692 pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[2 << 2], iLineSize, iAlpha, iBeta, iTc);
586 pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[3 << 2], iLineSize, iAlpha, iBeta, iTc);693
694 if (!pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
695 pFilter->pLoopf->pfLumaDeblockingLT4Hor (&pDestY[3 << 2], iLineSize, iAlpha, iBeta, iTc);
696 }
587 }697 }
588 698
589 // luma h699 // luma h
@@ -594,9 +704,15 @@ void FilteringEdgeLumaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int3 · 4 unmodified lines
594 704
595 pFilter->iLumaQP = iCurQp;705 pFilter->iLumaQP = iCurQp;
596 if (iAlpha | iBeta) {706 if (iAlpha | iBeta) {
597 pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (1 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);707 if (!pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
708 pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (1 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);
709 }
710
598 pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (2 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);711 pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (2 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);
599 pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (3 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);712
713 if (!pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
714 pFilter->pLoopf->pfLumaDeblockingLT4Ver (&pDestY[ (3 << 2)*iLineSize], iLineSize, iAlpha, iBeta, iTc);
715 }
600 }716 }
601}717}
602void FilteringEdgeChromaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {718void FilteringEdgeChromaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
@@ -705,6 +821,7 @@ void WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t · 102 unmodified lines
705 821
706 switch (iCurMbType) {822 switch (iCurMbType) {
707 case MB_TYPE_INTRA4x4:823 case MB_TYPE_INTRA4x4:
824 case MB_TYPE_INTRA8x8:
708 case MB_TYPE_INTRA16x16:825 case MB_TYPE_INTRA16x16:
709 case MB_TYPE_INTRA_PCM:826 case MB_TYPE_INTRA_PCM:
710 DeblockingIntraMb (pCurDqLayer, pFilter, iBoundryFlag);827 DeblockingIntraMb (pCurDqLayer, pFilter, iBoundryFlag);
@@ -728,7 +845,11 @@ void WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t · 17 unmodified lines
728 //SKIP MB_16x16 or others845 //SKIP MB_16x16 or others
729 if (iCurMbType != MB_TYPE_SKIP) {846 if (iCurMbType != MB_TYPE_SKIP) {
730 if (iCurMbType == MB_TYPE_16x16) {847 if (iCurMbType == MB_TYPE_16x16) {
731 DeblockingBSInsideMBAvsbase (pCurDqLayer->pNzc[iMbXyIndex], nBS, 1);848 if (!pCurDqLayer->pTransformSize8x8Flag[pCurDqLayer->iMbXyIndex]) {
849 DeblockingBSInsideMBAvsbase (pCurDqLayer->pNzc[iMbXyIndex], nBS, 1);
850 } else {
851 DeblockingBSInsideMBAvsbase8x8 (pCurDqLayer->pNzc[iMbXyIndex], nBS, 1);
852 }
732 } else {853 } else {
733 DeblockingBSInsideMBNormal (pCurDqLayer, nBS, pCurDqLayer->pNzc[iMbXyIndex], iMbXyIndex);854 DeblockingBSInsideMBNormal (pCurDqLayer, nBS, pCurDqLayer->pNzc[iMbXyIndex], iMbXyIndex);
734 }855 }
@@ -839,8 +960,8 @@ void DeblockingInit (SDeblockingFunc* pFunc, int32_t iCpu) { · 104 unmodified lines
839 if (iCpu & WELS_CPU_SSSE3) {960 if (iCpu & WELS_CPU_SSSE3) {
840 pFunc->pfLumaDeblockingLT4Ver = DeblockLumaLt4V_ssse3;961 pFunc->pfLumaDeblockingLT4Ver = DeblockLumaLt4V_ssse3;
841 pFunc->pfLumaDeblockingEQ4Ver = DeblockLumaEq4V_ssse3;962 pFunc->pfLumaDeblockingEQ4Ver = DeblockLumaEq4V_ssse3;
842 pFunc->pfLumaDeblockingLT4Hor = DeblockLumaLt4H_ssse3;963 pFunc->pfLumaDeblockingLT4Hor = DeblockLumaLt4H_ssse3;
843 pFunc->pfLumaDeblockingEQ4Hor = DeblockLumaEq4H_ssse3;964 pFunc->pfLumaDeblockingEQ4Hor = DeblockLumaEq4H_ssse3;
844 pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_ssse3;965 pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_ssse3;
845 pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_ssse3;966 pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_ssse3;
846 pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_ssse3;967 pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_ssse3;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t