pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/jpeg_ls Initial import of jpeg_ls-2.2:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/770d8da1df21
branches:  trunk
changeset: 465132:770d8da1df21
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun Dec 21 21:29:08 2003 +0000

description:
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:

 graphics/jpeg_ls/DESCR            |  25 +++++++++++++++++++++++++
 graphics/jpeg_ls/Makefile         |  28 ++++++++++++++++++++++++++++
 graphics/jpeg_ls/PLIST            |  11 +++++++++++
 graphics/jpeg_ls/distinfo         |  11 +++++++++++
 graphics/jpeg_ls/patches/patch-aa |  31 +++++++++++++++++++++++++++++++
 graphics/jpeg_ls/patches/patch-ab |  31 +++++++++++++++++++++++++++++++
 graphics/jpeg_ls/patches/patch-ac |  25 +++++++++++++++++++++++++
 graphics/jpeg_ls/patches/patch-ad |  31 +++++++++++++++++++++++++++++++
 graphics/jpeg_ls/patches/patch-ae |  31 +++++++++++++++++++++++++++++++
 graphics/jpeg_ls/patches/patch-af |  22 ++++++++++++++++++++++
 graphics/jpeg_ls/patches/patch-ag |  25 +++++++++++++++++++++++++
 11 files changed, 271 insertions(+), 0 deletions(-)

diffs (truncated from 315 to 300 lines):

diff -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/DESCR    Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/Makefile Sun Dec 21 21:29:08 2003 +0000
@@ -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@localhost
+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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/PLIST    Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/distinfo Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-aa Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-ab Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-ac Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-ad Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-ae Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-af Sun Dec 21 21:29:08 2003 +0000
@@ -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 -r 3414d96343c6 -r 770d8da1df21 graphics/jpeg_ls/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/jpeg_ls/patches/patch-ag Sun Dec 21 21:29:08 2003 +0000
@@ -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



Home | Main Index | Thread Index | Old Index