Further reduce the size of a binned triangle.
/* one-pixel sized trivial reject offsets for each plane */
int eo;
-
- /* one-pixel sized trivial accept offsets for each plane */
- int ei;
};
/**
const int dcdx = -plane[j].dcdx * 4;
const int dcdy = plane[j].dcdy * 4;
const int cox = plane[j].eo * 4;
- const int cio = plane[j].ei * 4 - 1;
+ const int ei = plane[j].dcdy - plane[j].dcdx - plane[j].eo;
+ const int cio = ei * 4 - 1;
build_masks(c[j] + cox,
cio - cox,
const int dcdx = -plane[j].dcdx * 16;
const int dcdy = plane[j].dcdy * 16;
const int cox = plane[j].eo * 16;
- const int cio = plane[j].ei * 16 - 1;
+ 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,
plane[i].eo = 0;
if (plane[i].dcdx < 0) plane[i].eo -= plane[i].dcdx;
if (plane[i].dcdy > 0) plane[i].eo += plane[i].dcdy;
-
- /* Calculate trivial accept offsets from the above.
- */
- plane[i].ei = plane[i].dcdy - plane[i].dcdx - plane[i].eo;
}
plane[4].dcdx = -1;
plane[4].dcdy = 0;
plane[4].c = 1-bbox.x0;
- plane[4].ei = 0;
plane[4].eo = 1;
plane[5].dcdx = 1;
plane[5].dcdy = 0;
plane[5].c = bbox.x1+1;
- plane[5].ei = -1;
plane[5].eo = 0;
plane[6].dcdx = 0;
plane[6].dcdy = 1;
plane[6].c = 1-bbox.y0;
- plane[6].ei = 0;
plane[6].eo = 1;
plane[7].dcdx = 0;
plane[7].dcdy = -1;
plane[7].c = bbox.y1+1;
- plane[7].ei = -1;
plane[7].eo = 0;
}
plane[0].dcdx = -1;
plane[0].dcdy = 0;
plane[0].c = 1-bbox.x0;
- plane[0].ei = 0;
plane[0].eo = 1;
plane[1].dcdx = 1;
plane[1].dcdy = 0;
plane[1].c = bbox.x1+1;
- plane[1].ei = -1;
plane[1].eo = 0;
plane[2].dcdx = 0;
plane[2].dcdy = 1;
plane[2].c = 1-bbox.y0;
- plane[2].ei = 0;
plane[2].eo = 1;
plane[3].dcdx = 0;
plane[3].dcdy = -1;
plane[3].c = bbox.y1+1;
- plane[3].ei = -1;
plane[3].eo = 0;
}
plane[i].eo = 0;
if (plane[i].dcdx < 0) plane[i].eo -= plane[i].dcdx;
if (plane[i].dcdy > 0) plane[i].eo += plane[i].dcdy;
-
- /* Calculate trivial accept offsets from the above.
- */
- plane[i].ei = plane[i].dcdy - plane[i].dcdx - plane[i].eo;
}
plane[3].dcdx = -1;
plane[3].dcdy = 0;
plane[3].c = 1-bbox.x0;
- plane[3].ei = 0;
plane[3].eo = 1;
plane[4].dcdx = 1;
plane[4].dcdy = 0;
plane[4].c = bbox.x1+1;
- plane[4].ei = -1;
plane[4].eo = 0;
plane[5].dcdx = 0;
plane[5].dcdy = 1;
plane[5].c = 1-bbox.y0;
- plane[5].ei = 0;
plane[5].eo = 1;
plane[6].dcdx = 0;
plane[6].dcdy = -1;
plane[6].c = bbox.y1+1;
- plane[6].ei = -1;
plane[6].eo = 0;
}
plane[i].dcdy * iy0 * TILE_SIZE -
plane[i].dcdx * ix0 * TILE_SIZE);
- ei[i] = plane[i].ei << TILE_ORDER;
+ ei[i] = (plane[i].dcdy -
+ plane[i].dcdx -
+ plane[i].eo) << TILE_ORDER;
+
eo[i] = plane[i].eo << TILE_ORDER;
xstep[i] = -(plane[i].dcdx << TILE_ORDER);
ystep[i] = plane[i].dcdy << TILE_ORDER;