ReactOS 0.4.16-dev-2617-g01a0906
jcparam.c File Reference
#include "jinclude.h"
#include "jpeglib.h"
Include dependency graph for jcparam.c:

Go to the source code of this file.

Macros

#define JPEG_INTERNALS
 
#define SET_COMP(index, id, hsamp, vsamp, quant, dctbl, actbl)
 

Functions

 jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, const unsigned int *basic_table, int scale_factor, boolean force_baseline)
 
 jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline)
 
 jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, boolean force_baseline)
 
 jpeg_quality_scaling (int quality)
 
 jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline)
 
 std_huff_tables (j_compress_ptr cinfo)
 
 jpeg_set_defaults (j_compress_ptr cinfo)
 
 jpeg_default_colorspace (j_compress_ptr cinfo)
 
 jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
 

Variables

static const unsigned int std_luminance_quant_tbl [DCTSIZE2]
 
static const unsigned int std_chrominance_quant_tbl [DCTSIZE2]
 

Macro Definition Documentation

◆ JPEG_INTERNALS

#define JPEG_INTERNALS

Definition at line 14 of file jcparam.c.

◆ SET_COMP

#define SET_COMP (   index,
  id,
  hsamp,
  vsamp,
  quant,
  dctbl,
  actbl 
)
Value:
(compptr = &cinfo->comp_info[index], \
compptr->h_samp_factor = (hsamp), \
compptr->v_samp_factor = (vsamp), \
compptr->quant_tbl_no = (quant), \
compptr->dc_tbl_no = (dctbl), \
compptr->ac_tbl_no = (actbl) )
#define index(s, c)
Definition: various.h:29
GLuint id
Definition: glext.h:5910
jpeg_component_info * compptr
Definition: jdct.h:252

Function Documentation

◆ jpeg_add_quant_table()

jpeg_add_quant_table ( j_compress_ptr  cinfo,
int  which_tbl,
const unsigned int basic_table,
int  scale_factor,
boolean  force_baseline 
)

Definition at line 24 of file jcparam.c.

32{
33 JQUANT_TBL ** qtblptr;
34 int i;
35 long temp;
36
37 /* Safety check to ensure start_compress not called yet. */
38 if (cinfo->global_state != CSTATE_START)
39 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
40
41 if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS)
42 ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl);
43
44 qtblptr = & cinfo->quant_tbl_ptrs[which_tbl];
45
46 if (*qtblptr == NULL)
47 *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo);
48
49 for (i = 0; i < DCTSIZE2; i++) {
50 temp = ((long) basic_table[i] * scale_factor + 50L) / 100L;
51 /* limit the values to the valid range */
52 if (temp <= 0L) temp = 1L;
53 if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */
54 if (force_baseline && temp > 255L)
55 temp = 255L; /* limit to baseline range if requested */
56 (*qtblptr)->quantval[i] = (UINT16) temp;
57 }
58
59 /* Initialize sent_table FALSE so table will be written to JPEG file. */
60 (*qtblptr)->sent_table = FALSE;
61}
unsigned short UINT16
Definition: actypes.h:129
char boolean force_baseline
Definition: cdjpeg.h:137
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define L(x)
Definition: resources.c:13
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
Definition: glfuncs.h:248
jpeg_alloc_quant_table(j_common_ptr cinfo)
Definition: jcomapi.c:87
#define ERREXIT1(cinfo, code, p1)
Definition: jerror.h:212
#define CSTATE_START
Definition: jpegint.h:26
int const unsigned int * basic_table
Definition: jpeglib.h:1002
int scale_factor
Definition: jpeglib.h:997
#define NUM_QUANT_TBLS
Definition: jpeglib.h:52
int which_tbl
Definition: jpeglib.h:1001
#define DCTSIZE2
Definition: jpeglib.h:51
#define long
Definition: qsort.c:33
static calc_node_t temp
Definition: rpn_ieee.c:38
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
Definition: jpeglib.h:336

Referenced by jpeg_default_qtables(), jpeg_set_linear_quality(), and read_quant_tables().

◆ jpeg_default_colorspace()

jpeg_default_colorspace ( j_compress_ptr  cinfo)

Definition at line 299 of file jcparam.c.

