Lines Matching refs:cquantize

344 prescan_quantize (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize)  argument
350 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
354 register hist3d histogram = cquantize->histogram;
467 update_box (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, boxptr boxp) argument
474 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
476 hist3d histogram = cquantize->histogram;
603 median_cut (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
699 update_box (oim, nim, cquantize, b1);
700 update_box (oim, nim, cquantize, b2);
710 compute_color (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, argument
719 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
721 hist3d histogram = cquantize->histogram;
784 select_colors (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, int desired_colors)
819 update_box (oim, nim, cquantize, &boxlist[0]);
821 numboxes = median_cut (oim, nim, cquantize, boxlist, numboxes, desired_colors);
824 compute_color (oim, nim, cquantize, &boxlist[i], i);
927 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
1102 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
1207 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
1215 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; local
1217 hist3d histogram = cquantize->histogram;
1252 find_nearby_colors (oim, nim, cquantize, minc0, minc1, minc2, colorlist);
1253 find_best_colors (oim, nim, cquantize, minc0, minc1, minc2, numcolors,
1286 pass2_no_dither (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) argument
1297 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
1301 hist3d histogram = cquantize->histogram;
1350 fill_inverse_cmap (oim, nim, cquantize, c0, c1, c2);
1365 pass2_fs_dither (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) argument
1372 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
1375 hist3d histogram = cquantize->histogram;
1401 int *error_limit = cquantize->error_limiter;
1408 if (cquantize->on_odd_row)
1415 errorptr = cquantize->fserrors + (width + 1) * 3; /* => entry after last column */
1417 cquantize->on_odd_row = FALSE; /* flip for next time */
1425 errorptr = cquantize->fserrors; /* => entry before first real column */
1427 cquantize->on_odd_row = TRUE; /* flip for next time */
1501 fill_inverse_cmap (oim, nim, cquantize, cur0 >> C0_SHIFT,
1591 init_error_limit (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize)
1598 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; local
1602 cquantize->error_limiter_storage =
1604 if (!cquantize->error_limiter_storage)
1608 table = cquantize->error_limiter_storage;
1612 cquantize->error_limiter = table;
1646 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; local
1649 cinfo->colormap = cquantize->sv_colormap;
1650 select_colors (cinfo, cquantize->desired);
1652 cquantize->needs_zeroed = TRUE;
1669 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; local
1670 hist3d histogram = cquantize->histogram;
1681 cquantize->pub.color_quantize = prescan_quantize;
1682 cquantize->pub.finish_pass = finish_pass1;
1683 cquantize->needs_zeroed = TRUE; /* Always zero histogram */
1689 cquantize->pub.color_quantize = pass2_fs_dither;
1691 cquantize->pub.color_quantize = pass2_no_dither;
1692 cquantize->pub.finish_pass = finish_pass2;
1706 if (cquantize->fserrors == NULL)
1707 cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)
1710 jzero_far ((void FAR *) cquantize->fserrors, arraysize);
1712 if (cquantize->error_limiter == NULL)
1714 cquantize->on_odd_row = FALSE;
1719 if (cquantize->needs_zeroed)
1726 cquantize->needs_zeroed = FALSE;
1738 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; local
1741 cquantize->needs_zeroed = TRUE;
1782 my_cquantize_ptr cquantize = NULL; local
1838 cquantize = (my_cquantize_ptr)
1841 cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
1842 cquantize->pub.start_pass = start_pass_2_quant;
1843 cquantize->pub.new_color_map = new_color_map_2_quant;
1848 cquantize = (my_cquantize_ptr) gdCalloc (sizeof (my_cquantizer), 1);
1849 if (!cquantize)
1855 cquantize->fserrors = NULL; /* flag optional arrays not allocated */
1856 cquantize->error_limiter = NULL;
1861 cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small)
1865 cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large)
1869 cquantize->needs_zeroed = TRUE; /* histogram is garbage now */
1871 cquantize->histogram = (hist3d) safe_emalloc (HIST_C0_ELEMS, sizeof (hist2d), 0);
1874 cquantize->histogram[i] =
1876 if (!cquantize->histogram[i])
1898 cquantize->sv_colormap = (*cinfo->mem->alloc_sarray)
1901 cquantize->desired = desired;
1904 cquantize->sv_colormap = NULL;
1918 cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large)
1926 cquantize->fserrors = (FSERRPTR) safe_emalloc (3, sizeof (FSERROR), 0);
1927 init_error_limit (oim, nim, cquantize);
1930 cquantize->fserrors = gdRealloc(cquantize->fserrors, arraysize);
1931 memset(cquantize->fserrors, 0, arraysize);
1932 if (!cquantize->fserrors)
1936 cquantize->on_odd_row = FALSE;
1939 zeroHistogram (cquantize->histogram);
1940 prescan_quantize (oim, nim, cquantize);
1942 select_colors (oim, nim, cquantize, colorsWanted);
1943 zeroHistogram (cquantize->histogram);
1946 pass2_fs_dither (oim, nim, cquantize);
1950 pass2_no_dither (oim, nim, cquantize);
1953 if (cquantize->transparentIsPresent)
1973 if (cquantize->opaqueIsPresent)
2044 if (cquantize->histogram[i])
2046 gdFree (cquantize->histogram[i]);
2049 if (cquantize->histogram)
2051 gdFree (cquantize->histogram);
2053 if (cquantize->fserrors)
2055 gdFree (cquantize->fserrors);
2057 if (cquantize->error_limiter_storage)
2059 gdFree (cquantize->error_limiter_storage);
2061 if (cquantize)
2063 gdFree (cquantize);