98#define ONE_HALF ((INT32) 1 << (SCALEBITS-1))
99#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
109#define G_Y_OFF (1*(MAXJSAMPLE+1))
110#define B_Y_OFF (2*(MAXJSAMPLE+1))
111#define TABLE_SIZE (3*(MAXJSAMPLE+1))
127 cconvert->Cr_r_tab = (
int *) (*cinfo->mem->alloc_small)
129 cconvert->Cb_b_tab = (
int *) (*cinfo->mem->alloc_small)
131 cconvert->Cr_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
133 cconvert->Cb_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
144 cconvert->Cr_g_tab[
i] = (-
FIX(0.714136286)) *
x;
161 cconvert->Cr_r_tab = (
int *) (*cinfo->mem->alloc_small)
163 cconvert->Cb_b_tab = (
int *) (*cinfo->mem->alloc_small)
165 cconvert->Cr_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
167 cconvert->Cb_g_tab = (
INT32 *) (*cinfo->mem->alloc_small)
178 cconvert->Cr_g_tab[
i] = (-
FIX(1.428272572)) *
x;
204 register int y,
cb, cr;
206 register JSAMPROW inptr0, inptr1, inptr2;
210 register JSAMPLE * range_limit = cinfo->sample_range_limit;
211 register int * Crrtab = cconvert->Cr_r_tab;
212 register int * Cbbtab = cconvert->Cb_b_tab;
213 register INT32 * Crgtab = cconvert->Cr_g_tab;
214 register INT32 * Cbgtab = cconvert->Cb_g_tab;
218 inptr0 = input_buf[0][input_row];
219 inptr1 = input_buf[1][input_row];
220 inptr2 = input_buf[2][input_row];
223 for (col = 0; col <
num_cols; col++) {
230 outptr[RGB_RED] = range_limit[
y + Crrtab[cr]];
231 outptr[RGB_GREEN] = range_limit[
y +
234 outptr[RGB_BLUE] = range_limit[
y + Cbbtab[
cb]];
235 outptr += RGB_PIXELSIZE;
256 cconvert->rgb_y_tab = rgb_y_tab = (
INT32 *) (*cinfo->mem->alloc_small)
277 register int r,
g,
b;
278 register INT32 * ctab = cconvert->rgb_y_tab;
280 register JSAMPROW inptr0, inptr1, inptr2;
285 inptr0 = input_buf[0][input_row];
286 inptr1 = input_buf[1][input_row];
287 inptr2 = input_buf[2][input_row];
290 for (col = 0; col <
num_cols; col++) {
317 register int r,
g,
b;
319 register JSAMPROW inptr0, inptr1, inptr2;
324 inptr0 = input_buf[0][input_row];
325 inptr1 = input_buf[1][input_row];
326 inptr2 = input_buf[2][input_row];
329 for (col = 0; col <
num_cols; col++) {
339 outptr += RGB_PIXELSIZE;
356 register int r,
g,
b;
357 register INT32 * ctab = cconvert->rgb_y_tab;
359 register JSAMPROW inptr0, inptr1, inptr2;
364 inptr0 = input_buf[0][input_row];
365 inptr1 = input_buf[1][input_row];
366 inptr2 = input_buf[2][input_row];
369 for (col = 0; col <
num_cols; col++) {
399 register JSAMPROW inptr0, inptr1, inptr2;
404 inptr0 = input_buf[0][input_row];
405 inptr1 = input_buf[1][input_row];
406 inptr2 = input_buf[2][input_row];
409 for (col = 0; col <
num_cols; col++) {
411 outptr[RGB_RED] = inptr0[col];
412 outptr[RGB_GREEN] = inptr1[col];
413 outptr[RGB_BLUE] = inptr2[col];
414 outptr += RGB_PIXELSIZE;
434 register int num_comps = cinfo->num_components;
440 for (ci = 0; ci < num_comps; ci++) {
441 inptr = input_buf[ci][input_row];
487 inptr = input_buf[0][input_row++];
489 for (col = 0; col <
num_cols; col++) {
491 outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
492 outptr += RGB_PIXELSIZE;
512 register int y,
cb, cr;
514 register JSAMPROW inptr0, inptr1, inptr2, inptr3;
518 register JSAMPLE * range_limit = cinfo->sample_range_limit;
519 register int * Crrtab = cconvert->Cr_r_tab;
520 register int * Cbbtab = cconvert->Cb_b_tab;
521 register INT32 * Crgtab = cconvert->Cr_g_tab;
522 register INT32 * Cbgtab = cconvert->Cb_g_tab;
526 inptr0 = input_buf[0][input_row];
527 inptr1 = input_buf[1][input_row];
528 inptr2 = input_buf[2][input_row];
529 inptr3 = input_buf[3][input_row];
532 for (col = 0; col <
num_cols; col++) {
539 outptr[0] = range_limit[
MAXJSAMPLE - (
y + Crrtab[cr])];
545 outptr[3] = inptr3[col];
575 cinfo->cconvert = &cconvert->
pub;
579 switch (cinfo->jpeg_color_space) {
581 if (cinfo->num_components != 1)
582 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
589 if (cinfo->num_components != 3)
590 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
595 if (cinfo->num_components != 4)
596 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
600 if (cinfo->num_components < 1)
601 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
605 if (cinfo->color_transform &&
606 cinfo->jpeg_color_space !=
JCS_RGB &&
608 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
615 switch (cinfo->out_color_space) {
617 cinfo->out_color_components = 1;
618 switch (cinfo->jpeg_color_space) {
624 for (ci = 1; ci < cinfo->num_components; ci++)
625 cinfo->comp_info[ci].component_needed =
FALSE;
628 switch (cinfo->color_transform) {
636 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
641 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
646 cinfo->out_color_components = RGB_PIXELSIZE;
647 switch (cinfo->jpeg_color_space) {
660 switch (cinfo->color_transform) {
668 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
672 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
677 cinfo->out_color_components = RGB_PIXELSIZE;
679 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
680 switch (cinfo->color_transform) {
688 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
693 cinfo->out_color_components = 4;
694 switch (cinfo->jpeg_color_space) {
703 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
708 if (cinfo->out_color_space != cinfo->jpeg_color_space)
710 ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
711 cinfo->out_color_components = cinfo->num_components;
715 if (cinfo->quantize_colors)
716 cinfo->output_components = 1;
718 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
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
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)
start_pass_dcolor(j_decompress_ptr cinfo)
jpeg_component_info JCOEFPTR JSAMPARRAY output_buf
#define GETJSAMPLE(value)
int JSAMPARRAY int int num_rows
int JSAMPARRAY int int JDIMENSION num_cols
#define RIGHT_SHIFT(x, shft)
struct jpeg_common_struct * j_common_ptr
jcopy_sample_rows(JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)
static HMODULE MODULEINFO DWORD cb
struct jpeg_color_converter pub