History

expand structure of MD and ME

sijchen committed 12 years ago

Commit 7f0c7da1 parent e8d51084 files · +30 −9Browse files

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

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+10−5
@@ -918,6 +918,14 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 917 unmodified lines
918918 ///////////////
919919 // pMb loop
920920 ///////////////
921+inline void WelsInitInterMDStruc(const SMB* pCurMb, uint16_t *pMvdCostTableInter, const int32_t kiMvdInterTableStride, SWelsMD* pMd )
922+{
923+ pMd->iLambda = g_kiQpCostTable[pCurMb->uiLumaQp];
924+ pMd->pMvdCost = &pMvdCostTableInter[pCurMb->uiLumaQp * kiMvdInterTableStride];
925+ pMd-> iMbPixX = (pCurMb->iMbX<<4);
926+ pMd-> iMbPixY = (pCurMb->iMbY<<4);
927+ memset( &pMd->iBlock8x8StaticIdc[0], 0, sizeof(pMd->iBlock8x8StaticIdc) );
928+}
921929 // for inter non-dynamic pSlice
922930 int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, const int32_t kiSliceFirstMbXY) {
923931 SWelsMD* pMd = (SWelsMD*)pWelsMd;
@@ -948,10 +956,9 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 24 unmodified lines
948956 pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);
949957
950958 //step (2). save some vale for future use, initial pWelsMd
951− pMd->iLambda = g_kiQpCostTable[pCurMb->uiLumaQp];
952− pMd->pMvdCost = &pMvdCostTableInter[pCurMb->uiLumaQp * kiMvdInterTableStride];
953959 WelsMdIntraInit (pEncCtx, pCurMb, pMbCache, kiSliceFirstMbXY);
954960 WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY);
961+ WelsInitInterMDStruc(pCurMb, pMvdCostTableInter, kiMvdInterTableStride, pMd );
955962 pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache);
956963 //mb_qp
957964
@@ -1047,11 +1054,9 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 89 unmodified lines
10471054 }
10481055
10491056 //step (2). save some vale for future use, initial pWelsMd
1050− pMd->iLambda = g_kiQpCostTable[pCurMb->uiLumaQp];
1051− pMd->pMvdCost = &pMvdCostTableInter[pCurMb->uiLumaQp * kiMvdInterTableStride];
1052−
10531057 WelsMdIntraInit (pEncCtx, pCurMb, pMbCache, kiSliceFirstMbXY);
10541058 WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY);
1059+ WelsInitInterMDStruc(pCurMb, pMvdCostTableInter, kiMvdInterTableStride, pMd );
10551060 pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache);
10561061 //mb_qp
10571062

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