History

Fix calculation of num ref frames

Varun B Patil committed 12 years ago

Commit 422d1d11 parent 9d5bc6f1 file · +2 −1Browse 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+2−1
@@ -346,7 +346,7 @@ int CWelsH264SVCEncoder::InitializeInternal(SWelsSvcCodingParam* pCfg) { · 345 unmodified lines
346346 }
347347 if (pCfg->iUsageType == SCREEN_CONTENT_REAL_TIME) {
348348 if (pCfg->bEnableLongTermReference) {
349− pCfg->iLTRRefNum = WELS_CLIP3(pCfg->iLTRRefNum,1,LONG_TERM_REF_NUM_SCREEN);;
349+ pCfg->iLTRRefNum = WELS_CLIP3(pCfg->iLTRRefNum,1,LONG_TERM_REF_NUM_SCREEN);
350350 pCfg->iNumRefFrame = WELS_MAX(1,WELS_LOG2 (pCfg->uiGopSize)) + pCfg->iLTRRefNum;
351351 } else {
352352 pCfg->iLTRRefNum = 0;
@@ -355,6 +355,7 @@ int CWelsH264SVCEncoder::InitializeInternal(SWelsSvcCodingParam* pCfg) { · 2 unmodified lines
355355 } else {
356356 pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? WELS_CLIP3(pCfg->iLTRRefNum,1,LONG_TERM_REF_NUM) : 0;
357357 pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) :
358+ (MIN_REF_PIC_COUNT + pCfg->iLTRRefNum);
358359 pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM);
359360 }
360361

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