History

Merge pull request #1322 from ruil2/MinCr_waring

add MinCr checking and output warings if the MinCr isn't met

huili2 committed 12 years ago

Commit 43dc6f02 parents 199d19a 4ece8ef1 file · +8 −1Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+8−1
@@ -3444,7 +3444,14 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 3443 unmodified lines
3444 }3444 }
3445 3445
3446 iFrameSize += iLayerSize;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#ifdef ENABLE_FRAME_DUMP3455#ifdef ENABLE_FRAME_DUMP
3449 if (iCurDid + 1 < pSvcParam->iSpatialLayerNum) {3456 if (iCurDid + 1 < pSvcParam->iSpatialLayerNum) {
3450 DumpDependencyRec (fsnr, &pSvcParam->sDependencyLayers[iCurDid].sRecFileName[0], iCurDid,3457 DumpDependencyRec (fsnr, &pSvcParam->sDependencyLayers[iCurDid].sRecFileName[0], iCurDid,

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