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