summaryrefslogtreecommitdiff
path: root/multimedia/libmpeg3/patches/patch-ah
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/libmpeg3/patches/patch-ah')
-rw-r--r--multimedia/libmpeg3/patches/patch-ah98
1 files changed, 85 insertions, 13 deletions
diff --git a/multimedia/libmpeg3/patches/patch-ah b/multimedia/libmpeg3/patches/patch-ah
index 12035bb0083..c38ecdcab4f 100644
--- a/multimedia/libmpeg3/patches/patch-ah
+++ b/multimedia/libmpeg3/patches/patch-ah
@@ -1,8 +1,48 @@
-$NetBSD: patch-ah,v 1.1 2004/06/26 18:00:21 grant Exp $
+$NetBSD: patch-ah,v 1.2 2006/08/09 17:55:51 mrg Exp $
---- video/output.c.orig 2001-05-20 13:05:26.000000000 +1000
-+++ video/output.c 2003-07-29 00:53:45.000000000 +1000
-@@ -207,50 +207,50 @@
+--- video/output.c.orig 2001-05-19 20:05:26.000000000 -0700
++++ video/output.c 2006-08-09 10:39:35.000000000 -0700
+@@ -4,23 +4,29 @@
+
+ #define CLIP(x) ((x) >= 0 ? ((x) < 255 ? (x) : 255) : 0)
+
++#if defined(__GNUC__) && __GNUC__ > 3
++#define LMUSED __attribute__((__used__))
++#else
++#define LMUSED
++#endif
++
+ static long long mpeg3_MMX_0 = 0L;
+-static unsigned long mpeg3_MMX_10w[] = {0x00100010, 0x00100010}; /*dd 00010 0010h, 000100010h */
+-static unsigned long mpeg3_MMX_80w[] = {0x00800080, 0x00800080}; /*dd 00080 0080h, 000800080h */
++static unsigned long mpeg3_MMX_10w[] LMUSED = {0x00100010, 0x00100010}; /*dd 00010 0010h, 000100010h */
++static unsigned long mpeg3_MMX_80w[] LMUSED = {0x00800080, 0x00800080}; /*dd 00080 0080h, 000800080h */
+
+-static unsigned long mpeg3_MMX_00FFw[] = {0x00ff00ff, 0x00ff00ff}; /*dd 000FF 00FFh, 000FF00FFh */
++static unsigned long mpeg3_MMX_00FFw[] LMUSED = {0x00ff00ff, 0x00ff00ff}; /*dd 000FF 00FFh, 000FF00FFh */
+
+-static unsigned short mpeg3_MMX_Ublucoeff[] = {0x81, 0x81, 0x81, 0x81}; /*dd 00081 0081h, 000810081h */
+-static unsigned short mpeg3_MMX_Vredcoeff[] = {0x66, 0x66, 0x66, 0x66}; /*dd 00066 0066h, 000660066h */
++static unsigned short mpeg3_MMX_Ublucoeff[] LMUSED = {0x81, 0x81, 0x81, 0x81}; /*dd 00081 0081h, 000810081h */
++static unsigned short mpeg3_MMX_Vredcoeff[] LMUSED = {0x66, 0x66, 0x66, 0x66}; /*dd 00066 0066h, 000660066h */
+
+-static unsigned short mpeg3_MMX_Ugrncoeff[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; /*dd 0FFE7 FFE7h, 0FFE7FFE7h */
+-static unsigned short mpeg3_MMX_Vgrncoeff[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; /*dd 0FFCC FFCCh, 0FFCCFFCCh */
++static unsigned short mpeg3_MMX_Ugrncoeff[] LMUSED = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; /*dd 0FFE7 FFE7h, 0FFE7FFE7h */
++static unsigned short mpeg3_MMX_Vgrncoeff[] LMUSED = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; /*dd 0FFCC FFCCh, 0FFCCFFCCh */
+
+-static unsigned short mpeg3_MMX_Ycoeff[] = {0x4a, 0x4a, 0x4a, 0x4a}; /*dd 0004A 004Ah, 0004A004Ah */
++static unsigned short mpeg3_MMX_Ycoeff[] LMUSED = {0x4a, 0x4a, 0x4a, 0x4a}; /*dd 0004A 004Ah, 0004A004Ah */
+
+-static unsigned short mpeg3_MMX_redmask[] = {0xf800, 0xf800, 0xf800, 0xf800}; /*dd 07c00 7c00h, 07c007c00h */
++static unsigned short mpeg3_MMX_redmask[] LMUSED = {0xf800, 0xf800, 0xf800, 0xf800}; /*dd 07c00 7c00h, 07c007c00h */
+
+-static unsigned short mpeg3_MMX_grnmask[] = {0x7e0, 0x7e0, 0x7e0, 0x7e0}; /*dd 003e0 03e0h, 003e003e0h */
++static unsigned short mpeg3_MMX_grnmask[] LMUSED = {0x7e0, 0x7e0, 0x7e0, 0x7e0}; /*dd 003e0 03e0h, 003e003e0h */
+
+ static unsigned char mpeg3_601_to_rgb[256];
+
+@@ -207,50 +213,50 @@
);
}
@@ -12,12 +52,12 @@ $NetBSD: patch-ah,v 1.1 2004/06/26 18:00:21 grant Exp $
-static long long mpeg3_MMX_V_COEF = 0x00000000ffea006f;
-static long long mpeg3_MMX_601_Y_COEF = 0x0000004800480048;
-static long long mpeg3_MMX_601_Y_DIFF = 0x0000000000000010;
-+static unsigned long long mpeg3_MMX_U_80 = 0x0000008000800000LL;
-+static unsigned long long mpeg3_MMX_V_80 = 0x0000000000800080LL;
-+static long long mpeg3_MMX_U_COEF = 0x00000058ffd30000LL;
-+static long long mpeg3_MMX_V_COEF = 0x00000000ffea006fLL;
-+static long long mpeg3_MMX_601_Y_COEF = 0x0000004800480048LL;
-+static long long mpeg3_MMX_601_Y_DIFF = 0x0000000000000010LL;
++static unsigned long long mpeg3_MMX_U_80 LMUSED = 0x0000008000800000LL;
++static unsigned long long mpeg3_MMX_V_80 LMUSED = 0x0000000000800080LL;
++static long long mpeg3_MMX_U_COEF LMUSED = 0x00000058ffd30000LL;
++static long long mpeg3_MMX_V_COEF LMUSED = 0x00000000ffea006fLL;
++static long long mpeg3_MMX_601_Y_COEF LMUSED = 0x0000004800480048LL;
++static long long mpeg3_MMX_601_Y_DIFF LMUSED = 0x0000000000000010LL;
inline void mpeg3_bgra32_mmx(unsigned long y,
unsigned long u,
@@ -91,7 +131,7 @@ $NetBSD: patch-ah,v 1.1 2004/06/26 18:00:21 grant Exp $
"
:
: "r" (&y), "r" (&u), "r" (&v), "r" (output));
-@@ -261,39 +261,39 @@
+@@ -261,86 +267,86 @@
unsigned long v,
unsigned long *output)
{
@@ -164,7 +204,19 @@ $NetBSD: patch-ah,v 1.1 2004/06/26 18:00:21 grant Exp $
"
:
: "r" (&y), "r" (&u), "r" (&v), "r" (output));
-@@ -309,38 +309,38 @@
+ }
+
+-static unsigned long long mpeg3_MMX_U_80_RGB = 0x0000000000800080;
+-static unsigned long long mpeg3_MMX_V_80_RGB = 0x0000008000800000;
+-static long long mpeg3_MMX_U_COEF_RGB = 0x00000000ffd30058;
+-static long long mpeg3_MMX_V_COEF_RGB = 0x0000006fffea0000;
++static unsigned long long mpeg3_MMX_U_80_RGB LMUSED = 0x0000000000800080;
++static unsigned long long mpeg3_MMX_V_80_RGB LMUSED = 0x0000008000800000ULL;
++static long long mpeg3_MMX_U_COEF_RGB LMUSED = 0x00000000ffd30058;
++static long long mpeg3_MMX_V_COEF_RGB LMUSED = 0x0000006fffea0000ULL;
+
+ inline void mpeg3_rgba32_mmx(unsigned long y,
+ unsigned long u,
unsigned long v,
unsigned long *output)
{
@@ -235,7 +287,7 @@ $NetBSD: patch-ah,v 1.1 2004/06/26 18:00:21 grant Exp $
"
:
: "r" (&y), "r" (&v), "r" (&u), "r" (output));
-@@ -351,39 +351,39 @@
+@@ -351,39 +357,39 @@
unsigned long v,
unsigned long *output)
{
@@ -308,3 +360,23 @@ $NetBSD: patch-ah,v 1.1 2004/06/26 18:00:21 grant Exp $
"
:
: "r" (&y), "r" (&v), "r" (&u), "r" (output));
+@@ -482,11 +488,14 @@
+ *data++ = CLIP(r_l); \
+ *data++ = 0;
+
+-#define STORE_PIXEL_RGB565 \
+- *((unsigned short*)data)++ = \
+- ((CLIP(r_l) & 0xf8) << 8) | \
+- ((CLIP(g_l) & 0xfc) << 3) | \
+- ((CLIP(b_l) & 0xf8) >> 3);
++#define STORE_PIXEL_RGB565 { \
++ unsigned short *sdata = (unsigned short *)data; \
++ *((unsigned short*)sdata)++ = \
++ ((CLIP(r_l) & 0xf8) << 8) | \
++ ((CLIP(g_l) & 0xfc) << 3) | \
++ ((CLIP(b_l) & 0xf8) >> 3); \
++ data = (unsigned char *)sdata; \
++ }
+
+ #define STORE_PIXEL_RGB888 \
+ *data++ = CLIP(r_l); \