jbig2dec
Ralph Giles <[email protected]> Tue, 02 Jul 2002 17:10:09 -0700
| Newsgroups | gmane.comp.printing.ghostscript.jbig2dec.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/jbig2dec/jbig2dec
In directory usw-pr-cvs1:/tmp/cvs-serv19182
Modified Files:
jbig2.h jbig2_image.c
Log Message:
We've been using (and want) the image stride in bytes, not words.
Index: jbig2.h
===================================================================
RCS file: /cvsroot/jbig2dec/jbig2dec/jbig2.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- jbig2.h 22 Jun 2002 16:05:45 -0000 1.9
+++ jbig2.h 3 Jul 2002 00:10:07 -0000 1.10
@@ -43,7 +43,7 @@
/*
this is the general image structure used by the jbig2dec library
images are 1 bpp, packed into word-aligned rows. stride gives
- the word offset to the next row, while width and height define
+ the byte offset to the next row, while width and height define
the size of the image area in pixels.
*/
Index: jbig2_image.c
===================================================================
RCS file: /cvsroot/jbig2dec/jbig2dec/jbig2_image.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- jbig2_image.c 24 Jun 2002 15:51:57 -0000 1.7
+++ jbig2_image.c 3 Jul 2002 00:10:07 -0000 1.8
@@ -1,7 +1,7 @@
/*
jbig2dec
- Copyright (c) 2001 artofcode LLC.
+ Copyright (c) 2001-2002 artofcode LLC.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,8 +33,8 @@
return NULL;
}
- stride = (((width - 1) >> 5) + 1) << 2; /* generate a word-aligned stride */
- image->data = (uint32_t *)jbig2_alloc(ctx->allocator, (stride*height));
+ stride = ((width - 1) >> 5) + 1; /* generate a word-aligned stride */
+ image->data = (uint32_t *)jbig2_alloc(ctx->allocator, stride*height);
if (image->data == NULL) {
jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1,
"could not allocate image data buffer! [%d bytes]\n", stride*height);