Merge pull request #1023 from ruil2/remove_check

only supports fixed LTR_NUM for screen and camera
This commit is contained in:
huili2 2014-06-27 13:14:20 +08:00
commit f71cf37818
2 changed files with 4 additions and 4 deletions

View File

@ -353,7 +353,7 @@ int32_t ParamTranscode (const SEncParamExt& pCodingParam) {
if (iUsageType == SCREEN_CONTENT_REAL_TIME) {
if (bEnableLongTermReference) {
iLTRRefNum = WELS_CLIP3 (pCodingParam.iLTRRefNum, 1, LONG_TERM_REF_NUM_SCREEN);
iLTRRefNum = LONG_TERM_REF_NUM_SCREEN;
if (iNumRefFrame == AUTO_REF_PIC_COUNT)
iNumRefFrame = WELS_MAX (1, WELS_LOG2 (uiGopSize)) + iLTRRefNum;
} else {
@ -363,7 +363,7 @@ int32_t ParamTranscode (const SEncParamExt& pCodingParam) {
iNumRefFrame = WELS_MAX (1, uiGopSize >> 1);
}
} else {
iLTRRefNum = bEnableLongTermReference ? WELS_CLIP3 (pCodingParam.iLTRRefNum, 1, LONG_TERM_REF_NUM) : 0;
iLTRRefNum = bEnableLongTermReference ? LONG_TERM_REF_NUM : 0;
if (iNumRefFrame == AUTO_REF_PIC_COUNT) {
iNumRefFrame = ((uiGopSize >> 1) > 1) ? ((uiGopSize >> 1) + iLTRRefNum) : (MIN_REF_PIC_COUNT + iLTRRefNum);
iNumRefFrame = WELS_CLIP3 (iNumRefFrame, MIN_REF_PIC_COUNT, MAX_REFERENCE_PICTURE_COUNT_NUM);

View File

@ -355,7 +355,7 @@ int CWelsH264SVCEncoder::InitializeInternal (SWelsSvcCodingParam* pCfg) {
}
if (pCfg->iUsageType == SCREEN_CONTENT_REAL_TIME) {
if (pCfg->bEnableLongTermReference) {
pCfg->iLTRRefNum = WELS_CLIP3 (pCfg->iLTRRefNum, 1, LONG_TERM_REF_NUM_SCREEN);
pCfg->iLTRRefNum = LONG_TERM_REF_NUM_SCREEN;
if (pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT)
pCfg->iNumRefFrame = WELS_MAX (1, WELS_LOG2 (pCfg->uiGopSize)) + pCfg->iLTRRefNum;
} else {
@ -364,7 +364,7 @@ int CWelsH264SVCEncoder::InitializeInternal (SWelsSvcCodingParam* pCfg) {
pCfg->iNumRefFrame = WELS_MAX (1, pCfg->uiGopSize >> 1);
}
} else {
pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? WELS_CLIP3 (pCfg->iLTRRefNum, 1, LONG_TERM_REF_NUM) : 0;
pCfg->iLTRRefNum = pCfg->bEnableLongTermReference ? LONG_TERM_REF_NUM : 0;
if (pCfg->iNumRefFrame == AUTO_REF_PIC_COUNT) {
pCfg->iNumRefFrame = ((pCfg->uiGopSize >> 1) > 1) ? ((pCfg->uiGopSize >> 1) + pCfg->iLTRRefNum) :
(MIN_REF_PIC_COUNT + pCfg->iLTRRefNum);