summaryrefslogtreecommitdiffstats
path: root/libmpeg2/attributes.h
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-06 16:36:02 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-06 16:36:02 +0000
commit0b6eb24b9a8034287f67f800fc61d07b7f018891 (patch)
treeee1e7fe1ba37e57d24b8604e1c53f38e7b67484c /libmpeg2/attributes.h
parent27ff6fa04a22e2a56848b3ff3e1d681a18bc98e4 (diff)
downloadmpv-0b6eb24b9a8034287f67f800fc61d07b7f018891.tar.bz2
mpv-0b6eb24b9a8034287f67f800fc61d07b7f018891.tar.xz
Importing libmpeg2 from mpeg2dec-0.3.1
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9853 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpeg2/attributes.h')
-rw-r--r--libmpeg2/attributes.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/libmpeg2/attributes.h b/libmpeg2/attributes.h
index ab7105c2df..96a86b26c0 100644
--- a/libmpeg2/attributes.h
+++ b/libmpeg2/attributes.h
@@ -1,8 +1,10 @@
/*
* attributes.h
- * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
+ * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
*
* This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
+ * See http://libmpeg2.sourceforge.net/ for updates.
*
* mpeg2dec is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,7 +23,15 @@
/* use gcc attribs to align critical data structures */
#ifdef ATTRIBUTE_ALIGNED_MAX
-#define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < (align)) ? ATTRIBUTE_ALIGNED_MAX : (align))))
+#define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align)))
#else
#define ATTR_ALIGN(align)
#endif
+
+#ifdef HAVE_BUILTIN_EXPECT
+#define likely(x) __builtin_expect ((x) != 0, 1)
+#define unlikely(x) __builtin_expect ((x) != 0, 0)
+#else
+#define likely(x) (x)
+#define unlikely(x) (x)
+#endif