Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -3444,7 +3444,14 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 3443 unmodified lines | ||
| 3444 | 3444 | } |
| 3445 | 3445 | |
| 3446 | 3446 | iFrameSize += iLayerSize; |
| 3447 | − | |
| 3447 | + //check MinCr | |
| 3448 | + { | |
| 3449 | + int32_t iImageSize = (pParam->iVideoWidth * pParam->iVideoHeight * 3) >> 1; | |
| 3450 | + int32_t iMinCr = g_ksLevelLimits[pParam->uiLevelIdc - 1].uiMinCR; | |
| 3451 | + if (iFrameSize > (iImageSize / iMinCr)) | |
| 3452 | + WelsLog (pLogCtx, WELS_LOG_WARNING, | |
| 3453 | + "WelsEncoderEncodeExt()MinCr Checking,codec bitstream size is larger than Level limitation"); | |
| 3454 | + } | |
| 3448 | 3455 | #ifdef ENABLE_FRAME_DUMP |
| 3449 | 3456 | if (iCurDid + 1 < pSvcParam->iSpatialLayerNum) { |
| 3450 | 3457 | DumpDependencyRec (fsnr, &pSvcParam->sDependencyLayers[iCurDid].sRecFileName[0], iCurDid, |