History

remove pCountMbNumInSlice from SSliceCtx

huade committed 10 years ago

Commit d02addd1 parent 60f36eb8 files · +40 −72Browse files

Showing the changes to codec/encoder/core/src/ratectl.cpp (1 of 8 files). Show all

Unified · Split

codec/encoder/core/src/ratectl.cpp+2−3
@@ -511,7 +511,6 @@ void RcCalculatePictureQp (sWelsEncCtx* pEncCtx) { · 510 unmodified lines
511511 }
512512
513513 void RcInitSliceInformation (sWelsEncCtx* pEncCtx) {
514− SSliceCtx* pCurSliceCtx = &pEncCtx->pCurDqLayer->sSliceEncCtx;
515514 SSlice* pSliceInLayer = pEncCtx->pCurDqLayer->sLayerInfo.pSliceInLayer;
516515 SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
517516 SRCSlicing* pSOverRc = &pWelsSvcRc->pSlicingOverRc[0];
@@ -522,10 +521,10 @@ void RcInitSliceInformation (sWelsEncCtx* pEncCtx) { · 4 unmodified lines
522521 for (int32_t i = 0; i < kiSliceNum; i++) {
523522 pSOverRc->iStartMbSlice =
524523 pSOverRc->iEndMbSlice = pSliceInLayer[i].sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
525− pSOverRc->iEndMbSlice += (pCurSliceCtx->pCountMbNumInSlice[i] - 1);
524+ pSOverRc->iEndMbSlice += (pSliceInLayer[i].iCountMbNumInSlice - 1);
526525 pSOverRc->iTotalQpSlice = 0;
527526 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);
529528 pSOverRc->iFrameBitsSlice = 0;
530529 pSOverRc->iGomBitsSlice = 0;
531530 ++ pSOverRc;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t