History

modify the initialization of the number of LTR

ruil2 committed 12 years ago

Commit 85390711 parent d3fab244 files · +15 −12Browse files

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

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+3−3
@@ -354,14 +354,14 @@ int CWelsH264SVCEncoder::InitializeInternal(SWelsSvcCodingParam* pCfg) { · 353 unmodified lines
354 }354 }
355 if (pCfg->iUsageType == SCREEN_CONTENT_REAL_TIME) {355 if (pCfg->iUsageType == SCREEN_CONTENT_REAL_TIME) {
356 if (pCfg->bEnableLongTermReference) {356 if (pCfg->bEnableLongTermReference) {
357 pCfg->iLTRRefNum = LONG_TERM_REF_NUM;357 pCfg->iLTRRefNum = WELS_CLIP3(pCfg->iLTRRefNum,1,LONG_TERM_REF_NUM_SCREEN);;
358 pCfg->iNumRefFrame = 1 + WELS_LOG2 (pCfg->uiGopSize) + pCfg->iLTRRefNum;358 pCfg->iNumRefFrame = WELS_MAX(1,WELS_LOG2 (pCfg->uiGopSize)) + pCfg->iLTRRefNum;
359 } else {359 } else {
360 pCfg->iLTRRefNum = 0;360 pCfg->iLTRRefNum = 0;
361 pCfg->iNumRefFrame = 1;361 pCfg->iNumRefFrame = 1;
362 }362 }
363 } else {363 } else {
364 pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? LONG_TERM_REF_NUM : 0;364 pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? WELS_CLIP3(pCfg->iLTRRefNum,1,LONG_TERM_REF_NUM) : 0;
365 pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) :365 pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) :
366 pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM);366 pCfg->iNumRefFrame = WELS_CLIP3 (pCfg->iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM);
367 }367 }

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