Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a6144dde
Commit
a6144dde
authored
May 25, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use FreeBSD's be16toh() when available
parent
2444a87b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
modules/video_filter/swscale/common.h
modules/video_filter/swscale/common.h
+6
-4
No files found.
modules/video_filter/swscale/common.h
View file @
a6144dde
...
...
@@ -36,7 +36,10 @@ extern void *( *swscale_fast_memcpy )( void *, const void *, int );
#define MANGLE(a) #a
#endif
#ifdef ARCH_X86
#if defined(__FreeBSD__) && __FreeBSD__ >= 5
# include <sys/endian.h>
# define bswap_16(x) be16toh(x)
#elif defined(ARCH_X86)
static
inline
unsigned
short
ByteSwap16
(
unsigned
short
x
)
{
__asm
(
"xchgb %b0,%h0"
:
...
...
@@ -44,10 +47,9 @@ static inline unsigned short ByteSwap16(unsigned short x)
"0"
(
x
));
return
x
;
}
#define bswap_16(x) ByteSwap16(x)
#
define bswap_16(x) ByteSwap16(x)
#else
#define bswap_16(x) (((x) & 0x00ff) << 8 | ((x) & 0xff00) >> 8)
# define bswap_16(x) (((x) & 0x00ff) << 8 | ((x) & 0xff00) >> 8)
#endif
/* !ARCH_X86 */
/* SWSCALE image formats */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment