Lines Matching refs:cquantize

316 prescan_quantize (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize)  in prescan_quantize()  argument
320 register hist3d histogram = cquantize->histogram; in prescan_quantize()
418 update_box (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, boxptr boxp) in update_box() argument
420 hist3d histogram = cquantize->histogram; in update_box()
543 median_cut (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in median_cut() argument
634 update_box (oim, nim, cquantize, b1); in median_cut()
635 update_box (oim, nim, cquantize, b2); in median_cut()
643 compute_color (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in compute_color() argument
649 hist3d histogram = cquantize->histogram; in compute_color()
703 select_colors (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, int desired_colors) in select_colors() argument
721 update_box (oim, nim, cquantize, &boxlist[0]); in select_colors()
723 numboxes = median_cut (oim, nim, cquantize, boxlist, numboxes, desired_colors); in select_colors()
726 compute_color (oim, nim, cquantize, &boxlist[i], i); in select_colors()
825 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in find_nearby_colors() argument
980 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in find_best_colors() argument
1073 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in fill_inverse_cmap() argument
1079 hist3d histogram = cquantize->histogram; in fill_inverse_cmap()
1107 find_nearby_colors (oim, nim, cquantize, minc0, minc1, minc2, colorlist); in fill_inverse_cmap()
1108 find_best_colors (oim, nim, cquantize, minc0, minc1, minc2, numcolors, in fill_inverse_cmap()
1135 pass2_no_dither (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) in pass2_no_dither() argument
1141 hist3d histogram = cquantize->histogram; in pass2_no_dither()
1181 fill_inverse_cmap (oim, nim, cquantize, c0, c1, c2); in pass2_no_dither()
1190 pass2_fs_dither (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) in pass2_fs_dither() argument
1192 hist3d histogram = cquantize->histogram; in pass2_fs_dither()
1209 int *error_limit = cquantize->error_limiter; in pass2_fs_dither()
1216 if (cquantize->on_odd_row) in pass2_fs_dither()
1223 errorptr = cquantize->fserrors + (width + 1) * 3; /* => entry after last column */ in pass2_fs_dither()
1230 errorptr = cquantize->fserrors; /* => entry before first real column */ in pass2_fs_dither()
1290 fill_inverse_cmap (oim, nim, cquantize, cur0 >> C0_SHIFT, in pass2_fs_dither()
1372 init_error_limit (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) in init_error_limit() argument
1378 cquantize->error_limiter_storage = in init_error_limit()
1380 if (!cquantize->error_limiter_storage) in init_error_limit()
1384 table = cquantize->error_limiter_storage; in init_error_limit()
1387 cquantize->error_limiter = table; in init_error_limit()
1464 my_cquantize_ptr cquantize = NULL; in gdImageTrueColorToPaletteBody() local
1517 cquantize = (my_cquantize_ptr) gdCalloc (sizeof (my_cquantizer), 1); in gdImageTrueColorToPaletteBody()
1518 if (!cquantize) in gdImageTrueColorToPaletteBody()
1523 cquantize->fserrors = NULL; /* flag optional arrays not allocated */ in gdImageTrueColorToPaletteBody()
1524 cquantize->error_limiter = NULL; in gdImageTrueColorToPaletteBody()
1528 cquantize->histogram = (hist3d) safe_emalloc (HIST_C0_ELEMS, sizeof (hist2d), 0); in gdImageTrueColorToPaletteBody()
1531 cquantize->histogram[i] = in gdImageTrueColorToPaletteBody()
1533 if (!cquantize->histogram[i]) in gdImageTrueColorToPaletteBody()
1539 cquantize->fserrors = (FSERRPTR) safe_emalloc (3, sizeof (FSERROR), 0); in gdImageTrueColorToPaletteBody()
1540 init_error_limit (oim, nim, cquantize); in gdImageTrueColorToPaletteBody()
1543 cquantize->fserrors = gdRealloc(cquantize->fserrors, arraysize); in gdImageTrueColorToPaletteBody()
1544 memset(cquantize->fserrors, 0, arraysize); in gdImageTrueColorToPaletteBody()
1545 if (!cquantize->fserrors) in gdImageTrueColorToPaletteBody()
1549 cquantize->on_odd_row = FALSE; in gdImageTrueColorToPaletteBody()
1552 zeroHistogram (cquantize->histogram); in gdImageTrueColorToPaletteBody()
1553 prescan_quantize (oim, nim, cquantize); in gdImageTrueColorToPaletteBody()
1555 select_colors (oim, nim, cquantize, colorsWanted); in gdImageTrueColorToPaletteBody()
1556 zeroHistogram (cquantize->histogram); in gdImageTrueColorToPaletteBody()
1559 pass2_fs_dither (oim, nim, cquantize); in gdImageTrueColorToPaletteBody()
1563 pass2_no_dither (oim, nim, cquantize); in gdImageTrueColorToPaletteBody()
1566 if (cquantize->transparentIsPresent) in gdImageTrueColorToPaletteBody()
1586 if (cquantize->opaqueIsPresent) in gdImageTrueColorToPaletteBody()
1654 if (cquantize->histogram[i]) in gdImageTrueColorToPaletteBody()
1656 gdFree (cquantize->histogram[i]); in gdImageTrueColorToPaletteBody()
1659 if (cquantize->histogram) in gdImageTrueColorToPaletteBody()
1661 gdFree (cquantize->histogram); in gdImageTrueColorToPaletteBody()
1663 if (cquantize->fserrors) in gdImageTrueColorToPaletteBody()
1665 gdFree (cquantize->fserrors); in gdImageTrueColorToPaletteBody()
1667 if (cquantize->error_limiter_storage) in gdImageTrueColorToPaletteBody()
1669 gdFree (cquantize->error_limiter_storage); in gdImageTrueColorToPaletteBody()
1671 if (cquantize) in gdImageTrueColorToPaletteBody()
1673 gdFree (cquantize); in gdImageTrueColorToPaletteBody()