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 | void RcInitSliceInformation (sWelsEncCtx* pEncCtx) { | 513 | void RcInitSliceInformation (sWelsEncCtx* pEncCtx) { |
| 514 | SSliceCtx* pCurSliceCtx = &pEncCtx->pCurDqLayer->sSliceEncCtx; | ||
| 515 | SSlice* pSliceInLayer = pEncCtx->pCurDqLayer->sLayerInfo.pSliceInLayer; | 514 | SSlice* pSliceInLayer = pEncCtx->pCurDqLayer->sLayerInfo.pSliceInLayer; |
| 516 | SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId]; | 515 | SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId]; |
| 517 | SRCSlicing* pSOverRc = &pWelsSvcRc->pSlicingOverRc[0]; | 516 | SRCSlicing* pSOverRc = &pWelsSvcRc->pSlicingOverRc[0]; |
| @@ -522,10 +521,10 @@ void RcInitSliceInformation (sWelsEncCtx* pEncCtx) { · 4 unmodified lines | |||
| 522 | for (int32_t i = 0; i < kiSliceNum; i++) { | 521 | for (int32_t i = 0; i < kiSliceNum; i++) { |
| 523 | pSOverRc->iStartMbSlice = | 522 | pSOverRc->iStartMbSlice = |
| 524 | pSOverRc->iEndMbSlice = pSliceInLayer[i].sSliceHeaderExt.sSliceHeader.iFirstMbInSlice; | 523 | pSOverRc->iEndMbSlice = pSliceInLayer[i].sSliceHeaderExt.sSliceHeader.iFirstMbInSlice; |
| 525 | pSOverRc->iEndMbSlice += (pCurSliceCtx->pCountMbNumInSlice[i] - 1); | 524 | pSOverRc->iEndMbSlice += (pSliceInLayer[i].iCountMbNumInSlice - 1); |
| 526 | pSOverRc->iTotalQpSlice = 0; | 525 | pSOverRc->iTotalQpSlice = 0; |
| 527 | pSOverRc->iTotalMbSlice = 0; | 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 | pSOverRc->iFrameBitsSlice = 0; | 528 | pSOverRc->iFrameBitsSlice = 0; |
| 530 | pSOverRc->iGomBitsSlice = 0; | 529 | pSOverRc->iGomBitsSlice = 0; |
| 531 | ++ pSOverRc; | 530 | ++ pSOverRc; |