annotate Meerwald/dct.h @ 0:be303a3f5ea8

import
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Sun, 12 Aug 2007 13:14:34 +0200
parents
children acb6967ee76d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
1 #ifndef DCT_H
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
2 #define DCT_H
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
3
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
4 #include "wm.h"
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
5 #include "coeff.h"
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
6 #ifdef __cplusplus
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
7 extern "C" {
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
8 #endif
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
9 #include "pgm.h"
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
10 #ifdef __cplusplus
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
11 }
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
12 #endif
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
13
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
14 extern int N;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
15 extern int M;
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
16
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
17 void init_dct_NxM(int width, int height);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
18 void fdct_NxM(gray **pixels, double **dcts);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
19 void idct_NxM(double **dcts, gray **pixels);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
20
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
21 void init_dct_NxN(int width, int height);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
22 void fdct_NxN(gray **pixels, double **dcts);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
23 void idct_NxN(double **dcts, gray **pixels);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
24 void fdct_inplace_NxN(double **coeffs);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
25 void idct_inplace_NxN(double **coeffs);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
26
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
27 /*
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
28 * 'NJPEG' defines the JPEG's DCT block size (8x8)
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
29 */
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
30 #define NJPEG 8
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
31
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
32 void init_quantum_8x8(int quality);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
33 void init_quantum_JPEG_lumin(int quality);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
34 void init_quantum_JPEG_chromin(int quality);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
35 void quantize_8x8(double **transform);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
36 void dequantize_8x8(double **transform);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
37 void init_dct_8x8();
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
38 void fdct_8x8(gray **input, double **output);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
39 void fdct_block_8x8(gray **input, int col, int row, double **output);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
40 void idct_8x8(double **input, gray **output);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
41 void idct_block_8x8(double **input, gray **output, int col, int row);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
42 int is_middle_frequency_coeff_8x8(int coeff);
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
43
Peter Meerwald <pmeerw@cosy.sbg.ac.at>
parents:
diff changeset
44 #endif

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.