fix dump file issue that removing redundant operation
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 4 files). Show all
Unified · Split
| @@ -589,8 +589,9 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 588 unmodified lines | |||
| 589 | iMbWidth = (kiPicWidth + 15) >> 4; | 589 | iMbWidth = (kiPicWidth + 15) >> 4; |
| 590 | iMbHeight = (kiPicHeight + 15) >> 4; | 590 | iMbHeight = (kiPicHeight + 15) >> 4; |
| 591 | if (pSpatialLayer->sSliceArgument.uiSliceSizeConstraint <= MAX_MACROBLOCK_SIZE_IN_BYTE) { | 591 | if (pSpatialLayer->sSliceArgument.uiSliceSizeConstraint <= MAX_MACROBLOCK_SIZE_IN_BYTE) { |
| 592 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid iSliceSize (%d) settings!should be larger than MAX_MACROBLOCK_SIZE_IN_BYTE(%d)", | 592 | WelsLog (pLogCtx, WELS_LOG_ERROR, |
| 593 | pSpatialLayer->sSliceArgument.uiSliceSizeConstraint,MAX_MACROBLOCK_SIZE_IN_BYTE); | 593 | "ParamValidationExt(), invalid iSliceSize (%d) settings!should be larger than MAX_MACROBLOCK_SIZE_IN_BYTE(%d)", |
| 594 | pSpatialLayer->sSliceArgument.uiSliceSizeConstraint, MAX_MACROBLOCK_SIZE_IN_BYTE); | ||
| 594 | return ENC_RETURN_UNSUPPORTED_PARA; | 595 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 595 | } | 596 | } |
| 596 | 597 | ||
| @@ -3593,7 +3594,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2996 unmodified lines | |||
| 3593 | for (int32_t iDidIdx = 0; iDidIdx < pSvcParam->iSpatialLayerNum; iDidIdx++) { | 3594 | for (int32_t iDidIdx = 0; iDidIdx < pSvcParam->iSpatialLayerNum; iDidIdx++) { |
| 3594 | SSpatialLayerInternal* pParamInternal = &pSvcParam->sDependencyLayers[iDidIdx]; | 3595 | SSpatialLayerInternal* pParamInternal = &pSvcParam->sDependencyLayers[iDidIdx]; |
| 3595 | int32_t iTemporalId = GetTemporalLevel (pParamInternal, pParamInternal->iCodingIndex, | 3596 | int32_t iTemporalId = GetTemporalLevel (pParamInternal, pParamInternal->iCodingIndex, |
| 3596 | pSvcParam->uiGopSize); | 3597 | pSvcParam->uiGopSize); |
| 3597 | if (iTemporalId == INVALID_TEMPORAL_ID) | 3598 | if (iTemporalId == INVALID_TEMPORAL_ID) |
| 3598 | pParamInternal->iCodingIndex ++; | 3599 | pParamInternal->iCodingIndex ++; |
| 3599 | } | 3600 | } |
| @@ -3971,9 +3972,9 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 371 unmodified lines | |||
| 3971 | "WelsEncoderEncodeExt()MinCr Checking,codec bitstream size is larger than Level limitation"); | 3972 | "WelsEncoderEncodeExt()MinCr Checking,codec bitstream size is larger than Level limitation"); |
| 3972 | } | 3973 | } |
| 3973 | #ifdef ENABLE_FRAME_DUMP | 3974 | #ifdef ENABLE_FRAME_DUMP |
| 3974 | if (iCurDid + 1 < pSvcParam->iSpatialLayerNum) { | 3975 | { |
| 3975 | DumpDependencyRec (fsnr, &pSvcParam->sDependencyLayers[iCurDid].sRecFileName[0], iCurDid, | 3976 | DumpDependencyRec (fsnr, &pSvcParam->sDependencyLayers[iCurDid].sRecFileName[0], iCurDid, |
| 3976 | pCtx->bDependencyRecFlag[iCurDid], pCtx->pCurDqLayer); | 3977 | pCtx->bDependencyRecFlag[iCurDid], pCtx->pCurDqLayer, pSvcParam->bSimulcastAVC); |
| 3977 | pCtx->bDependencyRecFlag[iCurDid] = true; | 3978 | pCtx->bDependencyRecFlag[iCurDid] = true; |
| 3978 | } | 3979 | } |
| 3979 | #endif//ENABLE_FRAME_DUMP | 3980 | #endif//ENABLE_FRAME_DUMP |
| @@ -4162,13 +4163,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 182 unmodified lines | |||
| 4162 | AdjustBaseLayer (pCtx); | 4163 | AdjustBaseLayer (pCtx); |
| 4163 | } | 4164 | } |
| 4164 | 4165 | ||
| 4165 | #ifdef ENABLE_FRAME_DUMP | ||
| 4166 | DumpRecFrame (fsnr, &pSvcParam->sDependencyLayers[pSvcParam->iSpatialLayerNum - 1].sRecFileName[0], | ||
| 4167 | pSvcParam->iSpatialLayerNum - 1, pCtx->bRecFlag, pCtx->pCurDqLayer); // pDecPic: final reconstruction output | ||
| 4168 | pCtx->bRecFlag = true; | ||
| 4169 | |||
| 4170 | #endif//ENABLE_FRAME_DUMP | ||
| 4171 | |||
| 4172 | // to check number of layers / nals / slices dependencies | 4166 | // to check number of layers / nals / slices dependencies |
| 4173 | if (iLayerNum > MAX_LAYER_NUM_OF_FRAME) { | 4167 | if (iLayerNum > MAX_LAYER_NUM_OF_FRAME) { |
| 4174 | WelsLog (& pCtx->sLogCtx, WELS_LOG_ERROR, "WelsEncoderEncodeExt(), iLayerNum(%d) > MAX_LAYER_NUM_OF_FRAME(%d)!", | 4168 | WelsLog (& pCtx->sLogCtx, WELS_LOG_ERROR, "WelsEncoderEncodeExt(), iLayerNum(%d) > MAX_LAYER_NUM_OF_FRAME(%d)!", |