From fc6a9e4a3e0278e1a1f5c0bf570667306f716fed Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 1 Feb 2012 20:01:16 +0200 Subject: 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. --- ffmpeg_files/sh4/bswap.h | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 ffmpeg_files/sh4/bswap.h (limited to 'ffmpeg_files/sh4/bswap.h') diff --git a/ffmpeg_files/sh4/bswap.h b/ffmpeg_files/sh4/bswap.h deleted file mode 100644 index 47b91397ea..0000000000 --- a/ffmpeg_files/sh4/bswap.h +++ /dev/null @@ -1,48 +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/sh4/bswap.h - * byte swapping routines - */ - -#ifndef MP_AVUTIL_SH4_BSWAP_H -#define MP_AVUTIL_SH4_BSWAP_H - -#include -#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__("swap.b %0,%0" : "+r"(x)); - return x; -} - -#define bswap_32 bswap_32 -static av_always_inline av_const uint32_t bswap_32(uint32_t x) -{ - __asm__("swap.b %0,%0\n" - "swap.w %0,%0\n" - "swap.b %0,%0\n" - : "+r"(x)); - return x; -} - -#endif /* AVUTIL_SH4_BSWAP_H */ -- cgit v1.2.3