diff options
Diffstat (limited to 'tqtinterface/qt4/src/3rdparty/libjpeg/jquant2.c')
-rw-r--r-- | tqtinterface/qt4/src/3rdparty/libjpeg/jquant2.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tqtinterface/qt4/src/3rdparty/libjpeg/jquant2.c b/tqtinterface/qt4/src/3rdparty/libjpeg/jquant2.c index ccd6986..7839e41 100644 --- a/tqtinterface/qt4/src/3rdparty/libjpeg/jquant2.c +++ b/tqtinterface/qt4/src/3rdparty/libjpeg/jquant2.c @@ -5,7 +5,7 @@ * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * - * This file tqcontains 2-pass color quantization (color mapping) routines. + * This file contains 2-pass color quantization (color mapping) routines. * These routines provide selection of a custom color map for an image, * followed by mapping of the image to that color map, with optional * Floyd-Steinberg dithering. @@ -270,7 +270,7 @@ typedef box * boxptr; LOCAL(boxptr) -tqfind_biggest_color_pop (boxptr boxlist, int numboxes) +find_biggest_color_pop (boxptr boxlist, int numboxes) /* Find the splittable box with the largest color population */ /* Returns NULL if no splittable boxes remain */ { @@ -290,7 +290,7 @@ tqfind_biggest_color_pop (boxptr boxlist, int numboxes) LOCAL(boxptr) -tqfind_biggest_volume (boxptr boxlist, int numboxes) +find_biggest_volume (boxptr boxlist, int numboxes) /* Find the splittable box with the largest (scaled) volume */ /* Returns NULL if no splittable boxes remain */ { @@ -434,9 +434,9 @@ median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes, * Current algorithm: by population for first half, then by volume. */ if (numboxes*2 <= desired_colors) { - b1 = tqfind_biggest_color_pop(boxlist, numboxes); + b1 = find_biggest_color_pop(boxlist, numboxes); } else { - b1 = tqfind_biggest_volume(boxlist, numboxes); + b1 = find_biggest_volume(boxlist, numboxes); } if (b1 == NULL) /* no splittable boxes left! */ break; @@ -576,12 +576,12 @@ select_colors (j_decompress_ptr cinfo, int desired_colors) * closest to the cell's center. This may not be quite the closest entry to * the actual input color, but it's almost as good. A zero in the cache * indicates we haven't found the nearest color for that cell yet; the array - * is cleared to zeroes before starting the mapping pass. When we tqfind the + * is cleared to zeroes before starting the mapping pass. When we find the * nearest color for a cell, its colormap index plus one is recorded in the * cache for future use. The pass2 scanning routines call fill_inverse_cmap * when they need to use an unfilled entry in the cache. * - * Our method of efficiently tqfinding nearest colors is based on the "locally + * Our method of efficiently finding nearest colors is based on the "locally * sorted search" idea described by Heckbert and on the incremental distance * calculation described by Spencer W. Thomas in chapter III.1 of Graphics * Gems II (James Arvo, ed. Academic Press, 1991). Thomas points out that @@ -643,7 +643,7 @@ select_colors (j_decompress_ptr cinfo, int desired_colors) */ LOCAL(int) -tqfind_nearby_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, +find_nearby_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, JSAMPLE colorlist[]) /* Locate the colormap entries close enough to an update box to be candidates * for the nearest entry to some cell(s) in the update box. The update box @@ -674,7 +674,7 @@ tqfind_nearby_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); centerc2 = (minc2 + maxc2) >> 1; - /* For each color in colormap, tqfind: + /* For each color in colormap, find: * 1. its minimum squared-distance to any point in the update box * (zero if color is within update box); * 2. its maximum squared-distance to any point in the update box. @@ -772,13 +772,13 @@ tqfind_nearby_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, LOCAL(void) -tqfind_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, +find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) /* Find the closest colormap entry for each cell in the update box, - * given the list of candidate colors prepared by tqfind_nearby_colors. + * given the list of candidate colors prepared by find_nearby_colors. * Return the indexes of the closest entries in the bestcolor[] array. * This routine uses Thomas' incremental distance calculation method to - * tqfind the distance from a colormap entry to successive cells in the box. + * find the distance from a colormap entry to successive cells in the box. */ { int ic0, ic1, ic2; @@ -798,7 +798,7 @@ tqfind_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) *bptr++ = 0x7FFFFFFFL; - /* For each color selected by tqfind_nearby_colors, + /* For each color selected by find_nearby_colors, * compute its distance to the center of each cell in the box. * If that's less than best-so-far, update best distance and color number. */ @@ -853,7 +853,7 @@ tqfind_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, LOCAL(void) fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) -/* Fill the inverse-colormap entries in the update box that tqcontains */ +/* Fill the inverse-colormap entries in the update box that contains */ /* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */ /* we can fill as many others as we wish.) */ { @@ -885,10 +885,10 @@ fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) /* Determine which colormap entries are close enough to be candidates * for the nearest entry to some cell in the update box. */ - numcolors = tqfind_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); + numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); /* Determine the actually nearest colors. */ - tqfind_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, + find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, bestcolor); /* Save the best color numbers (plus 1) in the main cache array */ @@ -934,7 +934,7 @@ pass2_no_dither (j_decompress_ptr cinfo, c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT; c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT; cachep = & histogram[c0][c1][c2]; - /* If we have not seen this color before, tqfind nearest colormap entry */ + /* If we have not seen this color before, find nearest colormap entry */ /* and update the cache */ if (*cachep == 0) fill_inverse_cmap(cinfo, c0,c1,c2); @@ -1025,7 +1025,7 @@ pass2_fs_dither (j_decompress_ptr cinfo, cur2 = GETJSAMPLE(range_limit[cur2]); /* Index into the cache with adjusted pixel value */ cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; - /* If we have not seen this color before, tqfind nearest colormap */ + /* If we have not seen this color before, find nearest colormap */ /* entry and update the cache */ if (*cachep == 0) fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT); @@ -1068,7 +1068,7 @@ pass2_fs_dither (j_decompress_ptr cinfo, belowerr2 = bnexterr; cur2 += delta; /* form error * 7 */ } - /* At this point curN tqcontains the 7/16 error value to be propagated + /* At this point curN contains the 7/16 error value to be propagated * to the next pixel on the current line, and all the errors for the * next line have been shifted over. We are therefore ready to move on. */ |