]> git.sesse.net Git - fjl/blob - driver.h
Move some parts of the driver code into its own function.
[fjl] / driver.h
1 #ifndef _DRIVER_H
2 #define _DRIVER_H 1
3
4 #include <stddef.h>
5 #include "idct.h"
6
7 struct jpeg_image {
8         unsigned precision;
9         unsigned width, height;
10         unsigned num_components;
11         unsigned hsample[256], vsample[256], qtable[256];
12         unsigned max_hsample, max_vsample;
13         unsigned stride[256];
14         unsigned num_blocks_horizontal, num_blocks_vertical;
15         uint32_t qvalues[256][DCTSIZE2];
16         void* idct_data[256];
17         uint8_t* pixel_data[256];
18         uint8_t* pixel_write_pointer[256];
19 };
20
21 void read_jpeg(struct jpeg_image* jpeg, FILE *input);
22
23 #endif /* !defined(_DRIVER_H) */