History

expand the mb_idx range so as to support frame size > 32767

Sijia Chen committed 11 years ago

Commit c02d9b01 parent a39c4665 files · +20 −20Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+4−4
@@ -702,7 +702,7 @@ static void InitMbInfo (sWelsEncCtx* pEnc, SMB* pList, SDqLayer* pLayer, con · 701 unmodified lines
702702 bool bLeftTop;
703703 bool bRightTop;
704704 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
705− uint16_t uiSliceIdc;
705+ uint16_t uiSliceIdc; //[0..65535] > 36864 of LEVEL5.2
706706
707707 pList[iIdx].iMbX = pEnc->pStrideTab->pMbIndexX[kiDlayerId][iIdx];
708708 pList[iIdx].iMbY = pEnc->pStrideTab->pMbIndexY[kiDlayerId][iIdx];
@@ -4118,13 +4118,13 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 3409 unmodified lines
41184118 pMA->WelsFree (pCurLayer->sLayerInfo.pSliceInLayer, "Slice");
41194119 pCurLayer->sLayerInfo.pSliceInLayer = pSlice;
41204120
4121− int16_t* pFirstMbInSlice = (int16_t*)pMA->WelsMalloc (iMaxSliceNum * sizeof (int16_t), "pSliceSeg->pFirstMbInSlice");
4121+ int32_t* pFirstMbInSlice = (int32_t*)pMA->WelsMalloc (iMaxSliceNum * sizeof (int32_t), "pSliceSeg->pFirstMbInSlice");
41224122 if (NULL == pFirstMbInSlice) {
41234123 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "CWelsH264SVCEncoder::DynSliceRealloc: pFirstMbInSlice is NULL");
41244124 return ENC_RETURN_MEMALLOCERR;
41254125 }
4126− memset (pFirstMbInSlice, 0, sizeof (int16_t) * iMaxSliceNum);
4127− memcpy (pFirstMbInSlice, pCurLayer->pSliceEncCtx->pFirstMbInSlice, sizeof (int16_t) * iMaxSliceNumOld);
4126+ memset (pFirstMbInSlice, 0, sizeof (int32_t) * iMaxSliceNum);
4127+ memcpy (pFirstMbInSlice, pCurLayer->pSliceEncCtx->pFirstMbInSlice, sizeof (int32_t) * iMaxSliceNumOld);
41284128 pMA->WelsFree (pCurLayer->pSliceEncCtx->pFirstMbInSlice, "pSliceSeg->pFirstMbInSlice");
41294129 pCurLayer->pSliceEncCtx->pFirstMbInSlice = pFirstMbInSlice;
41304130

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