From 2626ed21817f61d0af2cd7477e7c6fceb75b7de2 Mon Sep 17 00:00:00 2001 From: ruil2 Date: Fri, 27 Jun 2014 09:25:57 +0800 Subject: [PATCH] only supports fixed LTR_NUM for screen and camera --- codec/encoder/core/inc/param_svc.h | 4 ++-- codec/encoder/plus/src/welsEncoderExt.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codec/encoder/core/inc/param_svc.h b/codec/encoder/core/inc/param_svc.h index 3667805d..ee3bf883 100644 --- a/codec/encoder/core/inc/param_svc.h +++ b/codec/encoder/core/inc/param_svc.h @@ -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); diff --git a/codec/encoder/plus/src/welsEncoderExt.cpp b/codec/encoder/plus/src/welsEncoderExt.cpp index d8a02223..64817225 100644 --- a/codec/encoder/plus/src/welsEncoderExt.cpp +++ b/codec/encoder/plus/src/welsEncoderExt.cpp @@ -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);