shithub: openh264

Download patch

ref: 42222b8e7e061b8e8b630af0ed5d426c38206220
parent: 8d2883277ce36d1c71a3c626b348781bde9cd704
author: Karina <ruil2@cisco.com>
date: Mon Nov 16 07:22:10 EST 2015

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) {