From 2f7c1e1c08add874cb0427e2d86b5d2bfdff4a5f Mon Sep 17 00:00:00 2001 From: ms Date: Wed, 11 Apr 2007 08:14:59 +0000 Subject: [PATCH] Saemtliche unbenutzte Patches aus dem Repository geworfen. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@489 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- src/patches/CnxADSL-cln-irqreturn.patch | 11 - .../bootsplash-3.0.7-2.4.31-vanilla.diff | 2878 - src/patches/busybox-0.60.5-config.patch | 212 - src/patches/busybox-0.60.5-gzip.patch | 171 - .../busybox-0.60.5-insmod_gpl_symbols.patch | 46 - src/patches/busybox-0.60.5-spider.patch | 60 - src/patches/busybox-0.60.5-wget-unlink.patch | 13 - src/patches/bzip2-1.0.2-chmod.patch | 92 - src/patches/cnx_pci_yukon.patch | 3043 - .../dhcpcd-1.3.22-pl4_corrupt-packet.patch | 12 - src/patches/e2fsprogs-1.35-install.patch | 16 - src/patches/fcdsl-singlelock.patch | 190 - src/patches/fcdslsl-singlelock.patch | 92 - src/patches/fcdslslusb-singlelock.patch | 142 - src/patches/fcdslx-irqreturn.patch | 11 - .../fcpci-suse8.2-03.11.02-compiler.patch | 11 - src/patches/gcc-2.95.3-alpha.patch | 321 - src/patches/glibc-2.3.3-ssp_frandom-2.patch | 222 - src/patches/grub-0.97-disk_geometry-1.patch | 892 - src/patches/grub-0.97-reiser4-20050808.diff | 604 - src/patches/grub-0.97/bad-assert-sideeffect | 15 - src/patches/grub-0.97/fix-uninitialized | 11 - src/patches/grub-0.97/force-LBA-off.diff | 143 - .../grub-0.97/grub-0.97-devicemap.diff | 118 - .../grub-0.97/grub-0.97-initrdaddr.diff | 16 - src/patches/grub-0.97/grub-0.97-path-patch | 70 - .../grub-0.97/grub-0.97-protexec.patch | 56 - src/patches/grub-0.97/grub-R | 61 - src/patches/grub-0.97/grub-linux-setup-fix | 12 - src/patches/grub-0.97/grub-path-cfg.diff | 152 - src/patches/grub-0.97/use_ferror.diff | 15 - src/patches/gzip-1.3.3-window-size.patch | 14 - src/patches/gzip-1.3.5-asm-execstack.patch | 15 - src/patches/gzip-1.3.5-gunzip-dir.patch | 14 - src/patches/gzip-1.3.5-perm.patch | 63 - ...netutils-1.4.2-no_server_man_pages-1.patch | 116 - src/patches/inetutils-1.4.2-ping-1.patch | 117 - src/patches/iproute2-2.4.7-netlink.patch | 22 - src/patches/iproute2-includes.patch | 251 - src/patches/iptables-1.2.11.patch | 31 - src/patches/kernel-2.4-layer7-2.1.patch | 2055 - src/patches/kudzu-0.99.50-pam.patch | 37 - src/patches/kudzu-0.99.50-updfstab.conf.patch | 24 - src/patches/kudzu-nodiet.patch | 12 - src/patches/libpng-1.2.12-no-asm.patch | 62 - src/patches/linux-2.4.23-olitec-isdn.patch | 60 - src/patches/linux-2.4.26-proc-stat.patch | 269 - src/patches/linux-2.4.26-scsi.patch | 10 - src/patches/linux-2.4.27-frandom-2.patch | 551 - src/patches/linux-2.4.27-ssp-1.patch | 64 - src/patches/linux-2.4.28-imq2.diff | 748 - src/patches/linux-2.4.29_r8169clone.patch | 10 - src/patches/linux-2.4.31-ipfire.patch | 11 - src/patches/linux-sis-965l.patch | 13 - src/patches/make_devices.patch | 410 - ...net-tools-1.60-cleanup-list-handling.patch | 61 - src/patches/net-tools-1.60-get_name.patch | 58 - src/patches/ntp-4.2.0-linuxcaps.patch | 139 - .../openswan-2.4.7.kernel-2.6-klips.patch | 59334 ---------------- .../openswan-2.4.7.kernel-2.6-natt.patch | 166 - .../patch-o-matic-ng-20040621_03_2.4.29.patch | 97 - ...atch-o-matic-ng-20040621_pptp_2.4.29.patch | 8 - src/patches/patch-o-matic-ng-raw_2.4.31.patch | 263 - src/patches/pcre-4.5-CAN-2005-2491.patch | 54 - .../perl-5.8.5-perlio_debug_security.patch | 22 - src/patches/perl-5.8.5-tempfiles.patch | 60 - src/patches/perl.patch | 26 - src/patches/pomng.fix | 11 - src/patches/speedtouch-1.2-isdn.patch | 11 - .../sysklogd-1.3-31-rh-ksyslog-nul.diff | 12 - ...sklogd-1.4.1-caen-owl-klogd-drop-root.diff | 170 - .../sysklogd-1.4.1-caen-owl-syslogd-bind.diff | 111 - ...logd-1.4.1-caen-owl-syslogd-drop-root.diff | 117 - ...ysklogd-1.4.1-owl-syslogd-crunch_list.diff | 87 - ...til-linux-2.12a-umount_CAN-2005-2876.patch | 14 - src/patches/viscii10-8x16-new.psfu | Bin 4897 -> 0 bytes 76 files changed, 75508 deletions(-) delete mode 100644 src/patches/CnxADSL-cln-irqreturn.patch delete mode 100644 src/patches/bootsplash-3.0.7-2.4.31-vanilla.diff delete mode 100644 src/patches/busybox-0.60.5-config.patch delete mode 100644 src/patches/busybox-0.60.5-gzip.patch delete mode 100644 src/patches/busybox-0.60.5-insmod_gpl_symbols.patch delete mode 100644 src/patches/busybox-0.60.5-spider.patch delete mode 100644 src/patches/busybox-0.60.5-wget-unlink.patch delete mode 100644 src/patches/bzip2-1.0.2-chmod.patch delete mode 100644 src/patches/cnx_pci_yukon.patch delete mode 100644 src/patches/dhcpcd-1.3.22-pl4_corrupt-packet.patch delete mode 100644 src/patches/e2fsprogs-1.35-install.patch delete mode 100644 src/patches/fcdsl-singlelock.patch delete mode 100644 src/patches/fcdslsl-singlelock.patch delete mode 100644 src/patches/fcdslslusb-singlelock.patch delete mode 100644 src/patches/fcdslx-irqreturn.patch delete mode 100644 src/patches/fcpci-suse8.2-03.11.02-compiler.patch delete mode 100644 src/patches/gcc-2.95.3-alpha.patch delete mode 100644 src/patches/glibc-2.3.3-ssp_frandom-2.patch delete mode 100644 src/patches/grub-0.97-disk_geometry-1.patch delete mode 100644 src/patches/grub-0.97-reiser4-20050808.diff delete mode 100644 src/patches/grub-0.97/bad-assert-sideeffect delete mode 100644 src/patches/grub-0.97/fix-uninitialized delete mode 100644 src/patches/grub-0.97/force-LBA-off.diff delete mode 100644 src/patches/grub-0.97/grub-0.97-devicemap.diff delete mode 100644 src/patches/grub-0.97/grub-0.97-initrdaddr.diff delete mode 100644 src/patches/grub-0.97/grub-0.97-path-patch delete mode 100644 src/patches/grub-0.97/grub-0.97-protexec.patch delete mode 100644 src/patches/grub-0.97/grub-R delete mode 100644 src/patches/grub-0.97/grub-linux-setup-fix delete mode 100644 src/patches/grub-0.97/grub-path-cfg.diff delete mode 100644 src/patches/grub-0.97/use_ferror.diff delete mode 100644 src/patches/gzip-1.3.3-window-size.patch delete mode 100644 src/patches/gzip-1.3.5-asm-execstack.patch delete mode 100644 src/patches/gzip-1.3.5-gunzip-dir.patch delete mode 100644 src/patches/gzip-1.3.5-perm.patch delete mode 100644 src/patches/inetutils-1.4.2-no_server_man_pages-1.patch delete mode 100644 src/patches/inetutils-1.4.2-ping-1.patch delete mode 100644 src/patches/iproute2-2.4.7-netlink.patch delete mode 100644 src/patches/iproute2-includes.patch delete mode 100644 src/patches/iptables-1.2.11.patch delete mode 100644 src/patches/kernel-2.4-layer7-2.1.patch delete mode 100644 src/patches/kudzu-0.99.50-pam.patch delete mode 100644 src/patches/kudzu-0.99.50-updfstab.conf.patch delete mode 100644 src/patches/kudzu-nodiet.patch delete mode 100644 src/patches/libpng-1.2.12-no-asm.patch delete mode 100644 src/patches/linux-2.4.23-olitec-isdn.patch delete mode 100644 src/patches/linux-2.4.26-proc-stat.patch delete mode 100644 src/patches/linux-2.4.26-scsi.patch delete mode 100644 src/patches/linux-2.4.27-frandom-2.patch delete mode 100644 src/patches/linux-2.4.27-ssp-1.patch delete mode 100644 src/patches/linux-2.4.28-imq2.diff delete mode 100644 src/patches/linux-2.4.29_r8169clone.patch delete mode 100644 src/patches/linux-2.4.31-ipfire.patch delete mode 100644 src/patches/linux-sis-965l.patch delete mode 100644 src/patches/make_devices.patch delete mode 100644 src/patches/net-tools-1.60-cleanup-list-handling.patch delete mode 100644 src/patches/net-tools-1.60-get_name.patch delete mode 100644 src/patches/ntp-4.2.0-linuxcaps.patch delete mode 100644 src/patches/openswan-2.4.7.kernel-2.6-klips.patch delete mode 100644 src/patches/openswan-2.4.7.kernel-2.6-natt.patch delete mode 100644 src/patches/patch-o-matic-ng-20040621_03_2.4.29.patch delete mode 100644 src/patches/patch-o-matic-ng-20040621_pptp_2.4.29.patch delete mode 100644 src/patches/patch-o-matic-ng-raw_2.4.31.patch delete mode 100644 src/patches/pcre-4.5-CAN-2005-2491.patch delete mode 100644 src/patches/perl-5.8.5-perlio_debug_security.patch delete mode 100644 src/patches/perl-5.8.5-tempfiles.patch delete mode 100644 src/patches/perl.patch delete mode 100644 src/patches/pomng.fix delete mode 100644 src/patches/speedtouch-1.2-isdn.patch delete mode 100644 src/patches/sysklogd-1.3-31-rh-ksyslog-nul.diff delete mode 100644 src/patches/sysklogd-1.4.1-caen-owl-klogd-drop-root.diff delete mode 100644 src/patches/sysklogd-1.4.1-caen-owl-syslogd-bind.diff delete mode 100644 src/patches/sysklogd-1.4.1-caen-owl-syslogd-drop-root.diff delete mode 100644 src/patches/sysklogd-1.4.1-owl-syslogd-crunch_list.diff delete mode 100644 src/patches/util-linux-2.12a-umount_CAN-2005-2876.patch delete mode 100644 src/patches/viscii10-8x16-new.psfu diff --git a/src/patches/CnxADSL-cln-irqreturn.patch b/src/patches/CnxADSL-cln-irqreturn.patch deleted file mode 100644 index 38660ec81..000000000 --- a/src/patches/CnxADSL-cln-irqreturn.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CnxADSL-TgrATM_k2.4.3-6.1.2.007CLN/KernelModule/ChipALCdsl.h.old Fri Oct 1 06:49:52 2004 -+++ CnxADSL-TgrATM_k2.4.3-6.1.2.007CLN/KernelModule/ChipALCdsl.h Mon Oct 4 23:19:36 2004 -@@ -546,7 +546,7 @@ - DWORD ComChannel // Communications Channel - ); - --#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23) - typedef void irqreturn_t; - #endif - diff --git a/src/patches/bootsplash-3.0.7-2.4.31-vanilla.diff b/src/patches/bootsplash-3.0.7-2.4.31-vanilla.diff deleted file mode 100644 index 5b3a00274..000000000 --- a/src/patches/bootsplash-3.0.7-2.4.31-vanilla.diff +++ /dev/null @@ -1,2878 +0,0 @@ -diff -ruN linux-2.4.31/drivers/char/console.c linux-2.4.31-bs/drivers/char/console.c ---- linux-2.4.31/drivers/char/console.c 2005-01-19 14:09:44.000000000 +0000 -+++ linux-2.4.31-bs/drivers/char/console.c 2005-05-05 22:20:15.000000000 +0100 -@@ -3031,6 +3031,32 @@ - return 0; - } - -+#ifdef CONFIG_FBCON_SPLASHSCREEN -+void con_remap_def_color(int currcons, int new_color) -+{ -+ unsigned short *sbuf = screenbuf; -+ unsigned c, len = screenbuf_size >> 1; -+ int old_color; -+ -+ if (sbuf) { -+ old_color = def_color << 8; -+ new_color <<= 8; -+ while(len--) { -+ c = *sbuf; -+ if (((c ^ old_color) & 0xf000) == 0) -+ *sbuf ^= (old_color ^ new_color) & 0xf000; -+ if (((c ^ old_color) & 0x0f00) == 0) -+ *sbuf ^= (old_color ^ new_color) & 0x0f00; -+ sbuf++; -+ } -+ new_color >>= 8; -+ } -+ def_color = color = new_color; -+ update_attr(currcons); -+} -+#endif -+ -+ - /* - * Visible symbols for modules - */ -diff -ruN linux-2.4.31/drivers/char/keyboard.c linux-2.4.31-bs/drivers/char/keyboard.c ---- linux-2.4.31/drivers/char/keyboard.c 2003-11-28 18:26:20.000000000 +0000 -+++ linux-2.4.31-bs/drivers/char/keyboard.c 2005-05-05 22:27:48.000000000 +0100 -@@ -263,6 +263,15 @@ - } else - rep = test_and_set_bit(keycode, key_down); - -+#ifdef CONFIG_FBCON_SPLASHSCREEN -+ /* This code has to be redone for some non-x86 platforms */ -+ if (keycode == 0x3c || keycode == 0x01) { /* F2 and ESC on a PC keyboard */ -+ extern int splash_verbose(void); -+ if (splash_verbose()) -+ goto out; -+ } -+#endif -+ - #ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */ - if (keycode == SYSRQ_KEY) { - sysrq_pressed = !up_flag; -diff -ruN linux-2.4.31/drivers/char/n_tty.c linux-2.4.31-bs/drivers/char/n_tty.c ---- linux-2.4.31/drivers/char/n_tty.c 2005-01-19 14:09:47.000000000 +0000 -+++ linux-2.4.31-bs/drivers/char/n_tty.c 2005-05-05 22:14:50.000000000 +0100 -@@ -45,6 +45,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -1184,6 +1185,17 @@ - return -EIO; - } - -+#ifdef CONFIG_FBCON_SPLASHSCREEN -+ if (file->f_dentry->d_inode->i_rdev == CONSOLE_DEV || -+ file->f_dentry->d_inode->i_rdev == SYSCONS_DEV || -+ file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,0) || -+ file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,1)) { -+ extern int splash_verbose(void); -+ (void)splash_verbose(); -+ } -+#endif -+ -+ - c = job_control(tty, file); - if(c < 0) - return c; -diff -ruN linux-2.4.31/drivers/video/Config.in linux-2.4.31-bs/drivers/video/Config.in ---- linux-2.4.31/drivers/video/Config.in 2004-02-18 13:36:31.000000000 +0000 -+++ linux-2.4.31-bs/drivers/video/Config.in 2005-05-05 22:24:55.000000000 +0100 -@@ -239,13 +239,20 @@ - tristate ' Virtual Frame Buffer support (ONLY FOR TESTING!) (EXPERIMENTAL)' CONFIG_FB_VIRTUAL - fi - -+ dep_bool ' Use splash screen instead of boot logo' CONFIG_FBCON_SPLASHSCREEN $CONFIG_BLK_DEV_INITRD -+ if [ "$CONFIG_FBCON_SPLASHSCREEN" = "y" ]; then -+ define_bool CONFIG_FBCON_CFB16 y -+ fi -+ - bool ' Advanced low level driver options' CONFIG_FBCON_ADVANCED - if [ "$CONFIG_FBCON_ADVANCED" = "y" ]; then - tristate ' Monochrome support' CONFIG_FBCON_MFB - tristate ' 2 bpp packed pixels support' CONFIG_FBCON_CFB2 - tristate ' 4 bpp packed pixels support' CONFIG_FBCON_CFB4 - tristate ' 8 bpp packed pixels support' CONFIG_FBCON_CFB8 -- tristate ' 16 bpp packed pixels support' CONFIG_FBCON_CFB16 -+ if [ "$CONFIG_FBCON_SPLASHSCREEN" != "y" ]; then -+ tristate ' 16 bpp packed pixels support' CONFIG_FBCON_CFB16 -+ fi - tristate ' 24 bpp packed pixels support' CONFIG_FBCON_CFB24 - tristate ' 32 bpp packed pixels support' CONFIG_FBCON_CFB32 - tristate ' Amiga bitplanes support' CONFIG_FBCON_AFB -@@ -355,7 +362,9 @@ - "$CONFIG_FB_SIS" = "y" -o "$CONFIG_FB_SA1100" = "y" -o \ - "$CONFIG_FB_PVR2" = "y" -o "$CONFIG_FB_VOODOO1" = "y" -o \ - "$CONFIG_FB_NEOMAGIC" = "y" -o "$CONFIG_FB_INTEL" = "y" ]; then -- define_tristate CONFIG_FBCON_CFB16 y -+ if [ "$CONFIG_FBCON_CFB16" != "m" ]; then -+ define_tristate CONFIG_FBCON_CFB16 y -+ fi - else - if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \ - "$CONFIG_FB_MAC" = "m" -o "$CONFIG_FB_VESA" = "m" -o \ -@@ -373,7 +382,9 @@ - "$CONFIG_FB_INTEL" = "m" -o \ - "$CONFIG_FB_PVR2" = "m" -o "$CONFIG_FB_VOODOO1" = "m" -o \ - "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_INTEL" = "m" ]; then -- define_tristate CONFIG_FBCON_CFB16 m -+ if [ "$CONFIG_FBCON_CFB16" != "y" ]; then -+ define_tristate CONFIG_FBCON_CFB16 m -+ fi - fi - fi - if [ "$CONFIG_FB_ATY" = "y" -o "$CONFIG_FB_VIRTUAL" = "y" -o \ -diff -ruN linux-2.4.31/drivers/video/Makefile linux-2.4.31-bs/drivers/video/Makefile ---- linux-2.4.31/drivers/video/Makefile 2004-02-18 13:36:31.000000000 +0000 -+++ linux-2.4.31-bs/drivers/video/Makefile 2005-05-06 11:28:28.000000000 +0100 -@@ -14,7 +14,7 @@ - fbcon-vga.o fbcon-iplan2p2.o fbcon-iplan2p4.o \ - fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-cfb16.o \ - fbcon-cfb2.o fbcon-cfb24.o fbcon-cfb32.o fbcon-cfb4.o \ -- fbcon-cfb8.o fbcon-mac.o fbcon-mfb.o \ -+ fbcon-cfb8.o fbcon-splash16.o fbcon-mac.o fbcon-mfb.o \ - cyber2000fb.o sa1100fb.o fbcon-hga.o fbgen.o - - # Each configuration option enables a list of files. -@@ -154,6 +154,9 @@ - obj-$(CONFIG_FBCON_VGA) += fbcon-vga.o - obj-$(CONFIG_FBCON_HGA) += fbcon-hga.o - obj-$(CONFIG_FBCON_STI) += fbcon-sti.o -+obj-$(CONFIG_FBCON_SPLASHSCREEN) += fbcon-splash.o -+obj-$(CONFIG_FBCON_SPLASHSCREEN) += fbcon-splash16.o -+obj-$(CONFIG_FBCON_SPLASHSCREEN) += fbcon-jpegdec.o - - include $(TOPDIR)/Rules.make - -diff -ruN linux-2.4.31/drivers/video/fbcon-jpegdec.c linux-2.4.31-bs/drivers/video/fbcon-jpegdec.c ---- linux-2.4.31/drivers/video/fbcon-jpegdec.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.4.31-bs/drivers/video/fbcon-jpegdec.c 2005-05-06 11:22:05.000000000 +0100 -@@ -0,0 +1,960 @@ -+/* -+ * linux/drivers/video/fbcon-jpegdec.c - a tiny jpeg decoder. -+ * -+ * (w) August 2001 by Michael Schroeder, -+ * -+ */ -+ -+#include -+#include -+#include -+ -+struct display; -+#include "fbcon-splash.h" -+#include "fbcon-jpegdec.h" -+ -+#define ISHIFT 11 -+ -+#define IFIX(a) ((int)((a) * (1 << ISHIFT) + .5)) -+#define IMULT(a, b) (((a) * (b)) >> ISHIFT) -+#define ITOINT(a) ((a) >> ISHIFT) -+ -+#ifndef __P -+# define __P(x) x -+#endif -+ -+/* special markers */ -+#define M_BADHUFF -1 -+#define M_EOF 0x80 -+ -+struct in { -+ unsigned char *p; -+ unsigned int bits; -+ int left; -+ int marker; -+ -+ int (*func) __P((void *)); -+ void *data; -+}; -+ -+/*********************************/ -+struct dec_hufftbl; -+struct enc_hufftbl; -+ -+union hufftblp { -+ struct dec_hufftbl *dhuff; -+ struct enc_hufftbl *ehuff; -+}; -+ -+struct scan { -+ int dc; /* old dc value */ -+ -+ union hufftblp hudc; -+ union hufftblp huac; -+ int next; /* when to switch to next scan */ -+ -+ int cid; /* component id */ -+ int hv; /* horiz/vert, copied from comp */ -+ int tq; /* quant tbl, copied from comp */ -+}; -+ -+/*********************************/ -+ -+#define DECBITS 10 /* seems to be the optimum */ -+ -+struct dec_hufftbl { -+ int maxcode[17]; -+ int valptr[16]; -+ unsigned char vals[256]; -+ unsigned int llvals[1 << DECBITS]; -+}; -+ -+static void decode_mcus __P((struct in *, int *, int, struct scan *, int *)); -+static int dec_readmarker __P((struct in *)); -+static void dec_makehuff __P((struct dec_hufftbl *, int *, unsigned char *)); -+ -+static void setinput __P((struct in *, unsigned char *)); -+/*********************************/ -+ -+#undef PREC -+#define PREC int -+ -+static void idctqtab __P((unsigned char *, PREC *)); -+static void idct __P((int *, int *, PREC *, PREC, int)); -+static void scaleidctqtab __P((PREC *, PREC)); -+ -+/*********************************/ -+ -+static void initcol __P((PREC[][64])); -+ -+static void col221111 __P((int *, unsigned char *, int)); -+static void col221111_16 __P((int *, unsigned char *, int)); -+ -+/*********************************/ -+ -+#define M_SOI 0xd8 -+#define M_APP0 0xe0 -+#define M_DQT 0xdb -+#define M_SOF0 0xc0 -+#define M_DHT 0xc4 -+#define M_DRI 0xdd -+#define M_SOS 0xda -+#define M_RST0 0xd0 -+#define M_EOI 0xd9 -+#define M_COM 0xfe -+ -+static unsigned char *datap; -+ -+static int getbyte(void) -+{ -+ return *datap++; -+} -+ -+static int getword(void) -+{ -+ int c1, c2; -+ c1 = *datap++; -+ c2 = *datap++; -+ return c1 << 8 | c2; -+} -+ -+struct comp { -+ int cid; -+ int hv; -+ int tq; -+}; -+ -+#define MAXCOMP 4 -+struct jpginfo { -+ int nc; /* number of components */ -+ int ns; /* number of scans */ -+ int dri; /* restart interval */ -+ int nm; /* mcus til next marker */ -+ int rm; /* next restart marker */ -+}; -+ -+static struct jpginfo info; -+static struct comp comps[MAXCOMP]; -+ -+static struct scan dscans[MAXCOMP]; -+ -+static unsigned char quant[4][64]; -+ -+static struct dec_hufftbl dhuff[4]; -+ -+#define dec_huffdc (dhuff + 0) -+#define dec_huffac (dhuff + 2) -+ -+static struct in in; -+ -+static int readtables(int till) -+{ -+ int m, l, i, j, lq, pq, tq; -+ int tc, th, tt; -+ -+ for (;;) { -+ if (getbyte() != 0xff) -+ return -1; -+ if ((m = getbyte()) == till) -+ break; -+ -+ switch (m) { -+ case 0xc2: -+ return 0; -+ -+ case M_DQT: -+ lq = getword(); -+ while (lq > 2) { -+ pq = getbyte(); -+ tq = pq & 15; -+ if (tq > 3) -+ return -1; -+ pq >>= 4; -+ if (pq != 0) -+ return -1; -+ for (i = 0; i < 64; i++) -+ quant[tq][i] = getbyte(); -+ lq -= 64 + 1; -+ } -+ break; -+ -+ case M_DHT: -+ l = getword(); -+ while (l > 2) { -+ int hufflen[16], k; -+ unsigned char huffvals[256]; -+ -+ tc = getbyte(); -+ th = tc & 15; -+ tc >>= 4; -+ tt = tc * 2 + th; -+ if (tc > 1 || th > 1) -+ return -1; -+ for (i = 0; i < 16; i++) -+ hufflen[i] = getbyte(); -+ l -= 1 + 16; -+ k = 0; -+ for (i = 0; i < 16; i++) { -+ for (j = 0; j < hufflen[i]; j++) -+ huffvals[k++] = getbyte(); -+ l -= hufflen[i]; -+ } -+ dec_makehuff(dhuff + tt, hufflen, -+ huffvals); -+ } -+ break; -+ -+ case M_DRI: -+ l = getword(); -+ info.dri = getword(); -+ break; -+ -+ default: -+ l = getword(); -+ while (l-- > 2) -+ getbyte(); -+ break; -+ } -+ } -+ return 0; -+} -+ -+static void dec_initscans(void) -+{ -+ int i; -+ -+ info.nm = info.dri + 1; -+ info.rm = M_RST0; -+ for (i = 0; i < info.ns; i++) -+ dscans[i].dc = 0; -+} -+ -+static int dec_checkmarker(void) -+{ -+ int i; -+ -+ if (dec_readmarker(&in) != info.rm) -+ return -1; -+ info.nm = info.dri; -+ info.rm = (info.rm + 1) & ~0x08; -+ for (i = 0; i < info.ns; i++) -+ dscans[i].dc = 0; -+ return 0; -+} -+ -+int jpeg_check_size(unsigned char *buf, int width, int height) -+{ -+ datap = buf; -+ getbyte(); -+ getbyte(); -+ readtables(M_SOF0); -+ getword(); -+ getbyte(); -+ if (height != getword() || width != getword()) -+ return 0; -+ return 1; -+} -+ -+int jpeg_decode(buf, pic, width, height, depth, decdata) -+unsigned char *buf, *pic; -+int width, height, depth; -+struct jpeg_decdata *decdata; -+{ -+ int i, j, m, tac, tdc; -+ int mcusx, mcusy, mx, my; -+ int max[6]; -+ -+ if (!decdata) -+ return -1; -+ datap = buf; -+ if (getbyte() != 0xff) -+ return ERR_NO_SOI; -+ if (getbyte() != M_SOI) -+ return ERR_NO_SOI; -+ if (readtables(M_SOF0)) -+ return ERR_BAD_TABLES; -+ getword(); -+ i = getbyte(); -+ if (i != 8) -+ return ERR_NOT_8BIT; -+ if (((getword() + 15) & ~15) != height) -+ return ERR_HEIGHT_MISMATCH; -+ if (((getword() + 15) & ~15) != width) -+ return ERR_WIDTH_MISMATCH; -+ if ((height & 15) || (width & 15)) -+ return ERR_BAD_WIDTH_OR_HEIGHT; -+ info.nc = getbyte(); -+ if (info.nc > MAXCOMP) -+ return ERR_TOO_MANY_COMPPS; -+ for (i = 0; i < info.nc; i++) { -+ int h, v; -+ comps[i].cid = getbyte(); -+ comps[i].hv = getbyte(); -+ v = comps[i].hv & 15; -+ h = comps[i].hv >> 4; -+ comps[i].tq = getbyte(); -+ if (h > 3 || v > 3) -+ return ERR_ILLEGAL_HV; -+ if (comps[i].tq > 3) -+ return ERR_QUANT_TABLE_SELECTOR; -+ } -+ if (readtables(M_SOS)) -+ return ERR_BAD_TABLES; -+ getword(); -+ info.ns = getbyte(); -+ if (info.ns != 3) -+ return ERR_NOT_YCBCR_221111; -+ for (i = 0; i < 3; i++) { -+ dscans[i].cid = getbyte(); -+ tdc = getbyte(); -+ tac = tdc & 15; -+ tdc >>= 4; -+ if (tdc > 1 || tac > 1) -+ return ERR_QUANT_TABLE_SELECTOR; -+ for (j = 0; j < info.nc; j++) -+ if (comps[j].cid == dscans[i].cid) -+ break; -+ if (j == info.nc) -+ return ERR_UNKNOWN_CID_IN_SCAN; -+ dscans[i].hv = comps[j].hv; -+ dscans[i].tq = comps[j].tq; -+ dscans[i].hudc.dhuff = dec_huffdc + tdc; -+ dscans[i].huac.dhuff = dec_huffac + tac; -+ } -+ -+ i = getbyte(); -+ j = getbyte(); -+ m = getbyte(); -+ -+ if (i != 0 || j != 63 || m != 0) -+ return ERR_NOT_SEQUENTIAL_DCT; -+ -+ if (dscans[0].cid != 1 || dscans[1].cid != 2 || dscans[2].cid != 3) -+ return ERR_NOT_YCBCR_221111; -+ -+ if (dscans[0].hv != 0x22 || dscans[1].hv != 0x11 || dscans[2].hv != 0x11) -+ return ERR_NOT_YCBCR_221111; -+ -+ mcusx = width >> 4; -+ mcusy = height >> 4; -+ -+ -+ idctqtab(quant[dscans[0].tq], decdata->dquant[0]); -+ idctqtab(quant[dscans[1].tq], decdata->dquant[1]); -+ idctqtab(quant[dscans[2].tq], decdata->dquant[2]); -+ initcol(decdata->dquant); -+ setinput(&in, datap); -+ -+#if 0 -+ /* landing zone */ -+ img[len] = 0; -+ img[len + 1] = 0xff; -+ img[len + 2] = M_EOF; -+#endif -+ -+ dec_initscans(); -+ -+ dscans[0].next = 6 - 4; -+ dscans[1].next = 6 - 4 - 1; -+ dscans[2].next = 6 - 4 - 1 - 1; /* 411 encoding */ -+ for (my = 0; my < mcusy; my++) { -+ for (mx = 0; mx < mcusx; mx++) { -+ if (info.dri && !--info.nm) -+ if (dec_checkmarker()) -+ return ERR_WRONG_MARKER; -+ -+ decode_mcus(&in, decdata->dcts, 6, dscans, max); -+ idct(decdata->dcts, decdata->out, decdata->dquant[0], IFIX(128.5), max[0]); -+ idct(decdata->dcts + 64, decdata->out + 64, decdata->dquant[0], IFIX(128.5), max[1]); -+ idct(decdata->dcts + 128, decdata->out + 128, decdata->dquant[0], IFIX(128.5), max[2]); -+ idct(decdata->dcts + 192, decdata->out + 192, decdata->dquant[0], IFIX(128.5), max[3]); -+ idct(decdata->dcts + 256, decdata->out + 256, decdata->dquant[1], IFIX(0.5), max[4]); -+ idct(decdata->dcts + 320, decdata->out + 320, decdata->dquant[2], IFIX(0.5), max[5]); -+ -+ switch (depth) { -+ case 24: -+ col221111(decdata->out, pic + (my * 16 * mcusx + mx) * 16 * 3, mcusx * 16 * 3); -+ break; -+ case 16: -+ col221111_16(decdata->out, pic + (my * 16 * mcusx + mx) * (16 * 2), mcusx * (16 * 2)); -+ break; -+ default: -+ return ERR_DEPTH_MISMATCH; -+ break; -+ } -+ } -+ } -+ -+ m = dec_readmarker(&in); -+ if (m != M_EOI) -+ return ERR_NO_EOI; -+ -+ return 0; -+} -+ -+/****************************************************************/ -+/************** huffman decoder ***************/ -+/****************************************************************/ -+ -+static int fillbits __P((struct in *, int, unsigned int)); -+static int dec_rec2 -+__P((struct in *, struct dec_hufftbl *, int *, int, int)); -+ -+static void setinput(in, p) -+struct in *in; -+unsigned char *p; -+{ -+ in->p = p; -+ in->left = 0; -+ in->bits = 0; -+ in->marker = 0; -+} -+ -+static int fillbits(in, le, bi) -+struct in *in; -+int le; -+unsigned int bi; -+{ -+ int b, m; -+ -+ if (in->marker) { -+ if (le <= 16) -+ in->bits = bi << 16, le += 16; -+ return le; -+ } -+ while (le <= 24) { -+ b = *in->p++; -+ if (b == 0xff && (m = *in->p++) != 0) { -+ if (m == M_EOF) { -+ if (in->func && (m = in->func(in->data)) == 0) -+ continue; -+ } -+ in->marker = m; -+ if (le <= 16) -+ bi = bi << 16, le += 16; -+ break; -+ } -+ bi = bi << 8 | b; -+ le += 8; -+ } -+ in->bits = bi; /* tmp... 2 return values needed */ -+ return le; -+} -+ -+static int dec_readmarker(in) -+struct in *in; -+{ -+ int m; -+ -+ in->left = fillbits(in, in->left, in->bits); -+ if ((m = in->marker) == 0) -+ return 0; -+ in->left = 0; -+ in->marker = 0; -+ return m; -+} -+ -+#define LEBI_DCL int le, bi -+#define LEBI_GET(in) (le = in->left, bi = in->bits) -+#define LEBI_PUT(in) (in->left = le, in->bits = bi) -+ -+#define GETBITS(in, n) ( \ -+ (le < (n) ? le = fillbits(in, le, bi), bi = in->bits : 0), \ -+ (le -= (n)), \ -+ bi >> le & ((1 << (n)) - 1) \ -+) -+ -+#define UNGETBITS(in, n) ( \ -+ le += (n) \ -+) -+ -+ -+static int dec_rec2(in, hu, runp, c, i) -+struct in *in; -+struct dec_hufftbl *hu; -+int *runp; -+int c, i; -+{ -+ LEBI_DCL; -+ -+ LEBI_GET(in); -+ if (i) { -+ UNGETBITS(in, i & 127); -+ *runp = i >> 8 & 15; -+ i >>= 16; -+ } else { -+ for (i = DECBITS; (c = ((c << 1) | GETBITS(in, 1))) >= (hu->maxcode[i]); i++); -+ if (i >= 16) { -+ in->marker = M_BADHUFF; -+ return 0; -+ } -+ i = hu->vals[hu->valptr[i] + c - hu->maxcode[i - 1] * 2]; -+ *runp = i >> 4; -+ i &= 15; -+ } -+ if (i == 0) { /* sigh, 0xf0 is 11 bit */ -+ LEBI_PUT(in); -+ return 0; -+ } -+ /* receive part */ -+ c = GETBITS(in, i); -+ if (c < (1 << (i - 1))) -+ c += (-1 << i) + 1; -+ LEBI_PUT(in); -+ return c; -+} -+ -+#define DEC_REC(in, hu, r, i) ( \ -+ r = GETBITS(in, DECBITS), \ -+ i = hu->llvals[r], \ -+ i & 128 ? \ -+ ( \ -+ UNGETBITS(in, i & 127), \ -+ r = i >> 8 & 15, \ -+ i >> 16 \ -+ ) \ -+ : \ -+ ( \ -+ LEBI_PUT(in), \ -+ i = dec_rec2(in, hu, &r, r, i), \ -+ LEBI_GET(in), \ -+ i \ -+ ) \ -+) -+ -+static void decode_mcus(in, dct, n, sc, maxp) -+struct in *in; -+int *dct; -+int n; -+struct scan *sc; -+int *maxp; -+{ -+ struct dec_hufftbl *hu; -+ int i, r, t; -+ LEBI_DCL; -+ -+ memset(dct, 0, n * 64 * sizeof(*dct)); -+ LEBI_GET(in); -+ while (n-- > 0) { -+ hu = sc->hudc.dhuff; -+ *dct++ = (sc->dc += DEC_REC(in, hu, r, t)); -+ -+ hu = sc->huac.dhuff; -+ i = 63; -+ while (i > 0) { -+ t = DEC_REC(in, hu, r, t); -+ if (t == 0 && r == 0) { -+ dct += i; -+ break; -+ } -+ dct += r; -+ *dct++ = t; -+ i -= r + 1; -+ } -+ *maxp++ = 64 - i; -+ if (n == sc->next) -+ sc++; -+ } -+ LEBI_PUT(in); -+} -+ -+static void dec_makehuff(hu, hufflen, huffvals) -+struct dec_hufftbl *hu; -+int *hufflen; -+unsigned char *huffvals; -+{ -+ int code, k, i, j, d, x, c, v; -+ for (i = 0; i < (1 << DECBITS); i++) -+ hu->llvals[i] = 0; -+ -+/* -+ * llvals layout: -+ * -+ * value v already known, run r, backup u bits: -+ * vvvvvvvvvvvvvvvv 0000 rrrr 1 uuuuuuu -+ * value unknown, size b bits, run r, backup u bits: -+ * 000000000000bbbb 0000 rrrr 0 uuuuuuu -+ * value and size unknown: -+ * 0000000000000000 0000 0000 0 0000000 -+ */ -+ code = 0; -+ k = 0; -+ for (i = 0; i < 16; i++, code <<= 1) { /* sizes */ -+ hu->valptr[i] = k; -+ for (j = 0; j < hufflen[i]; j++) { -+ hu->vals[k] = *huffvals++; -+ if (i < DECBITS) { -+ c = code << (DECBITS - 1 - i); -+ v = hu->vals[k] & 0x0f; /* size */ -+ for (d = 1 << (DECBITS - 1 - i); --d >= 0;) { -+ if (v + i < DECBITS) { /* both fit in table */ -+ x = d >> (DECBITS - 1 - v - -+ i); -+ if (v && x < (1 << (v - 1))) -+ x += (-1 << v) + 1; -+ x = x << 16 | (hu-> vals[k] & 0xf0) << 4 | -+ (DECBITS - (i + 1 + v)) | 128; -+ } else -+ x = v << 16 | (hu-> vals[k] & 0xf0) << 4 | -+ (DECBITS - (i + 1)); -+ hu->llvals[c | d] = x; -+ } -+ } -+ code++; -+ k++; -+ } -+ hu->maxcode[i] = code; -+ } -+ hu->maxcode[16] = 0x20000; /* always terminate decode */ -+} -+ -+/****************************************************************/ -+/************** idct ***************/ -+/****************************************************************/ -+ -+#define ONE ((PREC)IFIX(1.)) -+#define S2 ((PREC)IFIX(0.382683432)) -+#define C2 ((PREC)IFIX(0.923879532)) -+#define C4 ((PREC)IFIX(0.707106781)) -+ -+#define S22 ((PREC)IFIX(2 * 0.382683432)) -+#define C22 ((PREC)IFIX(2 * 0.923879532)) -+#define IC4 ((PREC)IFIX(1 / 0.707106781)) -+ -+#define C3IC1 ((PREC)IFIX(0.847759065)) /* c3/c1 */ -+#define C5IC1 ((PREC)IFIX(0.566454497)) /* c5/c1 */ -+#define C7IC1 ((PREC)IFIX(0.198912367)) /* c7/c1 */ -+ -+#define XPP(a,b) (t = a + b, b = a - b, a = t) -+#define XMP(a,b) (t = a - b, b = a + b, a = t) -+#define XPM(a,b) (t = a + b, b = b - a, a = t) -+ -+#define ROT(a,b,s,c) ( t = IMULT(a + b, s), \ -+ a = IMULT(a, c - s) + t, \ -+ b = IMULT(b, c + s) - t) -+ -+#define IDCT \ -+( \ -+ XPP(t0, t1), \ -+ XMP(t2, t3), \ -+ t2 = IMULT(t2, IC4) - t3, \ -+ XPP(t0, t3), \ -+ XPP(t1, t2), \ -+ XMP(t4, t7), \ -+ XPP(t5, t6), \ -+ XMP(t5, t7), \ -+ t5 = IMULT(t5, IC4), \ -+ ROT(t4, t6, S22, C22),\ -+ t6 -= t7, \ -+ t5 -= t6, \ -+ t4 -= t5, \ -+ XPP(t0, t7), \ -+ XPP(t1, t6), \ -+ XPP(t2, t5), \ -+ XPP(t3, t4) \ -+) -+ -+static unsigned char zig2[64] = { -+ 0, 2, 3, 9, 10, 20, 21, 35, -+ 14, 16, 25, 31, 39, 46, 50, 57, -+ 5, 7, 12, 18, 23, 33, 37, 48, -+ 27, 29, 41, 44, 52, 55, 59, 62, -+ 15, 26, 30, 40, 45, 51, 56, 58, -+ 1, 4, 8, 11, 19, 22, 34, 36, -+ 28, 42, 43, 53, 54, 60, 61, 63, -+ 6, 13, 17, 24, 32, 38, 47, 49 -+}; -+ -+void idct(in, out, quant, off, max) -+int *in; -+int *out; -+PREC *quant; -+PREC off; -+int max; -+{ -+ PREC t0, t1, t2, t3, t4, t5, t6, t7, t; -+ PREC tmp[64], *tmpp; -+ int i, j; -+ unsigned char *zig2p; -+ -+ t0 = off; -+ if (max == 1) { -+ t0 += in[0] * quant[0]; -+ for (i = 0; i < 64; i++) -+ out[i] = ITOINT(t0); -+ return; -+ } -+ zig2p = zig2; -+ tmpp = tmp; -+ for (i = 0; i < 8; i++) { -+ j = *zig2p++; -+ t0 += in[j] * quant[j]; -+ j = *zig2p++; -+ t5 = in[j] * quant[j]; -+ j = *zig2p++; -+ t2 = in[j] * quant[j]; -+ j = *zig2p++; -+ t7 = in[j] * quant[j]; -+ j = *zig2p++; -+ t1 = in[j] * quant[j]; -+ j = *zig2p++; -+ t4 = in[j] * quant[j]; -+ j = *zig2p++; -+ t3 = in[j] * quant[j]; -+ j = *zig2p++; -+ t6 = in[j] * quant[j]; -+ IDCT; -+ tmpp[0 * 8] = t0; -+ tmpp[1 * 8] = t1; -+ tmpp[2 * 8] = t2; -+ tmpp[3 * 8] = t3; -+ tmpp[4 * 8] = t4; -+ tmpp[5 * 8] = t5; -+ tmpp[6 * 8] = t6; -+ tmpp[7 * 8] = t7; -+ tmpp++; -+ t0 = 0; -+ } -+ for (i = 0; i < 8; i++) { -+ t0 = tmp[8 * i + 0]; -+ t1 = tmp[8 * i + 1]; -+ t2 = tmp[8 * i + 2]; -+ t3 = tmp[8 * i + 3]; -+ t4 = tmp[8 * i + 4]; -+ t5 = tmp[8 * i + 5]; -+ t6 = tmp[8 * i + 6]; -+ t7 = tmp[8 * i + 7]; -+ IDCT; -+ out[8 * i + 0] = ITOINT(t0); -+ out[8 * i + 1] = ITOINT(t1); -+ out[8 * i + 2] = ITOINT(t2); -+ out[8 * i + 3] = ITOINT(t3); -+ out[8 * i + 4] = ITOINT(t4); -+ out[8 * i + 5] = ITOINT(t5); -+ out[8 * i + 6] = ITOINT(t6); -+ out[8 * i + 7] = ITOINT(t7); -+ } -+} -+ -+static unsigned char zig[64] = { -+ 0, 1, 5, 6, 14, 15, 27, 28, -+ 2, 4, 7, 13, 16, 26, 29, 42, -+ 3, 8, 12, 17, 25, 30, 41, 43, -+ 9, 11, 18, 24, 31, 40, 44, 53, -+ 10, 19, 23, 32, 39, 45, 52, 54, -+ 20, 22, 33, 38, 46, 51, 55, 60, -+ 21, 34, 37, 47, 50, 56, 59, 61, -+ 35, 36, 48, 49, 57, 58, 62, 63 -+}; -+ -+static PREC aaidct[8] = { -+ IFIX(0.3535533906), IFIX(0.4903926402), -+ IFIX(0.4619397663), IFIX(0.4157348062), -+ IFIX(0.3535533906), IFIX(0.2777851165), -+ IFIX(0.1913417162), IFIX(0.0975451610) -+}; -+ -+ -+static void idctqtab(qin, qout) -+unsigned char *qin; -+PREC *qout; -+{ -+ int i, j; -+ -+ for (i = 0; i < 8; i++) -+ for (j = 0; j < 8; j++) -+ qout[zig[i * 8 + j]] = qin[zig[i * 8 + j]] * -+ IMULT(aaidct[i], aaidct[j]); -+} -+ -+static void scaleidctqtab(q, sc) -+PREC *q; -+PREC sc; -+{ -+ int i; -+ -+ for (i = 0; i < 64; i++) -+ q[i] = IMULT(q[i], sc); -+} -+ -+/****************************************************************/ -+/************** color decoder ***************/ -+/****************************************************************/ -+ -+#define ROUND -+ -+/* -+ * YCbCr Color transformation: -+ * -+ * y:0..255 Cb:-128..127 Cr:-128..127 -+ * -+ * R = Y + 1.40200 * Cr -+ * G = Y - 0.34414 * Cb - 0.71414 * Cr -+ * B = Y + 1.77200 * Cb -+ * -+ * => -+ * Cr *= 1.40200; -+ * Cb *= 1.77200; -+ * Cg = 0.19421 * Cb + .50937 * Cr; -+ * R = Y + Cr; -+ * G = Y - Cg; -+ * B = Y + Cb; -+ * -+ * => -+ * Cg = (50 * Cb + 130 * Cr + 128) >> 8; -+ */ -+ -+static void initcol(q) -+PREC q[][64]; -+{ -+ scaleidctqtab(q[1], IFIX(1.77200)); -+ scaleidctqtab(q[2], IFIX(1.40200)); -+} -+ -+/* This is optimized for the stupid sun SUNWspro compiler. */ -+#define STORECLAMP(a,x) \ -+( \ -+ (a) = (x), \ -+ (unsigned int)(x) >= 256 ? \ -+ ((a) = (x) < 0 ? 0 : 255) \ -+ : \ -+ 0 \ -+) -+ -+#define CLAMP(x) ((unsigned int)(x) >= 256 ? ((x) < 0 ? 0 : 255) : (x)) -+ -+#ifdef ROUND -+ -+#define CBCRCG(yin, xin) \ -+( \ -+ cb = outc[0 +yin*8+xin], \ -+ cr = outc[64+yin*8+xin], \ -+ cg = (50 * cb + 130 * cr + 128) >> 8 \ -+) -+ -+#else -+ -+#define CBCRCG(yin, xin) \ -+( \ -+ cb = outc[0 +yin*8+xin], \ -+ cr = outc[64+yin*8+xin], \ -+ cg = (3 * cb + 8 * cr) >> 4 \ -+) -+ -+#endif -+ -+#define PIC(yin, xin, p, xout) \ -+( \ -+ y = outy[(yin) * 8 + xin], \ -+ STORECLAMP(p[(xout) * 3 + 0], y + cr), \ -+ STORECLAMP(p[(xout) * 3 + 1], y - cg), \ -+ STORECLAMP(p[(xout) * 3 + 2], y + cb) \ -+) -+ -+#ifdef __LITTLE_ENDIAN -+#define PIC_16(yin, xin, p, xout, add) \ -+( \ -+ y = outy[(yin) * 8 + xin], \ -+ y = ((CLAMP(y + cr + add*2+1) & 0xf8) << 8) | \ -+ ((CLAMP(y - cg + add ) & 0xfc) << 3) | \ -+ ((CLAMP(y + cb + add*2+1) ) >> 3), \ -+ p[(xout) * 2 + 0] = y & 0xff, \ -+ p[(xout) * 2 + 1] = y >> 8 \ -+) -+#else -+#ifdef CONFIG_PPC -+#define PIC_16(yin, xin, p, xout, add) \ -+( \ -+ y = outy[(yin) * 8 + xin], \ -+ y = ((CLAMP(y + cr + add*2+1) & 0xf8) << 7) | \ -+ ((CLAMP(y - cg + add*2+1) & 0xf8) << 2) | \ -+ ((CLAMP(y + cb + add*2+1) ) >> 3), \ -+ p[(xout) * 2 + 0] = y >> 8, \ -+ p[(xout) * 2 + 1] = y & 0xff \ -+) -+#else -+#define PIC_16(yin, xin, p, xout, add) \ -+( \ -+ y = outy[(yin) * 8 + xin], \ -+ y = ((CLAMP(y + cr + add*2+1) & 0xf8) << 8) | \ -+ ((CLAMP(y - cg + add ) & 0xfc) << 3) | \ -+ ((CLAMP(y + cb + add*2+1) ) >> 3), \ -+ p[(xout) * 2 + 0] = y >> 8, \ -+ p[(xout) * 2 + 1] = y & 0xff \ -+) -+#endif -+#endif -+ -+#define PIC221111(xin) \ -+( \ -+ CBCRCG(0, xin), \ -+ PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0), \ -+ PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1), \ -+ PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0), \ -+ PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1) \ -+) -+ -+#define PIC221111_16(xin) \ -+( \ -+ CBCRCG(0, xin), \ -+ PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0, 3), \ -+ PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1, 0), \ -+ PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0, 1), \ -+ PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1, 2) \ -+) -+ -+static void col221111(out, pic, width) -+int *out; -+unsigned char *pic; -+int width; -+{ -+ int i, j, k; -+ unsigned char *pic0, *pic1; -+ int *outy, *outc; -+ int cr, cg, cb, y; -+ -+ pic0 = pic; -+ pic1 = pic + width; -+ outy = out; -+ outc = out + 64 * 4; -+ for (i = 2; i > 0; i--) { -+ for (j = 4; j > 0; j--) { -+ for (k = 0; k < 8; k++) { -+ PIC221111(k); -+ } -+ outc += 8; -+ outy += 16; -+ pic0 += 2 * width; -+ pic1 += 2 * width; -+ } -+ outy += 64 * 2 - 16 * 4; -+ } -+} -+ -+static void col221111_16(out, pic, width) -+int *out; -+unsigned char *pic; -+int width; -+{ -+ int i, j, k; -+ unsigned char *pic0, *pic1; -+ int *outy, *outc; -+ int cr, cg, cb, y; -+ -+ pic0 = pic; -+ pic1 = pic + width; -+ outy = out; -+ outc = out + 64 * 4; -+ for (i = 2; i > 0; i--) { -+ for (j = 4; j > 0; j--) { -+ for (k = 0; k < 8; k++) { -+ PIC221111_16(k); -+ } -+ outc += 8; -+ outy += 16; -+ pic0 += 2 * width; -+ pic1 += 2 * width; -+ } -+ outy += 64 * 2 - 16 * 4; -+ } -+} -diff -ruN linux-2.4.31/drivers/video/fbcon-jpegdec.h linux-2.4.31-bs/drivers/video/fbcon-jpegdec.h ---- linux-2.4.31/drivers/video/fbcon-jpegdec.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.4.31-bs/drivers/video/fbcon-jpegdec.h 2005-05-06 11:23:55.000000000 +0100 -@@ -0,0 +1,24 @@ -+#define ERR_NO_SOI 1 -+#define ERR_NOT_8BIT 2 -+#define ERR_HEIGHT_MISMATCH 3 -+#define ERR_WIDTH_MISMATCH 4 -+#define ERR_BAD_WIDTH_OR_HEIGHT 5 -+#define ERR_TOO_MANY_COMPPS 6 -+#define ERR_ILLEGAL_HV 7 -+#define ERR_QUANT_TABLE_SELECTOR 8 -+#define ERR_NOT_YCBCR_221111 9 -+#define ERR_UNKNOWN_CID_IN_SCAN 10 -+#define ERR_NOT_SEQUENTIAL_DCT 11 -+#define ERR_WRONG_MARKER 12 -+#define ERR_NO_EOI 13 -+#define ERR_BAD_TABLES 14 -+#define ERR_DEPTH_MISMATCH 15 -+ -+struct jpeg_decdata { -+ int dcts[6 * 64 + 16]; -+ int out[64 * 6]; -+ int dquant[3][64]; -+}; -+ -+extern int jpeg_decode(unsigned char *, unsigned char *, int, int, int, struct jpeg_decdata *); -+extern int jpeg_check_size(unsigned char *, int, int); -diff -ruN linux-2.4.31/drivers/video/fbcon-splash.c linux-2.4.31-bs/drivers/video/fbcon-splash.c ---- linux-2.4.31/drivers/video/fbcon-splash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.4.31-bs/drivers/video/fbcon-splash.c 2005-05-06 11:24:52.000000000 +0100 -@@ -0,0 +1,848 @@ -+/* -+ * linux/drivers/video/fbcon-splash.c - splash screen handling functions. -+ * -+ * (w) 2001-2003 by Volker Poplawski, -+ * Stefan Reinauer, -+ * Steffen Winterfeldt, -+ * -+ * Ideas & SuSE screen work by Ken Wimer, -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include