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
702 bool bLeftTop;702 bool bLeftTop;
703 bool bRightTop;703 bool bRightTop;
704 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;704 int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY;
705 uint16_t uiSliceIdc;705 uint16_t uiSliceIdc; //[0..65535] > 36864 of LEVEL5.2
706 706
707 pList[iIdx].iMbX = pEnc->pStrideTab->pMbIndexX[kiDlayerId][iIdx];707 pList[iIdx].iMbX = pEnc->pStrideTab->pMbIndexX[kiDlayerId][iIdx];
708 pList[iIdx].iMbY = pEnc->pStrideTab->pMbIndexY[kiDlayerId][iIdx];708 pList[iIdx].iMbY = pEnc->pStrideTab->pMbIndexY[kiDlayerId][iIdx];
@@ -4118,13 +4118,13 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 3409 unmodified lines
4118 pMA->WelsFree (pCurLayer->sLayerInfo.pSliceInLayer, "Slice");4118 pMA->WelsFree (pCurLayer->sLayerInfo.pSliceInLayer, "Slice");
4119 pCurLayer->sLayerInfo.pSliceInLayer = pSlice;4119 pCurLayer->sLayerInfo.pSliceInLayer = pSlice;
4120 4120
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");
4122 if (NULL == pFirstMbInSlice) {4122 if (NULL == pFirstMbInSlice) {
4123 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "CWelsH264SVCEncoder::DynSliceRealloc: pFirstMbInSlice is NULL");4123 WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "CWelsH264SVCEncoder::DynSliceRealloc: pFirstMbInSlice is NULL");
4124 return ENC_RETURN_MEMALLOCERR;4124 return ENC_RETURN_MEMALLOCERR;
4125 }4125 }
4126 memset (pFirstMbInSlice, 0, sizeof (int16_t) * iMaxSliceNum);4126 memset (pFirstMbInSlice, 0, sizeof (int32_t) * iMaxSliceNum);
4127 memcpy (pFirstMbInSlice, pCurLayer->pSliceEncCtx->pFirstMbInSlice, sizeof (int16_t) * iMaxSliceNumOld);4127 memcpy (pFirstMbInSlice, pCurLayer->pSliceEncCtx->pFirstMbInSlice, sizeof (int32_t) * iMaxSliceNumOld);
4128 pMA->WelsFree (pCurLayer->pSliceEncCtx->pFirstMbInSlice, "pSliceSeg->pFirstMbInSlice");4128 pMA->WelsFree (pCurLayer->pSliceEncCtx->pFirstMbInSlice, "pSliceSeg->pFirstMbInSlice");
4129 pCurLayer->pSliceEncCtx->pFirstMbInSlice = pFirstMbInSlice;4129 pCurLayer->pSliceEncCtx->pFirstMbInSlice = pFirstMbInSlice;
4130 4130

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