You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-05-21 16:47:28 +02:00
Add av_ prefix to bswap macros
Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -28,15 +28,15 @@
|
||||
#include "config.h"
|
||||
#include "libavutil/attributes.h"
|
||||
|
||||
#define bswap_16 bswap_16
|
||||
static av_always_inline av_const uint16_t bswap_16(uint16_t x)
|
||||
#define av_bswap16 av_bswap16
|
||||
static av_always_inline av_const uint16_t av_bswap16(uint16_t x)
|
||||
{
|
||||
__asm__("rorw $8, %0" : "+r"(x));
|
||||
return x;
|
||||
}
|
||||
|
||||
#define bswap_32 bswap_32
|
||||
static av_always_inline av_const uint32_t bswap_32(uint32_t x)
|
||||
#define av_bswap32 av_bswap32
|
||||
static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
|
||||
{
|
||||
#if HAVE_BSWAP
|
||||
__asm__("bswap %0" : "+r" (x));
|
||||
@@ -50,8 +50,8 @@ static av_always_inline av_const uint32_t bswap_32(uint32_t x)
|
||||
}
|
||||
|
||||
#if ARCH_X86_64
|
||||
#define bswap_64 bswap_64
|
||||
static inline uint64_t av_const bswap_64(uint64_t x)
|
||||
#define av_bswap64 av_bswap64
|
||||
static inline uint64_t av_const av_bswap64(uint64_t x)
|
||||
{
|
||||
__asm__("bswap %0": "=r" (x) : "0" (x));
|
||||
return x;
|
||||
|
||||
Reference in New Issue
Block a user