History

completing and bug-fixing the screen content MD/ME process

Sijia Chen committed 12 years ago

Commit a964ae81 parent 2eb65d717 files · +404 −289Browse files

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

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+7−8
@@ -921,10 +921,10 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 920 unmodified lines
921921 ///////////////
922922 // pMb loop
923923 ///////////////
924−inline void WelsInitInterMDStruc (const SMB* pCurMb, uint16_t* pMvdCostTableInter, const int32_t kiMvdInterTableStride,
924+inline void WelsInitInterMDStruc (const SMB* pCurMb, uint16_t* pMvdCostTable, const int32_t kiMvdInterTableStride,
925925 SWelsMD* pMd) {
926926 pMd->iLambda = g_kiQpCostTable[pCurMb->uiLumaQp];
927− pMd->pMvdCost = &pMvdCostTableInter[pCurMb->uiLumaQp * kiMvdInterTableStride];
927+ pMd->pMvdCost = &pMvdCostTable[pCurMb->uiLumaQp * kiMvdInterTableStride];
928928 pMd-> iMbPixX = (pCurMb->iMbX << 4);
929929 pMd-> iMbPixY = (pCurMb->iMbY << 4);
930930 memset (&pMd->iBlock8x8StaticIdc[0], 0, sizeof (pMd->iBlock8x8StaticIdc));
@@ -943,9 +943,8 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 12 unmodified lines
943943 int32_t iCurMbIdx = -1;
944944 int32_t iMbSkipRun = 0;
945945 const int32_t kiTotalNumMb = pCurLayer->iMbWidth * pCurLayer->iMbHeight;
946− const int32_t kiMvdInterTableSize = (pEncCtx->pSvcParam->iSpatialLayerNum == 1 ? 648 : 972);
947− const int32_t kiMvdInterTableStride = 1 + (kiMvdInterTableSize << 1);
948− uint16_t* pMvdCostTableInter = &pEncCtx->pMvdCostTableInter[kiMvdInterTableSize];
946+ const int32_t kiMvdInterTableStride = pEncCtx->iMvdCostTableStride;
947+ uint16_t* pMvdCostTable = &pEncCtx->pMvdCostTable[pEncCtx->iMvdCostTableSize];
949948 const int32_t kiSliceIdx = pSlice->uiSliceIdx;
950949 const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset;
951950 int32_t iEncReturn = ENC_RETURN_SUCCESS;
@@ -965,7 +964,7 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 13 unmodified lines
965964 WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY);
966965
967966 TRY_REENCODING:
968− WelsInitInterMDStruc (pCurMb, pMvdCostTableInter, kiMvdInterTableStride, pMd);
967+ WelsInitInterMDStruc (pCurMb, pMvdCostTable, kiMvdInterTableStride, pMd);
969968 pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache);
970969 //mb_qp
971970
@@ -1041,7 +1040,7 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 69 unmodified lines
10411040 int32_t iMbSkipRun = 0;
10421041 const int32_t kiMvdInterTableSize = (pEncCtx->pSvcParam->iSpatialLayerNum == 1 ? 648 : 972);
10431042 const int32_t kiMvdInterTableStride = 1 + (kiMvdInterTableSize << 1);
1044− uint16_t* pMvdCostTableInter = &pEncCtx->pMvdCostTableInter[kiMvdInterTableSize];
1043+ uint16_t* pMvdCostTable = &pEncCtx->pMvdCostTable[kiMvdInterTableSize];
10451044 const int32_t kiSliceIdx = pSlice->uiSliceIdx;
10461045 const int32_t kiPartitionId = (kiSliceIdx % pEncCtx->iActiveThreadsNum);
10471046 const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset;
@@ -1074,7 +1073,7 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 26 unmodified lines
10741073 WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY);
10751074
10761075 TRY_REENCODING:
1077− WelsInitInterMDStruc (pCurMb, pMvdCostTableInter, kiMvdInterTableStride, pMd);
1076+ WelsInitInterMDStruc (pCurMb, pMvdCostTable, kiMvdInterTableStride, pMd);
10781077 pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache);
10791078 //mb_qp
10801079

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