Home | History | Annotate | Download | only in jpeg-6b

Lines Matching refs:cinfo

186 select_ncolors (j_decompress_ptr cinfo, int Ncolors[])
191 int nc = cinfo->out_color_components; /* number of color components */
192 int max_colors = cinfo->desired_number_of_colors;
211 ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp);
228 j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i);
245 output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
259 largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
273 create_colormap (j_decompress_ptr cinfo)
275 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
281 total_colors = select_ncolors(cinfo, cquantize->Ncolors);
284 if (cinfo->out_color_components == 3)
285 TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS,
289 TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors);
295 colormap = (*cinfo->mem->alloc_sarray)
296 ((j_common_ptr) cinfo, JPOOL_IMAGE,
297 (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components);
303 for (i = 0; i < cinfo->out_color_components; i++) {
309 val = output_value(cinfo, i, j, nci-1);
333 create_colorindex (j_decompress_ptr cinfo)
335 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
344 if (cinfo->dither_mode == JDITHER_ORDERED) {
352 cquantize->colorindex = (*cinfo->mem->alloc_sarray)
353 ((j_common_ptr) cinfo, JPOOL_IMAGE,
355 (JDIMENSION) cinfo->out_color_components);
360 for (i = 0; i < cinfo->out_color_components; i++) {
373 k = largest_input_value(cinfo, i, 0, nci-1);
376 k = largest_input_value(cinfo, i, ++val, nci-1);
396 make_odither_array (j_decompress_ptr cinfo, int ncolors)
403 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
432 create_odither_tables (j_decompress_ptr cinfo)
434 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
438 for (i = 0; i < cinfo->out_color_components; i++) {
448 odither = make_odither_array(cinfo, nci);
459 color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
463 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
469 JDIMENSION width = cinfo->output_width;
470 register int nc = cinfo->out_color_components;
487 color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
491 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
499 JDIMENSION width = cinfo->output_width;
515 quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
519 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
525 int nc = cinfo->out_color_components;
529 JDIMENSION width = cinfo->output_width;
565 quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
569 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
582 JDIMENSION width = cinfo->output_width;
610 quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
614 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
626 int nc = cinfo->out_color_components;
632 JDIMENSION width = cinfo->output_width;
633 JSAMPLE *range_limit = cinfo->sample_range_limit;
722 alloc_fs_workspace (j_decompress_ptr cinfo)
724 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
728 arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
729 for (i = 0; i < cinfo->out_color_components; i++) {
731 (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize);
741 start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
743 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
748 cinfo->colormap = cquantize->sv_colormap;
749 cinfo->actual_number_of_colors = cquantize->sv_actual;
752 switch (cinfo->dither_mode) {
754 if (cinfo->out_color_components == 3)
760 if (cinfo->out_color_components == 3)
770 create_colorindex(cinfo);
773 create_odither_tables(cinfo);
780 alloc_fs_workspace(cinfo);
782 arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR));
783 for (i = 0; i < cinfo->out_color_components; i++)
787 ERREXIT(cinfo, JERR_NOT_COMPILED);
798 finish_pass_1_quant (j_decompress_ptr cinfo)
810 new_color_map_1_quant (j_decompress_ptr cinfo)
812 ERREXIT(cinfo, JERR_MODE_CHANGE);
821 jinit_1pass_quantizer (j_decompress_ptr cinfo)
826 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
828 cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize;
836 if (cinfo->out_color_components > MAX_Q_COMPS)
837 ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS);
839 if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1))
840 ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1);
843 create_colormap(cinfo);
844 create_colorindex(cinfo);
852 if (cinfo->dither_mode == JDITHER_FS)
853 alloc_fs_workspace(cinfo);