History

Multi-thread-fixed:RBC#1720:iMaxSliceNumConstraint replaced by iMaxSliceNum

huade committed 9 years ago

Commit c2e37d51 parent c917d315 files · +31 −36Browse files

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

Unified · Split

codec/encoder/core/src/wels_task_encoder.cpp+5−7
@@ -232,26 +232,24 @@ void CWelsLoadBalancingSlicingEncodingTask::FinishTask() { · 231 unmodified lines
232232 //CWelsConstrainedSizeSlicingEncodingTask
233233 WelsErrorType CWelsConstrainedSizeSlicingEncodingTask::ExecuteTask() {
234234
235− SDqLayer* pCurDq = m_pCtx->pCurDqLayer;
236−
235+ SDqLayer* pCurDq = m_pCtx->pCurDqLayer;
237236 SSliceCtx* pSliceCtx = &pCurDq->sSliceEncCtx;
238237 const int32_t kiSliceIdxStep = m_pCtx->iActiveThreadsNum;
239−
240− SSpatialLayerInternal* pParamInternal = &m_pCtx->pSvcParam->sDependencyLayers[m_pCtx->uiDependencyId];
238+ SSpatialLayerInternal* pParamInternal = &m_pCtx->pSvcParam->sDependencyLayers[m_pCtx->uiDependencyId];
241239 SSliceHeaderExt* pStartSliceHeaderExt = &pCurDq->ppSliceInLayer[m_iSliceIdx]->sSliceHeaderExt;
242−
243− //deal with partition: TODO: here SSliceThreadPrivateData is just for parition info and actually has little relationship with threadbuffer, and iThreadIndex is not used in threadpool model, need renaming after removing old logic to avoid confusion
244240 const int32_t kiPartitionId = m_iSliceIdx % kiSliceIdxStep;
245241 const int32_t kiFirstMbInPartition = pCurDq->pFirstMbIdxOfPartition[kiPartitionId];
246242 const int32_t kiEndMbIdxInPartition = pCurDq->pEndMbIdxOfPartition[kiPartitionId];
247243 pStartSliceHeaderExt->sSliceHeader.iFirstMbInSlice = kiFirstMbInPartition;
248244 pCurDq->pNumSliceCodedOfPartition[kiPartitionId] = 1;
249245 pCurDq->pLastCodedMbIdxOfPartition[kiPartitionId] = 0;
250− //end of deal with partition
246+
247+ //deal with partition: TODO: here SSliceThreadPrivateData is just for parition info and actually has little relationship with threadbuffer, and iThreadIndex is not used in threadpool model, need renaming after removing old logic to avoid confusion
251248
252249 int32_t iAnyMbLeftInPartition = kiEndMbIdxInPartition - kiFirstMbInPartition + 1;
253250 int32_t iLocalSliceIdx = m_iSliceIdx;
254251 while (iAnyMbLeftInPartition > 0) {
252+ //TODO: will reallocate
255253 if (iLocalSliceIdx >= pSliceCtx->iMaxSliceNumConstraint) {
256254 WelsLog (&m_pCtx->sLogCtx, WELS_LOG_WARNING,
257255 "[MT] CWelsConstrainedSizeSlicingEncodingTask ExecuteTask() coding_idx %d, uiLocalSliceIdx %d, pSliceCtx->iMaxSliceNumConstraint %d",

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