0
|
1 #ifndef DCT_H
|
|
2 #define DCT_H
|
|
3
|
|
4 #include "wm.h"
|
|
5 #include "coeff.h"
|
|
6 #ifdef __cplusplus
|
|
7 extern "C" {
|
|
8 #endif
|
|
9 #include "pgm.h"
|
|
10 #ifdef __cplusplus
|
|
11 }
|
|
12 #endif
|
|
13
|
|
14 extern int N;
|
|
15 extern int M;
|
|
16
|
|
17 void init_dct_NxM(int width, int height);
|
|
18 void fdct_NxM(gray **pixels, double **dcts);
|
|
19 void idct_NxM(double **dcts, gray **pixels);
|
|
20
|
|
21 void init_dct_NxN(int width, int height);
|
|
22 void fdct_NxN(gray **pixels, double **dcts);
|
|
23 void idct_NxN(double **dcts, gray **pixels);
|
|
24 void fdct_inplace_NxN(double **coeffs);
|
|
25 void idct_inplace_NxN(double **coeffs);
|
|
26
|
|
27 /*
|
|
28 * 'NJPEG' defines the JPEG's DCT block size (8x8)
|
|
29 */
|
|
30 #define NJPEG 8
|
|
31
|
|
32 void init_quantum_8x8(int quality);
|
|
33 void init_quantum_JPEG_lumin(int quality);
|
|
34 void init_quantum_JPEG_chromin(int quality);
|
|
35 void quantize_8x8(double **transform);
|
|
36 void dequantize_8x8(double **transform);
|
|
37 void init_dct_8x8();
|
|
38 void fdct_8x8(gray **input, double **output);
|
|
39 void fdct_block_8x8(gray **input, int col, int row, double **output);
|
|
40 void idct_8x8(double **input, gray **output);
|
|
41 void idct_block_8x8(double **input, gray **output, int col, int row);
|
|
42 int is_middle_frequency_coeff_8x8(int coeff);
|
|
43
|
|
44 #endif
|