Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 8 files). Show all
Unified · Split
| @@ -3507,7 +3507,7 @@ int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) { · 3506 unmodified lines | ||
| 3507 | 3507 | // writing parasets for (simulcast) svc |
| 3508 | 3508 | int32_t WriteSsvcParaset (sWelsEncCtx* pCtx, const int32_t kiSpatialNum, |
| 3509 | 3509 | SLayerBSInfo*& pLayerBsInfo, int32_t& iLayerNum, int32_t& iFrameSize) { |
| 3510 | − int32_t iNonVclSize = 0, iCountNal = 0, iReturn; | |
| 3510 | + int32_t iNonVclSize = 0, iCountNal = 0, iReturn = 0; | |
| 3511 | 3511 | iReturn = WelsWriteParameterSets (pCtx, &pLayerBsInfo->pNalLengthInByte[0], &iCountNal, &iNonVclSize); |
| 3512 | 3512 | WELS_VERIFY_RETURN_IFNEQ (iReturn, ENC_RETURN_SUCCESS) |
| 3513 | 3513 | |
| @@ -4299,8 +4299,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 785 unmodified lines | ||
| 4299 | 4299 | && pSvcParam->bUseLoadBalancing |
| 4300 | 4300 | && pSvcParam->iMultipleThreadIdc > 1 && |
| 4301 | 4301 | pSvcParam->iMultipleThreadIdc >= pParam->sSliceArgument.uiSliceNum) { |
| 4302 | − CalcSliceComplexRatio (pCtx->pSliceThreading->pSliceComplexRatio[iCurDid], pCtx->pCurDqLayer, | |
| 4303 | − pCtx->pSliceThreading->pSliceConsumeTime[iCurDid]); | |
| 4302 | + CalcSliceComplexRatio (pCtx->pSliceThreading->pSliceComplexRatio[iCurDid], pCtx->pCurDqLayer); | |
| 4304 | 4303 | #if defined(MT_DEBUG) |
| 4305 | 4304 | TrackSliceComplexities (pCtx, iCurDid); |
| 4306 | 4305 | #endif//#if defined(MT_DEBUG) |
| @@ -4814,17 +4813,6 @@ int32_t DynSliceRealloc (sWelsEncCtx* pCtx, · 507 unmodified lines | ||
| 4814 | 4813 | pMA->WelsFree (pCurLayer->sSliceEncCtx.pCountMbNumInSlice, "pSliceSeg->pCountMbNumInSlice"); |
| 4815 | 4814 | pCurLayer->sSliceEncCtx.pCountMbNumInSlice = pCountMbNumInSlice; |
| 4816 | 4815 | |
| 4817 | − uint32_t* pSliceConsumeTime = (uint32_t*)pMA->WelsMalloc (iMaxSliceNum * sizeof (uint32_t), | |
| 4818 | − "pSliceSeg->pSliceConsumeTime"); | |
| 4819 | − if (NULL == pSliceConsumeTime) { | |
| 4820 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, | |
| 4821 | − "CWelsH264SVCEncoder::DynSliceRealloc: realloc pSliceConsumeTime not successful"); | |
| 4822 | − return ENC_RETURN_MEMALLOCERR; | |
| 4823 | − } | |
| 4824 | − memcpy (pSliceConsumeTime, pCurLayer->sSliceEncCtx.pSliceConsumeTime, sizeof (int32_t) * iMaxSliceNumOld); | |
| 4825 | − pMA->WelsFree (pCurLayer->sSliceEncCtx.pSliceConsumeTime, "pSliceSeg->pSliceConsumeTime"); | |
| 4826 | − pCurLayer->sSliceEncCtx.pSliceConsumeTime = pSliceConsumeTime; | |
| 4827 | − | |
| 4828 | 4816 | //deal with rate control variables |
| 4829 | 4817 | const int32_t kiCurDid = pCtx->uiDependencyId; |
| 4830 | 4818 | SRCSlicing* pSlcingOverRc = (SRCSlicing*)pMA->WelsMalloc (iMaxSliceNum * sizeof (SRCSlicing), "SlicingOverRC"); |