Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 7 files). Show all
Unified · Split
| @@ -1527,11 +1527,11 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 1526 unmodified lines | ||
| 1527 | 1527 | int32_t iPosBitOffset = 0; |
| 1528 | 1528 | const int32_t kiActiveThreadsNum = pEncCtx->iActiveThreadsNum; |
| 1529 | 1529 | const int32_t kiPartitaionId = pCurSlice->uiSliceIdx % kiActiveThreadsNum; |
| 1530 | − const int32_t kiLastMbIdxInPartition = pEncCtx->pCurDqLayer->pLastMbIdxOfPartition[kiPartitaionId]; | |
| 1530 | + const int32_t kiEndMbIdxOfPartition = pEncCtx->pCurDqLayer->pEndMbIdxOfPartition[kiPartitaionId]; | |
| 1531 | 1531 | |
| 1532 | 1532 | const bool kbCurMbNotFirstMbOfCurSlice = ((iCurMbIdx > 0) && (pSliceCtx->pOverallMbMap[iCurMbIdx] == |
| 1533 | 1533 | pSliceCtx->pOverallMbMap[iCurMbIdx - 1])); |
| 1534 | − const bool kbCurMbNotLastMbOfCurPartition = iCurMbIdx < kiLastMbIdxInPartition; | |
| 1534 | + const bool kbCurMbNotLastMbOfCurPartition = iCurMbIdx < kiEndMbIdxOfPartition; | |
| 1535 | 1535 | |
| 1536 | 1536 | if (pCurSlice->bDynamicSlicingSliceSizeCtrlFlag) |
| 1537 | 1537 | return false; |
| @@ -1564,7 +1564,7 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 26 unmodified lines | ||
| 1564 | 1564 | //DYNAMIC_SLICING_ONE_THREAD: judge jump_avoiding_pack_exceed |
| 1565 | 1565 | if (kbSliceNumNotExceedConstraint && kbSliceIdxNotExceedConstraint) {//able to add new pSlice |
| 1566 | 1566 | |
| 1567 | − AddSliceBoundary (pEncCtx, pCurSlice, pSliceCtx, pCurMb, iCurMbIdx, kiLastMbIdxInPartition); | |
| 1567 | + AddSliceBoundary (pEncCtx, pCurSlice, pSliceCtx, pCurMb, iCurMbIdx, kiEndMbIdxOfPartition); | |
| 1568 | 1568 | |
| 1569 | 1569 | ++ pSliceCtx->iSliceNumInFrame; |
| 1570 | 1570 | |
| @@ -1581,7 +1581,7 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 10 unmodified lines | ||
| 1581 | 1581 | if ((kbSliceNumReachConstraint || !kbSliceIdxNotExceedConstraint) |
| 1582 | 1582 | && kbCurMbNotLastMbOfCurPartition |
| 1583 | 1583 | && JUMPPACKETSIZE_JUDGE (uiLen, iCurMbIdx, |
| 1584 | − pSliceCtx->uiSliceSizeConstraint - ((kiLastMbIdxInPartition - iCurMbIdx) << | |
| 1584 | + pSliceCtx->uiSliceSizeConstraint - ((kiEndMbIdxOfPartition - iCurMbIdx) << | |
| 1585 | 1585 | (pCurSlice->uiAssumeLog2BytePerMb) //assume each MB consumes these byte under largest QP |
| 1586 | 1586 | )) |
| 1587 | 1587 | ) { |