Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Macros | Typedefs | Functions
jccolor.cpp File Reference
#include "jinclude.h"
#include "mrpt_jpeglib.h"

Go to the source code of this file.

Classes

struct  my_color_converter
 

Macros

#define JPEG_INTERNALS
 
#define SCALEBITS   16 /* speediest right-shift on some machines */
 
#define CBCR_OFFSET   ((INT32)CENTERJSAMPLE << SCALEBITS)
 
#define ONE_HALF   ((INT32)1 << (SCALEBITS - 1))
 
#define FIX(x)   ((INT32)((x) * (1L << SCALEBITS) + 0.5))
 
#define R_Y_OFF   0 /* offset to R => Y section */
 
#define G_Y_OFF   (1 * (MAXJSAMPLE + 1)) /* offset to G => Y section */
 
#define B_Y_OFF   (2 * (MAXJSAMPLE + 1)) /* etc. */
 
#define R_CB_OFF   (3 * (MAXJSAMPLE + 1))
 
#define G_CB_OFF   (4 * (MAXJSAMPLE + 1))
 
#define B_CB_OFF   (5 * (MAXJSAMPLE + 1))
 
#define R_CR_OFF   B_CB_OFF /* B=>Cb, R=>Cr are the same */
 
#define G_CR_OFF   (6 * (MAXJSAMPLE + 1))
 
#define B_CR_OFF   (7 * (MAXJSAMPLE + 1))
 
#define TABLE_SIZE   (8 * (MAXJSAMPLE + 1))
 

Typedefs

typedef my_color_convertermy_cconvert_ptr
 

Functions

 rgb_ycc_start (j_compress_ptr cinfo)
 
 rgb_ycc_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)
 
 cmyk_ycck_convert (j_compress_ptr cinfo, JSAMPARRAY input_buf, JSAMPIMAGE output_buf, JDIMENSION output_row, int num_rows)
 
 grayscale_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)
 
 null_method (j_compress_ptr)
 
 jinit_color_converter (j_compress_ptr cinfo)
 

Macro Definition Documentation

◆ B_CB_OFF

#define B_CB_OFF   (5 * (MAXJSAMPLE + 1))

Definition at line 72 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_ycc_convert(), and rgb_ycc_start().

◆ B_CR_OFF

#define B_CR_OFF   (7 * (MAXJSAMPLE + 1))

Definition at line 75 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_ycc_convert(), and rgb_ycc_start().

◆ B_Y_OFF

#define B_Y_OFF   (2 * (MAXJSAMPLE + 1)) /* etc. */

Definition at line 69 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_gray_convert(), rgb_ycc_convert(), and rgb_ycc_start().

◆ CBCR_OFFSET

#define CBCR_OFFSET   ((INT32)CENTERJSAMPLE << SCALEBITS)

Definition at line 57 of file jccolor.cpp.

Referenced by rgb_ycc_start().

◆ FIX

#define FIX (   x)    ((INT32)((x) * (1L << SCALEBITS) + 0.5))

Definition at line 59 of file jccolor.cpp.

Referenced by rgb_ycc_start().

◆ G_CB_OFF

#define G_CB_OFF   (4 * (MAXJSAMPLE + 1))

Definition at line 71 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_ycc_convert(), and rgb_ycc_start().

◆ G_CR_OFF

#define G_CR_OFF   (6 * (MAXJSAMPLE + 1))

Definition at line 74 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_ycc_convert(), and rgb_ycc_start().

◆ G_Y_OFF

#define G_Y_OFF   (1 * (MAXJSAMPLE + 1)) /* offset to G => Y section */

Definition at line 68 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_gray_convert(), rgb_ycc_convert(), and rgb_ycc_start().

◆ JPEG_INTERNALS

#define JPEG_INTERNALS

Definition at line 10 of file jccolor.cpp.

◆ ONE_HALF

#define ONE_HALF   ((INT32)1 << (SCALEBITS - 1))

Definition at line 58 of file jccolor.cpp.

Referenced by rgb_ycc_start().

◆ R_CB_OFF

#define R_CB_OFF   (3 * (MAXJSAMPLE + 1))

Definition at line 70 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_ycc_convert(), and rgb_ycc_start().

◆ R_CR_OFF

#define R_CR_OFF   B_CB_OFF /* B=>Cb, R=>Cr are the same */

Definition at line 73 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), and rgb_ycc_convert().

◆ R_Y_OFF

#define R_Y_OFF   0 /* offset to R => Y section */

Definition at line 67 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_gray_convert(), rgb_ycc_convert(), and rgb_ycc_start().

◆ SCALEBITS

