History

add buffer based rc

ruil2 committed 12 years ago

Commit 36cfb3b1 parent 4cdee3b9 files · +56 −24Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+14−12
@@ -2042,7 +2042,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 2041 unmodified lines
20422042 if (pCodingParam->iMultipleThreadIdc > 1)
20432043 iRet = CreateSliceThreads (pCtx);
20442044
2045− WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode != RC_OFF_MODE ? WELS_RC_GOM : WELS_RC_DISABLE);
2045+ WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode);
20462046
20472047 pCtx->pVpp = new CWelsPreProcess (pCtx);
20482048 if (pCtx->pVpp == NULL) {
@@ -2948,17 +2948,19 @@ int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) { · 899 unmodified lines
29482948 bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) {
29492949 SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0];
29502950 bool bSkipMustFlag = false;
2951−
2952− if (RC_OFF_MODE != pCtx->pSvcParam->iRCMode && true == pCtx->pSvcParam->bEnableFrameSkip) {
2953− for (int32_t i = 0; i < iSpatialNum; i++) {
2954− if (0 == pCtx->pSvcParam->sSpatialLayers[i].iMaxSpatialBitrate) {
2955− break;
2956− }
2957− pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid;
2958− pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pCtx);
2959− if (true == pCtx->pWelsSvcRc[pCtx->uiDependencyId].bSkipFlag) {
2960− bSkipMustFlag = true;
2961− break;
2951+ if (pCtx->pSvcParam->bEnableFrameSkip) {
2952+ if ((RC_QUALITY_MODE == pCtx->pSvcParam->iRCMode) || (RC_BITRATE_MODE == pCtx->pSvcParam->iRCMode)
2953+ || (RC_LOW_BW_MODE == pCtx->pSvcParam->iRCMode)) {
2954+ for (int32_t i = 0; i < iSpatialNum; i++) {
2955+ if (0 == pCtx->pSvcParam->sSpatialLayers[i].iMaxSpatialBitrate) {
2956+ break;
2957+ }
2958+ pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid;
2959+ pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pCtx);
2960+ if (true == pCtx->pWelsSvcRc[pCtx->uiDependencyId].bSkipFlag) {
2961+ bSkipMustFlag = true;
2962+ break;
2963+ }
29622964 }
29632965 }
29642966 }

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