Showing the changes to codec/decoder/core/src/deblocking.cpp (1 of 120 files). Show all
Unified · Split
| @@ -185,25 +185,25 @@ void static inline DeblockingBSInsideMBNormal (PDqLayer pCurDqLayer, uint8_t nBS · 184 unmodified lines | |||
| 185 | uiNnz32b3 = * (uint32_t*) (pNnzTab + 12); | 185 | uiNnz32b3 = * (uint32_t*) (pNnzTab + 12); |
| 186 | 186 | ||
| 187 | for (int i = 0; i < 3; i++) | 187 | for (int i = 0; i < 3; i++) |
| 188 | uiBsx4[i] = pNnzTab[i] | pNnzTab[i + 1]; | 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); | 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); | 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); | 191 | nBS[0][3][0] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 3, 2); |
| 192 | 192 | ||
| 193 | for (int i = 0; i < 3; i++) | 193 | for (int i = 0; i < 3; i++) |
| 194 | uiBsx4[i] = pNnzTab[4 + i] | pNnzTab[4 + i + 1]; | 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); | 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); | 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); | 197 | nBS[0][3][1] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 7, 6); |
| 198 | 198 | ||
| 199 | for (int i = 0; i < 3; i++) | 199 | for (int i = 0; i < 3; i++) |
| 200 | uiBsx4[i] = pNnzTab[8 + i] | pNnzTab[8 + i + 1]; | 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); | 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); | 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); | 203 | nBS[0][3][2] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 11, 10); |
| 204 | 204 | ||
| 205 | for (int i = 0; i < 3; i++) | 205 | for (int i = 0; i < 3; i++) |
| 206 | uiBsx4[i] = pNnzTab[12 + i] | pNnzTab[12 + i + 1]; | 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); | 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); | 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); | 209 | nBS[0][3][3] = BS_EDGE (uiBsx4[2], iRefIndex, pCurDqLayer->pMv[LIST_0][iMbXy], 15, 14); |
| @@ -233,8 +233,8 @@ uint32_t DeblockingBsMarginalMBAvcbase (PDqLayer pCurDqLayer, int32_t iEdge, int · 23 unmodified lines | |||
| 233 | uint32_t uiBSx4; | 233 | uint32_t uiBSx4; |
| 234 | //uint8_t* bS = static_cast<uint8_t*>(&uiBSx4); | 234 | //uint8_t* bS = static_cast<uint8_t*>(&uiBSx4); |
| 235 | uint8_t* pBS = (uint8_t*) (&uiBSx4); | 235 | uint8_t* pBS = (uint8_t*) (&uiBSx4); |
| 236 | const uint8_t *pBIdx = &g_kuiTableBIdx[iEdge][0]; | 236 | const uint8_t* pBIdx = &g_kuiTableBIdx[iEdge][0]; |
| 237 | const uint8_t *pBnIdx = &g_kuiTableBIdx[iEdge][4]; | 237 | const uint8_t* pBnIdx = &g_kuiTableBIdx[iEdge][4]; |
| 238 | 238 | ||
| 239 | for (i = 0; i < 4; i++) { | 239 | for (i = 0; i < 4; i++) { |
| 240 | if (pCurDqLayer->pNzc[iMbXy][*pBIdx] | pCurDqLayer->pNzc[iNeighMb][*pBnIdx]) { | 240 | if (pCurDqLayer->pNzc[iMbXy][*pBIdx] | pCurDqLayer->pNzc[iNeighMb][*pBnIdx]) { |
| @@ -327,7 +327,7 @@ void FilteringEdgeLumaIntraV (SDeblockingFilter* pFilter, uint8_t* pPix, int32_t · 86 unmodified lines | |||
| 327 | return; | 327 | return; |
| 328 | } | 328 | } |
| 329 | void FilteringEdgeChromaH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, | 329 | void FilteringEdgeChromaH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, |
| 330 | uint8_t* pBS) { | 330 | uint8_t* pBS) { |
| 331 | int32_t iIndexA; | 331 | int32_t iIndexA; |
| 332 | int32_t iAlpha; | 332 | int32_t iAlpha; |
| 333 | int32_t iBeta; | 333 | int32_t iBeta; |
| @@ -343,7 +343,7 @@ void FilteringEdgeChromaH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* · 9 unmodified lines | |||
| 343 | return; | 343 | return; |
| 344 | } | 344 | } |
| 345 | void FilteringEdgeChromaV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, | 345 | void FilteringEdgeChromaV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, |
| 346 | uint8_t* pBS) { | 346 | uint8_t* pBS) { |
| 347 | int32_t iIndexA; | 347 | int32_t iIndexA; |
| 348 | int32_t iAlpha; | 348 | int32_t iAlpha; |
| 349 | int32_t iBeta; | 349 | int32_t iBeta; |
| @@ -360,7 +360,7 @@ void FilteringEdgeChromaV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* · 10 unmodified lines | |||
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | void FilteringEdgeChromaIntraH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, | 362 | void FilteringEdgeChromaIntraH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, |
| 363 | uint8_t* pBS) { | 363 | uint8_t* pBS) { |
| 364 | int32_t iIndexA; | 364 | int32_t iIndexA; |
| 365 | int32_t iAlpha; | 365 | int32_t iAlpha; |
| 366 | int32_t iBeta; | 366 | int32_t iBeta; |
| @@ -375,7 +375,7 @@ void FilteringEdgeChromaIntraH (SDeblockingFilter* pFilter, uint8_t* pPixCb, uin · 8 unmodified lines | |||
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | void FilteringEdgeChromaIntraV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, | 377 | void FilteringEdgeChromaIntraV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uint8_t* pPixCr, int32_t iStride, |
| 378 | uint8_t* pBS) { | 378 | uint8_t* pBS) { |
| 379 | int32_t iIndexA; | 379 | int32_t iIndexA; |
| 380 | int32_t iAlpha; | 380 | int32_t iAlpha; |
| 381 | int32_t iBeta; | 381 | int32_t iBeta; |
| @@ -391,7 +391,7 @@ void FilteringEdgeChromaIntraV (SDeblockingFilter* pFilter, uint8_t* pPixCb, uin · 9 unmodified lines | |||
| 391 | 391 | ||
| 392 | 392 | ||
| 393 | void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_t nBS[2][4][4], | 393 | void DeblockingInterMb (PDqLayer pCurDqLayer, PDeblockingFilter pFilter, uint8_t nBS[2][4][4], |
| 394 | int32_t iBoundryFlag) { | 394 | int32_t iBoundryFlag) { |
| 395 | int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex; | 395 | int32_t iMbXyIndex = pCurDqLayer->iMbXyIndex; |
| 396 | int32_t iMbX = pCurDqLayer->iMbX; | 396 | int32_t iMbX = pCurDqLayer->iMbX; |
| 397 | int32_t iMbY = pCurDqLayer->iMbY; | 397 | int32_t iMbY = pCurDqLayer->iMbY; |
| @@ -631,7 +631,7 @@ void WelsDeblockingFilterSlice (PWelsDecoderContext pCtx, PDeblockingFilterMbFun · 233 unmodified lines | |||
| 631 | int32_t iTotalMbCount = pSliceHeaderExt->sSliceHeader.pSps->uiTotalMbCount; | 631 | int32_t iTotalMbCount = pSliceHeaderExt->sSliceHeader.pSps->uiTotalMbCount; |
| 632 | 632 | ||
| 633 | SDeblockingFilter pFilter; | 633 | SDeblockingFilter pFilter; |
| 634 | memset (&pFilter, 0, sizeof(pFilter)); | 634 | memset (&pFilter, 0, sizeof (pFilter)); |
| 635 | PFmo pFmo = pCtx->pFmo; | 635 | PFmo pFmo = pCtx->pFmo; |
| 636 | int32_t iNextMbXyIndex = 0; | 636 | int32_t iNextMbXyIndex = 0; |
| 637 | int32_t iTotalNumMb = pCurDqLayer->sLayerInfo.sSliceInLayer.iTotalMbInCurSlice; | 637 | int32_t iTotalNumMb = pCurDqLayer->sLayerInfo.sSliceInLayer.iTotalMbInCurSlice; |
| @@ -720,18 +720,17 @@ void DeblockingInit (SDeblockingFunc* pFunc, int32_t iCpu) { · 82 unmodified lines | |||
| 720 | #endif | 720 | #endif |
| 721 | 721 | ||
| 722 | #if defined(HAVE_NEON) | 722 | #if defined(HAVE_NEON) |
| 723 | if ( iCpu & WELS_CPU_NEON ) | 723 | if (iCpu & WELS_CPU_NEON) { |
| 724 | { | 724 | pFunc->pfLumaDeblockingLT4Ver = DeblockLumaLt4V_neon; |
| 725 | pFunc->pfLumaDeblockingLT4Ver = DeblockLumaLt4V_neon; | 725 | pFunc->pfLumaDeblockingEQ4Ver = DeblockLumaEq4V_neon; |
| 726 | pFunc->pfLumaDeblockingEQ4Ver = DeblockLumaEq4V_neon; | 726 | pFunc->pfLumaDeblockingLT4Hor = DeblockLumaLt4H_neon; |
| 727 | pFunc->pfLumaDeblockingLT4Hor = DeblockLumaLt4H_neon; | 727 | pFunc->pfLumaDeblockingEQ4Hor = DeblockLumaEq4H_neon; |
| 728 | pFunc->pfLumaDeblockingEQ4Hor = DeblockLumaEq4H_neon; | 728 | |
| 729 | 729 | pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_neon; | |
| 730 | pFunc->pfChromaDeblockingLT4Ver = DeblockChromaLt4V_neon; | 730 | pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_neon; |
| 731 | pFunc->pfChromaDeblockingEQ4Ver = DeblockChromaEq4V_neon; | 731 | pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_neon; |
| 732 | pFunc->pfChromaDeblockingLT4Hor = DeblockChromaLt4H_neon; | 732 | pFunc->pfChromaDeblockingEQ4Hor = DeblockChromaEq4H_neon; |
| 733 | pFunc->pfChromaDeblockingEQ4Hor = DeblockChromaEq4H_neon; | 733 | } |
| 734 | } | ||
| 735 | #endif | 734 | #endif |
| 736 | } | 735 | } |
| 737 | 736 | ||