shithub: openh264

Download patch

ref: 4033940ba7921041239f78f82710d5acb7a11766
parent: 9b46788676e7adf2b26a652e73a416a972451b79
parent: 4a08781c189b4c79e716f39ea751938bf2a20bb1
author: Ethan Hugg <[email protected]>
date: Tue Jan 7 08:13:05 EST 2014

Merge pull request #105 from mstorsjo/msvc-disable-inline-asm-on-arm

Use MSVC inline assembly only on (32-bit) X86

--- a/codec/decoder/core/src/bit_stream.cpp
+++ b/codec/decoder/core/src/bit_stream.cpp
@@ -48,7 +48,7 @@
 }
 #else //WORDS_BIGENDIAN
 
-#if defined(WIN32) && defined(_MSC_VER)
+#if defined(_MSC_VER) && defined(_M_IX86)
 inline uint32_t EndianFix (uint32_t uiX) {
   __asm {
     mov   eax,  uiX
--- a/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
+++ b/codec/decoder/core/src/parse_mb_syn_cavlc.cpp
@@ -559,7 +559,7 @@
 
   for (; i < uiTotalCoeff; i++) {
     if (pBitsCache->uiRemainBits <= 16)		SHIFT_BUFFER (pBitsCache);
-#if defined(WIN32) && !defined(WIN64) && defined(_MSC_VER)
+#if defined(_MSC_VER) && defined(_M_IX86)
     uiCache32Bit = pBitsCache->uiCache32Bit;
     WELS_GET_PREFIX_BITS (uiCache32Bit, iPrefixBits);
 #else
@@ -662,7 +662,7 @@
           iRun[i] = pVlcTable->kpZeroTable[6][uiValue][0];
         } else {
           if (pBitsCache->uiRemainBits < 16) SHIFT_BUFFER (pBitsCache);
-#if defined(WIN32) && !defined(WIN64) && defined(_MSC_VER)
+#if defined(_MSC_VER) && defined(_M_IX86)
           uiCache32Bit = pBitsCache->uiCache32Bit;
           WELS_GET_PREFIX_BITS (uiCache32Bit, iPrefixBits);
 #else
--- a/codec/encoder/core/inc/macros.h
+++ b/codec/encoder/core/inc/macros.h
@@ -273,7 +273,7 @@
 #else
 
 
-#if defined(WIN32) && !defined(WIN64) && defined(_MSC_VER)
+#if defined(_MSC_VER) && defined(_M_IX86)
 static inline uint32_t ENDIAN_FIX (uint32_t x) {
 __asm {
   mov   eax,  x