shithub: openh264

Download patch

ref: 102dc5f0f046a8bf144f491759a7a93826ded4f4
parent: 78eed44d1523ec28012b0e96ae209993c312c989
parent: af2666fde3aeffdae492c3c078e025ca09ca30e0
author: ruil2 <ruil2@cisco.com>
date: Fri May 30 13:15:27 EDT 2014

Merge pull request #907 from mstorsjo/warning-fix

Get rid of some build warnings

--- a/codec/encoder/core/inc/encoder_context.h
+++ b/codec/encoder/core/inc/encoder_context.h
@@ -64,7 +64,7 @@
  */
 typedef struct TagRefList {
   SPicture*					pShortRefList[1 + MAX_SHORT_REF_COUNT]; // reference list 0 - int16_t
-  SPicture*					pLongRefList[1 + MAX_LONG_REF_COUNT];	// reference list 1 - int32_t
+  SPicture*					pLongRefList[1 + MAX_REF_PIC_COUNT];	// reference list 1 - int32_t
   SPicture*					pNextBuffer;
   SPicture*					pRef[1 + MAX_REF_PIC_COUNT];	// plus 1 for swap intend
   uint8_t						uiShortRefCount;
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3730,7 +3730,7 @@
   if (NULL == pSlice)
     return ENC_RETURN_MEMALLOCERR;
   memcpy (pSlice, pCurLayer->sLayerInfo.pSliceInLayer, sizeof (SSlice) * iMaxSliceNumOld);
-  uint32_t uiSliceIdx;
+  int32_t uiSliceIdx;
   uiSliceIdx = iMaxSliceNumOld;
   SSlice* pBaseSlice = &pCurLayer->sLayerInfo.pSliceInLayer[0];
   SSliceHeaderExt* pBaseSHExt = &pBaseSlice->sSliceHeaderExt;
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -969,7 +969,7 @@
 
   int32_t iNumOfLargeChange = 0, iNumOfMediumChangeToLtr = 0;
 
-  bool bBestRefIsLtr = false, bIsClosestLtrFrame = false;
+  bool bIsClosestLtrFrame = false;
   int32_t ret = 1, iScdIdx = 0;
 
   SPicture* pRefPic = NULL;
@@ -1044,7 +1044,6 @@
       if (JudgeBestRef (pRefPic, sLtrJudgement, iFrameComplexity, bIsClosestLtrFrame)) {
         SaveBestRefToJudgement (iRefPicAvQP, iFrameComplexity, &sLtrJudgement);
         SaveBestRefToLocal (pRefPicInfo, sSceneChangeResult, &sLtrSaved);
-        bBestRefIsLtr = bCurRefIsLtr;
       }
       if (bCurRefIsLtr && JudgeBestRef (pRefPic, sSceneLtrJudgement, iFrameComplexity, bIsClosestLtrFrame)) {
         SaveBestRefToJudgement (iRefPicAvQP, iFrameComplexity, &sSceneLtrJudgement);
--- a/test/decoder/DecUT_PredMv.cpp
+++ b/test/decoder/DecUT_PredMv.cpp
@@ -272,7 +272,7 @@
 
   int32_t iCurSliceIdc, iTopSliceIdc, iLeftTopSliceIdc, iRightTopSliceIdc, iLeftSliceIdc;
   int32_t iLeftTopType, iRightTopType, iTopType, iLeftType;
-  int32_t iCurX, iCurY, iCurXy, iLeftXy, iTopXy, iLeftTopXy, iRightTopXy;
+  int32_t iCurX, iCurY, iCurXy, iLeftXy, iTopXy, iLeftTopXy, iRightTopXy = 0;
 
   int8_t iLeftRef;
   int8_t iTopRef;