aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/jpeg-6b/jquant2.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/jpeg-6b/jquant2.c')
-rw-r--r--test/monniaux/jpeg-6b/jquant2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/monniaux/jpeg-6b/jquant2.c b/test/monniaux/jpeg-6b/jquant2.c
index af601e33..6eb3bb17 100644
--- a/test/monniaux/jpeg-6b/jquant2.c
+++ b/test/monniaux/jpeg-6b/jquant2.c
@@ -529,9 +529,9 @@ compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor)
}
}
- cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total);
- cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total);
- cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total);
+ cinfo->colormap[0][icolor] = (JSAMPLE) INT_DIV((c0total + (total>>1)), total);
+ cinfo->colormap[1][icolor] = (JSAMPLE) INT_DIV((c1total + (total>>1)), total);
+ cinfo->colormap[2][icolor] = (JSAMPLE) INT_DIV((c2total + (total>>1)), total);
}