Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 7 files). Show all
Unified · Split
| @@ -527,7 +527,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 526 unmodified lines | ||
| 527 | 527 | iCountNumNals += kiNumOfSlice; |
| 528 | 528 | assert (iCountNumNals - iOrgNumNals <= MAX_NAL_UNITS_IN_LAYER); |
| 529 | 529 | if (kiNumOfSlice > MAX_SLICES_NUM) { |
| 530 | − WelsLog (*ppCtx, WELS_LOG_ERROR, | |
| 530 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_ERROR, | |
| 531 | 531 | "AcquireLayersNals(), num_of_slice(%d) > MAX_SLICES_NUM(%d) per (iDid= %d, qid= %d) settings!\n", |
| 532 | 532 | kiNumOfSlice, MAX_SLICES_NUM, iDIndex, 0); |
| 533 | 533 | return 1; |
| @@ -535,7 +535,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 1 unmodified line | ||
| 535 | 535 | } |
| 536 | 536 | |
| 537 | 537 | if (iCountNumNals - iOrgNumNals > MAX_NAL_UNITS_IN_LAYER) { |
| 538 | − WelsLog (*ppCtx, WELS_LOG_ERROR, | |
| 538 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_ERROR, | |
| 539 | 539 | "AcquireLayersNals(), num_of_nals(%d) > MAX_NAL_UNITS_IN_LAYER(%d) per (iDid= %d, qid= %d) settings!\n", |
| 540 | 540 | (iCountNumNals - iOrgNumNals), MAX_NAL_UNITS_IN_LAYER, iDIndex, 0); |
| 541 | 541 | return 1; |
| @@ -551,7 +551,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 9 unmodified lines | ||
| 551 | 551 | |
| 552 | 552 | // to check number of layers / nals / slices dependencies, 12/8/2010 |
| 553 | 553 | if (iCountNumLayers > MAX_LAYER_NUM_OF_FRAME) { |
| 554 | − WelsLog (*ppCtx, WELS_LOG_ERROR, "AcquireLayersNals(), iCountNumLayers(%d) > MAX_LAYER_NUM_OF_FRAME(%d)!", | |
| 554 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_ERROR, "AcquireLayersNals(), iCountNumLayers(%d) > MAX_LAYER_NUM_OF_FRAME(%d)!", | |
| 555 | 555 | iCountNumLayers, MAX_LAYER_NUM_OF_FRAME); |
| 556 | 556 | return 1; |
| 557 | 557 | } |
| @@ -955,7 +955,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 397 unmodified lines | ||
| 955 | 955 | & (pDlayerParam->sSliceCfg), |
| 956 | 956 | pPps); |
| 957 | 957 | if (iResult) { |
| 958 | − WelsLog (*ppCtx, WELS_LOG_WARNING, "InitDqLayers(), InitSlicePEncCtx failed(%d)!", iResult); | |
| 958 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "InitDqLayers(), InitSlicePEncCtx failed(%d)!", iResult); | |
| 959 | 959 | FreeMemorySvc (ppCtx); |
| 960 | 960 | return 1; |
| 961 | 961 | } |
| @@ -1285,14 +1285,14 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 323 unmodified lines | ||
| 1285 | 1285 | int32_t iTargetSpatialBsSize = 0; |
| 1286 | 1286 | |
| 1287 | 1287 | if (kiNumDependencyLayers < 1 || kiNumDependencyLayers > MAX_DEPENDENCY_LAYER) { |
| 1288 | − WelsLog (*ppCtx, WELS_LOG_WARNING, "RequestMemorySvc() failed due to invalid iNumDependencyLayers(%d)!\n", | |
| 1288 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc() failed due to invalid iNumDependencyLayers(%d)!\n", | |
| 1289 | 1289 | kiNumDependencyLayers); |
| 1290 | 1290 | FreeMemorySvc (ppCtx); |
| 1291 | 1291 | return 1; |
| 1292 | 1292 | } |
| 1293 | 1293 | |
| 1294 | 1294 | if (pParam->uiGopSize == 0 || (pParam->uiIntraPeriod && ((pParam->uiIntraPeriod % pParam->uiGopSize) != 0))) { |
| 1295 | − WelsLog (*ppCtx, WELS_LOG_WARNING, | |
| 1295 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, | |
| 1296 | 1296 | "RequestMemorySvc() failed due to invalid uiIntraPeriod(%d) (=multipler of uiGopSize(%d)!", |
| 1297 | 1297 | pParam->uiIntraPeriod, pParam->uiGopSize); |
| 1298 | 1298 | FreeMemorySvc (ppCtx); |
| @@ -1306,7 +1306,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 7 unmodified lines | ||
| 1306 | 1306 | |
| 1307 | 1307 | iResult = AcquireLayersNals (ppCtx, pParam, &iCountLayers, &iCountNals); |
| 1308 | 1308 | if (iResult) { |
| 1309 | − WelsLog (*ppCtx, WELS_LOG_WARNING, "RequestMemorySvc(), AcquireLayersNals failed(%d)!", iResult); | |
| 1309 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), AcquireLayersNals failed(%d)!", iResult); | |
| 1310 | 1310 | FreeMemorySvc (ppCtx); |
| 1311 | 1311 | return 1; |
| 1312 | 1312 | } |
| @@ -1359,7 +1359,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 46 unmodified lines | ||
| 1359 | 1359 | |
| 1360 | 1360 | // for pSlice bs buffers |
| 1361 | 1361 | if (pParam->iMultipleThreadIdc > 1 && RequestMtResource (ppCtx, pParam, iCountBsLen, iTargetSpatialBsSize)) { |
| 1362 | − WelsLog (*ppCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMtResource failed!"); | |
| 1362 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMtResource failed!"); | |
| 1363 | 1363 | FreeMemorySvc (ppCtx); |
| 1364 | 1364 | return 1; |
| 1365 | 1365 | } |
| @@ -1406,7 +1406,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 40 unmodified lines | ||
| 1406 | 1406 | |
| 1407 | 1407 | // stride tables |
| 1408 | 1408 | if (AllocStrideTables (ppCtx, kiNumDependencyLayers)) { |
| 1409 | − WelsLog (*ppCtx, WELS_LOG_WARNING, "RequestMemorySvc(), AllocStrideTables failed!"); | |
| 1409 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), AllocStrideTables failed!"); | |
| 1410 | 1410 | FreeMemorySvc (ppCtx); |
| 1411 | 1411 | return 1; |
| 1412 | 1412 | } |
| @@ -1422,7 +1422,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 9 unmodified lines | ||
| 1422 | 1422 | (*ppCtx)->pVaa = (SVAAFrameInfoExt*)pMa->WelsMallocz (sizeof (SVAAFrameInfoExt), "pVaa"); |
| 1423 | 1423 | WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pVaa), FreeMemorySvc (ppCtx)) |
| 1424 | 1424 | if (RequestMemoryVaaScreen ((*ppCtx)->pVaa, pMa, (*ppCtx)->pSvcParam->iMaxNumRefFrame, iCountMaxMbNum << 2)) { |
| 1425 | − WelsLog (*ppCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMemoryVaaScreen failed!"); | |
| 1425 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMemoryVaaScreen failed!"); | |
| 1426 | 1426 | FreeMemorySvc (ppCtx); |
| 1427 | 1427 | return 1; |
| 1428 | 1428 | } |
| @@ -1471,13 +1471,13 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 42 unmodified lines | ||
| 1471 | 1471 | |
| 1472 | 1472 | iResult = InitDqLayers (ppCtx); |
| 1473 | 1473 | if (iResult) { |
| 1474 | − WelsLog (*ppCtx, WELS_LOG_WARNING, "RequestMemorySvc(), InitDqLayers failed(%d)!", iResult); | |
| 1474 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), InitDqLayers failed(%d)!", iResult); | |
| 1475 | 1475 | FreeMemorySvc (ppCtx); |
| 1476 | 1476 | return iResult; |
| 1477 | 1477 | } |
| 1478 | 1478 | |
| 1479 | 1479 | if (InitMbListD (ppCtx)) { |
| 1480 | − WelsLog (*ppCtx, WELS_LOG_WARNING, "RequestMemorySvc(), InitMbListD failed!"); | |
| 1480 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), InitMbListD failed!"); | |
| 1481 | 1481 | FreeMemorySvc (ppCtx); |
| 1482 | 1482 | return 1; |
| 1483 | 1483 | } |
| @@ -1757,7 +1757,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 273 unmodified lines | ||
| 1757 | 1757 | #endif//MEMORY_MONITOR |
| 1758 | 1758 | |
| 1759 | 1759 | if ((*ppCtx)->pMemAlign != NULL) { |
| 1760 | − WelsLog (*ppCtx, WELS_LOG_INFO, "FreeMemorySvc(), verify memory usage (%d bytes) after free..\n", | |
| 1760 | + WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_INFO, "FreeMemorySvc(), verify memory usage (%d bytes) after free..\n", | |
| 1761 | 1761 | (*ppCtx)->pMemAlign->WelsGetMemoryUsage()); |
| 1762 | 1762 | delete (*ppCtx)->pMemAlign; |
| 1763 | 1763 | (*ppCtx)->pMemAlign = NULL; |