300{
301 switch (cinfo->in_color_space) {
302 case JCS_UNKNOWN:
304 break;
305 case JCS_GRAYSCALE:
307 break;
308 case JCS_RGB:
310 break;
311 case JCS_YCbCr:
313 break;
314 case JCS_CMYK:
315 jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */
316 break;
317 case JCS_YCCK:
319 break;
320 case JCS_BG_RGB:
321 /* No translation for now -- conversion to BG_YCC not yet supportet */
323 break;
324 case JCS_BG_YCC:
326 break;
327 default:
328 ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE);
329 }
330}
jpeg_set_colorspace(j_compress_ptr cinfo, J_COLOR_SPACE colorspace)
Definition: jcparam.c:338
@ JCS_YCCK
Definition: jpeglib.h:226
@ JCS_BG_RGB
Definition: jpeglib.h:227
@ JCS_BG_YCC
Definition: jpeglib.h:228
@ JCS_UNKNOWN
Definition: jpeglib.h:221
@ JCS_YCbCr
Definition: jpeglib.h:224
@ JCS_CMYK
Definition: jpeglib.h:225
@ JCS_GRAYSCALE
Definition: jpeglib.h:222
@ JCS_RGB
Definition: jpeglib.h:223
#define ERREXIT(msg)
Definition: rdjpgcom.c:72
J_COLOR_SPACE in_color_space
Definition: jpeglib.h:305

Referenced by jpeg_set_defaults(), and main().

◆ jpeg_default_qtables()

jpeg_default_qtables ( j_compress_ptr  cinfo,
boolean  force_baseline 
)

Definition at line 92 of file jcparam.c.

97{
98 /* Set up two quantization tables using the specified scaling */
100 cinfo->q_scale_factor[0], force_baseline);
102 cinfo->q_scale_factor[1], force_baseline);
103}
static const unsigned int std_luminance_quant_tbl[DCTSIZE2]
Definition: jcparam.c:69
jpeg_add_quant_table(j_compress_ptr cinfo, int which_tbl, const unsigned int *basic_table, int scale_factor, boolean force_baseline)
Definition: jcparam.c:24
static const unsigned int std_chrominance_quant_tbl[DCTSIZE2]
Definition: jcparam.c:79
int q_scale_factor[NUM_QUANT_TBLS]
Definition: jpeglib.h:337

Referenced by set_quality_ratings().

◆ jpeg_quality_scaling()

jpeg_quality_scaling ( int  quality)

Definition at line 124 of file jcparam.c.

129{
130 /* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */
131 if (quality <= 0) quality = 1;
132 if (quality > 100) quality = 100;
133
134 /* The basic table is used as-is (scaling 100) for a quality of 50.
135 * Qualities 50..100 are converted to scaling percentage 200 - 2*Q;
136 * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table
137 * to make all the table entries 1 (hence, minimum quantization loss).
138 * Qualities 1..50 are converted to scaling percentage 5000/Q.
139 */
140 if (quality < 50)
141 quality = 5000 / quality;
142 else
143 quality = 200 - quality*2;
144
145 return quality;
146}
int quality
Definition: jpeglib.h:994

Referenced by jpeg_set_quality(), and set_quality_ratings().

◆ jpeg_set_colorspace()

jpeg_set_colorspace ( j_compress_ptr  cinfo,
J_COLOR_SPACE  colorspace 
)

Definition at line 338 of file jcparam.c.

