ref: a8584b530f4ba9b355ec11c735e14a0e673a7c1d
parent: 148f86f3b05a3b8c21e386fa0bf8e57bd3a803c9
parent: 06eb03578dfb61a69a2a228d0c97bee87cfa320e
author: ruil2 <ruil2@cisco.com>
date: Wed Nov 18 08:42:02 EST 2015
Merge pull request #2245 from shihuade/MultiThread_V4.1_SliceCtx_V1_Pull_V2 SSliceCtx structure refactoring----change input parameters for UpdateMb…
--- a/codec/encoder/core/inc/slice_multi_threading.h
+++ b/codec/encoder/core/inc/slice_multi_threading.h
@@ -51,7 +51,7 @@
#include "WelsThreadLib.h"
namespace WelsEnc {
-void UpdateMbListNeighborParallel (SSliceCtx* pSliceCtx,
+void UpdateMbListNeighborParallel (SDqLayer* pCurDq,
SMB* pMbList,
const int32_t kiSliceIdc);
--- a/codec/encoder/core/src/slice_multi_threading.cpp
+++ b/codec/encoder/core/src/slice_multi_threading.cpp
@@ -77,9 +77,10 @@
}
namespace WelsEnc {
-void UpdateMbListNeighborParallel (SSliceCtx* pSliceCtx,
+void UpdateMbListNeighborParallel (SDqLayer* pCurDq,
SMB* pMbList,
const int32_t uiSliceIdc) {
+ SSliceCtx* pSliceCtx = pCurDq->pSliceEncCtx;
const uint16_t* kpMbMap = pSliceCtx->pOverallMbMap;
const int32_t kiMbWidth = pSliceCtx->iMbWidth;
int32_t iIdx = pSliceCtx->pFirstMbInSlice[uiSliceIdc];
@@ -960,7 +961,7 @@
iSliceIdx =
iEventIdx; // pPrivateData->iSliceIndex; old threads can not be terminated, pPrivateData is not correct for applicable
pCurDq = pEncPEncCtx->pCurDqLayer;
- UpdateMbListNeighborParallel (pCurDq->pSliceEncCtx, pCurDq->sMbDataP, iSliceIdx);
+ UpdateMbListNeighborParallel (pCurDq, pCurDq->sMbDataP, iSliceIdx);
WelsEventSignal (
&pEncPEncCtx->pSliceThreading->pFinUpdateMbListEvent[iEventIdx]); // mean finished update pMb list for this pSlice
} else { // WELS_THREAD_ERROR_WAIT_TIMEOUT, or WELS_THREAD_ERROR_WAIT_FAILED
--- a/codec/encoder/core/src/wels_task_encoder.cpp
+++ b/codec/encoder/core/src/wels_task_encoder.cpp
@@ -237,7 +237,7 @@
}
WelsErrorType CWelsUpdateMbMapTask::Execute() {
- UpdateMbListNeighborParallel (m_pCtx->pCurDqLayer->pSliceEncCtx, m_pCtx->pCurDqLayer->sMbDataP, m_iSliceIdx);
+ UpdateMbListNeighborParallel (m_pCtx->pCurDqLayer, m_pCtx->pCurDqLayer->sMbDataP, m_iSliceIdx);
return ENC_RETURN_SUCCESS;
}