summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/libmpeg3/Makefile33
-rw-r--r--multimedia/libmpeg3/PLIST4
-rw-r--r--multimedia/libmpeg3/buildlink3.mk4
-rw-r--r--multimedia/libmpeg3/distinfo20
-rw-r--r--multimedia/libmpeg3/patches/patch-aa71
-rw-r--r--multimedia/libmpeg3/patches/patch-ab17
-rw-r--r--multimedia/libmpeg3/patches/patch-ac19
-rw-r--r--multimedia/libmpeg3/patches/patch-ae29
-rw-r--r--multimedia/libmpeg3/patches/patch-af39
-rw-r--r--multimedia/libmpeg3/patches/patch-ah400
-rw-r--r--multimedia/libmpeg3/patches/patch-ai28
11 files changed, 132 insertions, 532 deletions
diff --git a/multimedia/libmpeg3/Makefile b/multimedia/libmpeg3/Makefile
index bedd3280aef..d9b87b133f2 100644
--- a/multimedia/libmpeg3/Makefile
+++ b/multimedia/libmpeg3/Makefile
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile,v 1.8 2006/03/04 21:30:15 jlam Exp $
+# $NetBSD: Makefile,v 1.9 2008/02/20 09:56:44 xtraeme Exp $
#
-DISTNAME= libmpeg3-1.3
-PKGREVISION= 6
+DISTNAME= libmpeg3-1.7-src
+PKGNAME= ${DISTNAME:S/-src//}
+#PKGREVISION= 1
CATEGORIES= devel audio graphics multimedia
-MASTER_SITES= http://heroines.sourceforge.net/
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=heroines/}
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://heroines.sourceforge.net/libmpeg3.php3
@@ -13,21 +15,23 @@ COMMENT= MPEG decoding library
.include "../../mk/bsd.prefs.mk"
.if (${MACHINE_ARCH} == "i386")
+MAKE_ENV+= USE_MMX=1
+MAKE_ENV+= USE_CSS=1
BUILD_DEPENDS+= nasm-[0-9]*:../../devel/nasm
.else
-CONFIGURE_ARGS+= --no-mmx --no-css
+. if ${OPSYS} == "DragonFly"
+MAKE_ENV+= USE_MMX=0
+MAKE_ENV+= USE_CSS=0
+. endif
.endif
-.if ${OPSYS} == "DragonFly"
-CONFIGURE_ARGS+= --no-css
-.endif
-
-HAS_CONFIGURE= yes
+NO_CONFIGURE= yes
USE_TOOLS+= gmake
+WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
ONLY_FOR_COMPILER= gcc
-
-PTHREAD_OPTS+= require
+PTHREAD_AUTO_VARS= yes
+PTHREAD_OPTS+= require
post-configure:
${ECHO} "CFLAGS+=-O2" >>${WRKSRC}/global_config
@@ -39,12 +43,11 @@ INSTHDRS= bitstream.h libmpeg3.h mpeg3atrack.h mpeg3css.h \
mpeg3private.inc mpeg3title.h mpeg3vtrack.h timecode.h
AINSTHDRS= ac3.h mpeg3audio.h
VINSTHDRS= idct.h mpeg3video.h slice.h
-INSTBINS= mpeg3cat mpeg3toc mpeg3split
+INSTBINS= mpeg3cat mpeg3peek mpeg3toc mpeg3dump
INSTALLATION_DIRS= bin lib
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/work/dump ${PREFIX}/bin/mpeg3dump
for f in ${INSTBINS}; do \
${INSTALL_PROGRAM} ${WRKSRC}/work/$$f ${PREFIX}/bin; \
done
@@ -62,7 +65,7 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/video/$$f \
${PREFIX}/include/mpeg3/video; \
done
- ${INSTALL_DATA} ${WRKSRC}/work/libmpeg3.a ${PREFIX}/lib
+ ${INSTALL_LIB} ${WRKSRC}/work/libmpeg3.a ${PREFIX}/lib
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/libmpeg3
${INSTALL_DATA} ${WRKSRC}/docs/index.html \
${PREFIX}/share/doc/html/libmpeg3
diff --git a/multimedia/libmpeg3/PLIST b/multimedia/libmpeg3/PLIST
index c29f778ce9e..6c0d3042fac 100644
--- a/multimedia/libmpeg3/PLIST
+++ b/multimedia/libmpeg3/PLIST
@@ -1,7 +1,7 @@
-@comment $NetBSD: PLIST,v 1.2 2005/07/13 13:17:03 wiz Exp $
+@comment $NetBSD: PLIST,v 1.3 2008/02/20 09:56:44 xtraeme Exp $
bin/mpeg3cat
bin/mpeg3dump
-bin/mpeg3split
+bin/mpeg3peek
bin/mpeg3toc
include/mpeg3/audio/ac3.h
include/mpeg3/audio/mpeg3audio.h
diff --git a/multimedia/libmpeg3/buildlink3.mk b/multimedia/libmpeg3/buildlink3.mk
index 16dcddbe31e..88b4c29aefd 100644
--- a/multimedia/libmpeg3/buildlink3.mk
+++ b/multimedia/libmpeg3/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.6 2006/07/08 23:11:02 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.7 2008/02/20 09:56:44 xtraeme Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
LIBMPEG3_BUILDLINK3_MK:= ${LIBMPEG3_BUILDLINK3_MK}+
@@ -14,7 +14,7 @@ BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libmpeg3
.if !empty(LIBMPEG3_BUILDLINK3_MK:M+)
BUILDLINK_API_DEPENDS.libmpeg3+= libmpeg3>=1.3nb4
BUILDLINK_ABI_DEPENDS.libmpeg3?= libmpeg3>=1.3nb6
-BUILDLINK_PKGSRCDIR.libmpeg3?= ../../multimedia/libmpeg3
+BUILDLINK_PKGSRCDIR.libmpeg3?= ../../multimedia/libmpeg3
.endif # LIBMPEG3_BUILDLINK3_MK
.include "../../mk/pthread.buildlink3.mk"
diff --git a/multimedia/libmpeg3/distinfo b/multimedia/libmpeg3/distinfo
index 18fc1c6970d..bf3ed9cd8d2 100644
--- a/multimedia/libmpeg3/distinfo
+++ b/multimedia/libmpeg3/distinfo
@@ -1,14 +1,12 @@
-$NetBSD: distinfo,v 1.10 2006/08/09 17:55:51 mrg Exp $
+$NetBSD: distinfo,v 1.11 2008/02/20 09:56:44 xtraeme Exp $
-SHA1 (libmpeg3-1.3.tar.gz) = e7e8b03ab45d5593558b0d19e31f0694cfdfa2b5
-RMD160 (libmpeg3-1.3.tar.gz) = b1751f681d26758873746aa38368150eb0a4bafd
-Size (libmpeg3-1.3.tar.gz) = 154062 bytes
-SHA1 (patch-aa) = 65ce6f7bddb393a9c051a030bd8e9c3a9d791dd1
-SHA1 (patch-ab) = 3223b9f7d81dd73eec6767f9e1bb2cb26b4bcd80
-SHA1 (patch-ac) = 68576efb30a0d6f4cfe23fd543a04c4f3ada8936
+SHA1 (libmpeg3-1.7-src.tar.bz2) = 577da1ddf77f1e1fcd1deb69829eec3567daed36
+RMD160 (libmpeg3-1.7-src.tar.bz2) = f1989c4b52d97ee29833edc79efd731b6219f126
+Size (libmpeg3-1.7-src.tar.bz2) = 320897 bytes
+SHA1 (patch-aa) = c05dfda5b2b43593044af2328244858453add46c
+SHA1 (patch-ac) = f83af5e90c93f7d02395923d2f93fb916057c434
SHA1 (patch-ad) = 86edf9af264370bf89050b02e956b5bacc86881e
-SHA1 (patch-ae) = 5418e29f4f5c30f235cfb075d99c0022d0ad2394
-SHA1 (patch-af) = 9965dda181ebc73aae4d975dc09d071036b81352
+SHA1 (patch-ae) = 4a9034c2fc0e424b8426aa4015f4910beb5a8406
SHA1 (patch-ag) = bf321ac689b82889ca1a2bb8a96cb6e387280f32
-SHA1 (patch-ah) = 72c4f133ef9e6f3e55144bb75766ec7988351caf
-SHA1 (patch-ai) = 5f2aeff3558ddbc28e276dd827c32ad4757f9995
+SHA1 (patch-ah) = 265b70c9f785b2ce80aec17d73f4e9719f71edba
+SHA1 (patch-ai) = 859735f677cb469b782e27da2a14bacd3fd02003
diff --git a/multimedia/libmpeg3/patches/patch-aa b/multimedia/libmpeg3/patches/patch-aa
index 71d50384cec..22139805d1f 100644
--- a/multimedia/libmpeg3/patches/patch-aa
+++ b/multimedia/libmpeg3/patches/patch-aa
@@ -1,47 +1,54 @@
-$NetBSD: patch-aa,v 1.3 2006/04/19 17:03:26 wiz Exp $
+$NetBSD: patch-aa,v 1.4 2008/02/20 09:56:44 xtraeme Exp $
---- Makefile.orig 2001-05-20 05:05:26.000000000 +0200
-+++ Makefile
-@@ -2,12 +2,7 @@ include global_config
+--- Makefile.orig 2006-02-15 06:09:31.000000000 +0100
++++ Makefile 2008-02-19 19:35:28.000000000 +0100
+@@ -1,7 +1,7 @@
+ CC = gcc
+ NASM = nasm
+-USE_MMX = 0
+-USE_CSS = 1
++#USE_MMX = 0
++#USE_CSS = 1
+ A52DIR := $(shell expr a52dec* )
- CFLAGS +=
--OBJDIR = $(shell uname --machine)
--
--$(shell sh -c 'if ! test -d $(OBJDIR)\; then \
-- mkdir $(OBJDIR)\; \
-- mkdir $(OBJDIR)/audio\; \
-- mkdir $(OBJDIR)/video\; fi' )
+@@ -16,7 +16,7 @@
+ endif
+
+
+-OBJDIR := $(shell uname --machine)
+OBJDIR = work
- ifeq ($(OBJDIR), alpha)
- USE_MMX = 0
-@@ -69,11 +64,16 @@ OBJS = \
- OUTPUT = $(OBJDIR)/libmpeg3.a
- UTILS = $(OBJDIR)/dump $(OBJDIR)/mpeg3cat $(OBJDIR)/mpeg3toc $(OBJDIR)/mpeg3split
+
+@@ -147,19 +147,19 @@
+ #$(OBJDIR)/mpeg3split
+
+
-LIBS = -lm -lpthread
+LIBS = -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lm ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
-+
-+all: prepare $(OUTPUT) util
++all: prepare $(OUTPUT) $(UTILS)
--all: $(OUTPUT) util
+-$(shell if ! test -d $(OBJDIR) \; then mkdir -p $(OBJDIR) \; fi )
+prepare:
+ mkdir -p $(OBJDIR)
+ mkdir -p $(OBJDIR)/audio
+ mkdir -p $(OBJDIR)/video
++ echo $(CFLAGS) > $(OBJDIR)/c_flags
++ echo $(A52CFLAGS) > $(OBJDIR)/a52_flags
++ echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs
++ mkdir -p $(DIRS)
+
+-$(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
+-$(shell echo $(A52CFLAGS) > $(OBJDIR)/a52_flags)
+-$(shell echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs)
+-$(shell mkdir -p $(DIRS) )
+-
+-all: $(OUTPUT) $(UTILS)
+-
+-
+-$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS)
++$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS) prepare
+ ar rcs $(OUTPUT) `cat $(OBJDIR)/objs`
--$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS)
-+$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) prepare
- ar rcs $(OUTPUT) $(OBJS) $(ASMOBJS) $(NASMOBJS)
-
- $(OBJDIR)/dump: $(OBJDIR)/dump.o $(OUTPUT)
-@@ -88,7 +88,7 @@ $(OBJDIR)/mpeg3toc: $(OBJDIR)/mpeg3toc.o
- $(OBJDIR)/mpeg3split: $(OBJDIR)/mpeg3split.o $(OUTPUT)
- $(CC) -o $(OBJDIR)/mpeg3split $(OBJDIR)/mpeg3split.o $(OUTPUT) $(LIBS)
-
--util: $(UTILS)
-+util: $(UTILS) prepare
- clean:
- find \( -name core \
diff --git a/multimedia/libmpeg3/patches/patch-ab b/multimedia/libmpeg3/patches/patch-ab
deleted file mode 100644
index b04eb8c58b4..00000000000
--- a/multimedia/libmpeg3/patches/patch-ab
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2005/10/29 01:43:18 grant Exp $
-
---- mpeg3css.c.orig 2001-05-20 13:05:26.000000000 +1000
-+++ mpeg3css.c
-@@ -45,7 +45,11 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/types.h>
--#include <linux/cdrom.h>
-+#ifdef __linux__
-+# include <linux/cdrom.h>
-+#else
-+# include <sys/dvdio.h>
-+#endif
-
- #ifndef FIBMAP
- #define FIBMAP _IO(0x00,1) /* bmap access */
diff --git a/multimedia/libmpeg3/patches/patch-ac b/multimedia/libmpeg3/patches/patch-ac
index af58881aaba..5570a0d0fc1 100644
--- a/multimedia/libmpeg3/patches/patch-ac
+++ b/multimedia/libmpeg3/patches/patch-ac
@@ -1,14 +1,15 @@
-$NetBSD: patch-ac,v 1.3 2005/07/13 13:16:36 wiz Exp $
+$NetBSD: patch-ac,v 1.4 2008/02/20 09:56:44 xtraeme Exp $
---- mpeg3ifo.c.orig 2001-05-20 05:05:26.000000000 +0200
-+++ mpeg3ifo.c
-@@ -1,10 +1,26 @@
+--- mpeg3ifo.c.orig 2008-02-19 19:14:12.000000000 +0100
++++ mpeg3ifo.c 2008-02-19 19:14:46.000000000 +0100
+@@ -1,4 +1,3 @@
-#include <byteswap.h>
#include <dirent.h>
#include <fcntl.h>
#include <stdlib.h>
- #include <string.h>
- #include <sys/types.h>
+@@ -10,6 +9,23 @@
+ #include "mpeg3private.h"
+ #include "mpeg3protos.h"
+#if defined(__NetBSD__)
+# include <sys/endian.h>
@@ -27,6 +28,6 @@ $NetBSD: patch-ac,v 1.3 2005/07/13 13:16:36 wiz Exp $
+# define bswap_32(x) OSSwapInt32(x)
+#endif
+
- #include "ifo.h"
- #include "mpeg3private.h"
- #include "mpeg3protos.h"
+ typedef struct
+ {
+ // Bytes relative to start of stream.
diff --git a/multimedia/libmpeg3/patches/patch-ae b/multimedia/libmpeg3/patches/patch-ae
index 106856e6de0..bda4b3fc3e2 100644
--- a/multimedia/libmpeg3/patches/patch-ae
+++ b/multimedia/libmpeg3/patches/patch-ae
@@ -1,18 +1,25 @@
-$NetBSD: patch-ae,v 1.6 2005/12/06 17:47:56 joerg Exp $
+$NetBSD: patch-ae,v 1.7 2008/02/20 09:56:44 xtraeme Exp $
---- mpeg3io.c.orig 2001-05-20 13:05:26.000000000 +1000
-+++ mpeg3io.c
-@@ -1,8 +1,21 @@
+--- mpeg3io.c.orig 2005-05-01 07:57:56.000000000 +0200
++++ mpeg3io.c 2008-02-19 19:25:09.000000000 +0100
+@@ -1,11 +1,27 @@
#include "mpeg3private.h"
#include "mpeg3protos.h"
-#include <mntent.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
-#include <sys/stat.h>
++
+#if defined(__NetBSD__) || defined(__DragonFly__)
+# include <sys/param.h>
+# include <sys/mount.h>
+
+# if defined(__NetBSD__) && __NetBSD_Version__ >= 299000900 /* 2.99.9 */
++# define fopen64 fopen
++# define fseeko64 fseek
++# define stat64 stat
+# define statfs statvfs
+# endif
+
@@ -22,11 +29,10 @@ $NetBSD: patch-ae,v 1.6 2005/12/06 17:47:56 joerg Exp $
+# include <mntent.h>
+# include <sys/stat.h>
+#endif
-+
- #include <stdlib.h>
- #include <string.h>
-@@ -88,16 +101,25 @@ int mpeg3io_read_data(unsigned char *buf
+ mpeg3_fs_t* mpeg3_new_fs(char *path)
+ {
+@@ -215,16 +231,26 @@
int mpeg3io_device(char *path, char *device)
{
@@ -35,11 +41,12 @@ $NetBSD: patch-ae,v 1.6 2005/12/06 17:47:56 joerg Exp $
+
+ if (statfs(path, &file_st) < 0)
+#else
- struct stat file_st, device_st;
++
+ struct stat64 file_st, device_st;
struct mntent *mnt;
FILE *fp;
- if(stat(path, &file_st) < 0)
+ if(stat64(path, &file_st) < 0)
+#endif
{
perror("mpeg3io_device");
@@ -52,7 +59,7 @@ $NetBSD: patch-ae,v 1.6 2005/12/06 17:47:56 joerg Exp $
fp = setmntent(MOUNTED, "r");
while(fp && (mnt = getmntent(fp)))
{
-@@ -109,6 +131,7 @@ int mpeg3io_device(char *path, char *dev
+@@ -236,6 +262,7 @@
}
}
endmntent(fp);
diff --git a/multimedia/libmpeg3/patches/patch-af b/multimedia/libmpeg3/patches/patch-af
deleted file mode 100644
index f05ba1cd9f7..00000000000
--- a/multimedia/libmpeg3/patches/patch-af
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD: patch-af,v 1.2 2006/08/09 17:55:51 mrg Exp $
-
---- video/reconstruct.c.orig 2001-05-19 20:05:26.000000000 -0700
-+++ video/reconstruct.c 2006-08-09 10:43:50.000000000 -0700
-@@ -270,8 +270,14 @@
- }
-
- #else // HAVE_3DNOW
-- static long long ADD_1 = 0x0101010101010101LL;
-- static long long MASK_AND = 0x7f7f7f7f7f7f7f7fLL;
-+#if defined(__GNUC__) && __GNUC__ > 3
-+#define LMUSED __attribute__((__used__))
-+#else
-+#define LMUSED
-+#endif
-+
-+ static long long ADD_1 LMUSED = 0x0101010101010101LL;
-+ static long long MASK_AND LMUSED = 0x7f7f7f7f7f7f7f7fLL;
- #endif
-
- static inline void rec_mmx(unsigned char *s, unsigned char *d, int lx2, int h)
-@@ -572,7 +578,7 @@
- }
- }
-
--static inline void recv(unsigned char *s, unsigned char *d, int lx, int lx2, int h)
-+static inline void xxrecv(unsigned char *s, unsigned char *d, int lx, int lx2, int h)
- {
- unsigned char *dp,*sp,*sp2;
- int j;
-@@ -971,7 +977,7 @@
- case 0x0: recc(s, d, lx2, h); break;
- case 0x7: recva(s, d, lx, lx2, h); break;
- case 0x6: recvac(s, d, lx, lx2, h); break;
-- case 0x5: recv(s, d, lx, lx2, h); break;
-+ case 0x5: xxrecv(s, d, lx, lx2, h); break;
- case 0x4: recvc(s, d, lx, lx2, h); break;
- case 0x9: rech(s, d, lx2, h); break;
- case 0x8: rechc(s, d, lx2, h); break;
diff --git a/multimedia/libmpeg3/patches/patch-ah b/multimedia/libmpeg3/patches/patch-ah
index c38ecdcab4f..ec968b20a02 100644
--- a/multimedia/libmpeg3/patches/patch-ah
+++ b/multimedia/libmpeg3/patches/patch-ah
@@ -1,382 +1,28 @@
-$NetBSD: patch-ah,v 1.2 2006/08/09 17:55:51 mrg Exp $
+$NetBSD: patch-ah,v 1.3 2008/02/20 09:56:44 xtraeme Exp $
---- 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__))
+--- mpeg3tocutil.c.orig 2008-02-19 19:21:30.000000000 +0100
++++ mpeg3tocutil.c 2008-02-19 19:22:41.000000000 +0100
+@@ -5,8 +5,21 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <sys/stat.h>
+-
++#if defined(__NetBSD__) || defined(__DragonFly__)
++# include <sys/param.h>
++# include <sys/mount.h>
++
++# if defined(__NetBSD__) && __NetBSD_Version__ >= 299000900 /* 2.99.9 */
++# define stat64 stat
++# define statfs statvfs
++# endif
++
++# include <sys/types.h>
++# include <sys/stat.h>
+#else
-+#define LMUSED
++# include <mntent.h>
++# include <sys/stat.h>
+#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 @@
- );
- }
-
--static unsigned long long mpeg3_MMX_U_80 = 0x0000008000800000;
--static unsigned long long mpeg3_MMX_V_80 = 0x0000000000800080;
--static long long mpeg3_MMX_U_COEF = 0x00000058ffd30000;
--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 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,
- unsigned long v,
- unsigned long *output)
- {
--asm("
--/* Output will be 0x00rrggbb with the 00 trailing so this can also be used */
--/* for bgr24. */
-- movd (%0), %%mm0; /* Load y 0x00000000000000yy */
-- movd (%1), %%mm1; /* Load u 0x00000000000000cr */
-- movq %%mm0, %%mm3; /* Copy y to temp */
-- psllq $16, %%mm1; /* Shift u 0x0000000000cr0000 */
-- movd (%2), %%mm2; /* Load v 0x00000000000000cb */
-- psllq $16, %%mm3; /* Shift y */
-- movq %%mm1, %%mm4; /* Copy u to temp */
-- por %%mm3, %%mm0; /* Overlay new y byte 0x0000000000yy00yy */
-- psllq $16, %%mm4; /* Shift u */
-- movq %%mm2, %%mm5; /* Copy v to temp */
-- psllq $16, %%mm3; /* Shift y */
-- por %%mm4, %%mm1; /* Overlay new u byte 0x000000cr00cr0000 */
-- psllq $16, %%mm5; /* Shift v */
-- por %%mm3, %%mm0; /* Overlay new y byte 0x000000yy00yy00yy */
-- por %%mm5, %%mm2; /* Overlay new v byte 0x0000000000cb00cb */
--
--/* mm0: 0x000000yy00yy00yy mm1: 0x000000uu00uu0000 mm2: 0x0000000000vv00vv */
-- psubw mpeg3_MMX_U_80, %%mm1; /* Subtract 128 from u 0x000000uu00uu0000 */
-- pmullw mpeg3_MMX_U_COEF, %%mm1; /* Multiply u coeffs 0x0000uuuuuuuu0000 */
-- psllw $6, %%mm0; /* Shift y coeffs 0x0000yyy0yyy0yyy0 */
-- psubw mpeg3_MMX_V_80, %%mm2; /* Subtract 128 from v 0x0000000000cb00cb */
-- pmullw mpeg3_MMX_V_COEF, %%mm2; /* Multiply v coeffs 0x0000crcrcrcrcrcr */
--
--/* mm0: 0x000000yy00yy00yy mm1: 0x0000uuuuuuuu0000 mm2: 0x00000000vvvvvvvv */
-- paddsw %%mm1, %%mm0; /* Add u to result */
-- paddsw %%mm2, %%mm0; /* Add v to result 0x0000rrrrggggbbbb */
-- psraw $6, %%mm0; /* Demote precision */
-- packuswb %%mm0, %%mm0; /* Pack into ARGB 0x0000000000rrggbb */
-- movd %%mm0, (%3); /* Store output */
-+asm("\n\
-+/* Output will be 0x00rrggbb with the 00 trailing so this can also be used */\n\
-+/* for bgr24. */\n\
-+ movd (%0), %%mm0; /* Load y 0x00000000000000yy */\n\
-+ movd (%1), %%mm1; /* Load u 0x00000000000000cr */\n\
-+ movq %%mm0, %%mm3; /* Copy y to temp */\n\
-+ psllq $16, %%mm1; /* Shift u 0x0000000000cr0000 */\n\
-+ movd (%2), %%mm2; /* Load v 0x00000000000000cb */\n\
-+ psllq $16, %%mm3; /* Shift y */\n\
-+ movq %%mm1, %%mm4; /* Copy u to temp */\n\
-+ por %%mm3, %%mm0; /* Overlay new y byte 0x0000000000yy00yy */\n\
-+ psllq $16, %%mm4; /* Shift u */\n\
-+ movq %%mm2, %%mm5; /* Copy v to temp */\n\
-+ psllq $16, %%mm3; /* Shift y */\n\
-+ por %%mm4, %%mm1; /* Overlay new u byte 0x000000cr00cr0000 */\n\
-+ psllq $16, %%mm5; /* Shift v */\n\
-+ por %%mm3, %%mm0; /* Overlay new y byte 0x000000yy00yy00yy */\n\
-+ por %%mm5, %%mm2; /* Overlay new v byte 0x0000000000cb00cb */\n\
-+\n\
-+/* mm0: 0x000000yy00yy00yy mm1: 0x000000uu00uu0000 mm2: 0x0000000000vv00vv */\n\
-+ psubw mpeg3_MMX_U_80, %%mm1; /* Subtract 128 from u 0x000000uu00uu0000 */\n\
-+ pmullw mpeg3_MMX_U_COEF, %%mm1; /* Multiply u coeffs 0x0000uuuuuuuu0000 */\n\
-+ psllw $6, %%mm0; /* Shift y coeffs 0x0000yyy0yyy0yyy0 */\n\
-+ psubw mpeg3_MMX_V_80, %%mm2; /* Subtract 128 from v 0x0000000000cb00cb */\n\
-+ pmullw mpeg3_MMX_V_COEF, %%mm2; /* Multiply v coeffs 0x0000crcrcrcrcrcr */\n\
-+\n\
-+/* mm0: 0x000000yy00yy00yy mm1: 0x0000uuuuuuuu0000 mm2: 0x00000000vvvvvvvv */\n\
-+ paddsw %%mm1, %%mm0; /* Add u to result */\n\
-+ paddsw %%mm2, %%mm0; /* Add v to result 0x0000rrrrggggbbbb */\n\
-+ psraw $6, %%mm0; /* Demote precision */\n\
-+ packuswb %%mm0, %%mm0; /* Pack into ARGB 0x0000000000rrggbb */\n\
-+ movd %%mm0, (%3); /* Store output */\n\
- "
- :
- : "r" (&y), "r" (&u), "r" (&v), "r" (output));
-@@ -261,86 +267,86 @@
- unsigned long v,
- unsigned long *output)
- {
--asm("
--/* Output will be 0x00rrggbb with the 00 trailing so this can also be used */
--/* for bgr24. */
-- movd (%0), %%mm0; /* Load y 0x00000000000000yy */
-- psubsw mpeg3_MMX_601_Y_DIFF, %%mm0; /* Subtract 16 from y */
-- movd (%1), %%mm1; /* Load u 0x00000000000000cr */
-- movq %%mm0, %%mm3; /* Copy y to temp */
-- psllq $16, %%mm1; /* Shift u 0x0000000000cr0000 */
-- movd (%2), %%mm2; /* Load v 0x00000000000000cb */
-- psllq $16, %%mm3; /* Shift y */
-- movq %%mm1, %%mm4; /* Copy u to temp */
-- por %%mm3, %%mm0; /* Overlay new y byte 0x0000000000yy00yy */
-- psllq $16, %%mm4; /* Shift u */
-- movq %%mm2, %%mm5; /* Copy v to temp */
-- psllq $16, %%mm3; /* Shift y */
-- por %%mm4, %%mm1; /* Overlay new u byte 0x000000cr00cr0000 */
-- psllq $16, %%mm5; /* Shift v */
-- por %%mm3, %%mm0; /* Overlay new y byte 0x000000yy00yy00yy */
-- por %%mm5, %%mm2; /* Overlay new v byte 0x0000000000cb00cb */
--
--/* mm0: 0x000000yy00yy00yy mm1: 0x000000uu00uu0000 mm2: 0x0000000000vv00vv */
-- pmullw mpeg3_MMX_601_Y_COEF, %%mm0; /* Scale and shift y coeffs */
-- psubw mpeg3_MMX_U_80, %%mm1; /* Subtract 128 from u 0x000000uu00uu0000 */
-- pmullw mpeg3_MMX_U_COEF, %%mm1; /* Multiply u coeffs 0x0000uuuuuuuu0000 */
-- psubw mpeg3_MMX_V_80, %%mm2; /* Subtract 128 from v 0x0000000000cb00cb */
-- pmullw mpeg3_MMX_V_COEF, %%mm2; /* Multiply v coeffs 0x0000crcrcrcrcrcr */
--
--/* mm0: 0x000000yy00yy00yy mm1: 0x0000uuuuuuuu0000 mm2: 0x00000000vvvvvvvv */
-- paddsw %%mm1, %%mm0; /* Add u to result */
-- paddsw %%mm2, %%mm0; /* Add v to result 0x0000rrrrggggbbbb */
-- psraw $6, %%mm0; /* Demote precision */
-- packuswb %%mm0, %%mm0; /* Pack into ARGB 0x0000000000rrggbb */
-- movd %%mm0, (%3); /* Store output */
-+asm("\n\
-+/* Output will be 0x00rrggbb with the 00 trailing so this can also be used */\n\
-+/* for bgr24. */\n\
-+ movd (%0), %%mm0; /* Load y 0x00000000000000yy */\n\
-+ psubsw mpeg3_MMX_601_Y_DIFF, %%mm0; /* Subtract 16 from y */\n\
-+ movd (%1), %%mm1; /* Load u 0x00000000000000cr */\n\
-+ movq %%mm0, %%mm3; /* Copy y to temp */\n\
-+ psllq $16, %%mm1; /* Shift u 0x0000000000cr0000 */\n\
-+ movd (%2), %%mm2; /* Load v 0x00000000000000cb */\n\
-+ psllq $16, %%mm3; /* Shift y */\n\
-+ movq %%mm1, %%mm4; /* Copy u to temp */\n\
-+ por %%mm3, %%mm0; /* Overlay new y byte 0x0000000000yy00yy */\n\
-+ psllq $16, %%mm4; /* Shift u */\n\
-+ movq %%mm2, %%mm5; /* Copy v to temp */\n\
-+ psllq $16, %%mm3; /* Shift y */\n\
-+ por %%mm4, %%mm1; /* Overlay new u byte 0x000000cr00cr0000 */\n\
-+ psllq $16, %%mm5; /* Shift v */\n\
-+ por %%mm3, %%mm0; /* Overlay new y byte 0x000000yy00yy00yy */\n\
-+ por %%mm5, %%mm2; /* Overlay new v byte 0x0000000000cb00cb */\n\
-+\n\
-+/* mm0: 0x000000yy00yy00yy mm1: 0x000000uu00uu0000 mm2: 0x0000000000vv00vv */\n\
-+ pmullw mpeg3_MMX_601_Y_COEF, %%mm0; /* Scale and shift y coeffs */\n\
-+ psubw mpeg3_MMX_U_80, %%mm1; /* Subtract 128 from u 0x000000uu00uu0000 */\n\
-+ pmullw mpeg3_MMX_U_COEF, %%mm1; /* Multiply u coeffs 0x0000uuuuuuuu0000 */\n\
-+ psubw mpeg3_MMX_V_80, %%mm2; /* Subtract 128 from v 0x0000000000cb00cb */\n\
-+ pmullw mpeg3_MMX_V_COEF, %%mm2; /* Multiply v coeffs 0x0000crcrcrcrcrcr */\n\
-+\n\
-+/* mm0: 0x000000yy00yy00yy mm1: 0x0000uuuuuuuu0000 mm2: 0x00000000vvvvvvvv */\n\
-+ paddsw %%mm1, %%mm0; /* Add u to result */\n\
-+ paddsw %%mm2, %%mm0; /* Add v to result 0x0000rrrrggggbbbb */\n\
-+ psraw $6, %%mm0; /* Demote precision */\n\
-+ packuswb %%mm0, %%mm0; /* Pack into ARGB 0x0000000000rrggbb */\n\
-+ movd %%mm0, (%3); /* Store output */\n\
- "
- :
- : "r" (&y), "r" (&u), "r" (&v), "r" (output));
- }
-
--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)
- {
--asm("
--/* Output will be 0x00bbggrr with the 00 trailing so this can also be used */
--/* for rgb24. */
-- movd (%0), %%mm0; /* Load y 0x00000000000000yy */
-- movd (%1), %%mm1; /* Load v 0x00000000000000vv */
-- movq %%mm0, %%mm3; /* Copy y to temp */
-- psllq $16, %%mm1; /* Shift v 0x0000000000vv0000 */
-- movd (%2), %%mm2; /* Load u 0x00000000000000uu */
-- psllq $16, %%mm3; /* Shift y */
-- movq %%mm1, %%mm4; /* Copy v to temp */
-- por %%mm3, %%mm0; /* Overlay new y byte 0x0000000000yy00yy */
-- psllq $16, %%mm4; /* Shift v */
-- movq %%mm2, %%mm5; /* Copy u to temp */
-- psllq $16, %%mm3; /* Shift y */
-- por %%mm4, %%mm1; /* Overlay new v byte 0x000000vv00vv0000 */
-- psllq $16, %%mm5; /* Shift u */
-- por %%mm3, %%mm0; /* Overlay new y byte 0x000000yy00yy00yy */
-- por %%mm5, %%mm2; /* Overlay new u byte 0x0000000000uu00uu */
--
--/* mm0: 0x000000yy00yy00yy mm1: 0x000000vv00vv0000 mm2: 0x0000000000uu00uu */
-- psubw mpeg3_MMX_V_80_RGB, %%mm1; /* Subtract 128 from v 0x000000vv00vv0000 */
-- pmullw mpeg3_MMX_V_COEF_RGB, %%mm1; /* Multiply v coeffs 0x0000vvvvvvvv0000 */
-- psllw $6, %%mm0; /* Shift y coeffs 0x0000yyy0yyy0yyy0 */
-- psubw mpeg3_MMX_U_80_RGB, %%mm2; /* Subtract 128 from u 0x0000000000uu00uu */
-- pmullw mpeg3_MMX_U_COEF_RGB, %%mm2; /* Multiply u coeffs 0x0000uuuuuuuuuuuu */
--
--/* mm0: 0x000000yy00yy00yy mm1: 0x0000vvvvvvvv0000 mm2: 0x00000000uuuuuuuu */
-- paddsw %%mm1, %%mm0; /* Add v to result */
-- paddsw %%mm2, %%mm0; /* Add u to result 0x0000bbbbggggrrrr */
-- psraw $6, %%mm0; /* Demote precision */
-- packuswb %%mm0, %%mm0; /* Pack into RGBA 0x0000000000bbggrr */
-- movd %%mm0, (%3); /* Store output */
-+asm("\n\
-+/* Output will be 0x00bbggrr with the 00 trailing so this can also be used */\n\
-+/* for rgb24. */\n\
-+ movd (%0), %%mm0; /* Load y 0x00000000000000yy */\n\
-+ movd (%1), %%mm1; /* Load v 0x00000000000000vv */\n\
-+ movq %%mm0, %%mm3; /* Copy y to temp */\n\
-+ psllq $16, %%mm1; /* Shift v 0x0000000000vv0000 */\n\
-+ movd (%2), %%mm2; /* Load u 0x00000000000000uu */\n\
-+ psllq $16, %%mm3; /* Shift y */\n\
-+ movq %%mm1, %%mm4; /* Copy v to temp */\n\
-+ por %%mm3, %%mm0; /* Overlay new y byte 0x0000000000yy00yy */\n\
-+ psllq $16, %%mm4; /* Shift v */\n\
-+ movq %%mm2, %%mm5; /* Copy u to temp */\n\
-+ psllq $16, %%mm3; /* Shift y */\n\
-+ por %%mm4, %%mm1; /* Overlay new v byte 0x000000vv00vv0000 */\n\
-+ psllq $16, %%mm5; /* Shift u */\n\
-+ por %%mm3, %%mm0; /* Overlay new y byte 0x000000yy00yy00yy */\n\
-+ por %%mm5, %%mm2; /* Overlay new u byte 0x0000000000uu00uu */\n\
-+\n\
-+/* mm0: 0x000000yy00yy00yy mm1: 0x000000vv00vv0000 mm2: 0x0000000000uu00uu */\n\
-+ psubw mpeg3_MMX_V_80_RGB, %%mm1; /* Subtract 128 from v 0x000000vv00vv0000 */\n\
-+ pmullw mpeg3_MMX_V_COEF_RGB, %%mm1; /* Multiply v coeffs 0x0000vvvvvvvv0000 */\n\
-+ psllw $6, %%mm0; /* Shift y coeffs 0x0000yyy0yyy0yyy0 */\n\
-+ psubw mpeg3_MMX_U_80_RGB, %%mm2; /* Subtract 128 from u 0x0000000000uu00uu */\n\
-+ pmullw mpeg3_MMX_U_COEF_RGB, %%mm2; /* Multiply u coeffs 0x0000uuuuuuuuuuuu */\n\
-+\n\
-+/* mm0: 0x000000yy00yy00yy mm1: 0x0000vvvvvvvv0000 mm2: 0x00000000uuuuuuuu */\n\
-+ paddsw %%mm1, %%mm0; /* Add v to result */\n\
-+ paddsw %%mm2, %%mm0; /* Add u to result 0x0000bbbbggggrrrr */\n\
-+ psraw $6, %%mm0; /* Demote precision */\n\
-+ packuswb %%mm0, %%mm0; /* Pack into RGBA 0x0000000000bbggrr */\n\
-+ movd %%mm0, (%3); /* Store output */\n\
- "
- :
- : "r" (&y), "r" (&v), "r" (&u), "r" (output));
-@@ -351,39 +357,39 @@
- unsigned long v,
- unsigned long *output)
- {
--asm("
--/* Output will be 0x00bbggrr with the 00 trailing so this can also be used */
--/* for rgb24. */
-- movd (%0), %%mm0; /* Load y 0x00000000000000yy */
-- psubsw mpeg3_MMX_601_Y_DIFF, %%mm0; /* Subtract 16 from y */
-- movd (%1), %%mm1; /* Load v 0x00000000000000vv */
-- movq %%mm0, %%mm3; /* Copy y to temp */
-- psllq $16, %%mm1; /* Shift v 0x0000000000vv0000 */
-- movd (%2), %%mm2; /* Load u 0x00000000000000uu */
-- psllq $16, %%mm3; /* Shift y */
-- movq %%mm1, %%mm4; /* Copy v to temp */
-- por %%mm3, %%mm0; /* Overlay new y byte 0x0000000000yy00yy */
-- psllq $16, %%mm4; /* Shift v */
-- movq %%mm2, %%mm5; /* Copy u to temp */
-- psllq $16, %%mm3; /* Shift y */
-- por %%mm4, %%mm1; /* Overlay new v byte 0x000000vv00vv0000 */
-- psllq $16, %%mm5; /* Shift u */
-- por %%mm3, %%mm0; /* Overlay new y byte 0x000000yy00yy00yy */
-- por %%mm5, %%mm2; /* Overlay new u byte 0x0000000000uu00uu */
--
--/* mm0: 0x000000yy00yy00yy mm1: 0x000000vv00vv0000 mm2: 0x0000000000uu00uu */
-- pmullw mpeg3_MMX_601_Y_COEF, %%mm0; /* Scale y coeffs */
-- psubw mpeg3_MMX_V_80_RGB, %%mm1; /* Subtract 128 from v 0x000000vv00vv0000 */
-- pmullw mpeg3_MMX_V_COEF_RGB, %%mm1; /* Multiply v coeffs 0x0000vvvvvvvv0000 */
-- psubw mpeg3_MMX_U_80_RGB, %%mm2; /* Subtract 128 from u 0x0000000000uu00uu */
-- pmullw mpeg3_MMX_U_COEF_RGB, %%mm2; /* Multiply u coeffs 0x0000uuuuuuuuuuuu */
--
--/* mm0: 0x000000yy00yy00yy mm1: 0x0000vvvvvvvv0000 mm2: 0x00000000uuuuuuuu */
-- paddsw %%mm1, %%mm0; /* Add v to result */
-- paddsw %%mm2, %%mm0; /* Add u to result 0x0000bbbbggggrrrr */
-- psraw $6, %%mm0; /* Demote precision */
-- packuswb %%mm0, %%mm0; /* Pack into RGBA 0x0000000000bbggrr */
-- movd %%mm0, (%3); /* Store output */
-+asm("\n\
-+/* Output will be 0x00bbggrr with the 00 trailing so this can also be used */\n\
-+/* for rgb24. */\n\
-+ movd (%0), %%mm0; /* Load y 0x00000000000000yy */\n\
-+ psubsw mpeg3_MMX_601_Y_DIFF, %%mm0; /* Subtract 16 from y */\n\
-+ movd (%1), %%mm1; /* Load v 0x00000000000000vv */\n\
-+ movq %%mm0, %%mm3; /* Copy y to temp */\n\
-+ psllq $16, %%mm1; /* Shift v 0x0000000000vv0000 */\n\
-+ movd (%2), %%mm2; /* Load u 0x00000000000000uu */\n\
-+ psllq $16, %%mm3; /* Shift y */\n\
-+ movq %%mm1, %%mm4; /* Copy v to temp */\n\
-+ por %%mm3, %%mm0; /* Overlay new y byte 0x0000000000yy00yy */\n\
-+ psllq $16, %%mm4; /* Shift v */\n\
-+ movq %%mm2, %%mm5; /* Copy u to temp */\n\
-+ psllq $16, %%mm3; /* Shift y */\n\
-+ por %%mm4, %%mm1; /* Overlay new v byte 0x000000vv00vv0000 */\n\
-+ psllq $16, %%mm5; /* Shift u */\n\
-+ por %%mm3, %%mm0; /* Overlay new y byte 0x000000yy00yy00yy */\n\
-+ por %%mm5, %%mm2; /* Overlay new u byte 0x0000000000uu00uu */\n\
-+\n\
-+/* mm0: 0x000000yy00yy00yy mm1: 0x000000vv00vv0000 mm2: 0x0000000000uu00uu */\n\
-+ pmullw mpeg3_MMX_601_Y_COEF, %%mm0; /* Scale y coeffs */\n\
-+ psubw mpeg3_MMX_V_80_RGB, %%mm1; /* Subtract 128 from v 0x000000vv00vv0000 */\n\
-+ pmullw mpeg3_MMX_V_COEF_RGB, %%mm1; /* Multiply v coeffs 0x0000vvvvvvvv0000 */\n\
-+ psubw mpeg3_MMX_U_80_RGB, %%mm2; /* Subtract 128 from u 0x0000000000uu00uu */\n\
-+ pmullw mpeg3_MMX_U_COEF_RGB, %%mm2; /* Multiply u coeffs 0x0000uuuuuuuuuuuu */\n\
-+\n\
-+/* mm0: 0x000000yy00yy00yy mm1: 0x0000vvvvvvvv0000 mm2: 0x00000000uuuuuuuu */\n\
-+ paddsw %%mm1, %%mm0; /* Add v to result */\n\
-+ paddsw %%mm2, %%mm0; /* Add u to result 0x0000bbbbggggrrrr */\n\
-+ psraw $6, %%mm0; /* Demote precision */\n\
-+ packuswb %%mm0, %%mm0; /* Pack into RGBA 0x0000000000bbggrr */\n\
-+ movd %%mm0, (%3); /* Store output */\n\
- "
- :
- : "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); \
+ #define PUT_INT32(x) \
diff --git a/multimedia/libmpeg3/patches/patch-ai b/multimedia/libmpeg3/patches/patch-ai
index bbed5b05876..89879511afb 100644
--- a/multimedia/libmpeg3/patches/patch-ai
+++ b/multimedia/libmpeg3/patches/patch-ai
@@ -1,19 +1,13 @@
-$NetBSD: patch-ai,v 1.1 2006/08/09 17:55:51 mrg Exp $
+$NetBSD: patch-ai,v 1.2 2008/02/20 09:56:44 xtraeme Exp $
---- video/slice.c.orig 2001-05-19 20:05:26.000000000 -0700
-+++ video/slice.c 2006-08-09 10:42:13.000000000 -0700
-@@ -8,7 +8,13 @@
+--- a52dec-0.7.3/liba52/parse.c.orig 2008-02-19 19:41:19.000000000 +0100
++++ a52dec-0.7.3/liba52/parse.c 2008-02-19 19:41:32.000000000 +0100
+@@ -32,7 +32,7 @@
+ #include "bitstream.h"
+ #include "tables.h"
- #define CLIP(x) ((x) >= 0 ? ((x) < 255 ? (x) : 255) : 0)
-
--static unsigned long long MMX_128 = 0x80008000800080LL;
-+#if defined(__GNUC__) && __GNUC__ > 3
-+#define LMUSED __attribute__((__used__))
-+#else
-+#define LMUSED
-+#endif
-+
-+static unsigned long long MMX_128 LMUSED = 0x80008000800080LL;
-
- int mpeg3_new_slice_buffer(mpeg3_slice_buffer_t *slice_buffer)
- {
+-#ifdef HAVE_MEMALIGN
++#if 0
+ /* some systems have memalign() but no declaration for it */
+ void * memalign (size_t align, size_t size);
+ #else