339{
341 int ci;
342
343#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl) \
344 (compptr = &cinfo->comp_info[index], \
345 compptr->component_id = (id), \
346 compptr->h_samp_factor = (hsamp), \
347 compptr->v_samp_factor = (vsamp), \
348 compptr->quant_tbl_no = (quant), \
349 compptr->dc_tbl_no = (dctbl), \
350 compptr->ac_tbl_no = (actbl) )
351
352 /* Safety check to ensure start_compress not called yet. */
353 if (cinfo->global_state != CSTATE_START)
354 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
355
356 /* For all colorspaces, we use Q and Huff tables 0 for luminance components,
357 * tables 1 for chrominance components.
358 */
359
361
362 cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */
363 cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */
364
365 switch (colorspace) {
366 case JCS_UNKNOWN:
367 cinfo->num_components = cinfo->input_components;
368 if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS)
369 ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components,
371 for (ci = 0; ci < cinfo->num_components; ci++) {
372 SET_COMP(ci, ci, 1,1, 0, 0,0);
373 }
374 break;
375 case JCS_GRAYSCALE:
376 cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
377 cinfo->num_components = 1;
378 /* JFIF specifies component ID 1 */
379 SET_COMP(0, 0x01, 1,1, 0, 0,0);
380 break;
381 case JCS_RGB:
382 cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */
383 cinfo->num_components = 3;
384 SET_COMP(0, 0x52 /* 'R' */, 1,1,
385 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
386 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
387 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0);
388 SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0);
389 SET_COMP(2, 0x42 /* 'B' */, 1,1,
390 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
391 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
392 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0);
393 break;
394 case JCS_YCbCr:
395 cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
396 cinfo->num_components = 3;
397 /* JFIF specifies component IDs 1,2,3 */
398 /* We default to 2x2 subsamples of chrominance */
399 SET_COMP(0, 0x01, 2,2, 0, 0,0);
400 SET_COMP(1, 0x02, 1,1, 1, 1,1);
401 SET_COMP(2, 0x03, 1,1, 1, 1,1);
402 break;
403 case JCS_CMYK:
404 cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */
405 cinfo->num_components = 4;
406 SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0);
407 SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0);
408 SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0);
409 SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0);
410 break;
411 case JCS_YCCK:
412 cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */
413 cinfo->num_components = 4;
414 SET_COMP(0, 0x01, 2,2, 0, 0,0);
415 SET_COMP(1, 0x02, 1,1, 1, 1,1);
416 SET_COMP(2, 0x03, 1,1, 1, 1,1);
417 SET_COMP(3, 0x04, 2,2, 0, 0,0);
418 break;
419 case JCS_BG_RGB:
420 cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
421 cinfo->JFIF_major_version = 2; /* Set JFIF major version = 2 */
422 cinfo->num_components = 3;
423 /* Add offset 0x20 to the normal R/G/B component IDs */
424 SET_COMP(0, 0x72 /* 'r' */, 1,1,
425 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
426 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
427 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0);
428 SET_COMP(1, 0x67 /* 'g' */, 1,1, 0, 0,0);
429 SET_COMP(2, 0x62 /* 'b' */, 1,1,
430 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
431 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0,
432 cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0);
433 break;
434 case JCS_BG_YCC:
435 cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */
436 cinfo->JFIF_major_version = 2; /* Set JFIF major version = 2 */
437 cinfo->num_components = 3;
438 /* Add offset 0x20 to the normal Cb/Cr component IDs */
439 /* We default to 2x2 subsamples of chrominance */
440 SET_COMP(0, 0x01, 2,2, 0, 0,0);
441 SET_COMP(1, 0x22, 1,1, 1, 1,1);
442 SET_COMP(2, 0x23, 1,1, 1, 1,1);
443 break;
444 default:
445 ERREXIT(cinfo, JERR_BAD_J_COLORSPACE);
446 }
447}
#define TRUE
Definition: types.h:120
#define SET_COMP(index, id, hsamp, vsamp, quant, dctbl, actbl)
#define ERREXIT2(cinfo, code, p1, p2)
Definition: jerror.h:216
#define MAX_COMPONENTS
Definition: jmorecfg.h:81
@ JCT_SUBTRACT_GREEN
Definition: jpeglib.h:235
J_COLOR_SPACE colorspace
Definition: jpeglib.h:992
boolean write_JFIF_header
Definition: jpeglib.h:375
J_COLOR_TRANSFORM color_transform
Definition: jpeglib.h:388
boolean write_Adobe_marker
Definition: jpeglib.h:385
J_COLOR_SPACE jpeg_color_space
Definition: jpeglib.h:331
UINT8 JFIF_major_version
Definition: jpeglib.h:376

Referenced by jpeg_copy_critical_parameters(), jpeg_default_colorspace(), and parse_switches().

◆ jpeg_set_defaults()

jpeg_set_defaults ( j_compress_ptr  cinfo)

Definition at line 197 of file jcparam.c.

