Lines Matching defs:box

44  * Next, the color-selection step begins with a box representing the whole
45 * color space, and repeatedly splits the "largest" remaining box until we
47 * remaining box becomes one of the possible output colors.
55 * the "largest" box and deciding where to cut it. The particular policies
263 /* The bounds of the box (inclusive); expressed as histogram indexes */
267 /* The volume (actually 2-norm) of the box */
269 /* The number of nonzero histogram cells within this box */
271 } box;
273 typedef box * boxptr;
278 /* Find the splittable box with the largest color population */
298 /* Find the splittable box with the largest (scaled) volume */
318 /* Shrink the min/max bounds of a box to enclose only nonzero elements, */
400 /* Update box volume.
403 * a box is splittable iff norm > 0.
413 /* Now scan remaining volume of box and compute population */
430 /* Repeatedly select and split the largest box until we have enough boxes */
437 /* Select box to split.
447 b2 = &boxlist[numboxes]; /* where new box will go */
448 /* Copy the color bounds to the new box. */
451 /* Choose which axis to split the box on.
470 /* Choose split point along selected axis, and update box bounds.
472 * (Since the box has been shrunk to minimum volume,
474 * Note that lb value is max for lower box, so must be < old max.
504 /* Compute representative color for a box, put it in colormap[icolor] */
550 /* Allocate workspace for box list */
552 ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box));
553 /* Initialize one box containing whole space */
563 /* Perform median-cut to produce final box list */
565 /* Compute the representative color for each box, fill colormap */
627 /* log2(histogram cells in update box) for each axis; this can be adjusted */
632 #define BOX_C0_ELEMS (1<<BOX_C0_LOG) /* # of hist cells in update box */
652 /* Locate the colormap entries close enough to an update box to be candidates
653 * for the nearest entry to some cell(s) in the update box. The update box
668 /* Compute true coordinates of update box's upper corner and center.
682 * 1. its minimum squared-distance to any point in the update box
683 * (zero if color is within update box);
684 * 2. its maximum squared-distance to any point in the update box.
685 * Both of these can be found by considering only the corners of the box.
765 /* Now we know that no cell in the update box is more than minmaxdist
767 * within minmaxdist of some part of the box need be considered.
781 /* Find the closest colormap entry for each cell in the update box,
785 * find the distance from a colormap entry to successive cells in the box.
800 /* Initialize best-distance for each cell of the update box */
806 * compute its distance to the center of each cell in the box.
828 /* Now loop over all cells in box, updating distance per Thomas method */
860 /* Fill the inverse-colormap entries in the update box that contains */
866 int minc0, minc1, minc2; /* lower left corner of update box */
876 /* Convert cell coordinates to update box ID */
881 /* Compute true coordinates of update box's origin corner.
890 * for the nearest entry to some cell in the update box.