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
316 316
317#ifdef _WIN32317#ifdef _WIN32
318 // Dummy event namespace, the windows events don't actually use this318 // 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);
320#else320#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());
322#endif//!_WIN32322#endif//!_WIN32
323 323
324 iIdx = 0;324 iIdx = 0;
@@ -350,37 +350,37 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 25 unmodified lines
350 pSmt->pFSliceDiff = fopen ("slice_time.txt", "wt+");350 pSmt->pFSliceDiff = fopen ("slice_time.txt", "wt+");
351#endif//MT_DEBUG351#endif//MT_DEBUG
352 352
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);
354 354
355 char name[SEM_NAME_MAX] = {0};355 char name[SEM_NAME_MAX] = {0};
356 WELS_GCC_UNUSED WELS_THREAD_ERROR_CODE err = 0;356 WELS_GCC_UNUSED WELS_THREAD_ERROR_CODE err = 0;
357 357
358 iIdx = 0;358 iIdx = 0;
359 while (iIdx < iThreadNum) {359 while (iIdx < iThreadNum) {
360 pSmt->pThreadPEncCtx[iIdx].pWelsPEncCtx = (void*) (*ppCtx);360 pSmt->pThreadPEncCtx[iIdx].pWelsPEncCtx = (void*) *ppCtx;
361 pSmt->pThreadPEncCtx[iIdx].iSliceIndex = iIdx;361 pSmt->pThreadPEncCtx[iIdx].iSliceIndex = iIdx;
362 pSmt->pThreadPEncCtx[iIdx].iThreadIndex = iIdx;362 pSmt->pThreadPEncCtx[iIdx].iThreadIndex = iIdx;
363 pSmt->pThreadHandles[iIdx] = 0;363 pSmt->pThreadHandles[iIdx] = 0;
364 364
365 WelsSnprintf (name, SEM_NAME_MAX, "ee%d%s", iIdx, pSmt->eventNamespace);365 WelsSnprintf (name, SEM_NAME_MAX, "ee%d%s", iIdx, pSmt->eventNamespace);
366 err = WelsEventOpen (&pSmt->pExitEncodeEvent[iIdx], name);366 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);
368 WelsSnprintf (name, SEM_NAME_MAX, "tm%d%s", iIdx, pSmt->eventNamespace);368 WelsSnprintf (name, SEM_NAME_MAX, "tm%d%s", iIdx, pSmt->eventNamespace);
369 err = WelsEventOpen (&pSmt->pThreadMasterEvent[iIdx], name);369 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);
371 // length of semaphore name should be system constrained at least on mac 10.7371 // length of semaphore name should be system constrained at least on mac 10.7
372 WelsSnprintf (name, SEM_NAME_MAX, "ud%d%s", iIdx, pSmt->eventNamespace);372 WelsSnprintf (name, SEM_NAME_MAX, "ud%d%s", iIdx, pSmt->eventNamespace);
373 err = WelsEventOpen (&pSmt->pUpdateMbListEvent[iIdx], name);373 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);
375 WelsSnprintf (name, SEM_NAME_MAX, "fu%d%s", iIdx, pSmt->eventNamespace);375 WelsSnprintf (name, SEM_NAME_MAX, "fu%d%s", iIdx, pSmt->eventNamespace);
376 err = WelsEventOpen (&pSmt->pFinUpdateMbListEvent[iIdx], name);376 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);
378 WelsSnprintf (name, SEM_NAME_MAX, "sc%d%s", iIdx, pSmt->eventNamespace);378 WelsSnprintf (name, SEM_NAME_MAX, "sc%d%s", iIdx, pSmt->eventNamespace);
379 err = WelsEventOpen (&pSmt->pSliceCodedEvent[iIdx], name);379 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);
381 WelsSnprintf (name, SEM_NAME_MAX, "rc%d%s", iIdx, pSmt->eventNamespace);381 WelsSnprintf (name, SEM_NAME_MAX, "rc%d%s", iIdx, pSmt->eventNamespace);
382 err = WelsEventOpen (&pSmt->pReadySliceCodingEvent[iIdx], name);382 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,
384 (void*)pSmt->pReadySliceCodingEvent[iIdx], name, err, errno);384 (void*)pSmt->pReadySliceCodingEvent[iIdx], name, err, errno);
385 385
386 ++ iIdx;386 ++ iIdx;
@@ -388,7 +388,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 1 unmodified line
388 388
389 WelsSnprintf (name, SEM_NAME_MAX, "scm%s", pSmt->eventNamespace);389 WelsSnprintf (name, SEM_NAME_MAX, "scm%s", pSmt->eventNamespace);
390 err = WelsEventOpen (&pSmt->pSliceCodedMasterEvent, name);390 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);
392 392
393 (*ppCtx)->pSliceBs = (SWelsSliceBs*)pMa->WelsMalloc (sizeof (SWelsSliceBs) * iMaxSliceNum, "pSliceBs");393 (*ppCtx)->pSliceBs = (SWelsSliceBs*)pMa->WelsMalloc (sizeof (SWelsSliceBs) * iMaxSliceNum, "pSliceBs");
394 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pSliceBs), FreeMemorySvc (ppCtx))394 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
421 iReturn = WelsMutexInit (&(*ppCtx)->mutexEncoderError);421 iReturn = WelsMutexInit (&(*ppCtx)->mutexEncoderError);
422 WELS_VERIFY_RETURN_PROC_IF (1, (WELS_THREAD_ERROR_OK != iReturn), FreeMemorySvc (ppCtx))422 WELS_VERIFY_RETURN_PROC_IF (1, (WELS_THREAD_ERROR_OK != iReturn), FreeMemorySvc (ppCtx))
423 423
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,
425 iMaxSliceNum);425 iMaxSliceNum);
426 426
427 return 0;427 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