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.
This commit is contained in:
parent
2bd9dad6e1
commit
a0f2c30ec6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=139013
3 changed files with 144 additions and 1 deletions
|
@ -26,7 +26,7 @@ MAN3= fame_close.3 fame_encode_frame.3 fame_get_object.3 fame_init.3 \
|
|||
fame_open.3 fame_register.3 fame_unregister.3 fame_encode_slice.3 \
|
||||
fame_start_frame.3 fame_end_frame.3
|
||||
|
||||
OPTIONS= SSE "SSE optimized routines" off \
|
||||
OPTIONS= SSE "SSE optimized routines (no effect in this release)" off \
|
||||
MMX "MMX optimized routines" on
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
|
10
multimedia/libfame/files/patch-cflags
Normal file
10
multimedia/libfame/files/patch-cflags
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- configure Wed Feb 11 08:12:28 2004
|
||||
+++ configure Tue Jul 12 18:56:00 2005
|
||||
@@ -4500,4 +4500,7 @@
|
||||
|
||||
case "$target" in
|
||||
+ *-*-freebsd*)
|
||||
+ CFLAGS="$CFLAGS -DHAS_BSWAP"
|
||||
+ ;;
|
||||
alpha*-*-linux*)
|
||||
if test x$ac_cv_c_compiler_gnu = xyes; then
|
133
multimedia/libfame/files/patch-warnings
Normal file
133
multimedia/libfame/files/patch-warnings
Normal file
|
@ -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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h> /* strlen() */
|
||||
#include <math.h>
|
||||
#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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h> /* strlen() */
|
||||
#include <math.h>
|
||||
#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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h> /* 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;
|
Loading…
Reference in a new issue