pkgsrc/graphics/jpeg_ls/patches/patch-aa
wiz 3eca58ed59 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.
2003-12-21 21:29:08 +00:00

31 lines
895 B
Text

$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