summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2003-12-21 21:29:08 +0000
committerwiz <wiz@pkgsrc.org>2003-12-21 21:29:08 +0000
commit7f0d840457a003f6bbd6546d206d4831543a79ab (patch)
tree5875c58dc5879c9d3f1237453975ec376f6766c9 /graphics
parent8e5ae0dcba169138fab33f1eb989a355b24589f9 (diff)
downloadpkgsrc-7f0d840457a003f6bbd6546d206d4831543a79ab.tar.gz
Initial import of jpeg_ls-2.2:
This software package contains an implementation of JPEG-LS, the emerging lossless/near-lossless compression standard for continuous-tone images being developed by ISO/IEC JTC1/SC29/WG1 (draft document FCD14495 as of November 1997). The names of the executables in the software package derive from the acronym LOCO, as the core of the new standard is based on the LOCO-I algorithm (LOw COmplexity LOssless COmpression for Images) developed at Hewlett-Packard Laboratories (reference: M. Weinberger, G. Seroussi, G. Sapiro, "LOCO-I: A Low Complexity, Context-Based, Lossless Image Compression Algorithm," Proc. IEEE Data Compression Conference, Snowbird, Utah, March-April 1996). The term "near-lossless compression" refers to a lossy algorithm for which each decompressed image sample differs from the corresponding original image sample by not more than a pre-specified value, the (usually small) "loss." Lossless compression corresponds to loss=0. Even though the term "continuous-tone image" refers in principle to any image whose components have more than one bit per sample, palletized images may require a reordering of the color palette for best compression results using LOCO-I on the array of color indices. This functionality is not implemented in the present software, although it is supported by the new standard, and is easy enough to implement with the tools given. Notice, however, that LOCO-I and JPEG-LS were not designed, and might not give optimal performance, for images that have been palletized through dithering.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/jpeg_ls/DESCR25
-rw-r--r--graphics/jpeg_ls/Makefile28
-rw-r--r--graphics/jpeg_ls/PLIST11
-rw-r--r--graphics/jpeg_ls/distinfo11
-rw-r--r--graphics/jpeg_ls/patches/patch-aa31
-rw-r--r--graphics/jpeg_ls/patches/patch-ab31
-rw-r--r--graphics/jpeg_ls/patches/patch-ac25
-rw-r--r--graphics/jpeg_ls/patches/patch-ad31
-rw-r--r--graphics/jpeg_ls/patches/patch-ae31
-rw-r--r--graphics/jpeg_ls/patches/patch-af22
-rw-r--r--graphics/jpeg_ls/patches/patch-ag25
11 files changed, 271 insertions, 0 deletions
diff --git a/graphics/jpeg_ls/DESCR b/graphics/jpeg_ls/DESCR
new file mode 100644
index 00000000000..f7d883f126e
--- /dev/null
+++ b/graphics/jpeg_ls/DESCR
@@ -0,0 +1,25 @@
+This software package contains an implementation of JPEG-LS, the
+emerging lossless/near-lossless compression standard for continuous-tone
+images being developed by ISO/IEC JTC1/SC29/WG1 (draft document
+FCD14495 as of November 1997). The names of the executables in the
+software package derive from the acronym LOCO, as the core of the
+new standard is based on the LOCO-I algorithm (LOw COmplexity
+LOssless COmpression for Images) developed at Hewlett-Packard
+Laboratories (reference: M. Weinberger, G. Seroussi, G. Sapiro,
+"LOCO-I: A Low Complexity, Context-Based, Lossless Image Compression
+Algorithm," Proc. IEEE Data Compression Conference, Snowbird, Utah,
+March-April 1996).
+
+The term "near-lossless compression" refers to a lossy algorithm
+for which each decompressed image sample differs from the corresponding
+original image sample by not more than a pre-specified value, the
+(usually small) "loss." Lossless compression corresponds to loss=0.
+Even though the term "continuous-tone image" refers in principle
+to any image whose components have more than one bit per sample,
+palletized images may require a reordering of the color palette
+for best compression results using LOCO-I on the array of color
+indices. This functionality is not implemented in the present
+software, although it is supported by the new standard, and is easy
+enough to implement with the tools given. Notice, however, that
+LOCO-I and JPEG-LS were not designed, and might not give optimal
+performance, for images that have been palletized through dithering.
diff --git a/graphics/jpeg_ls/Makefile b/graphics/jpeg_ls/Makefile
new file mode 100644
index 00000000000..e7e75f01d89
--- /dev/null
+++ b/graphics/jpeg_ls/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+#
+
+DISTNAME= jpeg_ls_v2.2
+PKGNAME= jpeg_ls-2.2
+CATEGORIES= graphics
+MASTER_SITES= http://www.ece.ubc.ca/spmg/research/jpeg/jpeg_ls/ver-2.2/
+
+MAINTAINER= wiz@NetBSD.org
+HOMEPAGE= http://www.ece.ubc.ca/spmg/research/jpeg/jpeg_ls/jpegls.html
+COMMENT= JPEG-LS codec (lossless/near-lossless codec)
+
+USE_BUILDLINK2= yes
+BUILD_DIRS= ${WRKSRC}/Decoder ${WRKSRC}/Encoder
+MAKEFILE= makefile
+
+LICENSE= no-commercial-use
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/Decoder/locod ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/Encoder/locoe ${PREFIX}/bin
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/jpeg_ls
+ ${INSTALL_DATA} ${WRKSRC}/README* ${PREFIX}/share/doc/jpeg_ls
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/jpeg_ls
+ ${INSTALL_DATA} ${WRKSRC}/*.jls ${PREFIX}/share/examples/jpeg_ls
+ ${INSTALL_DATA} ${WRKSRC}/table* ${PREFIX}/share/examples/jpeg_ls
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/jpeg_ls/PLIST b/graphics/jpeg_ls/PLIST
new file mode 100644
index 00000000000..1e4244f8b56
--- /dev/null
+++ b/graphics/jpeg_ls/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+bin/locod
+bin/locoe
+share/doc/jpeg_ls/README
+share/doc/jpeg_ls/README.DIST
+share/examples/jpeg_ls/lena24b.jls
+share/examples/jpeg_ls/lena8b.jls
+share/examples/jpeg_ls/table24_no_red
+share/examples/jpeg_ls/table_r
+@dirrm share/examples/jpeg_ls
+@dirrm share/doc/jpeg_ls
diff --git a/graphics/jpeg_ls/distinfo b/graphics/jpeg_ls/distinfo
new file mode 100644
index 00000000000..6301a1f4821
--- /dev/null
+++ b/graphics/jpeg_ls/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+
+SHA1 (jpeg_ls_v2.2.tar.gz) = d4fde989359eebdc98cf57feeac3076fdfd06c64
+Size (jpeg_ls_v2.2.tar.gz) = 854276 bytes
+SHA1 (patch-aa) = 0b6996179e458c785043aa728600bdc56d96baaf
+SHA1 (patch-ab) = e87c51ca50be30ae6c07094fd935fedee8a1a2f5
+SHA1 (patch-ac) = cdb1d11427c50062df26d4d4c73eca041d08c972
+SHA1 (patch-ad) = fdfa574119fe0bf0b4cdfd110e7b20367f12493d
+SHA1 (patch-ae) = 5ca83b5d3ec9a14d017144c8e6cfb1b0bb5c7e9d
+SHA1 (patch-af) = a0558fef1b2b79343bd6af4cc205e42b65621944
+SHA1 (patch-ag) = 0fcd2ebda598b5d7db62437fda16242a28689295
diff --git a/graphics/jpeg_ls/patches/patch-aa b/graphics/jpeg_ls/patches/patch-aa
new file mode 100644
index 00000000000..f3b09cd0136
--- /dev/null
+++ b/graphics/jpeg_ls/patches/patch-aa
@@ -0,0 +1,31 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+
+--- Decoder/global.h.orig Tue Jun 22 21:04:33 1999
++++ Decoder/global.h
+@@ -95,8 +95,6 @@ extern char *plane_int_string,
+ *pixel_int_string;
+
+
+-#define BIG_ENDIAN 1
+-
+ typedef struct jpeg_ls {
+
+ int columns, /* The number of columns */
+@@ -318,7 +316,7 @@ extern int alpha;
+ extern int vLUT[3][2 * LUTMAX16];
+ extern int lutmax;
+ extern int classmap[CONTEXTS1];
+-extern int *qdiv0, *qdiv, /* quantization table (division via look-up) */
++extern int *qdiv0, *qdiv1, /* quantization table (division via look-up) */
+ *qmul0, *qmul; /* dequantization table */
+
+ /* statistics tables */
+@@ -359,7 +357,7 @@ void prepareLUTs();
+ void prepare_qtables(int, int);
+ void init_stats(int);
+
+-#ifdef BIG_ENDIAN
++#ifdef NEVER_ASSUME_BIG_ENDIAN
+ # define ENDIAN8(x) (x)
+ # define ENDIAN16(x) (x)
+ #else
diff --git a/graphics/jpeg_ls/patches/patch-ab b/graphics/jpeg_ls/patches/patch-ab
new file mode 100644
index 00000000000..2eb233de15b
--- /dev/null
+++ b/graphics/jpeg_ls/patches/patch-ab
@@ -0,0 +1,31 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+
+--- Decoder/initialize.c.orig Tue Jun 22 21:05:54 1999
++++ Decoder/initialize.c
+@@ -63,7 +63,7 @@ int vLUT[3][2 * LUTMAX16];
+
+ int classmap[CONTEXTS1];
+
+-int *qdiv0, *qdiv, /* quantization table (division via look-up) */
++int *qdiv0, *qdiv1, /* quantization table (division via look-up) */
+ *qmul0, *qmul; /* dequantization table */
+
+ int N[TOT_CONTEXTS],
+@@ -206,7 +206,7 @@ void prepare_qtables(int absize, int NEA
+ perror("qdiv table");
+ exit(10);
+ }
+- qdiv = qdiv0+absize-1;
++ qdiv1 = qdiv0+absize-1;
+
+ if ( (qmul0 = (int *)calloc(2*beta-1,sizeof(int)))==NULL ) {
+ perror("qmul table");
+@@ -219,7 +219,7 @@ void prepare_qtables(int absize, int NEA
+ qdiff = - ( (NEAR-diff)/quant );
+ else
+ qdiff = ( NEAR + diff )/quant;
+- qdiv[diff] = qdiff;
++ qdiv1[diff] = qdiff;
+ }
+ for ( qdiff = -(beta-1); qdiff<beta; qdiff++ ) {
+ diff = quant*qdiff;
diff --git a/graphics/jpeg_ls/patches/patch-ac b/graphics/jpeg_ls/patches/patch-ac
new file mode 100644
index 00000000000..1fc92381f36
--- /dev/null
+++ b/graphics/jpeg_ls/patches/patch-ac
@@ -0,0 +1,25 @@
+$NetBSD: patch-ac,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+
+--- Decoder/makefile.orig Tue Jun 22 20:42:53 1999
++++ Decoder/makefile
+@@ -1,8 +1,8 @@
+-CC=cc
++#CC=cc
+ PKGNAME=loco
+-OPTFLAGS= -Aa $(CFL) -DBIG_ENDIAN
++#OPTFLAGS= -Aa $(CFL) -DBIG_ENDIAN
+
+-CFLAGS = $(OPTFLAGS) $(VFL) $(DFL) -DPGMPREFIX=\"$(PREFIX)\" -DMELCODE -DEXTERNDISTRIB -Dinline="" -DNDEBUG
++CFLAGS += $(OPTFLAGS) $(VFL) $(DFL) -DPGMPREFIX=\"$(PREFIX)\" -DMELCODE -DEXTERNDISTRIB -Dinline="" -DNDEBUG
+
+ LNKFLAGS = -lm
+
+@@ -10,6 +10,8 @@ SRCS = global.c jpegmark.c initialize.c
+ INCL = global.h jpegmark.h bitio.h
+
+ EOBJS = global.o jpegmark.o initialize.o decoder.o lossless_d.o lossy_d.o bitio.o melcode.o
++
++all: loco
+
+ loco:
+ $(MAKE) -$(MAKEFLAGS) VFL="" PREFIX="loco" codec
diff --git a/graphics/jpeg_ls/patches/patch-ad b/graphics/jpeg_ls/patches/patch-ad
new file mode 100644
index 00000000000..b8e7ec2cfcd
--- /dev/null
+++ b/graphics/jpeg_ls/patches/patch-ad
@@ -0,0 +1,31 @@
+$NetBSD: patch-ad,v 1.1.1.1 2003/12/21 21:29:08 wiz Exp $
+
+--- Encoder/global.h.orig Tue Jun 22 20:14:15 1999
++++ Encoder/global.h
+@@ -97,8 +97,6 @@ extern char *plane_int_string,
+ *pixel_int_string;
+
+
+-#define BIG_ENDIAN 1
+-
+ typedef struct jpeg_ls {
+
+ int columns, /* The number of columns */
+@@ -318,7 +316,7 @@ extern int alpha;
+ extern int vLUT[3][2 * LUTMAX16];
+ extern int lutmax;
+ extern int classmap[CONTEXTS1];
+-extern int *qdiv0, *qdiv, /* quantization table (division via look-up) */
++extern int *qdiv0, *qdiv1, /* quantization table (division via look-up) */
+ *qmul0, *qmul; /* dequantization table */
+
+ /* statistics tables */
+@@ -365,7 +363,7 @@ void init_stats(int);
+
+
+
+-#ifdef BIG_ENDIAN
++#ifdef NEVER_ASSUME_BIG_ENDIAN
+ # define ENDIAN8(x) (x)
+ # define ENDIAN16(x) (x)
+ #else
diff --git a/graphics/jpeg_ls/patches/patch-ae b/graphics/jpeg_ls/patches/patch-ae
new file mode 100644
index 00000000000..1ea1959181b
--- /dev/null
+++ b/graphics/jpeg_ls/patches/patch-ae
@@ -0,0 +1,31 @@
+$NetBSD: patch-ae,v 1.1.1.1 2003/12/21 21:29:09 wiz Exp $
+
+--- Encoder/initialize.c.orig Tue Jun 22 20:15:24 1999
++++ Encoder/initialize.c
+@@ -64,7 +64,7 @@ int vLUT[3][2 * LUTMAX16];
+
+ int classmap[CONTEXTS1];
+
+-int *qdiv0, *qdiv, /* quantization table (division via look-up) */
++int *qdiv0, *qdiv1, /* quantization table (division via look-up) */
+ *qmul0, *qmul; /* dequantization table */
+
+ int N[TOT_CONTEXTS],
+@@ -229,7 +229,7 @@ void prepare_qtables(int absize, int NEA
+ perror("qdiv table");
+ exit(10);
+ }
+- qdiv = qdiv0+absize-1;
++ qdiv1 = qdiv0+absize-1;
+
+ if ( (qmul0 = (int *)calloc(2*beta-1,sizeof(int)))==NULL ) {
+ perror("qmul table");
+@@ -242,7 +242,7 @@ void prepare_qtables(int absize, int NEA
+ qdiff = - ( (NEAR-dif)/quant );
+ else
+ qdiff = ( NEAR + dif )/quant;
+- qdiv[dif] = qdiff;
++ qdiv1[dif] = qdiff;
+ }
+ for ( qdiff = -(beta-1); qdiff<beta; qdiff++ ) {
+ dif = quant*qdiff;
diff --git a/graphics/jpeg_ls/patches/patch-af b/graphics/jpeg_ls/patches/patch-af
new file mode 100644
index 00000000000..1809f375abe
--- /dev/null
+++ b/graphics/jpeg_ls/patches/patch-af
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.1.1.1 2003/12/21 21:29:09 wiz Exp $
+
+--- Encoder/lossy_e.c.orig Tue Jun 22 20:17:12 1999
++++ Encoder/lossy_e.c
+@@ -91,7 +91,7 @@ inline void lossy_regular_mode(int Q, in
+ Px = Px + (SIGN) * C[Q];
+ clip(Px,alpha);
+ Errval = SIGN * (Ix - Px);
+- qErrval = qdiv[Errval];
++ qErrval = qdiv1[Errval];
+ iqErrval = qmul[qErrval];
+ Rx = Px + SIGN * iqErrval;
+
+@@ -209,7 +209,7 @@ pixel lossy_end_of_run(pixel Ra, pixel R
+ Errval = -Errval;
+ }
+
+- qErrval = qdiv[Errval];
++ qErrval = qdiv1[Errval];
+ iqErrval = qmul[qErrval];
+
+ if ( RItype || (Rb >= Ra) )
diff --git a/graphics/jpeg_ls/patches/patch-ag b/graphics/jpeg_ls/patches/patch-ag
new file mode 100644
index 00000000000..7d5457296e1
--- /dev/null
+++ b/graphics/jpeg_ls/patches/patch-ag
@@ -0,0 +1,25 @@
+$NetBSD: patch-ag,v 1.1.1.1 2003/12/21 21:29:09 wiz Exp $
+
+--- Encoder/makefile.orig Tue Jun 22 20:48:07 1999
++++ Encoder/makefile
+@@ -1,8 +1,8 @@
+-CC=cc
++#CC=cc
+ PKGNAME=loco
+-OPTFLAGS= -Aa $(CFL) -DBIG_ENDIAN
++#OPTFLAGS= -Aa $(CFL) -DBIG_ENDIAN
+
+-CFLAGS = $(OPTFLAGS) $(VFL) $(DFL) -DPGMPREFIX=\"$(PREFIX)\" -DMELCODE -DEXTERNDISTRIB -Dinline="" -DNDEBUG
++CFLAGS += $(OPTFLAGS) $(VFL) $(DFL) -DPGMPREFIX=\"$(PREFIX)\" -DMELCODE -DEXTERNDISTRIB -Dinline="" -DNDEBUG
+
+ LNKFLAGS = -lm
+
+@@ -10,6 +10,8 @@ SRCS = global.c jpegmark.c initialize.c
+ INCL = global.h jpegmark.h bitio.h
+
+ EOBJS = global.o jpegmark.o initialize.o encoder.o lossless_e.o lossy_e.o bitio.o melcode.o
++
++all: loco
+
+ loco:
+ $(MAKE) -$(MAKEFLAGS) VFL="" PREFIX="loco" codec