[x265] [PATCH] Resolve gcc warnings

dtyx265 at gmail.com dtyx265 at gmail.com
Thu Sep 4 00:36:28 CEST 2014


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1409783716 25200
# Node ID fed3ddf3f84f3c4e4c72bcc0818a07a99ec7312e
# Parent  62c4779fb0bb35d5d8a69678e9e8aa81272f0115
Resolve gcc warnings

* more parenthesis for macro
* changed signed to unsigned int

diff -r 62c4779fb0bb -r fed3ddf3f84f source/common/common.h
--- a/source/common/common.h	Thu Aug 28 13:14:34 2014 +0530
+++ b/source/common/common.h	Wed Sep 03 15:35:16 2014 -0700
@@ -291,7 +291,7 @@
     }
 };
 
-#define CU_SET_FLAG(bitfield, flag, value) (bitfield) = (bitfield) & (~(flag)) | ((~((value) - 1)) & (flag))
+#define CU_SET_FLAG(bitfield, flag, value) (bitfield) = ((bitfield) & (~(flag))) | ((~((value) - 1)) & (flag))
 #define CU_GET_FLAG(bitfield, flag) (!!((bitfield) & (flag)))
 }
 /* defined in common.cpp */
diff -r 62c4779fb0bb -r fed3ddf3f84f source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp	Thu Aug 28 13:14:34 2014 +0530
+++ b/source/encoder/analysis.cpp	Wed Sep 03 15:35:16 2014 -0700
@@ -258,7 +258,7 @@
 
 void Analysis::loadCTUData(TComDataCU* parentCU)
 {
-    int8_t cuRange[2]= {MIN_LOG2_CU_SIZE, g_log2Size[m_param->maxCUSize]};
+    uint8_t cuRange[2]= {MIN_LOG2_CU_SIZE, g_log2Size[m_param->maxCUSize]};
 
     // Initialize the coding blocks inside the CTB
     for (int rangeIdx = cuRange[1], rangeCUIdx = 0; rangeIdx >= cuRange[0]; rangeIdx--)


More information about the x265-devel mailing list