100#define ONE_HALF ((INT32) 1 << (SCALEBITS-1))
101#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
117 cconvert->Cr_r_tab = (
int *) (*cinfo->mem->alloc_small)
119 cconvert->Cb_b_tab = (
int *) (*cinfo->mem->alloc_small)
121 cconvert->Cr_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
123 cconvert->Cb_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
134 cconvert->Cr_g_tab[
i] = (-
FIX(0.714136286)) *
x;
151 cconvert->Cr_r_tab = (
int *) (*cinfo->mem->alloc_small)
153 cconvert->Cb_b_tab = (
int *) (*cinfo->mem->alloc_small)
155 cconvert->Cr_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
157 cconvert->Cb_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
168 cconvert->Cr_g_tab[
i] = (-
FIX(1.428272572)) *
x;
194 register int y,
cb, cr;
196 register JSAMPROW inptr0, inptr1, inptr2;
200 register JSAMPLE * range_limit = cinfo->sample_range_limit;
201 register int * Crrtab = cconvert->Cr_r_tab;
202 register int * Cbbtab = cconvert->Cb_b_tab;
203 register INT32 * Crgtab = cconvert->Cr_g_tab;
204 register INT32 * Cbgtab = cconvert->Cb_g_tab;
208 inptr0 = input_buf[0][input_row];
209 inptr1 = input_buf[1][input_row];
210 inptr2 = input_buf[2][input_row];
213 for (col = 0; col <
num_cols; col++) {
220 outptr[RGB_RED] = range_limit[
y + Crrtab[cr]];
221 outptr[RGB_GREEN] = range_limit[
y +
224 outptr[RGB_BLUE] = range_limit[
y + Cbbtab[
cb]];
225 outptr += RGB_PIXELSIZE;
244 cconvert->R_y_tab = (
INT32 *) (*cinfo->mem->alloc_small)
246 cconvert->G_y_tab = (
INT32 *) (*cinfo->mem->alloc_small)
248 cconvert->B_y_tab = (
INT32 *) (*cinfo->mem->alloc_small)
252 cconvert->R_y_tab[
i] =
FIX(0.299) *
i;
253 cconvert->G_y_tab[
i] =
FIX(0.587) *
i;
270 register INT32 * Rytab = cconvert->R_y_tab;
271 register INT32 * Gytab = cconvert->G_y_tab;
272 register INT32 * Bytab = cconvert->B_y_tab;
274 register JSAMPROW inptr0, inptr1, inptr2;
279 inptr0 = input_buf[0][input_row];
280 inptr1 = input_buf[1][input_row];
281 inptr2 = input_buf[2][input_row];
284 for (col = 0; col <
num_cols; col++) {
308 register int r,
g,
b;
310 register JSAMPROW inptr0, inptr1, inptr2;
315 inptr0 = input_buf[0][input_row];
316 inptr1 = input_buf[1][input_row];
317 inptr2 = input_buf[2][input_row];
320 for (col = 0; col <
num_cols; col++) {
330 outptr += RGB_PIXELSIZE;
347 register int r,
g,
b;
349 register INT32 * Rytab = cconvert->R_y_tab;
350 register INT32 * Gytab = cconvert->G_y_tab;
351 register INT32 * Bytab = cconvert->B_y_tab;
353 register JSAMPROW inptr0, inptr1, inptr2;
358 inptr0 = input_buf[0][input_row];
359 inptr1 = input_buf[1][input_row];
360 inptr2 = input_buf[2][input_row];
363 for (col = 0; col <
num_cols; col++) {
391 register JSAMPROW inptr0, inptr1, inptr2;
396 inptr0 = input_buf[0][input_row];
397 inptr1 = input_buf[1][input_row];
398 inptr2 = input_buf[2][input_row];
401 for (col = 0; col <
num_cols; col++) {
403 outptr[RGB_RED] = inptr0[col];
404 outptr[RGB_GREEN] = inptr1[col];
405 outptr[RGB_BLUE] = inptr2[col];
406 outptr += RGB_PIXELSIZE;
426 register int out_comps = cinfo->out_color_components;
435 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
439 inptr = input_buf[ci][input_row];
484 inptr = input_buf[0][input_row++];
486 for (col = 0; col <
num_cols; col++) {
488 outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
489 outptr += RGB_PIXELSIZE;
509 register int y,
cb, cr;
511 register JSAMPROW inptr0, inptr1, inptr2, inptr3;
515 register JSAMPLE * range_limit = cinfo->sample_range_limit;
516 register int * Crrtab = cconvert->Cr_r_tab;
517 register int * Cbbtab = cconvert->Cb_b_tab;
518 register INT32 * Crgtab = cconvert->Cr_g_tab;
519 register INT32 * Cbgtab = cconvert->Cb_g_tab;
523 inptr0 = input_buf[0][input_row];
524 inptr1 = input_buf[1][input_row];
525 inptr2 = input_buf[2][input_row];
526 inptr3 = input_buf[3][input_row];
529 for (col = 0; col <
num_cols; col++) {
536 outptr[0] = range_limit[
MAXJSAMPLE - (
y + Crrtab[cr])];
542 outptr[3] = inptr3[col];
561 register INT32 * Rytab = cconvert->R_y_tab;
562 register INT32 * Gytab = cconvert->G_y_tab;
563 register INT32 * Bytab = cconvert->B_y_tab;
565 register JSAMPROW inptr0, inptr1, inptr2, inptr3;
570 inptr0 = input_buf[0][input_row];
571 inptr1 = input_buf[1][input_row];
572 inptr2 = input_buf[2][input_row];
573 inptr3 = input_buf[3][input_row];
576 for (col = 0; col <
num_cols; col++) {
582 outptr[1] = inptr3[col];
612 cinfo->cconvert = &cconvert->
pub;
616 switch (cinfo->jpeg_color_space) {
618 if (cinfo->num_components != 1)
619 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
626 if (cinfo->num_components != 3)
627 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
632 if (cinfo->num_components != 4)
633 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
637 if (cinfo->num_components < 1)
638 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
642 if (cinfo->color_transform &&
644 (cinfo->jpeg_color_space !=
JCS_RGB &&
646 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
653 switch (cinfo->out_color_space) {
655 cinfo->out_color_components = 1;
656 switch (cinfo->jpeg_color_space) {
662 for (ci = 1; ci < cinfo->num_components; ci++)
663 cinfo->comp_info[ci].component_needed =
FALSE;
666 switch (cinfo->color_transform) {
674 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
679 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
684 cinfo->out_color_components = RGB_PIXELSIZE;
685 switch (cinfo->jpeg_color_space) {
698 switch (cinfo->color_transform) {
706 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
710 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
716 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
717 cinfo->out_color_components = RGB_PIXELSIZE;
718 switch (cinfo->color_transform) {
726 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
731 if (cinfo->jpeg_color_space !=
JCS_YCCK)
733 cinfo->out_color_components = 4;
739 if (cinfo->jpeg_color_space !=
JCS_CMYK ||
741 ! cinfo->comp_info[0].component_needed ||
742 cinfo->comp_info[1].component_needed ||
743 cinfo->comp_info[2].component_needed ||
744 ! cinfo->comp_info[3].component_needed)
746 cinfo->out_color_components = 2;
748 cinfo->comp_info[1].component_needed =
TRUE;
749 cinfo->comp_info[2].component_needed =
TRUE;
755 if (cinfo->out_color_space != cinfo->jpeg_color_space)
757 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
759 for (ci = 0; ci < cinfo->num_components; ci++)
760 if (cinfo->comp_info[ci].component_needed)
762 cinfo->out_color_components =
i;
766 if (cinfo->quantize_colors)
767 cinfo->output_components = 1;
769 cinfo->output_components = cinfo->out_color_components;
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
rgb_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
gray_rgb_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
ycck_cmyk_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
ycc_rgb_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
rgb_gray_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
grayscale_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
rgb1_rgb_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
rgb1_gray_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
jinit_color_deconverter(j_decompress_ptr cinfo)
build_rgb_y_table(j_decompress_ptr cinfo)
null_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
build_ycc_rgb_table(j_decompress_ptr cinfo)
my_color_deconverter * my_cconvert_ptr
build_bg_ycc_rgb_table(j_decompress_ptr cinfo)
cmyk_yk_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION input_row, JSAMPARRAY output_buf, int num_rows)
start_pass_dcolor(j_decompress_ptr cinfo)
jpeg_component_info * compptr
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
#define GETJSAMPLE(value)
JSAMPARRAY int JDIMENSION num_cols
#define RIGHT_SHIFT(x, shft)
struct jpeg_common_struct * j_common_ptr
jcopy_sample_rows(JSAMPARRAY input_array, JSAMPARRAY output_array, int num_rows, JDIMENSION num_cols)
struct jpeg_color_converter pub