History

miss a branch for auto reference frame setting

ruil2 committed 12 years ago

Commit e0b92bb1 parent def2ae51 file · +9 −5Browse files

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

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+9−5
@@ -347,16 +347,20 @@ int CWelsH264SVCEncoder::InitializeInternal (SWelsSvcCodingParam* pCfg) { · 346 unmodified lines
347347 if (pCfg->iUsageType == SCREEN_CONTENT_REAL_TIME) {
348348 if (pCfg->bEnableLongTermReference) {
349349 pCfg->iLTRRefNum = WELS_CLIP3 (pCfg->iLTRRefNum, 1, LONG_TERM_REF_NUM_SCREEN);
350− pCfg->iNumRefFrame = WELS_MAX (1, WELS_LOG2 (pCfg->uiGopSize)) + pCfg->iLTRRefNum;
350+ if(pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT)
351+ pCfg->iNumRefFrame = WELS_MAX (1, WELS_LOG2 (pCfg->uiGopSize)) + pCfg->iLTRRefNum;
351352 } else {
352353 pCfg->iLTRRefNum = 0;
353− pCfg->iNumRefFrame = WELS_MAX (1, pCfg->uiGopSize >> 1);
354+ if(pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT)
355+ pCfg->iNumRefFrame = WELS_MAX (1, pCfg->uiGopSize >> 1);
354356 }
355357 } else {
356358 pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? WELS_CLIP3 (pCfg->iLTRRefNum, 1, LONG_TERM_REF_NUM) : 0;
357− pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) :
358− (MIN_REF_PIC_COUNT + pCfg->iLTRRefNum);
359− pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM);
359+ if(pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT){
360+ pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) :
361+ (MIN_REF_PIC_COUNT + pCfg->iLTRRefNum);
362+ pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM);
363+ }
360364 }
361365
362366 if (pCfg->iLtrMarkPeriod == 0) {

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