Lines Matching refs:cinfo

190 select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
195 int nc = cinfo->out_color_components; /* number of color components */
196 int max_colors = cinfo->desired_number_of_colors;
215 ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp);
232 j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i);
249 output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
263 largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
277 create_colormap (j_decompress_ptr cinfo)
279 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
285 total_colors = select_ncolors(cinfo, cquantize->Ncolors);
288 if (cinfo->out_color_components == 3)
289 TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS,
293 TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors);
299 colormap = (*cinfo->mem->alloc_sarray)
300 ((j_common_ptr) cinfo, JPOOL_IMAGE,
301 (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components);
307 for (i = 0; i < cinfo->out_color_components; i++) {
313 val = output_value(cinfo, i, j, nci-1);
337 create_colorindex (j_decompress_ptr cinfo)
339 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
348 if (cinfo->dither_mode == JDITHER_ORDERED) {
356 cquantize->colorindex = (*cinfo->mem->alloc_sarray)
357 ((j_common_ptr) cinfo, JPOOL_IMAGE,
359 (JDIMENSION) cinfo->out_color_components);
364 for (i = 0; i < cinfo->out_color_components; i++) {
377 k = largest_input_value(cinfo, i, 0, nci-1);
380 k = largest_input_value(cinfo, i, ++val, nci-1);
400 make_odither_array (j_decompress_ptr cinfo, int ncolors)
407 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
436 create_odither_tables (j_decompress_ptr cinfo)
438 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
442 for (i = 0; i < cinfo->out_color_components; i++) {
452 odither = make_odither_array(cinfo, nci);
463 color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
467 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
473 JDIMENSION width = cinfo->output_width;
474 register int nc = cinfo->out_color_components;
491 color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
495 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
503 JDIMENSION width = cinfo->output_width;
519 quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
523 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
529 int nc = cinfo->out_color_components;
533 JDIMENSION width = cinfo->output_width;
569 quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
573 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
586 JDIMENSION width = cinfo->output_width;
614 quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
618 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
630 int nc = cinfo->out_color_components;
636 JDIMENSION width = cinfo->output_width;
637 JSAMPLE *range_limit = cinfo->sample_range_limit;
726 alloc_fs_workspace (j_decompress_ptr cinfo)
728 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
732 arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
733 for (i = 0; i < cinfo->out_color_components; i++) {
735 (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
745 start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
747 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
752 cinfo->colormap = cquantize->sv_colormap;
753 cinfo->actual_number_of_colors = cquantize->sv_actual;
756 switch (cinfo->dither_mode) {
758 if (cinfo->out_color_components == 3)
764 if (cinfo->out_color_components == 3)
774 create_colorindex(cinfo);
777 create_odither_tables(cinfo);
784 alloc_fs_workspace(cinfo);
786 arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
787 for (i = 0; i < cinfo->out_color_components; i++)
791 ERREXIT(cinfo, JERR_NOT_COMPILED);
802 finish_pass_1_quant (j_decompress_ptr cinfo)
814 new_color_map_1_quant (j_decompress_ptr cinfo)
816 ERREXIT(cinfo, JERR_MODE_CHANGE);
825 jinit_1pass_quantizer (j_decompress_ptr cinfo)
830 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
832 cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
840 if (cinfo->out_color_components > MAX_Q_COMPS)
841 ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS);
843 if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1))
844 ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1);
847 create_colormap(cinfo);
848 create_colorindex(cinfo);
856 if (cinfo->dither_mode == JDITHER_FS)
857 alloc_fs_workspace(cinfo);