1Some patches to fix compiler warnings... 2 3 -mi 4 5The mpeg_close method only does anything, if MMX was used. Do not even 6declare nor define it, if that is not the case. 7--- src/fame_decoder_mpeg.c Tue Jul 1 04:59:34 2003 8+++ src/fame_decoder_mpeg.c Tue Jul 12 19:02:15 2005 9@@ -79,5 +79,7 @@ 10 static void mpeg_interpolate(fame_decoder_t *decoder, int rounding); 11 static void mpeg_leave(fame_decoder_t *decoder); 12+#ifdef HAS_MMX 13 static void mpeg_close(fame_decoder_t *decoder); 14+#endif 15 16 FAME_CONSTRUCTOR(fame_decoder_mpeg_t) 17@@ -91,5 +93,9 @@ 18 FAME_DECODER(this)->interpolate = mpeg_interpolate; 19 FAME_DECODER(this)->leave = mpeg_leave; 20+#ifdef HAS_MMX 21 FAME_DECODER(this)->close = mpeg_close; 22+#else 23+ FAME_DECODER(this)->close = NULL; 24+#endif 25 return(this); 26 } 27@@ -604,4 +610,5 @@ 28 } 29 30+#ifdef HAS_MMX 31 /* mpeg_close */ 32 /* */ 33@@ -619,5 +626,4 @@ 34 fame_decoder_mpeg_t *decoder_mpeg = FAME_DECODER_MPEG(decoder); 35 36-#ifdef HAS_MMX 37 /* free mismatch accumulator */ 38 { 39@@ -627,4 +633,4 @@ 40 fame_free(decoder_mpeg->mismatch_accumulator[i]); 41 } 42-#endif 43 } 44+#endif 45 46Include the missing header: 47--- src/fame_rate_simple.c Mon Apr 8 11:58:05 2002 48+++ src/fame_rate_simple.c Tue Jul 12 19:05:27 2005 49@@ -20,4 +20,5 @@ 50 #include <stdio.h> 51 #include <stdlib.h> 52+#include <string.h> /* strlen() */ 53 #include <math.h> 54 #include "fame.h" 55--- src/fame_rate_1param.c Sun May 12 14:34:45 2002 56+++ src/fame_rate_1param.c Tue Jul 12 19:07:54 2005 57@@ -20,4 +20,5 @@ 58 #include <stdio.h> 59 #include <stdlib.h> 60+#include <string.h> /* strlen() */ 61 #include <math.h> 62 #include "fame.h" 63--- src/mae_mmx.h Mon May 20 14:58:06 2002 64+++ src/mae_mmx.h Tue Jul 12 19:22:34 2005 65@@ -19,8 +19,8 @@ 66 */ 67 68-static unsigned int MAE8x8_withmask(unsigned char *ref, 69- unsigned char *input, 70- unsigned char *shape, 71- int pitch) 72+static inline unsigned int 73+MAE8x8_withmask(unsigned char *ref, unsigned char *input, 74+ unsigned char *shape, 75+ int pitch) 76 { 77 int dummy; 78@@ -71,8 +71,8 @@ 79 } 80 81-static unsigned int MAE8x8_withoutmask(unsigned char *ref, 82- unsigned char *input, 83- unsigned char *shape, 84- int pitch) 85+static inline unsigned int 86+MAE8x8_withoutmask(unsigned char *ref, unsigned char *input, 87+ unsigned char *shape, 88+ int pitch) 89 { 90 int dummy; 91--- src/mae_int.h Mon May 20 14:58:06 2002 92+++ src/mae_int.h Tue Jul 12 19:24:06 2005 93@@ -19,8 +19,8 @@ 94 */ 95 96-static unsigned int MAE8x8_withmask(unsigned char *ref, 97- unsigned char *input, 98- unsigned char *shape, 99- int pitch) 100+static inline unsigned int 101+MAE8x8_withmask(unsigned char *ref, unsigned char *input, 102+ unsigned char *shape, 103+ int pitch) 104 { 105 int j,i; 106@@ -42,8 +42,9 @@ 107 } 108 109-static unsigned int MAE8x8_withoutmask(unsigned char *ref, 110- unsigned char *input, 111- unsigned char *shape, 112- int pitch) 113+static inline unsigned int 114+MAE8x8_withoutmask(unsigned char *ref, 115+ unsigned char *input, 116+ unsigned char *shape, 117+ int pitch) 118 { 119 int j,i; 120--- src/fame_motion_pmvfast.c Sat Oct 5 08:44:47 2002 121+++ src/fame_motion_pmvfast.c Tue Jul 12 19:28:52 2005 122@@ -20,4 +20,5 @@ 123 #include <stdio.h> 124 #include <stdlib.h> 125+#include <string.h> /* memcpy, memset */ 126 #include "fame.h" 127 #include "fame_malloc.h" 128@@ -922,5 +923,4 @@ 129 fame_motion_vector_t *pvector_left, *pvector_topleft; 130 fame_motion_vector_t *pvector_top, *pvector_topright; 131- unsigned int weight_left, weight_top, weight_topright; 132 133 unsigned char *shape; 134--- src/fame_malloc.c Fri Jun 20 08:40:30 2003 135+++ src/fame_malloc.c Tue Jul 12 19:59:14 2005 136@@ -22,4 +22,6 @@ 137 138 #include <stdlib.h> 139+#include <stdio.h> 140+#include <inttypes.h> 141 142 void* fame_malloc(size_t size) 143@@ -37,7 +39,11 @@ 144 145 ptr = (unsigned char*) malloc(size+ALIGN); 146- aligned = (unsigned char*) (((unsigned int)ptr & (~(ALIGN-1))) + ALIGN ); 147+ if (ptr == NULL) { 148+ perror("fame_malloc"); 149+ exit(1); 150+ } 151+ aligned = (unsigned char*) (((uintptr_t)ptr & (~(ALIGN-1))) + ALIGN ); 152 padding = aligned - 1; 153- *padding = (ALIGN-1) - ((unsigned int)ptr & (ALIGN-1)); 154+ *padding = (ALIGN-1) - ((uintptr_t)ptr & (ALIGN-1)); 155 156 return ((void*)aligned); 157