Permalink
Browse files

Fixed hierarchical encoding, fixed handling of grey-scale images,

fixed images starting with a code that could be confused with a
white space.
  • Loading branch information...
1 parent 9af2838 commit 47e0fc9603c40ca977ac7a802f5a75dd1418f209 Thomas Richter committed Nov 17, 2012
Showing with 246 additions and 142 deletions.
  1. +2 −2 autoconfig.h
  2. +1 −1 automakefile
  3. +4 −4 cmd/main.cpp
  4. +5 −1 codestream/aclosslessscan.cpp
  5. +223 −128 codestream/vesadctscan.cpp
  6. +2 −2 codestream/vesadctscan.hpp
  7. +1 −1 configure.in
  8. +6 −1 control/blocklineadapter.cpp
  9. +2 −2 marker/quantization.cpp
View
@@ -453,7 +453,7 @@
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
+#define SIZEOF_LONG 4
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
@@ -462,7 +462,7 @@
#define SIZEOF_SHORT 2
/* The size of `void *', as computed by sizeof. */
-#define SIZEOF_VOID_P 8
+#define SIZEOF_VOID_P 4
/* The size of `__int64', as computed by sizeof. */
#define SIZEOF___INT64 0
View
@@ -17,7 +17,7 @@ PREFIX = /home/thor/bin/wavelet
PTHREADCFLAGS =
PTHREADLDFLAGS =
PTHREADLIBS =
-HWTYPE = x86_64
+HWTYPE = i686
HAVE_ADDONS =
BITSIZE =
##
View
@@ -46,7 +46,7 @@ the committee itself.
/*
** This header provides the main function.
**
-** $Id: main.cpp,v 1.81 2012-10-11 12:54:03 thor Exp $
+** $Id: main.cpp,v 1.84 2012-11-16 19:47:27 thor Exp $
**
*/
@@ -281,7 +281,7 @@ JPG_LONG BitmapHook(struct JPG_Hook *hook, struct JPG_TagItem *tags)
if (bmm->bmm_bFloat) {
ULONG count = bmm->bmm_ulWidth * height;
UWORD *data = (UWORD *)bmm->bmm_pMemPtr;
- double r,g,b;
+ double r = 0.0,g = 0.0,b = 0.0; // shut up the compiler.
do {
switch(bmm->bmm_usDepth) {
case 1:
@@ -752,7 +752,7 @@ void Encode(const char *source,const char *target,int quality,int hdrquality,int
bool big = false;
if (fscanf(in,"%c%c\n",&id,&type) == 2) {
if (id == 'P' && (type == '5' || type == '6' || type == 'f' || type == 'F')) {
- if (type == 5) {
+ if (type == '5') {
depth = 1;
} else {
depth = 3; // PFM is three-component.
@@ -762,7 +762,7 @@ void Encode(const char *source,const char *target,int quality,int hdrquality,int
fgets(buffer,sizeof(buffer),in);
}
ungetc(id,in);
- if (fscanf(in,"%d %d %d\n",&width,&height,&max) == 3) {
+ if (fscanf(in,"%d %d %d%*c",&width,&height,&max) == 3) {
prec = 0;
while((1 << prec) < max)
prec++;
@@ -47,7 +47,7 @@ the committee itself.
**
** Represents the scan including the scan header.
**
-** $Id: aclosslessscan.cpp,v 1.25 2012-09-22 20:51:40 thor Exp $
+** $Id: aclosslessscan.cpp,v 1.26 2012-11-02 20:50:17 thor Exp $
**
*/
@@ -134,6 +134,8 @@ void ACLosslessScan::StartParseScan(class ByteStream *io,class BufferCtrl *ctrl)
int i;
FindComponentDimensions();
+
+ m_bNoPrediction = true;
for(i = 0;i < m_ucCount;i++) {
dc = m_pScan->DCConditionerOf(i);
@@ -166,6 +168,8 @@ void ACLosslessScan::StartWriteScan(class ByteStream *io,class BufferCtrl *ctrl)
FindComponentDimensions();
+ m_bNoPrediction = true;
+
for(i = 0;i < m_ucCount;i++) {
dc = m_pScan->DCConditionerOf(i);
Oops, something went wrong.

0 comments on commit 47e0fc9

Please sign in to comment.