198{
199 int i;
200
201 /* Safety check to ensure start_compress not called yet. */
202 if (cinfo->global_state != CSTATE_START)
203 ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
204
205 /* Allocate comp_info array large enough for maximum component count.
206 * Array is made permanent in case application wants to compress
207 * multiple images at same param settings.
208 */
209 if (cinfo->comp_info == NULL)
210 cinfo->comp_info = (jpeg_component_info *)
211 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
213
214 /* Initialize everything not dependent on the color space */
215
216 cinfo->scale_num = 1; /* 1:1 scaling */
217 cinfo->scale_denom = 1;
219 /* Set up two quantization tables using default quality of 75 */
220 jpeg_set_quality(cinfo, 75, TRUE);
221 /* Reset standard Huffman tables */
222 std_huff_tables(cinfo);
223
224 /* Initialize default arithmetic coding conditioning */
225 for (i = 0; i < NUM_ARITH_TBLS; i++) {
226 cinfo->arith_dc_L[i] = 0;
227 cinfo->arith_dc_U[i] = 1;
228 cinfo->arith_ac_K[i] = 5;
229 }
230
231 /* Default is no multiple-scan output */
232 cinfo->scan_info = NULL;
233 cinfo->num_scans = 0;
234
235 /* Expect normal source image, not raw downsampled data */
236 cinfo->raw_data_in = FALSE;
237
238 /* The standard Huffman tables are only valid for 8-bit data precision.
239 * If the precision is higher, use arithmetic coding.
240 * (Alternatively, using Huffman coding would be possible with forcing
241 * optimization on so that usable tables will be computed, or by
242 * supplying default tables that are valid for the desired precision.)
243 * Otherwise, use Huffman coding by default.
244 */
245 cinfo->arith_code = cinfo->data_precision > 8 ? TRUE : FALSE;
246
247 /* By default, don't do extra passes to optimize entropy coding */
248 cinfo->optimize_coding = FALSE;
249
250 /* By default, use the simpler non-cosited sampling alignment */
251 cinfo->CCIR601_sampling = FALSE;
252
253 /* By default, apply fancy downsampling */
255
256 /* No input smoothing */
257 cinfo->smoothing_factor = 0;
258
259 /* DCT algorithm preference */
260 cinfo->dct_method = JDCT_DEFAULT;
261
262 /* No restart markers */
263 cinfo->restart_interval = 0;
264 cinfo->restart_in_rows = 0;
265
266 /* Fill in default JFIF marker parameters. Note that whether the marker
267 * will actually be written is determined by jpeg_set_colorspace.
268 *
269 * By default, the library emits JFIF version code 1.01.
270 * An application that wants to emit JFIF 1.02 extension markers should set
271 * JFIF_minor_version to 2. We could probably get away with just defaulting
272 * to 1.02, but there may still be some decoders in use that will complain
273 * about that; saying 1.01 should minimize compatibility problems.
274 *
275 * For wide gamut colorspaces (BG_RGB and BG_YCC), the major version will be
276 * overridden by jpeg_set_colorspace and set to 2.
277 */
278 cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */
279 cinfo->JFIF_minor_version = 1;
280 cinfo->density_unit = 0; /* Pixel size is unknown by default */
281 cinfo->X_density = 1; /* Pixel aspect ratio is square by default */
282 cinfo->Y_density = 1;
283
284 /* No color transform */
285 cinfo->color_transform = JCT_NONE;
286 cinfo->LSE_maxtrans = MAXJSAMPLE; /* Default LSE MAXTRANS value */
287
288 /* Choose JPEG colorspace based on input space, set defaults accordingly */
289
291}
#define SIZEOF(_ar)
Definition: calc.h:97
std_huff_tables(j_compress_ptr cinfo)
Definition: jcparam.c:170
jpeg_set_quality(j_compress_ptr cinfo, int quality, boolean force_baseline)
Definition: jcparam.c:150
jpeg_default_colorspace(j_compress_ptr cinfo)
Definition: jcparam.c:299
#define MAXJSAMPLE
Definition: jmorecfg.h:119
#define JPEG_DATA_PRECISION
Definition: jmorecfg.h:15
struct jpeg_common_struct * j_common_ptr
Definition: jpeglib.h:284
#define JDCT_DEFAULT
Definition: jpeglib.h:247
@ JCT_NONE
Definition: jpeglib.h:234
#define NUM_ARITH_TBLS
Definition: jpeglib.h:54
#define JPOOL_PERMANENT
Definition: jpeglib.h:809
unsigned int scale_num
Definition: jpeglib.h:317
boolean optimize_coding
Definition: jpeglib.h:359
jpeg_component_info * comp_info
Definition: jpeglib.h:333
const jpeg_scan_info * scan_info
Definition: jpeglib.h:351
unsigned int restart_interval
Definition: jpeglib.h:370
boolean do_fancy_downsampling
Definition: jpeglib.h:361
UINT8 arith_dc_U[NUM_ARITH_TBLS]
Definition: jpeglib.h:347
UINT8 arith_dc_L[NUM_ARITH_TBLS]
Definition: jpeglib.h:346
boolean raw_data_in
Definition: jpeglib.h:357
boolean arith_code
Definition: jpeglib.h:358
UINT8 JFIF_minor_version
Definition: jpeglib.h:377
unsigned int scale_denom
Definition: jpeglib.h:317
J_DCT_METHOD dct_method
Definition: jpeglib.h:363
boolean CCIR601_sampling
Definition: jpeglib.h:360
UINT8 arith_ac_K[NUM_ARITH_TBLS]
Definition: jpeglib.h:348

