summaryrefslogtreecommitdiffstats
path: root/ffmpeg_files/x86/bswap.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-02-01 20:01:16 +0200
committerUoti Urpala <uau@mplayer2.org>2012-02-01 22:46:27 +0200
commitfc6a9e4a3e0278e1a1f5c0bf570667306f716fed (patch)
treed94999fc238126f28c4c5e88c341829001b226df /ffmpeg_files/x86/bswap.h
parentcdb6d157ccb2d311afb72b7cbf128c3866e85ec6 (diff)
downloadmpv-fc6a9e4a3e0278e1a1f5c0bf570667306f716fed.tar.bz2
mpv-fc6a9e4a3e0278e1a1f5c0bf570667306f716fed.tar.xz
build: switch to libavutil bswap.h and intreadwrite.h
Remove the private bswap and intreadwrite.h implementations and use libavutil headers instead. Originally these headers weren't publicly installed by libavutil at all. That already changed in 2010, but the pure C bswap version in installed headers was very inefficient. That was recently (2011-12) improved and now using the public bswap version probably shouldn't cause noticeable performance problems, at least if using a new enough compiler.
Diffstat (limited to 'ffmpeg_files/x86/bswap.h')
-rw-r--r--ffmpeg_files/x86/bswap.h61
1 files changed, 0 insertions, 61 deletions
diff --git a/ffmpeg_files/x86/bswap.h b/ffmpeg_files/x86/bswap.h
deleted file mode 100644
index 62238d178a..0000000000
--- a/ffmpeg_files/x86/bswap.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file libavutil/x86/bswap.h
- * byte swapping routines
- */
-
-#ifndef MP_AVUTIL_X86_BSWAP_H
-#define MP_AVUTIL_X86_BSWAP_H
-
-#include <stdint.h>
-#include "config.h"
-#include "libavutil/common.h"
-
-#define bswap_16 bswap_16
-static av_always_inline av_const uint16_t bswap_16(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)
-{
-#if HAVE_BSWAP
- __asm__("bswap %0" : "+r" (x));
-#else
- __asm__("rorw $8, %w0 \n\t"
- "rorl $16, %0 \n\t"
- "rorw $8, %w0"
- : "+r"(x));
-#endif
- return x;
-}
-
-#if ARCH_X86_64
-#define bswap_64 bswap_64
-static inline uint64_t av_const bswap_64(uint64_t x)
-{
- __asm__("bswap %0": "=r" (x) : "0" (x));
- return x;
-}
-#endif
-
-#endif /* AVUTIL_X86_BSWAP_H */