History

change void* to explicit type definition

ruil2 committed 12 years ago

Commit 1ffcd361 parent fa138e87 files · +22 −23Browse files

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

Unified · Split

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

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