Referenced by jpeg_copy_critical_parameters(), jpeg_encoder_create_frame(), main(), and write_JPEG_file().

◆ jpeg_set_linear_quality()

jpeg_set_linear_quality ( j_compress_ptr  cinfo,
int  scale_factor,
boolean  force_baseline 
)

Definition at line 107 of file jcparam.c.

114{
115 /* Set up two quantization tables using the specified scaling */
120}

Referenced by jpeg_set_quality().

◆ jpeg_set_quality()

jpeg_set_quality ( j_compress_ptr  cinfo,
int  quality,
boolean  force_baseline 
)

Definition at line 150 of file jcparam.c.

156{
157 /* Convert user 0-100 rating to percentage scaling */
159
160 /* Set up standard quality tables */
162}
jpeg_set_linear_quality(j_compress_ptr cinfo, int scale_factor, boolean force_baseline)
Definition: jcparam.c:107
jpeg_quality_scaling(int quality)
Definition: jcparam.c:124

Referenced by jpeg_set_defaults(), and write_JPEG_file().

◆ std_huff_tables()

std_huff_tables ( j_compress_ptr  cinfo)

Definition at line 170 of file jcparam.c.

171{
172 if (cinfo->dc_huff_tbl_ptrs[0] != NULL)
174
175 if (cinfo->ac_huff_tbl_ptrs[0] != NULL)
177
178 if (cinfo->dc_huff_tbl_ptrs[1] != NULL)
180
181 if (cinfo->ac_huff_tbl_ptrs[1] != NULL)
183}
jpeg_std_huff_table(j_common_ptr cinfo, boolean isDC, int tblno)
Definition: jcomapi.c:117
JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]
Definition: jpeglib.h:342
JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]
Definition: jpeglib.h:343

Referenced by jpeg_set_defaults().

Variable Documentation

◆ std_chrominance_quant_tbl

const unsigned int std_chrominance_quant_tbl[DCTSIZE2]
static
Initial value:
= {
16, 18, 24, 47, 99, 99, 99, 99,
18, 21, 26, 66, 99, 99, 99, 99,
24, 26, 56, 99, 99, 99, 99, 99,
47, 66, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 99
}

Definition at line 79 of file jcparam.c.

Referenced by jpeg_default_qtables(), and jpeg_set_linear_quality().

◆ std_luminance_quant_tbl

const unsigned int std_luminance_quant_tbl[DCTSIZE2]
static
Initial value:
= {
16, 11, 10, 16, 24, 40, 51, 61,
12, 12, 14, 19, 26, 58, 60, 55,
14, 13, 16, 24, 40, 57, 69, 56,
14, 17, 22, 29, 51, 87, 80, 62,
18, 22, 37, 56, 68, 109, 103, 77,
24, 35, 55, 64, 81, 104, 113, 92,
49, 64, 78, 87, 103, 121, 120, 101,
72, 92, 95, 98, 112, 100, 103, 99
}

Definition at line 69 of file jcparam.c.

Referenced by jpeg_default_qtables(), and jpeg_set_linear_quality().