[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdemultimedia/mpeglib/lib/util/render/dither2YUV
From: Adrian Schroeter <adrian () suse ! de>
Date: 2003-08-25 6:34:04
[Download RAW message or body]
CVS commit by adrian:
fix compiler with gcc 3.3.1 and later. It optimise too much and drop
"unused" symbols, which are only used in asm calls.
M +19 -11 rgb2yuvdefs.h 1.2
--- kdemultimedia/mpeglib/lib/util/render/dither2YUV/rgb2yuvdefs.h #1.1:1.2
@@ -19,4 +19,12 @@
#define __RGB2YUVDEFS_H
+/* gcc 3.3.1 and later optimise the "not used" (only in asm code)
+ symbols away. So we need to mark them as used. */
+#if __GNUC_PREREQ (3,1)
+# define __attribute_used__ __attribute__ ((__used__))
+#else
+# define __attribute_used__
+#endif
+
// hicolor mode (16 bit) with r(5) g(6) b(5) bits (reverse order b, g, r)
#define RED(rgb) (unsigned char) ((rgb) << 3)
@@ -41,19 +49,19 @@
#define V_RGB(R,G,B) ((( V_R * (R) + V_G * (G) + V_B * (B)) >> YUV_SHIFT) + 128)
-static unsigned char CLEARX[8] = { 255, 0, 255, 0, 255, 0, 255, 0 };
-static short ZEROSX[4] = { 0, 0, 0, 0 };
+static unsigned char __attribute_used__ CLEARX[8] = { 255, 0, 255, 0, 255, 0, 255, 0 };
+static short __attribute_used__ ZEROSX[4] = { 0, 0, 0, 0 };
-static short OFFSETDX[4] = { 0, 64, 0, 64 };
-static short OFFSETWX[4] = { 128, 0, 128, 0 };
-static short OFFSETBX[4] = { 128, 128, 128, 128 };
+static short __attribute_used__ OFFSETDX[4] = { 0, 64, 0, 64 };
+static short __attribute_used__ OFFSETWX[4] = { 128, 0, 128, 0 };
+static short __attribute_used__ OFFSETBX[4] = { 128, 128, 128, 128 };
-static short YR0GRX[4] = { Y_R, Y_G, 0, Y_R };
-static short YBG0BX[4] = { Y_B, 0, Y_G, Y_B };
+static short __attribute_used__ YR0GRX[4] = { Y_R, Y_G, 0, Y_R };
+static short __attribute_used__ YBG0BX[4] = { Y_B, 0, Y_G, Y_B };
-static short UR0GRX[4] = { U_R, U_G, 0, U_R };
-static short UBG0BX[4] = { U_B, 0, U_G, U_B };
+static short __attribute_used__ UR0GRX[4] = { U_R, U_G, 0, U_R };
+static short __attribute_used__ UBG0BX[4] = { U_B, 0, U_G, U_B };
-static short VR0GRX[4] = { V_R, V_G, 0, V_R };
-static short VBG0BX[4] = { V_B, 0, V_G, V_B };
+static short __attribute_used__ VR0GRX[4] = { V_R, V_G, 0, V_R };
+static short __attribute_used__ VBG0BX[4] = { V_B, 0, V_G, V_B };
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic