10 #define JPEG_INTERNALS
30 #ifdef DCT_FLOAT_SUPPORTED
58 for (ci = 0,
compptr = cinfo->comp_info; ci < cinfo->num_components;
63 cinfo->quant_tbl_ptrs[qtblno] == NULL)
64 ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
65 qtbl = cinfo->quant_tbl_ptrs[qtblno];
68 switch (cinfo->dct_method) {
69 #ifdef DCT_ISLOW_SUPPORTED
74 if (fdct->
divisors[qtblno] == NULL) {
81 dtbl[i] = ((
DCTELEM) qtbl->quantval[i]) << 3;
85 #ifdef DCT_IFAST_SUPPORTED
97 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
98 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270,
99 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906,
100 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315,
101 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
102 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552,
103 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446,
104 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247
108 if (fdct->
divisors[qtblno] == NULL) {
117 (
INT32) aanscales[i]),
123 #ifdef DCT_FLOAT_SUPPORTED
136 static const double aanscalefactor[
DCTSIZE] = {
137 1.0, 1.387039845, 1.306562965, 1.175875602,
138 1.0, 0.785694958, 0.541196100, 0.275899379
149 for (col = 0; col <
DCTSIZE; col++) {
150 fdtbl[i] = (FAST_FLOAT)
151 (1.0 / (((
double) qtbl->quantval[i] *
152 aanscalefactor[
row] * aanscalefactor[col] * 8.0)));
160 ERREXIT(cinfo, JERR_NOT_COMPILED);
184 forward_DCT_method_ptr do_dct = fdct->
do_dct;
189 sample_data += start_row;
197 workspaceptr = workspace;
198 for (elemr = 0; elemr <
DCTSIZE; elemr++) {
199 elemptr = sample_data[elemr] + start_col;
211 for (elemc =
DCTSIZE; elemc > 0; elemc--) {
220 (*do_dct) (workspace);
225 JCOEFPTR output_ptr = coef_blocks[bi];
243 #define DIVIDE_BY(a,b) a /= b
245 #define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0
256 output_ptr[i] = (
JCOEF) temp;
263 #ifdef DCT_FLOAT_SUPPORTED
279 sample_data += start_row;
283 { FAST_FLOAT *workspaceptr;
287 workspaceptr = workspace;
288 for (elemr = 0; elemr <
DCTSIZE; elemr++) {
289 elemptr = sample_data[elemr] + start_col;
301 for (elemc =
DCTSIZE; elemc > 0; elemc--) {
302 *workspaceptr++ = (FAST_FLOAT)
311 (*do_dct) (workspace);
316 JCOEFPTR output_ptr = coef_blocks[bi];
320 temp = workspace[i] * divisors[i];
327 output_ptr[i] = (
JCOEF) ((
int) (temp + (FAST_FLOAT) 16384.5) - 16384);
352 switch (cinfo->dct_method) {
353 #ifdef DCT_ISLOW_SUPPORTED
359 #ifdef DCT_IFAST_SUPPORTED
365 #ifdef DCT_FLOAT_SUPPORTED
372 ERREXIT(cinfo, JERR_NOT_COMPILED);
379 #ifdef DCT_FLOAT_SUPPORTED
GLenum GLenum GLvoid * row
jinit_forward_dct(j_compress_ptr cinfo)
forward_DCT_float(j_compress_ptr cinfo, jpeg_component_info *compptr, JSAMPARRAY sample_data, JBLOCKROW coef_blocks, JDIMENSION start_row, JDIMENSION start_col, JDIMENSION num_blocks)
forward_DCT(j_compress_ptr cinfo, jpeg_component_info *compptr, JSAMPARRAY sample_data, JBLOCKROW coef_blocks, JDIMENSION start_row, JDIMENSION start_col, JDIMENSION num_blocks)
start_pass_fdctmgr(j_compress_ptr cinfo)
my_fdct_controller * my_fdct_ptr
#define MULTIPLY16V16(var1, var2)
jpeg_component_info * compptr
#define ERREXIT(cinfo, code)
#define ERREXIT1(cinfo, code, p1)
jpeg_fdct_float(FAST_FLOAT *data)
jpeg_fdct_ifast(DCTELEM *data)
jpeg_fdct_islow(DCTELEM *data)
#define GETJSAMPLE(value)
JBLOCKROW JDIMENSION num_blocks
struct jpeg_common_struct * j_common_ptr
float_DCT_method_ptr do_float_dct
struct jpeg_forward_dct pub
DCTELEM * divisors[NUM_QUANT_TBLS]
forward_DCT_method_ptr do_dct
FAST_FLOAT * float_divisors[NUM_QUANT_TBLS]