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
929929 }
930930
931931 int32_t InitSliceList (sWelsEncCtx* pCtx,
932− SDqLayer* pDqLayer,
933932 SSlice*& pSliceList,
934933 const int32_t kiMaxSliceNum,
935934 const int32_t kiDlayerIndex,
936935 CMemoryAlign* pMa) {
937− const int32_t kiMBWidth = pDqLayer->iMbWidth;
938− const int32_t kiMBHeight = pDqLayer->iMbHeight;
939936 SSliceArgument* pSliceArgument = & pCtx->pSvcParam->sSpatialLayers[kiDlayerIndex].sSliceArgument;
940937 int32_t iMaxSliceBufferSize = (pCtx)->iSliceBufferSize[kiDlayerIndex];
941938 int32_t iSliceIdx = 0;
@@ -945,8 +942,7 @@ int32_t InitSliceList (sWelsEncCtx* pCtx, · 3 unmodified lines
945942 //even though multi-thread is on for other layers
946943 bool bIndependenceBsBuffer = (pCtx->pSvcParam->iMultipleThreadIdc > 1 &&
947944 SM_SINGLE_SLICE != pSliceArgument->uiSliceMode) ? true : false;
948−
949− if (iMaxSliceBufferSize <= 0 || kiMBWidth <= 0 || kiMBHeight <= 0) {
945+ if (iMaxSliceBufferSize <= 0) {
950946 return ENC_RETURN_UNEXPECTED;
951947 }
952948
@@ -1048,7 +1044,6 @@ int32_t InitSliceThreadInfo (sWelsEncCtx* pCtx, · 95 unmodified lines
10481044 return ENC_RETURN_MEMALLOCERR;
10491045 }
10501046 iRet = InitSliceList (pCtx,
1051− pDqLayer,
10521047 pDqLayer->sSliceThreadInfo[iIdx].pSliceInThread,
10531048 iMaxSliceNum,
10541049 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