History

astyle code style for enc

Guangwei Wang committed 9 years ago

Commit 3d150f01 parent bc8317915 files · +184 −172Browse files

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

Unified · Split

codec/encoder/core/src/wels_task_encoder.cpp+12−12
@@ -116,7 +116,7 @@ WelsErrorType CWelsSliceEncodingTask::InitTask() { · 115 unmodified lines
116116 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
117117 m_pSliceBs = &m_pSlice->sSliceBs;
118118
119− iReturn = SetSliceBoundaryInfo(m_pCtx->pCurDqLayer, m_pSlice, m_iSliceIdx);
119+ iReturn = SetSliceBoundaryInfo (m_pCtx->pCurDqLayer, m_pSlice, m_iSliceIdx);
120120 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)
121121
122122 SetOneSliceBsBufferUnderMultithread (m_pCtx, m_iThreadIdx, m_pSlice);
@@ -244,7 +244,7 @@ WelsErrorType CWelsConstrainedSizeSlicingEncodingTask::ExecuteTask() { · 121 unmodified lines
244244 bool bNeedReallocate = false;
245245
246246 int32_t iDiffMbIdx = kiEndMbIdxInPartition - kiFirstMbInPartition;
247− if( 0 == iDiffMbIdx) {
247+ if (0 == iDiffMbIdx) {
248248 m_pSlice->iSliceIdx = -1;
249249 return ENC_RETURN_SUCCESS;
250250 }
@@ -252,17 +252,17 @@ WelsErrorType CWelsConstrainedSizeSlicingEncodingTask::ExecuteTask() { · 1 unmodified line
252252 int32_t iAnyMbLeftInPartition = iDiffMbIdx + 1;
253253 int32_t iLocalSliceIdx = m_iSliceIdx;
254254 while (iAnyMbLeftInPartition > 0) {
255− bNeedReallocate = (pCurDq->sSliceBufferInfo[m_iThreadIdx].iCodedSliceNum
256− >= pCurDq->sSliceBufferInfo[m_iThreadIdx].iMaxSliceNum -1) ? true : false;
257− if (bNeedReallocate) {
258− WelsMutexLock (&m_pCtx->pSliceThreading->mutexThreadSlcBuffReallocate);
259− //for memory statistic variable
260− iReturn = ReallocateSliceInThread(m_pCtx, pCurDq, m_pCtx->uiDependencyId, m_iThreadIdx);
261− WelsMutexUnlock (&m_pCtx->pSliceThreading->mutexThreadSlcBuffReallocate);
262− if (ENC_RETURN_SUCCESS != iReturn) {
263− return iReturn;
264− }
255+ bNeedReallocate = (pCurDq->sSliceBufferInfo[m_iThreadIdx].iCodedSliceNum
256+ >= pCurDq->sSliceBufferInfo[m_iThreadIdx].iMaxSliceNum - 1) ? true : false;
257+ if (bNeedReallocate) {
258+ WelsMutexLock (&m_pCtx->pSliceThreading->mutexThreadSlcBuffReallocate);
259+ //for memory statistic variable
260+ iReturn = ReallocateSliceInThread (m_pCtx, pCurDq, m_pCtx->uiDependencyId, m_iThreadIdx);
261+ WelsMutexUnlock (&m_pCtx->pSliceThreading->mutexThreadSlcBuffReallocate);
262+ if (ENC_RETURN_SUCCESS != iReturn) {
263+ return iReturn;
265264 }
265+ }
266266
267267 iReturn = InitOneSliceInThread (m_pCtx, m_pSlice, m_iThreadIdx, m_pCtx->uiDependencyId, iLocalSliceIdx);
268268 WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS)

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