History

Remove an unused function for byte order swapping

Martin Storsjö committed 12 years ago

Commit 55717d31 parent e17e6642 files · +0 −34Browse files

Showing the changes to codec/decoder (2 of 2 files). Show all

Unified · Split

2 files
  1. codec/decoder/core/inc/bit_stream.h +0 −2
  2. codec/decoder/core/src/bit_stream.cpp +0 −32
codec/decoder/core/inc/bit_stream.h+0−2
@@ -66,8 +66,6 @@ int32_t InitBits (PBitStringAux pBitString, const uint8_t* kpBuf, const int32_t · 65 unmodified lines
66 66
67void_t InitReadBits (PBitStringAux pBitString);67void_t InitReadBits (PBitStringAux pBitString);
68 68
69uint32_t EndianFix (uint32_t uiX);
70
71 69
72 70
73} // namespace WelsDec71} // namespace WelsDec
codec/decoder/core/src/bit_stream.cpp+0−32
@@ -41,38 +41,6 @@ · 40 unmodified lines
41 41
42namespace WelsDec {42namespace WelsDec {
43 43
44#ifdef WORDS_BIGENDIAN
45inline uint32_t EndianFix (uint32_t uiX) {
46 return uiX;
47}
48#else //WORDS_BIGENDIAN
49
50#if defined(_MSC_VER) && defined(_M_IX86)
51inline uint32_t EndianFix (uint32_t uiX) {
52 __asm {
53 mov eax, uiX
54 bswap eax
55 mov uiX, eax
56 }
57 return uiX;
58}
59#else //_MSC_VER
60
61inline uint32_t EndianFix (uint32_t uiX) {
62#ifdef ARM_ARCHv7
63 __asm__ __volatile__ ("rev %0, %0":"+r" (uiX)); //Just for the ARMv7
64#elif defined (X86_ARCH)
65 __asm__ __volatile__ ("bswap %0":"+r" (uiX));
66#else
67 uiX = ((uiX & 0xff000000) >> 24) | ((uiX & 0xff0000) >> 8) |
68 ((uiX & 0xff00) << 8) | ((uiX & 0xff) << 24);
69#endif
70 return uiX;
71}
72#endif //_MSC_VER
73
74#endif //WORDS_BIGENDIAN
75
76inline uint32_t GetValue4Bytes (uint8_t* pDstNal) {44inline uint32_t GetValue4Bytes (uint8_t* pDstNal) {
77 uint32_t uiValue = 0;45 uint32_t uiValue = 0;
78 uiValue = (pDstNal[0] << 24) | (pDstNal[1] << 16) | (pDstNal[2] << 8) | (pDstNal[3]);46 uiValue = (pDstNal[0] << 24) | (pDstNal[1] << 16) | (pDstNal[2] << 8) | (pDstNal[3]);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t