64
/* These are the sample quantization tables given in JPEG spec section K.1.
65
* The spec says that the values given produce "good" quality, and
66
* when divided by 2, "very good" quality.
68
static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
69
16, 11, 10, 16, 24, 40, 51, 61,
70
12, 12, 14, 19, 26, 58, 60, 55,
71
14, 13, 16, 24, 40, 57, 69, 56,
72
14, 17, 22, 29, 51, 87, 80, 62,
73
18, 22, 37, 56, 68, 109, 103, 77,
74
24, 35, 55, 64, 81, 104, 113, 92,
75
49, 64, 78, 87, 103, 121, 120, 101,
76
72, 92, 95, 98, 112, 100, 103, 99
78
static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {
79
17, 18, 24, 47, 99, 99, 99, 99,
80
18, 21, 26, 66, 99, 99, 99, 99,
81
24, 26, 56, 99, 99, 99, 99, 99,
82
47, 66, 99, 99, 99, 99, 99, 99,
83
99, 99, 99, 99, 99, 99, 99, 99,
84
99, 99, 99, 99, 99, 99, 99, 99,
85
99, 99, 99, 99, 99, 99, 99, 99,
86
99, 99, 99, 99, 99, 99, 99, 99
91
jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline)
92
/* Set or change the 'quality' (quantization) setting, using default tables
93
* and straight percentage-scaling quality scales.
94
* This entry point allows different scalings for luminance and chrominance.
97
/* Set up two quantization tables using the specified scaling */
98
jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
99
cinfo->q_scale_factor[0], force_baseline);
100
jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl,
101
cinfo->q_scale_factor[1], force_baseline);
64
106
jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,
65
107
boolean force_baseline)
69
111
* applications that insist on a linear percentage scaling.
72
/* These are the sample quantization tables given in JPEG spec section K.1.
73
* The spec says that the values given produce "good" quality, and
74
* when divided by 2, "very good" quality.
76
static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = {
77
16, 11, 10, 16, 24, 40, 51, 61,
78
12, 12, 14, 19, 26, 58, 60, 55,
79
14, 13, 16, 24, 40, 57, 69, 56,
80
14, 17, 22, 29, 51, 87, 80, 62,
81
18, 22, 37, 56, 68, 109, 103, 77,
82
24, 35, 55, 64, 81, 104, 113, 92,
83
49, 64, 78, 87, 103, 121, 120, 101,
84
72, 92, 95, 98, 112, 100, 103, 99
86
static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = {
87
17, 18, 24, 47, 99, 99, 99, 99,
88
18, 21, 26, 66, 99, 99, 99, 99,
89
24, 26, 56, 99, 99, 99, 99, 99,
90
47, 66, 99, 99, 99, 99, 99, 99,
91
99, 99, 99, 99, 99, 99, 99, 99,
92
99, 99, 99, 99, 99, 99, 99, 99,
93
99, 99, 99, 99, 99, 99, 99, 99,
94
99, 99, 99, 99, 99, 99, 99, 99
97
114
/* Set up two quantization tables using the specified scaling */
98
115
jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl,
99
116
scale_factor, force_baseline);