History

add scc rate control

ruil2 committed 12 years ago

Commit 66e38cc1 parent 25cad576 files · +8671 −8500Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+4−3
@@ -2950,7 +2950,8 @@ int32_t GetSubSequenceId (sWelsEncCtx* pCtx, EVideoFrameType eFrameType) { · 2949 unmodified lines
2950}2950}
2951 2951
2952//loop each layer to check if have skip frame when RC and frame skip enable (maxbr>0)2952//loop each layer to check if have skip frame when RC and frame skip enable (maxbr>0)
2953bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) {2953bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum, EVideoFrameType eFrameType,
2954 const uint32_t uiTimeStamp) {
2954 SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0];2955 SSpatialPicIndex* pSpatialIndexMap = &pCtx->sSpatialIndexMap[0];
2955 bool bSkipMustFlag = false;2956 bool bSkipMustFlag = false;
2956 if (pCtx->pSvcParam->bEnableFrameSkip) {2957 if (pCtx->pSvcParam->bEnableFrameSkip) {
@@ -2960,7 +2961,7 @@ bool CheckFrameSkipBasedMaxbr (sWelsEncCtx* pCtx, int32_t iSpatialNum) { · 3 unmodified lines
2960 break;2961 break;
2961 }2962 }
2962 pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid;2963 pCtx->uiDependencyId = (uint8_t) (pSpatialIndexMap + i)->iDid;
2963 pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pCtx);2964 pCtx->pFuncList->pfRc.pfWelsRcPicDelayJudge (pCtx, eFrameType, uiTimeStamp);
2964 if (true == pCtx->pWelsSvcRc[pCtx->uiDependencyId].bSkipFlag) {2965 if (true == pCtx->pWelsSvcRc[pCtx->uiDependencyId].bSkipFlag) {
2965 bSkipMustFlag = true;2966 bSkipMustFlag = true;
2966 break;2967 break;
@@ -3034,7 +3035,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 67 unmodified lines
3034 }3035 }
3035 3036
3036 //loop each layer to check if have skip frame when RC and frame skip enable3037 //loop each layer to check if have skip frame when RC and frame skip enable
3037 if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum)) {3038 if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum, eFrameType, (uint32_t)pSrcPic->uiTimeStamp)) {
3038 pFbi->eFrameType = videoFrameTypeSkip;3039 pFbi->eFrameType = videoFrameTypeSkip;
3039 return ENC_RETURN_SUCCESS;3040 return ENC_RETURN_SUCCESS;
3040 }3041 }

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