• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/jpeg/

Lines Matching defs:histogram

34  * In the first pass over the image, we accumulate a histogram showing the
35 * usage count of each possible color. To keep the histogram to a reasonable
38 * in the same histogram cell.
81 * you'll probably want to tweak the histogram sizes too.
102 * First we have the histogram data structure and routines for creating it.
109 * To maintain a fully accurate histogram, we'd need to allocate a "long"
113 * enough results. This reduces the recommended histogram size from 256Kb
115 * (In the second pass the histogram space is re-used for pixel mapping data;
119 * machines, we can't just allocate the histogram in one chunk. Instead
132 #define HIST_C0_BITS 5 /* bits of precision in R/B histogram */
133 #define HIST_C1_BITS 6 /* bits of precision in G histogram */
134 #define HIST_C2_BITS 5 /* bits of precision in B/R histogram */
136 /* Number of elements along histogram axes. */
141 /* These are the amounts to shift an input value to get a histogram index. */
147 typedef UINT16 histcell; /* histogram cell; prefer an unsigned type */
149 typedef histcell FAR * histptr; /* for pointers to histogram cells */
201 hist3d histogram; /* pointer to the histogram */
203 boolean needs_zeroed; /* TRUE if next pass must zero histogram */
216 * In this module the prescan simply updates the histogram, which has been
230 register hist3d histogram = cquantize->histogram;
238 /* get pixel value and index into the histogram */
239 histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT]
253 * given the completed histogram.
255 * subset of the input color space (to histogram precision).
259 /* The bounds of the box (inclusive); expressed as histogram indexes */
265 /* The number of nonzero histogram cells within this box */
318 hist3d histogram = cquantize->histogram;
332 histp = & histogram[c0][c1][c2min];
343 histp = & histogram[c0][c1][c2min];
354 histp = & histogram[c0][c1][c2min];
365 histp = & histogram[c0][c1][c2min];
376 histp = & histogram[c0][c1min][c2];
387 histp = & histogram[c0][c1min][c2];
400 * Since the differences are expressed in histogram-cell units,
413 histp = & histogram[c0][c1][c2min];
505 hist3d histogram = cquantize->histogram;
521 histp = & histogram[c0][c1][c2min];
573 * We re-use the histogram space as an "inverse color map", essentially a
575 * histogram cell will be mapped to the same colormap entry, namely the one
588 * the distances from a given colormap entry to each cell of the histogram can
592 * distance from every colormap entry to every histogram cell. Unfortunately,
593 * it needs a work array to hold the best-distance-so-far for each histogram
599 * nearest colors for only the cells within a small subbox of the histogram.
611 * size seems to be about 1/512th of the histogram (1/8th in each direction).
617 * with plenty of memory, filling the whole histogram in one shot with Thomas'
623 /* log2(histogram cells in update box) for each axis; this can be adjusted */
666 * histogram cell, which are the upper bounds of the volume we care about.
857 /* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */
861 hist3d histogram = cquantize->histogram;
879 * histogram cell, which are the lower bounds of the volume we care about.
901 cachep = & histogram[c0+ic0][c1+ic1][c2];
920 hist3d histogram = cquantize->histogram;
936 cachep = & histogram[c0][c1][c2];
954 hist3d histogram = cquantize->histogram;
1027 cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT];
1170 hist3d histogram = cquantize->histogram;
1182 cquantize->needs_zeroed = TRUE; /* Always zero histogram */
1214 /* Zero the histogram or inverse color map, if necessary */
1217 jzero_far((void FAR *) histogram[i],
1262 /* Allocate the histogram/inverse colormap storage */
1263 cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small)
1266 cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large)
1270 cquantize->needs_zeroed = TRUE; /* histogram is garbage now */