- const int dcdx = -plane[j].dcdx * 16;
- const int dcdy = plane[j].dcdy * 16;
- const int cox = plane[j].eo * 16;
- const int ei = plane[j].dcdy - plane[j].dcdx - plane[j].eo;
- const int cio = ei * 16 - 1;
-
- build_masks(c[j] + cox,
- cio - cox,
- dcdx, dcdy,
- &outmask, /* sign bits from c[i][0..15] + cox */
- &partmask); /* sign bits from c[i][0..15] + cio */
+ const int64_t dcdx = -IMUL64(plane[j].dcdx, 16);
+ const int64_t dcdy = IMUL64(plane[j].dcdy, 16);
+ const int64_t cox = IMUL64(plane[j].eo, 16);
+ const int64_t ei = plane[j].dcdy - plane[j].dcdx - plane[j].eo;
+ const int64_t cio = IMUL64(ei, 16) - 1;
+
+ BUILD_MASKS(c[j] + cox,
+ cio - cox,
+ dcdx, dcdy,
+ &outmask, /* sign bits from c[i][0..15] + cox */
+ &partmask); /* sign bits from c[i][0..15] + cio */