use function pointer in reference frame management

This commit is contained in:
ruil2
2014-04-01 14:52:55 +08:00
parent 9a81260b24
commit e7603d8fbb
5 changed files with 52 additions and 12 deletions

View File

@@ -2886,8 +2886,8 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo * pFbi, const SSou
WelsInitCurrentLayer (pCtx, iCurWidth, iCurHeight);
WelsMarkPic (pCtx);
if (!WelsBuildRefList (pCtx, pCtx->iPOC)) {
pCtx->pFuncList->pMarkPic(pCtx);
if (!pCtx->pFuncList->pBuildRefList (pCtx, pCtx->iPOC,0)) {
// Force coding IDR as followed
ForceCodingIDR (pCtx);
WelsLog (pCtx, WELS_LOG_WARNING, "WelsEncoderEncodeExt(), WelsBuildRefList failed for P frames, pCtx->iNumRef0= %d. ForceCodingIDR!\n",
@@ -3139,7 +3139,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo * pFbi, const SSou
// reference picture list update
if (eNalRefIdc != NRI_PRI_LOWEST) {
if (!WelsUpdateRefList (pCtx)) {
if (!pCtx->pFuncList->pUpdateRefList (pCtx)) {
// Force coding IDR as followed
ForceCodingIDR (pCtx);
WelsLog (pCtx, WELS_LOG_WARNING, "WelsEncoderEncodeExt(), WelsUpdateRefList failed. ForceCodingIDR!\n");