ref: c1707f54d0e1ac8fc69363b52a1c88bd79b66ff3
parent: eaee584fd278b0377a10f8dbd6dce3bfe11199cb
author: Sebastian Rasmussen <sebras@gmail.com>
date: Wed May 30 13:30:37 EDT 2018
jbig2dec: Change types to match those of the parsed data.
--- a/jbig2_generic.c
+++ b/jbig2_generic.c
@@ -57,10 +57,10 @@
const Jbig2GenericRegionParams *params, Jbig2ArithState *as,
Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
- const int rowstride = image->stride;
- int x, y;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
+ const uint32_t rowstride = image->stride;
+ uint32_t x, y;
byte *line2 = NULL;
byte *line1 = NULL;
byte *gbreg_line = (byte *) image->data;
@@ -126,10 +126,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
uint32_t CONTEXT;
- int x, y;
+ uint32_t x, y;
bool bit;
int code = 0;
@@ -175,10 +175,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
uint32_t CONTEXT;
- int x, y;
+ uint32_t x, y;
bool bit;
int code = 0;
@@ -218,10 +218,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
- const int rowstride = image->stride;
- int x, y;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
+ const uint32_t rowstride = image->stride;
+ uint32_t x, y;
byte *line2 = NULL;
byte *line1 = NULL;
byte *gbreg_line = (byte *) image->data;
@@ -284,10 +284,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
uint32_t CONTEXT;
- int x, y;
+ uint32_t x, y;
bool bit;
int code = 0;
@@ -325,10 +325,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
- const int rowstride = image->stride;
- int x, y;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
+ const uint32_t rowstride = image->stride;
+ uint32_t x, y;
byte *line2 = NULL;
byte *line1 = NULL;
byte *gbreg_line = (byte *) image->data;
@@ -391,12 +391,12 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
- const int rowstride = image->stride;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
+ const uint32_t rowstride = image->stride;
byte *line1 = NULL;
byte *gbreg_line = (byte *) image->data;
- int x, y;
+ uint32_t x, y;
int code;
#ifdef OUTPUT_PBM
@@ -450,10 +450,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
uint32_t CONTEXT;
- int x, y;
+ uint32_t x, y;
bool bit;
int code = 0;
@@ -504,10 +504,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
uint32_t CONTEXT;
- int x, y;
+ uint32_t x, y;
bool bit;
int LTP = 0;
int code = 0;
@@ -559,10 +559,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
uint32_t CONTEXT;
- int x, y;
+ uint32_t x, y;
bool bit;
int LTP = 0;
int code = 0;
@@ -608,10 +608,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
uint32_t CONTEXT;
- int x, y;
+ uint32_t x, y;
bool bit;
int LTP = 0;
int code = 0;
@@ -654,10 +654,10 @@
Jbig2Segment *segment,
const Jbig2GenericRegionParams *params, Jbig2ArithState *as, Jbig2Image *image, Jbig2ArithCx *GB_stats)
{
- const int GBW = image->width;
- const int GBH = image->height;
+ const uint32_t GBW = image->width;
+ const uint32_t GBH = image->height;
uint32_t CONTEXT;
- int x, y;
+ uint32_t x, y;
bool bit;
int LTP = 0;
int code = 0;
--- a/jbig2_halftone.c
+++ b/jbig2_halftone.c
@@ -43,9 +43,9 @@
jbig2_hd_new(Jbig2Ctx *ctx, const Jbig2PatternDictParams *params, Jbig2Image *image)
{
Jbig2PatternDict *new;
- const int N = params->GRAYMAX + 1;
- const int HPW = params->HDPW;
- const int HPH = params->HDPH;
+ const uint32_t N = params->GRAYMAX + 1;
+ const uint32_t HPW = params->HDPW;
+ const uint32_t HPH = params->HDPH;
int code;
int i;
int j;