summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg-devel/files/patch-libavcodec::bswap.h
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-11-03 07:01:44 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2002-11-03 07:01:44 +0000
commit77072d02124dce44eb0465a68982aede5c0fe250 (patch)
tree9edcfd962c313161b0a981f438260312f375270b /multimedia/ffmpeg-devel/files/patch-libavcodec::bswap.h
parentRemove BUILD_DEPENDS on perl5. This should have gone in security/nss. (diff)
o Add optimizations if WITH_OPTIMIZED_CFLAGS [1]
o Make it CFLAGS safe (I have no idea how this escaped me) o Unless WITHOUT_LIBA52, use liba52 port instead of ffmpeg liba52 code. The liba52 port is more optimized. o Use FreeBSD byteswap optimized routines IF one happens to be using either FreeBSD 4.7-RELEASE or later o Do not bump PORTREVISION Submitted by: "Steve O'Hara-Smith" <steve@sohara.org> [1] Reviewed by: "Steve O'Hara-Smith" <steve@sohara.org>
Diffstat (limited to 'multimedia/ffmpeg-devel/files/patch-libavcodec::bswap.h')
-rw-r--r--multimedia/ffmpeg-devel/files/patch-libavcodec::bswap.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/multimedia/ffmpeg-devel/files/patch-libavcodec::bswap.h b/multimedia/ffmpeg-devel/files/patch-libavcodec::bswap.h
new file mode 100644
index 000000000000..e0c419c1dc42
--- /dev/null
+++ b/multimedia/ffmpeg-devel/files/patch-libavcodec::bswap.h
@@ -0,0 +1,41 @@
+--- libavcodec/bswap.h.orig Sun Nov 3 04:51:51 2002
++++ libavcodec/bswap.h Sun Nov 3 04:53:30 2002
+@@ -5,6 +5,14 @@
+ #include <byteswap.h>
+ #else
+
++#if (defined(BSD) && (BSD >= 199103))
++#include <sys/param.h>
++#endif
++
++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000
++#include <sys/endian.h>
++#endif
++
+ #ifdef ARCH_X86
+ inline static unsigned short ByteSwap16(unsigned short x)
+ {
+@@ -13,7 +21,11 @@
+ "0" (x));
+ return x;
+ }
++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000
++#define bswap_16(x) (be16toh(x))
++#else
+ #define bswap_16(x) ByteSwap16(x)
++#endif
+
+ inline static unsigned int ByteSwap32(unsigned int x)
+ {
+@@ -29,7 +41,11 @@
+ "0" (x));
+ return x;
+ }
++#if defined(__FreeBSD__) && __FreeBSD_version >= 470000
++#define bswap_32(x) (be32toh(x))
++#else
+ #define bswap_32(x) ByteSwap32(x)
++#endif
+
+ inline static unsigned long long int ByteSwap64(unsigned long long int x)
+ {