History

Remove unnecessary/superfluous parentheses in slice_multi_threading.cpp

Martin Storsjö committed 12 years ago

Commit d75f6771 parent 3238c911 file · +12 −12Browse files

Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+12−12
@@ -316,9 +316,9 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 315 unmodified lines
316316
317317 #ifdef _WIN32
318318 // Dummy event namespace, the windows events don't actually use this
319− WelsSnprintf (pSmt->eventNamespace, sizeof(pSmt->eventNamespace), "%p", (void*) (*ppCtx));
319+ WelsSnprintf (pSmt->eventNamespace, sizeof(pSmt->eventNamespace), "%p", (void*) *ppCtx);
320320 #else
321− WelsSnprintf (pSmt->eventNamespace, sizeof(pSmt->eventNamespace), "%p%x", (void*) (*ppCtx), getpid());
321+ WelsSnprintf (pSmt->eventNamespace, sizeof(pSmt->eventNamespace), "%p%x", (void*) *ppCtx, getpid());
322322 #endif//!_WIN32
323323
324324 iIdx = 0;
@@ -350,37 +350,37 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 25 unmodified lines
350350 pSmt->pFSliceDiff = fopen ("slice_time.txt", "wt+");
351351 #endif//MT_DEBUG
352352
353− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "encpEncCtx= 0x%p\n", (void*) (*ppCtx));
353+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "encpEncCtx= 0x%p\n", (void*) *ppCtx);
354354
355355 char name[SEM_NAME_MAX] = {0};
356356 WELS_GCC_UNUSED WELS_THREAD_ERROR_CODE err = 0;
357357
358358 iIdx = 0;
359359 while (iIdx < iThreadNum) {
360− pSmt->pThreadPEncCtx[iIdx].pWelsPEncCtx = (void*) (*ppCtx);
360+ pSmt->pThreadPEncCtx[iIdx].pWelsPEncCtx = (void*) *ppCtx;
361361 pSmt->pThreadPEncCtx[iIdx].iSliceIndex = iIdx;
362362 pSmt->pThreadPEncCtx[iIdx].iThreadIndex = iIdx;
363363 pSmt->pThreadHandles[iIdx] = 0;
364364
365365 WelsSnprintf (name, SEM_NAME_MAX, "ee%d%s", iIdx, pSmt->eventNamespace);
366366 err = WelsEventOpen (&pSmt->pExitEncodeEvent[iIdx], name);
367− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "[MT] Open pExitEncodeEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
367+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "[MT] Open pExitEncodeEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
368368 WelsSnprintf (name, SEM_NAME_MAX, "tm%d%s", iIdx, pSmt->eventNamespace);
369369 err = WelsEventOpen (&pSmt->pThreadMasterEvent[iIdx], name);
370− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "[MT] Open pThreadMasterEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
370+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "[MT] Open pThreadMasterEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
371371 // length of semaphore name should be system constrained at least on mac 10.7
372372 WelsSnprintf (name, SEM_NAME_MAX, "ud%d%s", iIdx, pSmt->eventNamespace);
373373 err = WelsEventOpen (&pSmt->pUpdateMbListEvent[iIdx], name);
374− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "[MT] Open pUpdateMbListEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
374+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "[MT] Open pUpdateMbListEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
375375 WelsSnprintf (name, SEM_NAME_MAX, "fu%d%s", iIdx, pSmt->eventNamespace);
376376 err = WelsEventOpen (&pSmt->pFinUpdateMbListEvent[iIdx], name);
377− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "[MT] Open pFinUpdateMbListEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
377+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "[MT] Open pFinUpdateMbListEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
378378 WelsSnprintf (name, SEM_NAME_MAX, "sc%d%s", iIdx, pSmt->eventNamespace);
379379 err = WelsEventOpen (&pSmt->pSliceCodedEvent[iIdx], name);
380− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "[MT] Open pSliceCodedEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
380+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "[MT] Open pSliceCodedEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno);
381381 WelsSnprintf (name, SEM_NAME_MAX, "rc%d%s", iIdx, pSmt->eventNamespace);
382382 err = WelsEventOpen (&pSmt->pReadySliceCodingEvent[iIdx], name);
383− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "[MT] Open pReadySliceCodingEvent%d = 0x%p named(%s) ret%d err%d\n", iIdx,
383+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "[MT] Open pReadySliceCodingEvent%d = 0x%p named(%s) ret%d err%d\n", iIdx,
384384 (void*)pSmt->pReadySliceCodingEvent[iIdx], name, err, errno);
385385
386386 ++ iIdx;
@@ -388,7 +388,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 1 unmodified line
388388
389389 WelsSnprintf (name, SEM_NAME_MAX, "scm%s", pSmt->eventNamespace);
390390 err = WelsEventOpen (&pSmt->pSliceCodedMasterEvent, name);
391− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "[MT] Open pSliceCodedMasterEvent named(%s) ret%d err%d\n", name, err, errno);
391+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "[MT] Open pSliceCodedMasterEvent named(%s) ret%d err%d\n", name, err, errno);
392392
393393 (*ppCtx)->pSliceBs = (SWelsSliceBs*)pMa->WelsMalloc (sizeof (SWelsSliceBs) * iMaxSliceNum, "pSliceBs");
394394 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSliceBs), FreeMemorySvc (ppCtx))
@@ -421,7 +421,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 26 unmodified lines
421421 iReturn = WelsMutexInit (&(*ppCtx)->mutexEncoderError);
422422 WELS_VERIFY_RETURN_PROC_IF (1, (WELS_THREAD_ERROR_OK != iReturn), FreeMemorySvc (ppCtx))
423423
424− MT_TRACE_LOG ((*ppCtx), WELS_LOG_INFO, "RequestMtResource(), iThreadNum=%d, iCountSliceNum= %d\n", pPara->iCountThreadsNum,
424+ MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "RequestMtResource(), iThreadNum=%d, iCountSliceNum= %d\n", pPara->iCountThreadsNum,
425425 iMaxSliceNum);
426426
427427 return 0;

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