shithub: openh264

Download patch

ref: c644879cf9785307e249f491c09136ad188e080b
parent: 2d519493687c77f5b08a32063c638b717f3075f5
parent: 6663743f4c94ec68fbaaf39d40bdca6be963252d
author: Ethan Hugg <[email protected]>
date: Tue Apr 1 06:57:19 EDT 2014

Merge pull request #598 from varunbpatil/compiler_warnings

Remove compiler warnings

--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -824,7 +824,7 @@
   int32_t	iTotalFrameMax = -1;
   uint8_t* pYUV= NULL;
   SSourcePicture* pSrcPic = NULL;
-  int32_t iSourceWidth, iSourceHeight, kiPicResSize;
+  uint32_t iSourceWidth, iSourceHeight, kiPicResSize;
   // Inactive with sink with output file handler
   FILE* pFpBs = NULL;
 #if defined(COMPARE_DATA)
--- a/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
+++ b/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
@@ -47,7 +47,7 @@
 #define MAX_LEVEL_PREFIX 15
 void GetNeighborAvailMbType (PNeighAvail pNeighAvail, PDqLayer pCurLayer) {
   int32_t iCurSliceIdc, iTopSliceIdc, iLeftTopSliceIdc, iRightTopSliceIdc, iLeftSliceIdc;
-  int32_t iCurXy, iTopXy, iLeftXy, iLeftTopXy, iRightTopXy;
+  int32_t iCurXy, iTopXy = 0, iLeftXy = 0, iLeftTopXy = 0, iRightTopXy = 0;
   int32_t iCurX, iCurY;
 
   iCurXy = pCurLayer->iMbXyIndex;
--- a/codec/encoder/core/inc/svc_enc_golomb.h
+++ b/codec/encoder/core/inc/svc_enc_golomb.h
@@ -176,11 +176,11 @@
  *	Write unsigned exp golomb codes
  */
 static inline void BsWriteUE (SBitStringAux* pBs, const uint32_t kuiValue) {
+uint32_t iTmpValue = kuiValue + 1;
 if (256 > kuiValue)	{
   BsWriteBits (pBs, g_uiGolombUELength[kuiValue], kuiValue + 1);
 } else {
   uint32_t n = 0;
-  uint32_t iTmpValue = kuiValue + 1;
 
   if (iTmpValue & 0xffff0000) {
     iTmpValue >>= 16;
--- a/codec/processing/src/scenechangedetection/SceneChangeDetection.h
+++ b/codec/processing/src/scenechangedetection/SceneChangeDetection.h
@@ -119,7 +119,6 @@
     int32_t iBlock8x8Num       = iBlock8x8Width * iBlock8x8Height;
     int32_t iSceneChangeThresholdLarge = WelsStaticCast (int32_t, SCENE_CHANGE_MOTION_RATIO_LARGE * iBlock8x8Num + 0.5f + PESN);
     int32_t iSceneChangeThresholdMedium	= WelsStaticCast(int32_t, SCENE_CHANGE_MOTION_RATIO_MEDIUM * iBlock8x8Num + 0.5f + PESN);
-    int32_t iBlockSad = 0;
     uint8_t* pRefY = NULL, *pCurY = NULL;
     int32_t iRefStride = 0, iCurStride = 0;
     int32_t iRefRowStride = 0, iCurRowStride = 0;