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 | 694 | SMB* pMbList = pCurDq->sMbDataP; |
| 695 | − SSliceHeaderExt* sSliceHeaderExt = &pCurDq->ppSliceInLayer[kiSliceIdx]->sSliceHeaderExt; | |
| 695 | + SSliceHeaderExt* sSliceHeaderExt = &pSlice->sSliceHeaderExt; | |
| 696 | 696 | SMB* pCurrentMbBlock; |
| 697 | 697 | |
| 698 | 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 | 744 | void PerformDeblockingFilter (sWelsEncCtx* pEnc) { |
| 745 | − const int32_t kiCurDid = pEnc->uiDependencyId; | |
| 746 | − SWelsSvcCodingParam* pSvcParam = pEnc->pSvcParam; | |
| 747 | − SSpatialLayerConfig* pSpatialLayer = &pSvcParam->sSpatialLayers[kiCurDid]; | |
| 748 | − SDqLayer* pCurLayer = pEnc->pCurDqLayer; | |
| 745 | + SDqLayer* pCurLayer = pEnc->pCurDqLayer; | |
| 746 | + SSlice* pSlice = NULL; | |
| 749 | 747 | |
| 750 | 748 | if (pCurLayer->iLoopFilterDisableIdc == 0) { |
| 751 | 749 | DeblockingFilterFrameAvcbase (pCurLayer, pEnc->pFuncList); |
| @@ -753,26 +751,13 @@ void PerformDeblockingFilter (sWelsEncCtx* pEnc) { · 1 unmodified line | ||
| 753 | 751 | int32_t iSliceCount = 0; |
| 754 | 752 | int32_t iSliceIdx = 0; |
| 755 | 753 | |
| 756 | − if (SM_SIZELIMITED_SLICE != pSpatialLayer->sSliceArgument.uiSliceMode) { | |
| 757 | − iSliceCount = GetCurrentSliceNum (pCurLayer); | |
| 758 | − do { | |
| 759 | − DeblockingFilterSliceAvcbase (pCurLayer, pEnc->pFuncList, iSliceIdx); | |
| 760 | − ++ iSliceIdx; | |
| 761 | − } while (iSliceIdx < iSliceCount); | |
| 762 | − } else { // for dynamic slicing mode | |
| 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 | − } | |
| 754 | + iSliceCount = GetCurrentSliceNum (pCurLayer); | |
| 755 | + do { | |
| 756 | + pSlice = pCurLayer->ppSliceInLayer[iSliceIdx]; | |
| 757 | + assert( NULL != pSlice); | |
| 758 | + DeblockingFilterSliceAvcbase (pCurLayer, pEnc->pFuncList, pSlice); | |
| 759 | + ++ iSliceIdx; | |
| 760 | + } while (iSliceIdx < iSliceCount); | |
| 776 | 761 | } |
| 777 | 762 | } |
| 778 | 763 | |