Showing the changes to codec/encoder/core/src/deblocking.cpp (1 of 14 files). Show all
Unified · Split
| @@ -690,9 +690,9 @@ void DeblockingFilterFrameAvcbase (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc) { · 689 unmodified lines | |||
| 690 | } | 690 | } |
| 691 | } | 691 | } |
| 692 | 692 | ||
| 693 | void DeblockingFilterSliceAvcbase (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, const int32_t kiSliceIdx) { | 693 | void DeblockingFilterSliceAvcbase (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, SSlice* pSlice) { |
| 694 | SMB* pMbList = pCurDq->sMbDataP; | 694 | SMB* pMbList = pCurDq->sMbDataP; |
| 695 | SSliceHeaderExt* sSliceHeaderExt = &pCurDq->ppSliceInLayer[kiSliceIdx]->sSliceHeaderExt; | 695 | SSliceHeaderExt* sSliceHeaderExt = &pSlice->sSliceHeaderExt; |
| 696 | SMB* pCurrentMbBlock; | 696 | SMB* pCurrentMbBlock; |
| 697 | 697 | ||
| 698 | const int32_t kiMbWidth = pCurDq->iMbWidth; | 698 | const int32_t kiMbWidth = pCurDq->iMbWidth; |
| @@ -738,14 +738,12 @@ void DeblockingFilterSliceAvcbase (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, co · 39 unmodified lines | |||
| 738 | } | 738 | } |
| 739 | } | 739 | } |
| 740 | 740 | ||
| 741 | void DeblockingFilterSliceAvcbaseNull (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, const int32_t kiSliceIdx) { | 741 | void DeblockingFilterSliceAvcbaseNull (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, SSlice* pSlice) { |
| 742 | } | 742 | } |
| 743 | 743 | ||
| 744 | void PerformDeblockingFilter (sWelsEncCtx* pEnc) { | 744 | void PerformDeblockingFilter (sWelsEncCtx* pEnc) { |
| 745 | const int32_t kiCurDid = pEnc->uiDependencyId; | 745 | SDqLayer* pCurLayer = pEnc->pCurDqLayer; |
| 746 | SWelsSvcCodingParam* pSvcParam = pEnc->pSvcParam; | 746 | SSlice* pSlice = NULL; |
| 747 | SSpatialLayerConfig* pSpatialLayer = &pSvcParam->sSpatialLayers[kiCurDid]; | ||
| 748 | SDqLayer* pCurLayer = pEnc->pCurDqLayer; | ||
| 749 | 747 | ||
| 750 | if (pCurLayer->iLoopFilterDisableIdc == 0) { | 748 | if (pCurLayer->iLoopFilterDisableIdc == 0) { |
| 751 | DeblockingFilterFrameAvcbase (pCurLayer, pEnc->pFuncList); | 749 | DeblockingFilterFrameAvcbase (pCurLayer, pEnc->pFuncList); |
| @@ -753,26 +751,13 @@ void PerformDeblockingFilter (sWelsEncCtx* pEnc) { · 1 unmodified line | |||
| 753 | int32_t iSliceCount = 0; | 751 | int32_t iSliceCount = 0; |
| 754 | int32_t iSliceIdx = 0; | 752 | int32_t iSliceIdx = 0; |
| 755 | 753 | ||
| 756 | if (SM_SIZELIMITED_SLICE != pSpatialLayer->sSliceArgument.uiSliceMode) { | 754 | iSliceCount = GetCurrentSliceNum (pCurLayer); |
| 757 | iSliceCount = GetCurrentSliceNum (pCurLayer); | 755 | do { |
| 758 | do { | 756 | pSlice = pCurLayer->ppSliceInLayer[iSliceIdx]; |
| 759 | DeblockingFilterSliceAvcbase (pCurLayer, pEnc->pFuncList, iSliceIdx); | 757 | assert( NULL != pSlice); |
| 760 | ++ iSliceIdx; | 758 | DeblockingFilterSliceAvcbase (pCurLayer, pEnc->pFuncList, pSlice); |
| 761 | } while (iSliceIdx < iSliceCount); | 759 | ++ iSliceIdx; |
| 762 | } else { // for dynamic slicing mode | 760 | } while (iSliceIdx < iSliceCount); |
| 763 | const int32_t kiNumPicPartition = pEnc->iActiveThreadsNum; | ||
| 764 | int32_t iPartitionIdx = 0; | ||
| 765 | |||
| 766 | while (iPartitionIdx < kiNumPicPartition) { | ||
| 767 | iSliceCount = pCurLayer->pNumSliceCodedOfPartition[iPartitionIdx]; | ||
| 768 | iSliceIdx = iPartitionIdx; | ||
| 769 | do { | ||
| 770 | DeblockingFilterSliceAvcbase (pCurLayer, pEnc->pFuncList, iSliceIdx); | ||
| 771 | iSliceIdx += kiNumPicPartition; | ||
| 772 | } while (iSliceIdx < iSliceCount); | ||
| 773 | ++ iPartitionIdx; | ||
| 774 | } | ||
| 775 | } | ||
| 776 | } | 761 | } |
| 777 | } | 762 | } |
| 778 | 763 | ||