Showing the changes to codec/encoder/core/src/ratectl.cpp (1 of 8 files). Show all
Unified · Split
| @@ -511,7 +511,6 @@ void RcCalculatePictureQp (sWelsEncCtx* pEncCtx) { · 510 unmodified lines | ||
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | void RcInitSliceInformation (sWelsEncCtx* pEncCtx) { |
| 514 | − SSliceCtx* pCurSliceCtx = &pEncCtx->pCurDqLayer->sSliceEncCtx; | |
| 515 | 514 | SSlice* pSliceInLayer = pEncCtx->pCurDqLayer->sLayerInfo.pSliceInLayer; |
| 516 | 515 | SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId]; |
| 517 | 516 | SRCSlicing* pSOverRc = &pWelsSvcRc->pSlicingOverRc[0]; |
| @@ -522,10 +521,10 @@ void RcInitSliceInformation (sWelsEncCtx* pEncCtx) { · 4 unmodified lines | ||
| 522 | 521 | for (int32_t i = 0; i < kiSliceNum; i++) { |
| 523 | 522 | pSOverRc->iStartMbSlice = |
| 524 | 523 | pSOverRc->iEndMbSlice = pSliceInLayer[i].sSliceHeaderExt.sSliceHeader.iFirstMbInSlice; |
| 525 | − pSOverRc->iEndMbSlice += (pCurSliceCtx->pCountMbNumInSlice[i] - 1); | |
| 524 | + pSOverRc->iEndMbSlice += (pSliceInLayer[i].iCountMbNumInSlice - 1); | |
| 526 | 525 | pSOverRc->iTotalQpSlice = 0; |
| 527 | 526 | pSOverRc->iTotalMbSlice = 0; |
| 528 | − pSOverRc->iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb * pCurSliceCtx->pCountMbNumInSlice[i], INT_MULTIPLY); | |
| 527 | + pSOverRc->iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb * pSliceInLayer[i].iCountMbNumInSlice, INT_MULTIPLY); | |
| 529 | 528 | pSOverRc->iFrameBitsSlice = 0; |
| 530 | 529 | pSOverRc->iGomBitsSlice = 0; |
| 531 | 530 | ++ pSOverRc; |