From 42222b8e7e061b8e8b630af0ed5d426c38206220 Mon Sep 17 00:00:00 2001 From: Karina Date: Mon, 16 Nov 2015 12:22:10 +0800 Subject: [PATCH] remove iAbsDiffPicNumMinus1 processing for no reference frame --- codec/encoder/core/src/ref_list_mgr_svc.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/codec/encoder/core/src/ref_list_mgr_svc.cpp b/codec/encoder/core/src/ref_list_mgr_svc.cpp index b11f509d..f29481e2 100644 --- a/codec/encoder/core/src/ref_list_mgr_svc.cpp +++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp @@ -692,14 +692,15 @@ void WelsUpdateRefSyntax (sWelsEncCtx* pCtx, const int32_t iPOC, const int32_t u SSlice* pSliceList = NULL; /*syntax for ref_pic_list_reordering()*/ - if (pCtx->iNumRef0 > 0) + if (pCtx->iNumRef0 > 0) { iAbsDiffPicNumMinus1 = pCtx->iFrameNum - (pCtx->pRefList0[0]->iFrameNum) - 1; - if (iAbsDiffPicNumMinus1 < 0) { - WelsLog(&(pCtx->sLogCtx), WELS_LOG_INFO, "WelsUpdateRefSyntax():::uiAbsDiffPicNumMinus1:%d", iAbsDiffPicNumMinus1); - iAbsDiffPicNumMinus1 += (1 << (pCtx->pSps->uiLog2MaxFrameNum)); - WelsLog(&(pCtx->sLogCtx), WELS_LOG_INFO, "WelsUpdateRefSyntax():::uiAbsDiffPicNumMinus1< 0, update as:%d", + if (iAbsDiffPicNumMinus1 < 0) { + WelsLog(&(pCtx->sLogCtx), WELS_LOG_INFO, "WelsUpdateRefSyntax():::uiAbsDiffPicNumMinus1:%d", iAbsDiffPicNumMinus1); + iAbsDiffPicNumMinus1 += (1 << (pCtx->pSps->uiLog2MaxFrameNum)); + WelsLog(&(pCtx->sLogCtx), WELS_LOG_INFO, "WelsUpdateRefSyntax():::uiAbsDiffPicNumMinus1< 0, update as:%d", iAbsDiffPicNumMinus1); + } } if (pCtx->iActiveThreadsNum >0) {