Lines Matching refs:cquantize
276 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in create_colormap() local
282 total_colors = select_ncolors(cinfo, cquantize->Ncolors); in create_colormap()
287 total_colors, cquantize->Ncolors[0], in create_colormap()
288 cquantize->Ncolors[1], cquantize->Ncolors[2]); in create_colormap()
306 nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ in create_colormap()
324 cquantize->sv_colormap = colormap; in create_colormap()
325 cquantize->sv_actual = total_colors; in create_colormap()
336 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in create_colorindex() local
347 cquantize->is_padded = TRUE; in create_colorindex()
350 cquantize->is_padded = FALSE; in create_colorindex()
353 cquantize->colorindex = (*cinfo->mem->alloc_sarray) in create_colorindex()
359 blksize = cquantize->sv_actual; in create_colorindex()
363 nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ in create_colorindex()
368 cquantize->colorindex[i] += MAXJSAMPLE; in create_colorindex()
372 indexptr = cquantize->colorindex[i]; in create_colorindex()
435 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in create_odither_tables() local
440 nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ in create_odither_tables()
443 if (nci == cquantize->Ncolors[j]) { in create_odither_tables()
444 odither = cquantize->odither[j]; in create_odither_tables()
450 cquantize->odither[i] = odither; in create_odither_tables()
464 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in color_quantize() local
465 JSAMPARRAY colorindex = cquantize->colorindex; in color_quantize()
492 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in color_quantize3() local
495 JSAMPROW colorindex0 = cquantize->colorindex[0]; in color_quantize3()
496 JSAMPROW colorindex1 = cquantize->colorindex[1]; in color_quantize3()
497 JSAMPROW colorindex2 = cquantize->colorindex[2]; in color_quantize3()
520 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in quantize_ord_dither() local
536 row_index = cquantize->row_index; in quantize_ord_dither()
540 colorindex_ci = cquantize->colorindex[ci]; in quantize_ord_dither()
541 dither = cquantize->odither[ci][row_index]; in quantize_ord_dither()
560 cquantize->row_index = row_index; in quantize_ord_dither()
570 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in quantize3_ord_dither() local
574 JSAMPROW colorindex0 = cquantize->colorindex[0]; in quantize3_ord_dither()
575 JSAMPROW colorindex1 = cquantize->colorindex[1]; in quantize3_ord_dither()
576 JSAMPROW colorindex2 = cquantize->colorindex[2]; in quantize3_ord_dither()
586 row_index = cquantize->row_index; in quantize3_ord_dither()
589 dither0 = cquantize->odither[0][row_index]; in quantize3_ord_dither()
590 dither1 = cquantize->odither[1][row_index]; in quantize3_ord_dither()
591 dither2 = cquantize->odither[2][row_index]; in quantize3_ord_dither()
605 cquantize->row_index = row_index; in quantize3_ord_dither()
615 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in quantize_fs_dither() local
644 if (cquantize->on_odd_row) { in quantize_fs_dither()
650 errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */ in quantize_fs_dither()
655 errorptr = cquantize->fserrors[ci]; /* => entry before first column */ in quantize_fs_dither()
657 colorindex_ci = cquantize->colorindex[ci]; in quantize_fs_dither()
658 colormap_ci = cquantize->sv_colormap[ci]; in quantize_fs_dither()
713 cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE); in quantize_fs_dither()
725 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in alloc_fs_workspace() local
731 cquantize->fserrors[i] = (FSERRPTR) in alloc_fs_workspace()
744 my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; in start_pass_1_quant() local
749 cinfo->colormap = cquantize->sv_colormap; in start_pass_1_quant()
750 cinfo->actual_number_of_colors = cquantize->sv_actual; in start_pass_1_quant()
756 cquantize->pub.color_quantize = color_quantize3; in start_pass_1_quant()
758 cquantize->pub.color_quantize = color_quantize; in start_pass_1_quant()
762 cquantize->pub.color_quantize = quantize3_ord_dither; in start_pass_1_quant()
764 cquantize->pub.color_quantize = quantize_ord_dither; in start_pass_1_quant()
765 cquantize->row_index = 0; /* initialize state for ordered dither */ in start_pass_1_quant()
770 if (! cquantize->is_padded) in start_pass_1_quant()
773 if (cquantize->odither[0] == NULL) in start_pass_1_quant()
777 cquantize->pub.color_quantize = quantize_fs_dither; in start_pass_1_quant()
778 cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */ in start_pass_1_quant()
780 if (cquantize->fserrors[0] == NULL) in start_pass_1_quant()
785 FMEMZERO((void FAR *) cquantize->fserrors[i], arraysize); in start_pass_1_quant()
824 my_cquantize_ptr cquantize; in jinit_1pass_quantizer() local
826 cquantize = (my_cquantize_ptr) in jinit_1pass_quantizer()
829 cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; in jinit_1pass_quantizer()
830 cquantize->pub.start_pass = start_pass_1_quant; in jinit_1pass_quantizer()
831 cquantize->pub.finish_pass = finish_pass_1_quant; in jinit_1pass_quantizer()
832 cquantize->pub.new_color_map = new_color_map_1_quant; in jinit_1pass_quantizer()
833 cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */ in jinit_1pass_quantizer()
834 cquantize->odither[0] = NULL; /* Also flag odither arrays not allocated */ in jinit_1pass_quantizer()