Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 6 files). Show all
Unified · Split
| @@ -456,12 +456,12 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 455 unmodified lines | |||
| 456 | WelsEventInit (&pSmt->pFinUpdateMbListEvent[iIdx]); | 456 | WelsEventInit (&pSmt->pFinUpdateMbListEvent[iIdx]); |
| 457 | #else | 457 | #else |
| 458 | // length of semaphore name should be system constrained at least on mac 10.7 | 458 | // length of semaphore name should be system constrained at least on mac 10.7 |
| 459 | SNPRINTF (name, SEM_NAME_MAX, "ud%d%p", iIdx, (void*) (*ppCtx)); | 459 | WelsSnprintf (name, SEM_NAME_MAX, "ud%d%p", iIdx, (void*) (*ppCtx)); |
| 460 | err = WelsEventOpen (&pSmt->pUpdateMbListEvent[iIdx], name); | 460 | err = WelsEventOpen (&pSmt->pUpdateMbListEvent[iIdx], name); |
| 461 | #if defined(ENABLE_TRACE_MT) | 461 | #if defined(ENABLE_TRACE_MT) |
| 462 | WelsLog ((*ppCtx), WELS_LOG_INFO, "[MT] Open pUpdateMbListEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno); | 462 | WelsLog ((*ppCtx), WELS_LOG_INFO, "[MT] Open pUpdateMbListEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno); |
| 463 | #endif | 463 | #endif |
| 464 | SNPRINTF (name, SEM_NAME_MAX, "fu%d%p", iIdx, (void*) (*ppCtx)); | 464 | WelsSnprintf (name, SEM_NAME_MAX, "fu%d%p", iIdx, (void*) (*ppCtx)); |
| 465 | err = WelsEventOpen (&pSmt->pFinUpdateMbListEvent[iIdx], name); | 465 | err = WelsEventOpen (&pSmt->pFinUpdateMbListEvent[iIdx], name); |
| 466 | #if defined(ENABLE_TRACE_MT) | 466 | #if defined(ENABLE_TRACE_MT) |
| 467 | WelsLog ((*ppCtx), WELS_LOG_INFO, "[MT] Open pFinUpdateMbListEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno); | 467 | WelsLog ((*ppCtx), WELS_LOG_INFO, "[MT] Open pFinUpdateMbListEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno); |
| @@ -475,12 +475,12 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 7 unmodified lines | |||
| 475 | WelsEventInit (&pSmt->pFinSliceCodingEvent[iIdx]); | 475 | WelsEventInit (&pSmt->pFinSliceCodingEvent[iIdx]); |
| 476 | WelsEventInit (&pSmt->pExitEncodeEvent[iIdx]); | 476 | WelsEventInit (&pSmt->pExitEncodeEvent[iIdx]); |
| 477 | #else | 477 | #else |
| 478 | SNPRINTF (name, SEM_NAME_MAX, "sc%d%p", iIdx, (void*) (*ppCtx)); | 478 | WelsSnprintf (name, SEM_NAME_MAX, "sc%d%p", iIdx, (void*) (*ppCtx)); |
| 479 | err = WelsEventOpen (&pSmt->pSliceCodedEvent[iIdx], name); | 479 | err = WelsEventOpen (&pSmt->pSliceCodedEvent[iIdx], name); |
| 480 | #if defined(ENABLE_TRACE_MT) | 480 | #if defined(ENABLE_TRACE_MT) |
| 481 | WelsLog ((*ppCtx), WELS_LOG_INFO, "[MT] Open pSliceCodedEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno); | 481 | WelsLog ((*ppCtx), WELS_LOG_INFO, "[MT] Open pSliceCodedEvent%d named(%s) ret%d err%d\n", iIdx, name, err, errno); |
| 482 | #endif | 482 | #endif |
| 483 | SNPRINTF (name, SEM_NAME_MAX, "rc%d%p", iIdx, (void*) (*ppCtx)); | 483 | WelsSnprintf (name, SEM_NAME_MAX, "rc%d%p", iIdx, (void*) (*ppCtx)); |
| 484 | err = WelsEventOpen (&pSmt->pReadySliceCodingEvent[iIdx], name); | 484 | err = WelsEventOpen (&pSmt->pReadySliceCodingEvent[iIdx], name); |
| 485 | #if defined(ENABLE_TRACE_MT) | 485 | #if defined(ENABLE_TRACE_MT) |
| 486 | WelsLog ((*ppCtx), WELS_LOG_INFO, "[MT] Open pReadySliceCodingEvent%d = 0x%p named(%s) ret%d err%d\n", iIdx, | 486 | WelsLog ((*ppCtx), WELS_LOG_INFO, "[MT] Open pReadySliceCodingEvent%d = 0x%p named(%s) ret%d err%d\n", iIdx, |
| @@ -574,14 +574,14 @@ void ReleaseMtResource (sWelsEncCtx** ppCtx) { · 87 unmodified lines | |||
| 574 | #else | 574 | #else |
| 575 | str_t ename[SEM_NAME_MAX] = {0}; | 575 | str_t ename[SEM_NAME_MAX] = {0}; |
| 576 | // length of semaphore name should be system constrained at least on mac 10.7 | 576 | // length of semaphore name should be system constrained at least on mac 10.7 |
| 577 | SNPRINTF (ename, SEM_NAME_MAX, "sc%d%p", iIdx, (void*) (*ppCtx)); | 577 | WelsSnprintf (ename, SEM_NAME_MAX, "sc%d%p", iIdx, (void*) (*ppCtx)); |
| 578 | WelsEventClose (pSmt->pSliceCodedEvent[iIdx], ename); | 578 | WelsEventClose (pSmt->pSliceCodedEvent[iIdx], ename); |
| 579 | SNPRINTF (ename, SEM_NAME_MAX, "rc%d%p", iIdx, (void*) (*ppCtx)); | 579 | WelsSnprintf (ename, SEM_NAME_MAX, "rc%d%p", iIdx, (void*) (*ppCtx)); |
| 580 | WelsEventClose (pSmt->pReadySliceCodingEvent[iIdx], ename); | 580 | WelsEventClose (pSmt->pReadySliceCodingEvent[iIdx], ename); |
| 581 | #if defined(DYNAMIC_SLICE_ASSIGN) && defined(TRY_SLICING_BALANCE) | 581 | #if defined(DYNAMIC_SLICE_ASSIGN) && defined(TRY_SLICING_BALANCE) |
| 582 | SNPRINTF (ename, SEM_NAME_MAX, "ud%d%p", iIdx, (void*) (*ppCtx)); | 582 | WelsSnprintf (ename, SEM_NAME_MAX, "ud%d%p", iIdx, (void*) (*ppCtx)); |
| 583 | WelsEventClose (pSmt->pUpdateMbListEvent[iIdx], ename); | 583 | WelsEventClose (pSmt->pUpdateMbListEvent[iIdx], ename); |
| 584 | SNPRINTF (ename, SEM_NAME_MAX, "fu%d%p", iIdx, (void*) (*ppCtx)); | 584 | WelsSnprintf (ename, SEM_NAME_MAX, "fu%d%p", iIdx, (void*) (*ppCtx)); |
| 585 | WelsEventClose (pSmt->pFinUpdateMbListEvent[iIdx], ename); | 585 | WelsEventClose (pSmt->pFinUpdateMbListEvent[iIdx], ename); |
| 586 | #endif//DYNAMIC_SLICE_ASSIGN && TRY_SLICING_BALANCE | 586 | #endif//DYNAMIC_SLICE_ASSIGN && TRY_SLICING_BALANCE |
| 587 | #endif//_WIN32 | 587 | #endif//_WIN32 |
| @@ -1224,7 +1224,7 @@ int32_t CreateSliceThreads (sWelsEncCtx* pCtx) { · 636 unmodified lines | |||
| 1224 | dw = SetThreadAffinityMask (pCtx->pSliceThreading->pThreadHandles[iIdx], dwAffinityMask); //1 << iIdx | 1224 | dw = SetThreadAffinityMask (pCtx->pSliceThreading->pThreadHandles[iIdx], dwAffinityMask); //1 << iIdx |
| 1225 | if (dw == 0) { | 1225 | if (dw == 0) { |
| 1226 | str_t str[64] = {0}; | 1226 | str_t str[64] = {0}; |
| 1227 | SNPRINTF (str, 64, "SetThreadAffinityMask iIdx:%d", iIdx); | 1227 | WelsSnprintf (str, 64, "SetThreadAffinityMask iIdx:%d", iIdx); |
| 1228 | } | 1228 | } |
| 1229 | } | 1229 | } |
| 1230 | } | 1230 | } |