Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 5 files). Show all
Unified · Split
| @@ -702,7 +702,7 @@ static void InitMbInfo (sWelsEncCtx* pEnc, SMB* pList, SDqLayer* pLayer, con · 701 unmodified lines | ||
| 702 | 702 | bool bLeftTop; |
| 703 | 703 | bool bRightTop; |
| 704 | 704 | int32_t iLeftXY, iTopXY, iLeftTopXY, iRightTopXY; |
| 705 | − uint16_t uiSliceIdc; | |
| 705 | + uint16_t uiSliceIdc; //[0..65535] > 36864 of LEVEL5.2 | |
| 706 | 706 | |
| 707 | 707 | pList[iIdx].iMbX = pEnc->pStrideTab->pMbIndexX[kiDlayerId][iIdx]; |
| 708 | 708 | pList[iIdx].iMbY = pEnc->pStrideTab->pMbIndexY[kiDlayerId][iIdx]; |
| @@ -4118,13 +4118,13 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 3409 unmodified lines | ||
| 4118 | 4118 | pMA->WelsFree (pCurLayer->sLayerInfo.pSliceInLayer, "Slice"); |
| 4119 | 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 | 4122 | if (NULL == pFirstMbInSlice) { |
| 4123 | 4123 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "CWelsH264SVCEncoder::DynSliceRealloc: pFirstMbInSlice is NULL"); |
| 4124 | 4124 | return ENC_RETURN_MEMALLOCERR; |
| 4125 | 4125 | } |
| 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); | |
| 4128 | 4128 | pMA->WelsFree (pCurLayer->pSliceEncCtx->pFirstMbInSlice, "pSliceSeg->pFirstMbInSlice"); |
| 4129 | 4129 | pCurLayer->pSliceEncCtx->pFirstMbInSlice = pFirstMbInSlice; |
| 4130 | 4130 | |