The C standard reserves identifiers starting with _ and a capital letter
for the system.  Here is a patch that fixes a few instances in
libmpeg2/idct_mmx.c.  As a positive side effect, the names of the
variables are much better than before.

I already committed this to the copy of idct_mmx.c in FFmpeg.
Please apply.

Diego
Index: libmpeg2/idct_mmx.c
===================================================================
--- libmpeg2/idct_mmx.c	(revision 1150)
+++ libmpeg2/idct_mmx.c	(working copy)
@@ -404,15 +404,15 @@
 #define T3 43790
 #define C4 23170
 
-    static const short _T1[] ATTR_ALIGN(8) = {T1,T1,T1,T1};
-    static const short _T2[] ATTR_ALIGN(8) = {T2,T2,T2,T2};
-    static const short _T3[] ATTR_ALIGN(8) = {T3,T3,T3,T3};
-    static const short _C4[] ATTR_ALIGN(8) = {C4,C4,C4,C4};
+    static const short t1_vector[] ATTR_ALIGN(8) = {T1,T1,T1,T1};
+    static const short t2_vector[] ATTR_ALIGN(8) = {T2,T2,T2,T2};
+    static const short t3_vector[] ATTR_ALIGN(8) = {T3,T3,T3,T3};
+    static const short c4_vector[] ATTR_ALIGN(8) = {C4,C4,C4,C4};
 
     /* column code adapted from peter gubanov */
     /* http://www.elecard.com/peter/idct.shtml */
 
-    movq_m2r (*_T1, mm0);		/* mm0 = T1 */
+    movq_m2r (*t1_vector, mm0);		/* mm0 = T1 */
 
     movq_m2r (*(col+offset+1*8), mm1);	/* mm1 = x1 */
     movq_r2r (mm0, mm2);		/* mm2 = T1 */
@@ -420,7 +420,7 @@
     movq_m2r (*(col+offset+7*8), mm4);	/* mm4 = x7 */
     pmulhw_r2r (mm1, mm0);		/* mm0 = T1*x1 */
 
-    movq_m2r (*_T3, mm5);		/* mm5 = T3 */
+    movq_m2r (*t3_vector, mm5);		/* mm5 = T3 */
     pmulhw_r2r (mm4, mm2);		/* mm2 = T1*x7 */
 
     movq_m2r (*(col+offset+5*8), mm6);	/* mm6 = x5 */
@@ -429,7 +429,7 @@
     movq_m2r (*(col+offset+3*8), mm3);	/* mm3 = x3 */
     psubsw_r2r (mm4, mm0);		/* mm0 = v17 */
 
-    movq_m2r (*_T2, mm4);		/* mm4 = T2 */
+    movq_m2r (*t2_vector, mm4);		/* mm4 = T2 */
     pmulhw_r2r (mm3, mm5);		/* mm5 = (T3-1)*x3 */
 
     paddsw_r2r (mm2, mm1);		/* mm1 = u17 */
@@ -467,7 +467,7 @@
     movq_m2r (*(col+offset+0*8), mm3);	/* mm3 = x0 */
     paddsw_r2r (mm5, mm1);		/* mm1 = u12+v12 */
 
-    movq_m2r (*_C4, mm0);		/* mm0 = C4/2 */
+    movq_m2r (*c4_vector, mm0);		/* mm0 = C4/2 */
     psubsw_r2r (mm5, mm7);		/* mm7 = u12-v12 */
 
     movq_r2m (mm6, *(col+offset+5*8));	/* save b0 in scratch1 */
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmpeg2-devel mailing list
Libmpeg2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmpeg2-devel

Reply via email to