[SCM] libav/experimental: attribute used patch by (mitya at school dot ioffe dot ru (Dmitry Baryshkov))
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 15:39:23 UTC 2013
The following commit has been merged in the experimental branch:
commit 5c0513bda708f48e92459fabb7c343799529b272
Author: Dmitry Baryshkov <mitya at school.ioffe.ru>
Date: Sun Feb 29 22:10:18 2004 +0000
attribute used patch by (mitya at school dot ioffe dot ru (Dmitry Baryshkov))
Originally committed as revision 2830 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/common.h b/libavcodec/common.h
index 8f88b34..e3d952e 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -82,6 +82,12 @@ extern const struct AVOption avoptions_workaround_bug[11];
# define always_inline inline
#endif
+#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
+# define attribute_used __attribute__((used))
+#else
+# define attribute_used
+#endif
+
#ifndef EMULATE_INTTYPES
# include <inttypes.h>
#else
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c
index e2aee75..2885096 100644
--- a/libavcodec/i386/dsputil_mmx.c
+++ b/libavcodec/i386/dsputil_mmx.c
@@ -31,16 +31,16 @@ extern const uint8_t ff_h263_loop_filter_strength[32];
int mm_flags; /* multimedia extension flags */
/* pixel operations */
-static const uint64_t mm_bone __attribute__ ((aligned(8))) = 0x0101010101010101ULL;
-static const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL;
-static const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL;
+static const uint64_t mm_bone attribute_used __attribute__ ((aligned(8))) = 0x0101010101010101ULL;
+static const uint64_t mm_wone attribute_used __attribute__ ((aligned(8))) = 0x0001000100010001ULL;
+static const uint64_t mm_wtwo attribute_used __attribute__ ((aligned(8))) = 0x0002000200020002ULL;
-static const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL;
-static const uint64_t ff_pw_3 __attribute__ ((aligned(8))) = 0x0003000300030003ULL;
-static const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL;
-static const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL;
+static const uint64_t ff_pw_20 attribute_used __attribute__ ((aligned(8))) = 0x0014001400140014ULL;
+static const uint64_t ff_pw_3 attribute_used __attribute__ ((aligned(8))) = 0x0003000300030003ULL;
+static const uint64_t ff_pw_16 attribute_used __attribute__ ((aligned(8))) = 0x0010001000100010ULL;
+static const uint64_t ff_pw_15 attribute_used __attribute__ ((aligned(8))) = 0x000F000F000F000FULL;
-static const uint64_t ff_pb_FC __attribute__ ((aligned(8))) = 0xFCFCFCFCFCFCFCFCULL;
+static const uint64_t ff_pb_FC attribute_used __attribute__ ((aligned(8))) = 0xFCFCFCFCFCFCFCFCULL;
#define JUMPALIGN() __asm __volatile (".balign 8"::)
#define MOVQ_ZERO(regd) __asm __volatile ("pxor %%" #regd ", %%" #regd ::)
diff --git a/libavcodec/i386/motion_est_mmx.c b/libavcodec/i386/motion_est_mmx.c
index f32afae..39246d9 100644
--- a/libavcodec/i386/motion_est_mmx.c
+++ b/libavcodec/i386/motion_est_mmx.c
@@ -27,7 +27,7 @@ static const __attribute__ ((aligned(8))) uint64_t round_tab[3]={
0x0002000200020002ULL,
};
-static __attribute__ ((aligned(8), unused)) uint64_t bone= 0x0101010101010101LL;
+static attribute_used __attribute__ ((aligned(8))) uint64_t bone= 0x0101010101010101LL;
static inline void sad8_1_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
{
diff --git a/libavcodec/i386/simple_idct_mmx.c b/libavcodec/i386/simple_idct_mmx.c
index 626c1f5..b005f9d 100644
--- a/libavcodec/i386/simple_idct_mmx.c
+++ b/libavcodec/i386/simple_idct_mmx.c
@@ -45,8 +45,8 @@
#define ROW_SHIFT 11
#define COL_SHIFT 20 // 6
-static const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL;
-static const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL;
+static const uint64_t attribute_used __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL;
+static const uint64_t attribute_used __attribute__((aligned(8))) d40000= 0x0000000000040000ULL;
static const int16_t __attribute__((aligned(8))) coeffs[]= {
1<<(ROW_SHIFT-1), 0, 1<<(ROW_SHIFT-1), 0,
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list