shithub: openh264

Download patch

ref: 9be2b1a9a8075c851924139dba1a33a8947ca87b
parent: e17e664e1a4738ac289fa3ff231ec8916608e07a
parent: 55717d3fb8d7e32dd2efeac747ec5f64ab8409f3
author: Ethan Hugg <ethanhugg@gmail.com>
date: Mon Jan 27 08:02:00 EST 2014

Merge pull request #241 from mstorsjo/remove-unused-function

Remove an unused function for byte order swapping

--- a/codec/decoder/core/inc/bit_stream.h
+++ b/codec/decoder/core/inc/bit_stream.h
@@ -66,8 +66,6 @@
 
 void_t InitReadBits (PBitStringAux pBitString);
 
-uint32_t EndianFix (uint32_t uiX);
-
 
 
 } // namespace WelsDec
--- a/codec/decoder/core/src/bit_stream.cpp
+++ b/codec/decoder/core/src/bit_stream.cpp
@@ -41,38 +41,6 @@
 
 namespace WelsDec {
 
-#ifdef WORDS_BIGENDIAN
-inline uint32_t EndianFix (uint32_t uiX) {
-  return uiX;
-}
-#else //WORDS_BIGENDIAN
-
-#if defined(_MSC_VER) && defined(_M_IX86)
-inline uint32_t EndianFix (uint32_t uiX) {
-  __asm {
-    mov   eax,  uiX
-    bswap   eax
-    mov   uiX,    eax
-  }
-  return uiX;
-}
-#else  //_MSC_VER
-
-inline uint32_t EndianFix (uint32_t uiX) {
-#ifdef ARM_ARCHv7
-  __asm__ __volatile__ ("rev %0, %0":"+r" (uiX)); //Just for the ARMv7
-#elif defined (X86_ARCH)
-  __asm__ __volatile__ ("bswap %0":"+r" (uiX));
-#else
-  uiX = ((uiX & 0xff000000) >> 24) | ((uiX & 0xff0000) >> 8) |
-        ((uiX & 0xff00) << 8) | ((uiX & 0xff) << 24);
-#endif
-  return uiX;
-}
-#endif //_MSC_VER
-
-#endif //WORDS_BIGENDIAN
-
 inline uint32_t GetValue4Bytes (uint8_t* pDstNal) {
   uint32_t uiValue = 0;
   uiValue = (pDstNal[0] << 24) | (pDstNal[1] << 16) | (pDstNal[2] << 8) | (pDstNal[3]);