Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 4 files). Show all
Unified · Split
| @@ -918,6 +918,14 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 917 unmodified lines | |||
| 918 | /////////////// | 918 | /////////////// |
| 919 | // pMb loop | 919 | // pMb loop |
| 920 | /////////////// | 920 | /////////////// |
| 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 | } | ||
| 921 | // for inter non-dynamic pSlice | 929 | // for inter non-dynamic pSlice |
| 922 | int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, const int32_t kiSliceFirstMbXY) { | 930 | int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, const int32_t kiSliceFirstMbXY) { |
| 923 | SWelsMD* pMd = (SWelsMD*)pWelsMd; | 931 | SWelsMD* pMd = (SWelsMD*)pWelsMd; |
| @@ -948,10 +956,9 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 24 unmodified lines | |||
| 948 | pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice); | 956 | pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice); |
| 949 | 957 | ||
| 950 | //step (2). save some vale for future use, initial pWelsMd | 958 | //step (2). save some vale for future use, initial pWelsMd |
| 951 | pMd->iLambda = g_kiQpCostTable[pCurMb->uiLumaQp]; | ||
| 952 | pMd->pMvdCost = &pMvdCostTableInter[pCurMb->uiLumaQp * kiMvdInterTableStride]; | ||
| 953 | WelsMdIntraInit (pEncCtx, pCurMb, pMbCache, kiSliceFirstMbXY); | 959 | WelsMdIntraInit (pEncCtx, pCurMb, pMbCache, kiSliceFirstMbXY); |
| 954 | WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY); | 960 | WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY); |
| 961 | WelsInitInterMDStruc(pCurMb, pMvdCostTableInter, kiMvdInterTableStride, pMd ); | ||
| 955 | pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache); | 962 | pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache); |
| 956 | //mb_qp | 963 | //mb_qp |
| 957 | 964 | ||
| @@ -1047,11 +1054,9 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 89 unmodified lines | |||
| 1047 | } | 1054 | } |
| 1048 | 1055 | ||
| 1049 | //step (2). save some vale for future use, initial pWelsMd | 1056 | //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 | |||
| 1053 | WelsMdIntraInit (pEncCtx, pCurMb, pMbCache, kiSliceFirstMbXY); | 1057 | WelsMdIntraInit (pEncCtx, pCurMb, pMbCache, kiSliceFirstMbXY); |
| 1054 | WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY); | 1058 | WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY); |
| 1059 | WelsInitInterMDStruc(pCurMb, pMvdCostTableInter, kiMvdInterTableStride, pMd ); | ||
| 1055 | pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache); | 1060 | pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache); |
| 1056 | //mb_qp | 1061 | //mb_qp |
| 1057 | 1062 | ||