History

Slice buffer reallocate:: add ut cases

Huade Shi (huashi) committed 9 years ago

Commit 4c3852c1 parent 02e824d9 files · +748 −28Browse files

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

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+1−6
@@ -929,13 +929,10 @@ void FreeSliceBuffer (SSlice*& pSliceList, const int32_t kiMaxSliceNum, CMemoryA · 928 unmodified lines
929}929}
930 930
931int32_t InitSliceList (sWelsEncCtx* pCtx,931int32_t InitSliceList (sWelsEncCtx* pCtx,
932 SDqLayer* pDqLayer,
933 SSlice*& pSliceList,932 SSlice*& pSliceList,
934 const int32_t kiMaxSliceNum,933 const int32_t kiMaxSliceNum,
935 const int32_t kiDlayerIndex,934 const int32_t kiDlayerIndex,
936 CMemoryAlign* pMa) {935 CMemoryAlign* pMa) {
937 const int32_t kiMBWidth = pDqLayer->iMbWidth;
938 const int32_t kiMBHeight = pDqLayer->iMbHeight;
939 SSliceArgument* pSliceArgument = & pCtx->pSvcParam->sSpatialLayers[kiDlayerIndex].sSliceArgument;936 SSliceArgument* pSliceArgument = & pCtx->pSvcParam->sSpatialLayers[kiDlayerIndex].sSliceArgument;
940 int32_t iMaxSliceBufferSize = (pCtx)->iSliceBufferSize[kiDlayerIndex];937 int32_t iMaxSliceBufferSize = (pCtx)->iSliceBufferSize[kiDlayerIndex];
941 int32_t iSliceIdx = 0;938 int32_t iSliceIdx = 0;
@@ -945,8 +942,7 @@ int32_t InitSliceList (sWelsEncCtx* pCtx, · 3 unmodified lines
945 //even though multi-thread is on for other layers942 //even though multi-thread is on for other layers
946 bool bIndependenceBsBuffer = (pCtx->pSvcParam->iMultipleThreadIdc > 1 &&943 bool bIndependenceBsBuffer = (pCtx->pSvcParam->iMultipleThreadIdc > 1 &&
947 SM_SINGLE_SLICE != pSliceArgument->uiSliceMode) ? true : false;944 SM_SINGLE_SLICE != pSliceArgument->uiSliceMode) ? true : false;
948 945 if (iMaxSliceBufferSize <= 0) {
949 if (iMaxSliceBufferSize <= 0 || kiMBWidth <= 0 || kiMBHeight <= 0) {
950 return ENC_RETURN_UNEXPECTED;946 return ENC_RETURN_UNEXPECTED;
951 }947 }
952 948
@@ -1048,7 +1044,6 @@ int32_t InitSliceThreadInfo (sWelsEncCtx* pCtx, · 95 unmodified lines
1048 return ENC_RETURN_MEMALLOCERR;1044 return ENC_RETURN_MEMALLOCERR;
1049 }1045 }
1050 iRet = InitSliceList (pCtx,1046 iRet = InitSliceList (pCtx,
1051 pDqLayer,
1052 pDqLayer->sSliceThreadInfo[iIdx].pSliceInThread,1047 pDqLayer->sSliceThreadInfo[iIdx].pSliceInThread,
1053 iMaxSliceNum,1048 iMaxSliceNum,
1054 kiDlayerIndex,1049 kiDlayerIndex,

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