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
136136 },
137137 };
138138
139+static 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+
139152 #define TC0_TBL_LOOKUP(tc, iIndexA, pBS, bChroma) \
140153 {\
141154 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
170183 nBS[0][2][3] = (pNnzTab[13] | pNnzTab[14]) << iLShiftFactor;
171184 nBS[0][3][3] = (pNnzTab[14] | pNnzTab[15]) << iLShiftFactor;
172185 * (uint32_t*)nBS[1][3] = (uiNnz32b2 | uiNnz32b3) << iLShiftFactor;
186+}
187+
188+void 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+ }
173195
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;
174202 }
175203
176204 void 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
179207 int8_t* iRefIndex = pCurDqLayer->pRefIndex[LIST_0][iMbXy];
180208 ENFORCE_STACK_ALIGN_1D (uint8_t, uiBsx4, 4, 4);
181209
182− uiNnz32b0 = * (uint32_t*) (pNnzTab + 0);
183− uiNnz32b1 = * (uint32_t*) (pNnzTab + 4);
184− uiNnz32b2 = * (uint32_t*) (pNnzTab + 8);
185− uiNnz32b3 = * (uint32_t*) (pNnzTab + 12);
210+ int8_t i8x8NnzTab[4];
186211
187− for (int i = 0; i < 3; i++)
188− uiBsx4[i] = pNnzTab[i] | pNnzTab[i + 1];
189− nBS[0][1][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 1, 0);
190− nBS[0][2][0] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 2, 1);
191− nBS[0][3][0] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 3, 2);
192−
193− for (int i = 0; i < 3; i++)
194− uiBsx4[i] = pNnzTab[4 + i] | pNnzTab[4 + i + 1];
195− nBS[0][1][1] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 5, 4);
196− nBS[0][2][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 6, 5);
197− nBS[0][3][1] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 7, 6);
198−
199− for (int i = 0; i < 3; i++)
200− uiBsx4[i] = pNnzTab[8 + i] | pNnzTab[8 + i + 1];
201− nBS[0][1][2] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 9, 8);
202− nBS[0][2][2] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 10, 9);
203− nBS[0][3][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 11, 10);
204−
205− for (int i = 0; i < 3; i++)
206− uiBsx4[i] = pNnzTab[12 + i] | pNnzTab[12 + i + 1];
207− nBS[0][1][3] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 13, 12);
208− nBS[0][2][3] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 14, 13);
209− nBS[0][3][3] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 15, 14);
210−
211− // horizontal
212− * (uint32_t*)uiBsx4 = (uiNnz32b0 | uiNnz32b1);
213− nBS[1][1][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 4, 0);
214− nBS[1][1][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 5, 1);
215− nBS[1][1][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 6, 2);
216− nBS[1][1][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 7, 3);
217−
218− * (uint32_t*)uiBsx4 = (uiNnz32b1 | uiNnz32b2);
219− nBS[1][2][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 8, 4);
220− nBS[1][2][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 9, 5);
221− nBS[1][2][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 10, 6);
222− nBS[1][2][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 11, 7);
223−
224− * (uint32_t*)uiBsx4 = (uiNnz32b2 | uiNnz32b3);
225− nBS[1][3][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 12, 8);
226− nBS[1][3][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 13, 9);
227− nBS[1][3][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 14, 10);
228− nBS[1][3][3] = BS_EDGE (uiBsx4[3], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 15, 11);
212+ if (pCurDqLayer->pTransformSize8x8Flag[iMbXy]) {
213+ for (int32_t i = 0; i < 4; i++) {
214+ int32_t iBlkIdx = i << 2;
215+ i8x8NnzTab[i] = (pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 1]] |
216+ pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 2]] | pNnzTab[g_kuiMbCountScan4Idx[iBlkIdx + 3]]);
217+ }
218+ //vertical
219+ nBS[0][2][0] = nBS[0][2][1] = BS_EDGE ((i8x8NnzTab[0] | i8x8NnzTab[1]), iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy],
220+ g_kuiMbCountScan4Idx[1 << 2], g_kuiMbCountScan4Idx[0]);
221+ nBS[0][2][2] = nBS[0][2][3] = BS_EDGE ((i8x8NnzTab[2] | i8x8NnzTab[3]), iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy],
222+ g_kuiMbCountScan4Idx[3 << 2], g_kuiMbCountScan4Idx[2 << 2]);
223+
224+ //horizontal
225+ nBS[1][2][0] = nBS[1][2][1] = BS_EDGE ((i8x8NnzTab[0] | i8x8NnzTab[2]), iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy],
226+ g_kuiMbCountScan4Idx[2 << 2], g_kuiMbCountScan4Idx[0]);
227+ nBS[1][2][2] = nBS[1][2][3] = BS_EDGE ((i8x8NnzTab[1] | i8x8NnzTab[3]), iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy],
228+ g_kuiMbCountScan4Idx[3 << 2], g_kuiMbCountScan4Idx[1 << 2]);
229+ } else {
230+ uiNnz32b0 = * (uint32_t*) (pNnzTab + 0);
231+ uiNnz32b1 = * (uint32_t*) (pNnzTab + 4);
232+ uiNnz32b2 = * (uint32_t*) (pNnzTab + 8);
233+ uiNnz32b3 = * (uint32_t*) (pNnzTab + 12);
234+
235+ for (int i = 0; i < 3; i++)
236+ uiBsx4[i] = pNnzTab[i] | pNnzTab[i + 1];
237+ nBS[0][1][0] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 1, 0);
238+ nBS[0][2][0] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 2, 1);
239+ nBS[0][3][0] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 3, 2);
240+
241+ for (int i = 0; i < 3; i++)
242+ uiBsx4[i] = pNnzTab[4 + i] | pNnzTab[4 + i + 1];
243+ nBS[0][1][1] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 5, 4);
244+ nBS[0][2][1] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 6, 5);
245+ nBS[0][3][1] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 7, 6);
246+
247+ for (int i = 0; i < 3; i++)
248+ uiBsx4[i] = pNnzTab[8 + i] | pNnzTab[8 + i + 1];
249+ nBS[0][1][2] = BS_EDGE (uiBsx4[0], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 9, 8);
250+ nBS[0][2][2] = BS_EDGE (uiBsx4[1], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 10, 9);
251+ nBS[0][3][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 11, 10);
252+
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+ }
229278 }
230279
231280 uint32_t DeblockingBsMarginalMBAvcbase (PDqLayer pCurDqLayer, int32_t iEdge, int32_t iNeighMb, int32_t iMbXy) {
232− int32_t i;
281+ int32_t i, j;
233282 uint32_t uiBSx4;
234− //uint8_t* bS = static_cast<uint8_t*>(&uiBSx4);
235283 uint8_t* pBS = (uint8_t*) (&uiBSx4);
236− const uint8_t* pBIdx = &g_kuiTableBIdx[iEdge][0];
237− const uint8_t* pBnIdx = &g_kuiTableBIdx[iEdge][4];
238−
239− for (i = 0; i < 4; i++) {
240− if (pCurDqLayer->pNzc[iMbXy][*pBIdx] | pCurDqLayer->pNzc[iNeighMb][*pBnIdx]) {
241− pBS[i] = 2;
242− } else {
243− pBS[i] = MB_BS_MV (pCurDqLayer->pRefIndex[LIST_0], pCurDqLayer->pMv[LIST_0], iMbXy, iNeighMb, *pBIdx,
244− *pBnIdx);
284+ const uint8_t* pBIdx = &g_kuiTableBIdx[iEdge][0];
285+ const uint8_t* pBnIdx = &g_kuiTableBIdx[iEdge][4];
286+ const uint8_t* pB8x8Idx = &g_kuiTableB8x8Idx[iEdge][0];
287+ const uint8_t* pBn8x8Idx = &g_kuiTableB8x8Idx[iEdge][8];
288+
289+ if (pCurDqLayer->pTransformSize8x8Flag[iMbXy] && pCurDqLayer->pTransformSize8x8Flag[iNeighMb]) {
290+ for (i = 0; i < 2; i++) {
291+ uint8_t uiNzc = 0;
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++;
245349 }
246− pBIdx++;
247− pBnIdx++;
248350 }
351+
249352 return uiBSx4;
250353 }
251354 int32_t DeblockingAvailableNoInterlayer (PDqLayer pCurDqLayer, int32_t iFilterIdc) {
@@ -501,7 +604,7 @@ void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_ · 249 unmodified lines
501604 pFilter->iChromaQP[0] = pCurChromaQp[0];
502605 pFilter->iChromaQP[1] = pCurChromaQp[1];
503606
504− if (* (uint32_t*)nBS[0][1] != 0) {
607+ if (* (uint32_t*)nBS[0][1] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
505608 FilteringEdgeLumaV (pFilter, &pDestY[1 << 2], iLineSize, nBS[0][1]);
506609 }
507610
@@ -510,7 +613,7 @@ void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_ · 2 unmodified lines
510613 FilteringEdgeChromaV (pFilter, &pDestCb[2 << 1], &pDestCr[2 << 1], iLineSizeUV, nBS[0][2]);
511614 }
512615
513− if (* (uint32_t*)nBS[0][3] != 0) {
616+ if (* (uint32_t*)nBS[0][3] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
514617 FilteringEdgeLumaV (pFilter, &pDestY[3 << 2], iLineSize, nBS[0][3]);
515618 }
516619
@@ -536,7 +639,7 @@ void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_ · 19 unmodified lines
536639 pFilter->iChromaQP[0] = pCurChromaQp[0];
537640 pFilter->iChromaQP[1] = pCurChromaQp[1];
538641
539− if (* (uint32_t*)nBS[1][1] != 0) {
642+ if (* (uint32_t*)nBS[1][1] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
540643 FilteringEdgeLumaH (pFilter, &pDestY[ (1 << 2)*iLineSize], iLineSize, nBS[1][1]);
541644 }
542645
@@ -546,7 +649,7 @@ void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_ · 3 unmodified lines
546649 nBS[1][2]);
547650 }
548651
549− if (* (uint32_t*)nBS[1][3] != 0) {
652+ if (* (uint32_t*)nBS[1][3] != 0 && !pCurDqLayer->pTransformSize8x8Flag[iMbXyIndex]) {
550653 FilteringEdgeLumaH (pFilter, &pDestY[ (3 << 2)*iLineSize], iLineSize, nBS[1][3]);
551654 }
552655 }
@@ -581,9 +684,16 @@ void FilteringEdgeLumaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int3 · 28 unmodified lines
581684 iBeta);
582685 if (iAlpha | iBeta) {
583686 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+
585692 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+ }
587697 }
588698
589699 // luma h
@@ -594,9 +704,15 @@ void FilteringEdgeLumaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int3 · 4 unmodified lines
594704
595705 pFilter->iLumaQP = iCurQp;
596706 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+
598711 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+ }
600716 }
601717 }
602718 void FilteringEdgeChromaHV (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t iBoundryFlag) {
@@ -705,6 +821,7 @@ void WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t · 102 unmodified lines
705821
706822 switch (iCurMbType) {
707823 case MB_TYPE_INTRA4x4:
824+ case MB_TYPE_INTRA8x8:
708825 case MB_TYPE_INTRA16x16:
709826 case MB_TYPE_INTRA_PCM:
710827 DeblockingIntraMb (pCurDqLayer, pFilter, iBoundryFlag);
@@ -728,7 +845,11 @@ void WelsDeblockingMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, int32_t · 17 unmodified lines
728845 //SKIP MB_16x16 or others
729846 if (iCurMbType != MB_TYPE_SKIP) {
730847 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+ }
732853 } else {
733854 DeblockingBSInsideMBNormal (pCurDqLayer, nBS, pCurDqLayer->pNzc[iMbXyIndex], iMbXyIndex);
734855 }
@@ -839,8 +960,8 @@ void DeblockingInit (SDeblockingFunc* pFunc, int32_t iCpu) { · 104 unmodified lines
839960 if (iCpu & WELS_CPU_SSSE3) {
840961 pFunc->pfLumaDeblockingLT4Ver = DeblockLumaLt4V_ssse3;
841962 pFunc->pfLumaDeblockingEQ4Ver = DeblockLumaEq4V_ssse3;
842− pFunc->pfLumaDeblockingLT4Hor = DeblockLumaLt4H_ssse3;
843− pFunc->pfLumaDeblockingEQ4Hor = DeblockLumaEq4H_ssse3;
963+ pFunc->pfLumaDeblockingLT4Hor = DeblockLumaLt4H_ssse3;
964+ pFunc->pfLumaDeblockingEQ4Hor = DeblockLumaEq4H_ssse3;
844965 pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_ssse3;
845966 pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_ssse3;
846967 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