From a0f2c30ec62d840265f84c48ff03b72ded1e812e Mon Sep 17 00:00:00 2001 From: Mikhail Teterin Date: Tue, 12 Jul 2005 23:41:42 +0000 Subject: Fix configure to stop appending ``-march=i386'' to CFLAGS on i386. Depending on other optimization options, compiler could get confused into an internal error, and was, probably, building pessimized code even when working. Ensure warning-free build, while I'm here. Mark the SSE as having no effect -- ``--enable-sse'' causes configure to add the HAS_SSE define to CFLAGS, but nothing in the current release checks for that flag. Ha-ha. There are SSE implementations of some parts of the code (they are just no used), so, perhaps, someone can add another patch to make use of them, when possible. --- multimedia/libfame/files/patch-warnings | 133 ++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 multimedia/libfame/files/patch-warnings (limited to 'multimedia/libfame/files/patch-warnings') diff --git a/multimedia/libfame/files/patch-warnings b/multimedia/libfame/files/patch-warnings new file mode 100644 index 000000000000..fe734e698110 --- /dev/null +++ b/multimedia/libfame/files/patch-warnings @@ -0,0 +1,133 @@ +Some patches to fix compiler warnings... + + -mi + +The mpeg_close method only does anything, if MMX was used. Do not even +declare nor define it, if that is not the case. +--- src/fame_decoder_mpeg.c Tue Jul 1 04:59:34 2003 ++++ src/fame_decoder_mpeg.c Tue Jul 12 19:02:15 2005 +@@ -79,5 +79,7 @@ + static void mpeg_interpolate(fame_decoder_t *decoder, int rounding); + static void mpeg_leave(fame_decoder_t *decoder); ++#ifdef HAS_MMX + static void mpeg_close(fame_decoder_t *decoder); ++#endif + + FAME_CONSTRUCTOR(fame_decoder_mpeg_t) +@@ -91,5 +93,9 @@ + FAME_DECODER(this)->interpolate = mpeg_interpolate; + FAME_DECODER(this)->leave = mpeg_leave; ++#ifdef HAS_MMX + FAME_DECODER(this)->close = mpeg_close; ++#else ++ FAME_DECODER(this)->close = NULL; ++#endif + return(this); + } +@@ -604,4 +610,5 @@ + } + ++#ifdef HAS_MMX + /* mpeg_close */ + /* */ +@@ -619,5 +626,4 @@ + fame_decoder_mpeg_t *decoder_mpeg = FAME_DECODER_MPEG(decoder); + +-#ifdef HAS_MMX + /* free mismatch accumulator */ + { +@@ -627,4 +633,4 @@ + fame_free(decoder_mpeg->mismatch_accumulator[i]); + } +-#endif + } ++#endif + +Include the missing header: +--- src/fame_rate_simple.c Mon Apr 8 11:58:05 2002 ++++ src/fame_rate_simple.c Tue Jul 12 19:05:27 2005 +@@ -20,4 +20,5 @@ + #include + #include ++#include /* strlen() */ + #include + #include "fame.h" +--- src/fame_rate_1param.c Sun May 12 14:34:45 2002 ++++ src/fame_rate_1param.c Tue Jul 12 19:07:54 2005 +@@ -20,4 +20,5 @@ + #include + #include ++#include /* strlen() */ + #include + #include "fame.h" +--- src/mae_mmx.h Mon May 20 14:58:06 2002 ++++ src/mae_mmx.h Tue Jul 12 19:22:34 2005 +@@ -19,8 +19,8 @@ + */ + +-static unsigned int MAE8x8_withmask(unsigned char *ref, +- unsigned char *input, +- unsigned char *shape, +- int pitch) ++static inline unsigned int ++MAE8x8_withmask(unsigned char *ref, unsigned char *input, ++ unsigned char *shape, ++ int pitch) + { + int dummy; +@@ -71,8 +71,8 @@ + } + +-static unsigned int MAE8x8_withoutmask(unsigned char *ref, +- unsigned char *input, +- unsigned char *shape, +- int pitch) ++static inline unsigned int ++MAE8x8_withoutmask(unsigned char *ref, unsigned char *input, ++ unsigned char *shape, ++ int pitch) + { + int dummy; +--- src/mae_int.h Mon May 20 14:58:06 2002 ++++ src/mae_int.h Tue Jul 12 19:24:06 2005 +@@ -19,8 +19,8 @@ + */ + +-static unsigned int MAE8x8_withmask(unsigned char *ref, +- unsigned char *input, +- unsigned char *shape, +- int pitch) ++static inline unsigned int ++MAE8x8_withmask(unsigned char *ref, unsigned char *input, ++ unsigned char *shape, ++ int pitch) + { + int j,i; +@@ -42,8 +42,9 @@ + } + +-static unsigned int MAE8x8_withoutmask(unsigned char *ref, +- unsigned char *input, +- unsigned char *shape, +- int pitch) ++static inline unsigned int ++MAE8x8_withoutmask(unsigned char *ref, ++ unsigned char *input, ++ unsigned char *shape, ++ int pitch) + { + int j,i; +--- src/fame_motion_pmvfast.c Sat Oct 5 08:44:47 2002 ++++ src/fame_motion_pmvfast.c Tue Jul 12 19:28:52 2005 +@@ -20,4 +20,5 @@ + #include + #include ++#include /* memcpy, memset */ + #include "fame.h" + #include "fame_malloc.h" +@@ -922,5 +923,4 @@ + fame_motion_vector_t *pvector_left, *pvector_topleft; + fame_motion_vector_t *pvector_top, *pvector_topright; +- unsigned int weight_left, weight_top, weight_topright; + + unsigned char *shape; -- cgit v1.2.3