Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 17 files). Show all
Unified · Split
| @@ -921,10 +921,10 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 920 unmodified lines | ||
| 921 | 921 | /////////////// |
| 922 | 922 | // pMb loop |
| 923 | 923 | /////////////// |
| 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, | |
| 925 | 925 | SWelsMD* pMd) { |
| 926 | 926 | pMd->iLambda = g_kiQpCostTable[pCurMb->uiLumaQp]; |
| 927 | − pMd->pMvdCost = &pMvdCostTableInter[pCurMb->uiLumaQp * kiMvdInterTableStride]; | |
| 927 | + pMd->pMvdCost = &pMvdCostTable[pCurMb->uiLumaQp * kiMvdInterTableStride]; | |
| 928 | 928 | pMd-> iMbPixX = (pCurMb->iMbX << 4); |
| 929 | 929 | pMd-> iMbPixY = (pCurMb->iMbY << 4); |
| 930 | 930 | memset (&pMd->iBlock8x8StaticIdc[0], 0, sizeof (pMd->iBlock8x8StaticIdc)); |
| @@ -943,9 +943,8 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 12 unmodified lines | ||
| 943 | 943 | int32_t iCurMbIdx = -1; |
| 944 | 944 | int32_t iMbSkipRun = 0; |
| 945 | 945 | 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]; | |
| 949 | 948 | const int32_t kiSliceIdx = pSlice->uiSliceIdx; |
| 950 | 949 | const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset; |
| 951 | 950 | int32_t iEncReturn = ENC_RETURN_SUCCESS; |
| @@ -965,7 +964,7 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 13 unmodified lines | ||
| 965 | 964 | WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY); |
| 966 | 965 | |
| 967 | 966 | TRY_REENCODING: |
| 968 | − WelsInitInterMDStruc (pCurMb, pMvdCostTableInter, kiMvdInterTableStride, pMd); | |
| 967 | + WelsInitInterMDStruc (pCurMb, pMvdCostTable, kiMvdInterTableStride, pMd); | |
| 969 | 968 | pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache); |
| 970 | 969 | //mb_qp |
| 971 | 970 | |
| @@ -1041,7 +1040,7 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 69 unmodified lines | ||
| 1041 | 1040 | int32_t iMbSkipRun = 0; |
| 1042 | 1041 | const int32_t kiMvdInterTableSize = (pEncCtx->pSvcParam->iSpatialLayerNum == 1 ? 648 : 972); |
| 1043 | 1042 | const int32_t kiMvdInterTableStride = 1 + (kiMvdInterTableSize << 1); |
| 1044 | − uint16_t* pMvdCostTableInter = &pEncCtx->pMvdCostTableInter[kiMvdInterTableSize]; | |
| 1043 | + uint16_t* pMvdCostTable = &pEncCtx->pMvdCostTable[kiMvdInterTableSize]; | |
| 1045 | 1044 | const int32_t kiSliceIdx = pSlice->uiSliceIdx; |
| 1046 | 1045 | const int32_t kiPartitionId = (kiSliceIdx % pEncCtx->iActiveThreadsNum); |
| 1047 | 1046 | const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset; |
| @@ -1074,7 +1073,7 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 26 unmodified lines | ||
| 1074 | 1073 | WelsMdInterInit (pEncCtx, pSlice, pCurMb, kiSliceFirstMbXY); |
| 1075 | 1074 | |
| 1076 | 1075 | TRY_REENCODING: |
| 1077 | − WelsInitInterMDStruc (pCurMb, pMvdCostTableInter, kiMvdInterTableStride, pMd); | |
| 1076 | + WelsInitInterMDStruc (pCurMb, pMvdCostTable, kiMvdInterTableStride, pMd); | |
| 1078 | 1077 | pEncCtx->pFuncList->pfInterMd (pEncCtx, pMd, pSlice, pCurMb, pMbCache); |
| 1079 | 1078 | //mb_qp |
| 1080 | 1079 | |