shithub: openh264

Download patch

ref: 5263eeb973bfac9964160e586a79b13e3aba7150
parent: 91cd93e5d0c69fa2f9729c3f042c845e8f44296c
author: huili2 <huili2@cisco.com>
date: Tue Jun 17 14:18:46 EDT 2014

to support cross-platform UT of lD/ST 32 in scroll detection

--- a/codec/processing/src/scrolldetection/ScrollDetectionFuncs.cpp
+++ b/codec/processing/src/scrolldetection/ScrollDetectionFuncs.cpp
@@ -32,6 +32,7 @@
 
 #include "ScrollDetection.h"
 #include "ScrollDetectionFuncs.h"
+#include "ls_defines.h"
 
 WELSVP_NAMESPACE_BEGIN
 
@@ -98,9 +99,9 @@
 int32_t CompareLine (uint8_t* pYSrc, uint8_t* pYRef, const int32_t kiWidth) {
   int32_t iCmp = 1;
 
-  if (* ((int32_t*)pYSrc) != * ((int32_t*)pYRef)) return 1;
-  if (* ((int32_t*) (pYSrc + 4)) != * ((int32_t*) (pYRef + 4))) return 1;
-  if (* ((int32_t*) (pYSrc + 8)) != * ((int32_t*) (pYRef + 8))) return 1;
+  if (LD32 (pYSrc) != LD32 (pYRef)) return 1;
+  if (LD32 (pYSrc + 4) != LD32 (pYRef + 4)) return 1;
+  if (LD32 (pYSrc + 8) != LD32 (pYRef + 8)) return 1;
   if (kiWidth > 12)
     iCmp = WelsMemcmp (pYSrc + 12, pYRef + 12, kiWidth - 12);
   return iCmp;
@@ -196,4 +197,4 @@
   }
 }
 
-WELSVP_NAMESPACE_END
\ No newline at end of file
+WELSVP_NAMESPACE_END