diff options
author | Uoti Urpala <uau@mplayer2.org> | 2012-02-01 20:01:16 +0200 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-02-01 22:46:27 +0200 |
commit | fc6a9e4a3e0278e1a1f5c0bf570667306f716fed (patch) | |
tree | d94999fc238126f28c4c5e88c341829001b226df /ffmpeg_files/bfin | |
parent | cdb6d157ccb2d311afb72b7cbf128c3866e85ec6 (diff) | |
download | mpv-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/bfin')
-rw-r--r-- | ffmpeg_files/bfin/bswap.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/ffmpeg_files/bfin/bswap.h b/ffmpeg_files/bfin/bswap.h deleted file mode 100644 index 0f7e5a26eb..0000000000 --- a/ffmpeg_files/bfin/bswap.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2007 Marc Hoffman - * - * 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/bfin/bswap.h - * byte swapping routines - */ - -#ifndef MP_AVUTIL_BFIN_BSWAP_H -#define MP_AVUTIL_BFIN_BSWAP_H - -#include <stdint.h> -#include "config.h" -#include "libavutil/common.h" - -#define bswap_32 bswap_32 -static av_always_inline av_const uint32_t bswap_32(uint32_t x) -{ - unsigned tmp; - __asm__("%1 = %0 >> 8 (V); \n\t" - "%0 = %0 << 8 (V); \n\t" - "%0 = %0 | %1; \n\t" - "%0 = PACK(%0.L, %0.H); \n\t" - : "+d"(x), "=&d"(tmp)); - return x; -} - -#endif /* AVUTIL_BFIN_BSWAP_H */ |