aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/jpeg-6b/jdcoefct.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/jpeg-6b/jdcoefct.c')
-rw-r--r--test/monniaux/jpeg-6b/jdcoefct.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/monniaux/jpeg-6b/jdcoefct.c b/test/monniaux/jpeg-6b/jdcoefct.c
index 4938d20f..c14c936f 100644
--- a/test/monniaux/jpeg-6b/jdcoefct.c
+++ b/test/monniaux/jpeg-6b/jdcoefct.c
@@ -575,11 +575,11 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) {
num = 36 * Q00 * (DC4 - DC6);
if (num >= 0) {
- pred = (int) (((Q01<<7) + num) / (Q01<<8));
+ pred = (int) INT_DIV(((Q01<<7) + num), (Q01<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
} else {
- pred = (int) (((Q01<<7) - num) / (Q01<<8));
+ pred = (int) INT_DIV(((Q01<<7) - num), (Q01<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
pred = -pred;
@@ -590,11 +590,11 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
if ((Al=coef_bits[2]) != 0 && workspace[8] == 0) {
num = 36 * Q00 * (DC2 - DC8);
if (num >= 0) {
- pred = (int) (((Q10<<7) + num) / (Q10<<8));
+ pred = (int) INT_DIV(((Q10<<7) + num), (Q10<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
} else {
- pred = (int) (((Q10<<7) - num) / (Q10<<8));
+ pred = (int) INT_DIV(((Q10<<7) - num), (Q10<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
pred = -pred;
@@ -605,11 +605,11 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
if ((Al=coef_bits[3]) != 0 && workspace[16] == 0) {
num = 9 * Q00 * (DC2 + DC8 - 2*DC5);
if (num >= 0) {
- pred = (int) (((Q20<<7) + num) / (Q20<<8));
+ pred = (int) INT_DIV(((Q20<<7) + num), (Q20<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
} else {
- pred = (int) (((Q20<<7) - num) / (Q20<<8));
+ pred = (int) INT_DIV(((Q20<<7) - num), (Q20<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
pred = -pred;
@@ -620,11 +620,11 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
if ((Al=coef_bits[4]) != 0 && workspace[9] == 0) {
num = 5 * Q00 * (DC1 - DC3 - DC7 + DC9);
if (num >= 0) {
- pred = (int) (((Q11<<7) + num) / (Q11<<8));
+ pred = (int) INT_DIV(((Q11<<7) + num), (Q11<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
} else {
- pred = (int) (((Q11<<7) - num) / (Q11<<8));
+ pred = (int) INT_DIV(((Q11<<7) - num), (Q11<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
pred = -pred;
@@ -635,11 +635,11 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
if ((Al=coef_bits[5]) != 0 && workspace[2] == 0) {
num = 9 * Q00 * (DC4 + DC6 - 2*DC5);
if (num >= 0) {
- pred = (int) (((Q02<<7) + num) / (Q02<<8));
+ pred = (int) INT_DIV(((Q02<<7) + num), (Q02<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
} else {
- pred = (int) (((Q02<<7) - num) / (Q02<<8));
+ pred = (int) INT_DIV(((Q02<<7) - num), (Q02<<8));
if (Al > 0 && pred >= (1<<Al))
pred = (1<<Al)-1;
pred = -pred;