14 #define JPEG_INTERNALS
35 #ifdef DCT_FLOAT_SUPPORTED
63 for (ci = 0, compptr = cinfo->
comp_info; ci < cinfo->num_components;
65 qtblno = compptr->quant_tbl_no;
69 ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
74 #ifdef DCT_ISLOW_SUPPORTED
90 #ifdef DCT_IFAST_SUPPORTED
102 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
103 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270,
104 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906,
105 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315,
106 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
107 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552,
108 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446,
109 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247
128 #ifdef DCT_FLOAT_SUPPORTED
141 static const double aanscalefactor[
DCTSIZE] = {
142 1.0, 1.387039845, 1.306562965, 1.175875602,
143 1.0, 0.785694958, 0.541196100, 0.275899379
149 DCTSIZE2 *
SIZEOF(FAST_FLOAT));
153 for (row = 0; row <
DCTSIZE; row++) {
154 for (col = 0; col <
DCTSIZE; col++) {
155 fdtbl[
i] = (FAST_FLOAT)
157 aanscalefactor[
row] * aanscalefactor[col] * 8.0)));
165 ERREXIT(cinfo, JERR_NOT_COMPILED);
189 forward_DCT_method_ptr do_dct = fdct->
do_dct;
194 sample_data += start_row;
196 for (bi = 0; bi < num_blocks; bi++, start_col +=
DCTSIZE) {
198 {
register DCTELEM *workspaceptr;
202 workspaceptr = workspace;
203 for (elemr = 0; elemr <
DCTSIZE; elemr++) {
204 elemptr = sample_data[elemr] + start_col;
215 {
register int elemc;
216 for (elemc = DCTSIZE; elemc > 0; elemc--) {
225 (*do_dct) (workspace);
230 register JCOEFPTR output_ptr = coef_blocks[bi];
248 #define DIVIDE_BY(a,b) a /= b
250 #define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0
261 output_ptr[
i] = (
JCOEF) temp;
268 #ifdef DCT_FLOAT_SUPPORTED
284 sample_data += start_row;
286 for (bi = 0; bi < num_blocks; bi++, start_col +=
DCTSIZE) {
288 {
register FAST_FLOAT *workspaceptr;
292 workspaceptr = workspace;
293 for (elemr = 0; elemr <
DCTSIZE; elemr++) {
294 elemptr = sample_data[elemr] + start_col;
305 {
register int elemc;
306 for (elemc = DCTSIZE; elemc > 0; elemc--) {
307 *workspaceptr++ = (FAST_FLOAT)
316 (*do_dct) (workspace);
319 {
register FAST_FLOAT temp;
321 register JCOEFPTR output_ptr = coef_blocks[bi];
325 temp = workspace[
i] * divisors[
i];
332 output_ptr[
i] = (
JCOEF) ((
int) (temp + (FAST_FLOAT) 16384.5) - 16384);
358 #ifdef DCT_ISLOW_SUPPORTED
361 fdct->
do_dct = jpeg_fdct_islow;
364 #ifdef DCT_IFAST_SUPPORTED
367 fdct->
do_dct = jpeg_fdct_ifast;
370 #ifdef DCT_FLOAT_SUPPORTED
377 ERREXIT(cinfo, JERR_NOT_COMPILED);
384 #ifdef DCT_FLOAT_SUPPORTED
forward_DCT_method_ptr do_dct
my_fdct_controller * my_fdct_ptr
struct jpeg_forward_dct * fdct
FAST_FLOAT * float_divisors[NUM_QUANT_TBLS]
struct jpeg_common_struct * j_common_ptr
METHODDEF void 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)
#define GETJSAMPLE(value)
#define ERREXIT(cinfo, code)
const int jpeg_zigzag_order[]
DCTELEM * divisors[NUM_QUANT_TBLS]
float_DCT_method_ptr do_float_dct
METHODDEF void start_pass_fdctmgr(j_compress_ptr cinfo)
struct jpeg_forward_dct pub
METHODDEF void 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)
#define ERREXIT1(cinfo, code, p1)
GLOBAL void jinit_forward_dct(j_compress_ptr cinfo)
GLenum GLenum GLvoid * row
JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]
GLOBAL void jpeg_fdct_float(FAST_FLOAT *data)
jpeg_component_info * comp_info
#define MULTIPLY16V16(var1, var2)