#define SCALEBITS   16 /* speediest right-shift on some machines */

Definition at line 56 of file jccolor.cpp.

Referenced by cmyk_ycck_convert(), rgb_gray_convert(), and rgb_ycc_convert().

◆ TABLE_SIZE

#define TABLE_SIZE   (8 * (MAXJSAMPLE + 1))

Definition at line 76 of file jccolor.cpp.

Referenced by rgb_ycc_start().

Typedef Documentation

◆ my_cconvert_ptr

Definition at line 24 of file jccolor.cpp.

Function Documentation

◆ cmyk_ycck_convert()

cmyk_ycck_convert ( j_compress_ptr  cinfo,
JSAMPARRAY  input_buf,
JSAMPIMAGE  output_buf,
JDIMENSION  output_row,
int  num_rows 
)

Definition at line 226 of file jccolor.cpp.

References B_CB_OFF, B_CR_OFF, B_Y_OFF, G_CB_OFF, G_CR_OFF, G_Y_OFF, GETJSAMPLE, inptr, MAXJSAMPLE, output_buf, R_CB_OFF, R_CR_OFF, R_Y_OFF, my_color_converter::rgb_ycc_tab, and SCALEBITS.

Referenced by jinit_color_converter().

Here is the caller graph for this function:

◆ grayscale_convert()

grayscale_convert ( j_compress_ptr  cinfo,
JSAMPARRAY  input_buf,
JSAMPIMAGE  output_buf,
JDIMENSION  output_row,
int  num_rows 
)

Definition at line 284 of file jccolor.cpp.

References inptr, outptr, and output_buf.

Referenced by jinit_color_converter().

Here is the caller graph for this function:

◆ jinit_color_converter()

jinit_color_converter ( j_compress_ptr  cinfo)

Definition at line 354 of file jccolor.cpp.

References cmyk_ycck_convert(), ERREXIT, grayscale_convert(), JCS_CMYK, JCS_GRAYSCALE, JCS_RGB, JCS_YCbCr, JCS_YCCK, JPOOL_IMAGE, null_convert(), null_method(), my_color_converter::pub, rgb_gray_convert(), rgb_ycc_convert(), rgb_ycc_start(), and SIZEOF.

Referenced by jinit_compress_master().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ null_convert()

null_convert ( j_compress_ptr  cinfo,
JSAMPARRAY  input_buf,
JSAMPIMAGE  output_buf,
JDIMENSION  output_row,
int  num_rows 
)

Definition at line 314 of file jccolor.cpp.

References inptr, outptr, and output_buf.

Referenced by jinit_color_converter().

Here is the caller graph for this function:

◆ null_method()

null_method ( j_compress_ptr  )

Definition at line 348 of file jccolor.cpp.

Referenced by jinit_color_converter().

Here is the caller graph for this function:

◆ rgb_gray_convert()

rgb_gray_convert ( j_compress_ptr  cinfo,
JSAMPARRAY  input_buf,
JSAMPIMAGE  output_buf,
JDIMENSION  output_row,
int  num_rows 
)

Definition at line 186 of file jccolor.cpp.

References B_Y_OFF, G_Y_OFF, GETJSAMPLE, inptr, outptr, output_buf, R_Y_OFF, my_color_converter::rgb_ycc_tab, and SCALEBITS.

Referenced by jinit_color_converter().

Here is the caller graph for this function:

◆ rgb_ycc_convert()

rgb_ycc_convert ( j_compress_ptr  cinfo,
JSAMPARRAY  input_buf,
JSAMPIMAGE  output_buf,
JDIMENSION  output_row,
int  num_rows 
)

Definition at line 128 of file jccolor.cpp.

References B_CB_OFF, B_CR_OFF, B_Y_OFF, G_CB_OFF, G_CR_OFF, G_Y_OFF, GETJSAMPLE, inptr, output_buf, R_CB_OFF, R_CR_OFF, R_Y_OFF, my_color_converter::rgb_ycc_tab, and SCALEBITS.

Referenced by jinit_color_converter().

Here is the caller graph for this function:

◆ rgb_ycc_start()

rgb_ycc_start ( j_compress_ptr  cinfo)

Definition at line 83 of file jccolor.cpp.

References B_CB_OFF, B_CR_OFF, B_Y_OFF, CBCR_OFFSET, FIX, G_CB_OFF, G_CR_OFF, G_Y_OFF, JPOOL_IMAGE, MAXJSAMPLE, ONE_HALF, R_CB_OFF, R_Y_OFF, my_color_converter::rgb_ycc_tab, SIZEOF, and TABLE_SIZE.

Referenced by jinit_color_converter().

Here is the caller graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019