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/core/src/bit_stream.cpp (1 of 2 files). Show all

Unified · Split

codec/decoder/core/src/bit_stream.cpp+0−32
@@ -41,38 +41,6 @@ · 40 unmodified lines
4141
4242 namespace WelsDec {
4343
44−#ifdef WORDS_BIGENDIAN
45−inline uint32_t EndianFix (uint32_t uiX) {
46− return uiX;
47−}
48−#else //WORDS_BIGENDIAN
49−
50−#if defined(_MSC_VER) && defined(_M_IX86)
51−inline 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−
61−inline 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−
7644 inline uint32_t GetValue4Bytes (uint8_t* pDstNal) {
7745 uint32_t uiValue = 0;
7846 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