summaryrefslogtreecommitdiffstats
path: root/ffmpeg_files
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-08 02:32:45 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-05-08 02:32:45 +0300
commite3103ea06f62eda3afd3e8eb2202e54871dc0e93 (patch)
treecc73fe5254d6394e870980eb7bca8ae26ca30811 /ffmpeg_files
parent5266b5de98aa57dd99bb1f1ac5a40ebf4f23b7c2 (diff)
downloadmpv-e3103ea06f62eda3afd3e8eb2202e54871dc0e93.tar.bz2
mpv-e3103ea06f62eda3afd3e8eb2202e54871dc0e93.tar.xz
intreadwrite.h: disable optimizations
Disable arch/compiler specific optimizations in the MPlayer version of intreadwrite.h. All the uses in MPlayer should be irrelevant for performance.
Diffstat (limited to 'ffmpeg_files')
-rw-r--r--ffmpeg_files/arm/intreadwrite.h78
-rw-r--r--ffmpeg_files/intreadwrite.h42
2 files changed, 0 insertions, 120 deletions
diff --git a/ffmpeg_files/arm/intreadwrite.h b/ffmpeg_files/arm/intreadwrite.h
deleted file mode 100644
index 34b5ec8e4a..0000000000
--- a/ffmpeg_files/arm/intreadwrite.h
+++ /dev/null
@@ -1,78 +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
- */
-
-#ifndef MP_AVUTIL_ARM_INTREADWRITE_H
-#define MP_AVUTIL_ARM_INTREADWRITE_H
-
-#include <stdint.h>
-#include "config.h"
-
-#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM
-
-#define AV_RN16 AV_RN16
-static inline uint16_t AV_RN16(const void *p)
-{
- uint16_t v;
- __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(*(const uint16_t *)p));
- return v;
-}
-
-#define AV_WN16 AV_WN16
-static inline void AV_WN16(void *p, uint16_t v)
-{
- __asm__ ("strh %1, %0" : "=m"(*(uint16_t *)p) : "r"(v));
-}
-
-#define AV_RN32 AV_RN32
-static inline uint32_t AV_RN32(const void *p)
-{
- uint32_t v;
- __asm__ ("ldr %0, %1" : "=r"(v) : "m"(*(const uint32_t *)p));
- return v;
-}
-
-#define AV_WN32 AV_WN32
-static inline void AV_WN32(void *p, uint32_t v)
-{
- __asm__ ("str %1, %0" : "=m"(*(uint32_t *)p) : "r"(v));
-}
-
-#define AV_RN64 AV_RN64
-static inline uint64_t AV_RN64(const void *p)
-{
- union { uint64_t v; uint32_t hl[2]; } v;
- __asm__ ("ldr %0, %2 \n\t"
- "ldr %1, %3 \n\t"
- : "=r"(v.hl[0]), "=r"(v.hl[1])
- : "m"(*(const uint32_t*)p), "m"(*((const uint32_t*)p+1)));
- return v.v;
-}
-
-#define AV_WN64 AV_WN64
-static inline void AV_WN64(void *p, uint64_t v)
-{
- union { uint64_t v; uint32_t hl[2]; } vv = { v };
- __asm__ ("str %2, %0 \n\t"
- "str %3, %1 \n\t"
- : "=m"(*(uint32_t*)p), "=m"(*((uint32_t*)p+1))
- : "r"(vv.hl[0]), "r"(vv.hl[1]));
-}
-
-#endif /* HAVE_INLINE_ASM */
-
-#endif /* AVUTIL_ARM_INTREADWRITE_H */
diff --git a/ffmpeg_files/intreadwrite.h b/ffmpeg_files/intreadwrite.h
index bc61ccceb7..ff4e917e46 100644
--- a/ffmpeg_files/intreadwrite.h
+++ b/ffmpeg_files/intreadwrite.h
@@ -23,46 +23,6 @@
#include "config.h"
#include "bswap.h"
-/*
- * Arch-specific headers can provide any combination of
- * AV_[RW][BLN](16|32|64) macros. Preprocessor symbols must be
- * defined, even if these are implemented as inline functions.
- */
-
-#if ARCH_ARM
-# include "arm/intreadwrite.h"
-#elif ARCH_MIPS
-# include "mips/intreadwrite.h"
-#elif ARCH_PPC
-# include "ppc/intreadwrite.h"
-#endif
-
-/*
- * Define AV_[RW]N helper macros to simplify definitions not provided
- * by per-arch headers.
- */
-
-#if defined(__GNUC__)
-
-struct unaligned_64 { uint64_t l; } __attribute__((packed));
-struct unaligned_32 { uint32_t l; } __attribute__((packed));
-struct unaligned_16 { uint16_t l; } __attribute__((packed));
-
-# define AV_RN(s, p) (((const struct unaligned_##s *) (p))->l)
-# define AV_WN(s, p, v) (((struct unaligned_##s *) (p))->l) = (v)
-
-#elif defined(__DECC)
-
-# define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p)))
-# define AV_WN(s, p, v) *((__unaligned uint##s##_t*)(p)) = (v)
-
-#elif HAVE_FAST_UNALIGNED
-
-# define AV_RN(s, p) (*((const uint##s##_t*)(p)))
-# define AV_WN(s, p, v) *((uint##s##_t*)(p)) = (v)
-
-#else
-
#ifndef AV_RB16
#define AV_RB16(x) ((((const uint8_t*)(x))[0] << 8) | \
((const uint8_t*)(x))[1])
@@ -163,8 +123,6 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
# define AV_WN(s, p, v) AV_WL##s(p, v)
#endif
-#endif /* HAVE_FAST_UNALIGNED */
-
#ifndef AV_RN16
# define AV_RN16(p) AV_RN(16, p)
#endif