Submitted By: Jeremy Utley (jeremy@linuxfromscratch.org)
Date: 2004-05-20
Initial Package Version: 1.5.4
Upstream Status: Not Submitted
Origin: Self Created
Description: Fixes syntax issues with GCC 3.4

diff -uNr libmpeg3-1.5.4/video/output.c 
libmpeg3-1.5.4.jbit/video/output.c
--- libmpeg3-1.5.4/video/output.c	2003-11-07 13:32:32.000000000 -0800
+++ libmpeg3-1.5.4.jbit/video/output.c	2004-04-13 12:54:53.756934515 -0700
@@ -1062,3 +1062,39 @@
 /* Not used */
 	return 0;
 }
+
+#ifdef HAVE_MMX
+/* 
+	Make sure that these vars get linked
+	For some reason gcc3.4 doesn't link them
+	There's gotta be a better way to do this, this is just a quick hack
+*/
+void ___jbit_hack()
+{
+	void *foo;
+	foo = &mpeg3_MMX_0;
+	foo = mpeg3_MMX_10w;
+	foo = mpeg3_MMX_80w;
+	foo = mpeg3_MMX_00FFw;
+	foo = mpeg3_MMX_Ublucoeff;
+	foo = mpeg3_MMX_Vredcoeff;
+	foo = mpeg3_MMX_Ugrncoeff;
+	foo = mpeg3_MMX_Vgrncoeff;
+	foo = mpeg3_MMX_Ycoeff;
+	foo = mpeg3_MMX_redmask;
+	foo = mpeg3_MMX_grnmask;
+	foo = mpeg3_601_to_rgb;
+
+	foo = &mpeg3_MMX_U_80;
+	foo = &mpeg3_MMX_V_80;
+	foo = &mpeg3_MMX_U_COEF;
+	foo = &mpeg3_MMX_V_COEF;
+	foo = &mpeg3_MMX_601_Y_COEF;
+	foo = &mpeg3_MMX_601_Y_DIFF;
+
+	foo = &mpeg3_MMX_U_80_RGB;
+	foo = &mpeg3_MMX_V_80_RGB;
+	foo = &mpeg3_MMX_U_COEF_RGB;
+	foo = &mpeg3_MMX_V_COEF_RGB;
+}
+#endif
diff -uNr libmpeg3-1.5.4/video/reconstruct.c libmpeg3-1.5.4.jbit/video/reconstruct.c
--- libmpeg3-1.5.4/video/reconstruct.c	2003-10-14 00:54:14.000000000 -0700
+++ libmpeg3-1.5.4.jbit/video/reconstruct.c	2004-04-13 12:57:23.280261795 -0700
@@ -1286,4 +1286,16 @@
 	return 0;
 }
 
-
+#ifdef HAVE_MMX
+/* 
+        Make sure that these vars get linked
+        For some reason gcc3.4 doesn't link them
+        There's gotta be a better way to do this, this is just a quick hack
+*/
+void ___jbit_hack_reconstruct()
+{
+	void *foo;
+	foo = &MASK_AND;
+	foo = &ADD_1;
+}
+#endif 
diff -uNr libmpeg3-1.5.4/video/slice.c libmpeg3-1.5.4.jbit/video/slice.c
--- libmpeg3-1.5.4/video/slice.c	2003-10-14 00:54:14.000000000 -0700
+++ libmpeg3-1.5.4.jbit/video/slice.c	2004-04-13 12:55:54.710884733 -0700
@@ -706,3 +706,16 @@
 	pthread_mutex_destroy(&(slice->output_lock));
 	return 0;
 }
+
+#ifdef HAVE_MMX
+/* 
+        Make sure that these vars get linked
+        For some reason gcc3.4 doesn't link them
+        There's gotta be a better way to do this, this is just a quick hack
+*/
+void ___jbit_hack_slice()
+{
+	void *foo;
+	foo = &MMX_128;
+}
+#endif 
