shithub: openh264

Download patch

ref: cf4026a9484af7f83003f58cd1b0b8f2722f425a
parent: 778275ee1bd100a9c3cdd21f6ca4b17fdb6b6808
parent: 5263eeb973bfac9964160e586a79b13e3aba7150
author: dongzha <dongzha@cisco.com>
date: Wed Jun 18 09:19:20 EDT 2014

Merge pull request #976 from huili2/modify_EncUT_scroll_xplatform

to support cross-platform LD32 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