shithub: openh264

Download patch

ref: 4bdf539ce175ba2246352f19dab8f346346a0dd3
parent: 2c482d991a3cc35270088fd79ea13dac292b7bd5
parent: 1b2d3943f13c37440438d6cb8156b78a25ddb99b
author: Licai Guo <licaguo@cisco.com>
date: Tue Apr 8 17:53:36 EDT 2014

Merge pull request #642 from mstorsjo/win64-fix

Use uintptr_t for casting pointers to integers

--- a/test/encoder/EncUT_EncoderMbAux.cpp
+++ b/test/encoder/EncUT_EncoderMbAux.cpp
@@ -239,9 +239,9 @@
   const int iSStride = 64;  \
   const int iDStride = 64;  \
   uint8_t _ref_src[64*64], _ref_dst[64*64], _dst[64*64]; \
-  uint8_t *ref_src = (uint8_t*)((((unsigned long)(_ref_src + 15)) >> 4) << 4); \
-  uint8_t *ref_dst = (uint8_t*)((((unsigned long)(_ref_dst + 15)) >> 4) << 4); \
-  uint8_t *dst = (uint8_t*)((((unsigned long)(_dst + 15)) >> 4) << 4); \
+  uint8_t *ref_src = (uint8_t*)((((uintptr_t)(_ref_src + 15)) >> 4) << 4); \
+  uint8_t *ref_dst = (uint8_t*)((((uintptr_t)(_ref_dst + 15)) >> 4) << 4); \
+  uint8_t *dst = (uint8_t*)((((uintptr_t)(_dst + 15)) >> 4) << 4); \
   srand((unsigned int)time(NULL)); \
   for(int i = 0; i < height; i++) \
     for(int j = 0; j < width; j++) \
@@ -265,7 +265,7 @@
 #endif
 TEST(EncodeMbAuxTest, WelsGetNoneZeroCount_c) {
   int16_t _iLevel[32];
-  int16_t *pLevel = (int16_t*) (((((unsigned long)_iLevel) + 15) >> 4) << 4);
+  int16_t *pLevel = (int16_t*) (((((uintptr_t)_iLevel) + 15) >> 4) << 4);
   srand((unsigned int)time(NULL));
   int32_t result = 0;
   for(int i = 0; i < 16; i++) {
@@ -278,7 +278,7 @@
 #ifdef X86_ASM
 TEST(EncodeMbAuxTest, WelsGetNoneZeroCount_sse2) {
   int16_t _iLevel[32];
-  int16_t *pLevel = (int16_t*) (((((unsigned long)_iLevel) + 15) >> 4) << 4);
+  int16_t *pLevel = (int16_t*) (((((uintptr_t)_iLevel) + 15) >> 4) << 4);
   srand((unsigned int)time(NULL));
   int32_t result = 0;
   for(int i = 0; i < 16; i++) {