72#define CBCR_OFFSET ((INT32) CENTERJSAMPLE << SCALEBITS)
73#define ONE_HALF ((INT32) 1 << (SCALEBITS-1))
74#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
83#define G_Y_OFF (1*(MAXJSAMPLE+1))
84#define B_Y_OFF (2*(MAXJSAMPLE+1))
85#define R_CB_OFF (3*(MAXJSAMPLE+1))
86#define G_CB_OFF (4*(MAXJSAMPLE+1))
87#define B_CB_OFF (5*(MAXJSAMPLE+1))
88#define R_CR_OFF B_CB_OFF
89#define G_CR_OFF (6*(MAXJSAMPLE+1))
90#define B_CR_OFF (7*(MAXJSAMPLE+1))
91#define TABLE_SIZE (8*(MAXJSAMPLE+1))
148 register int r,
g,
b;
151 register JSAMPROW outptr0, outptr1, outptr2;
156 inptr = *input_buf++;
161 for (col = 0; col <
num_cols; col++) {
165 inptr += RGB_PIXELSIZE;
204 register int r,
g,
b;
212 inptr = *input_buf++;
214 for (col = 0; col <
num_cols; col++) {
218 inptr += RGB_PIXELSIZE;
242 register int r,
g,
b;
245 register JSAMPROW outptr0, outptr1, outptr2, outptr3;
250 inptr = *input_buf++;
256 for (col = 0; col <
num_cols; col++) {
261 outptr3[col] = inptr[3];
299 register int r,
g,
b;
301 register JSAMPROW outptr0, outptr1, outptr2;
306 inptr = *input_buf++;
311 for (col = 0; col <
num_cols; col++) {
315 inptr += RGB_PIXELSIZE;
341 register int instride = cinfo->input_components;
345 inptr = *input_buf++;
367 register JSAMPROW outptr0, outptr1, outptr2;
372 inptr = *input_buf++;
377 for (col = 0; col <
num_cols; col++) {
379 outptr0[col] = inptr[RGB_RED];
380 outptr1[col] = inptr[RGB_GREEN];
381 outptr2[col] = inptr[RGB_BLUE];
382 inptr += RGB_PIXELSIZE;
402 register int num_comps = cinfo->num_components;
408 for (ci = 0; ci < num_comps; ci++) {
409 inptr = input_buf[0] + ci;
444 cinfo->cconvert = &cconvert->
pub;
449 switch (cinfo->in_color_space) {
451 if (cinfo->input_components != 1)
452 ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
457#if RGB_PIXELSIZE != 3
458 if (cinfo->input_components != RGB_PIXELSIZE)
459 ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
465 if (cinfo->input_components != 3)
466 ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
471 if (cinfo->input_components != 4)
472 ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
476 if (cinfo->input_components < 1)
477 ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
481 if (cinfo->color_transform &&
482 cinfo->jpeg_color_space !=
JCS_RGB &&
484 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
487 switch (cinfo->jpeg_color_space) {
489 if (cinfo->num_components != 1)
490 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
491 switch (cinfo->in_color_space) {
502 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
508 if (cinfo->num_components != 3)
509 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
510 if (cinfo->in_color_space != cinfo->jpeg_color_space)
511 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
512 switch (cinfo->color_transform) {
520 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
525 if (cinfo->num_components != 3)
526 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
527 switch (cinfo->in_color_space) {
536 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
541 if (cinfo->num_components != 3)
542 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
543 switch (cinfo->in_color_space) {
551 cinfo->comp_info[1].component_needed =
TRUE;
552 cinfo->comp_info[2].component_needed =
TRUE;
559 cinfo->comp_info[1].component_needed =
TRUE;
560 cinfo->comp_info[2].component_needed =
TRUE;
567 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
572 if (cinfo->num_components != 4)
573 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
574 if (cinfo->in_color_space !=
JCS_CMYK)
575 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
580 if (cinfo->num_components != 4)
581 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
582 switch (cinfo->in_color_space) {
591 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
596 if (cinfo->jpeg_color_space != cinfo->in_color_space ||
597 cinfo->num_components != cinfo->input_components)
598 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
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_ycc_start(j_compress_ptr cinfo)
grayscale_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)
cmyk_ycck_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)
null_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)
jinit_color_converter(j_compress_ptr cinfo)
rgb_rgb1_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)
rgb_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)
rgb_gray_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)
null_method(j_compress_ptr cinfo)
my_color_converter * my_cconvert_ptr
rgb_ycc_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
#define GETJSAMPLE(value)
int JSAMPARRAY int int num_rows
int JSAMPARRAY int int JDIMENSION num_cols
struct jpeg_common_struct * j_common_ptr
struct jpeg_color_converter pub