shithub: openh264

Download patch

ref: 18fdf6292db80d242581460d4f5941e86550f709
parent: 8f785ebcd5fe473ea9a1d4dc7006ea4408eb7cf9
parent: 42222b8e7e061b8e8b630af0ed5d426c38206220
author: sijchen <[email protected]>
date: Mon Nov 16 05:36:00 EST 2015

Merge pull request #2239 from ruil2/remove_trace

remove iAbsDiffPicNumMinus1 processing for no reference frame

--- a/codec/encoder/core/src/ref_list_mgr_svc.cpp
+++ b/codec/encoder/core/src/ref_list_mgr_svc.cpp
@@ -692,14 +692,15 @@
   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) {