45#include "gl_jpeg_constants.h"
61 uint8_t channel_type[_JPEG_MAX_CHANNELS];
62 uint8_t channel_h_samp_factor[_JPEG_MAX_CHANNELS];
63 uint8_t channel_v_samp_factor[_JPEG_MAX_CHANNELS];
64 uint8_t channel_quant_table_map[_JPEG_MAX_CHANNELS];
69 uint8_t quant_uses_16_bits;
70 uint16_t quant_table[_JPEG_MAX_CHANNELS][64];
75 uint16_t restart_interval;
81 uint8_t huff_ac_symbol_len[_JPEG_MAX_HUFF_TABLES][16];
82 uint8_t huff_ac_symbol[_JPEG_MAX_HUFF_TABLES][256];
83 uint8_t huff_dc_symbol_len[_JPEG_MAX_HUFF_TABLES][16];
84 uint8_t huff_dc_symbol[_JPEG_MAX_HUFF_TABLES][16];
89 uint8_t channel_huff_ac_table_map[_JPEG_MAX_CHANNELS];
90 uint8_t channel_huff_dc_table_map[_JPEG_MAX_CHANNELS];
95 uint16_t huff_ac_sym_start[_JPEG_MAX_HUFF_TABLES][16];
96 uint16_t huff_dc_sym_start[_JPEG_MAX_HUFF_TABLES][16];
102 uint8_t bits_available;
103 uint8_t blocks_in_one_pass;
104 int16_t one_block[_JPEG_MAX_BLOCKS][64];
105 uint16_t block_number;
106 uint8_t channel_map[_JPEG_MAX_BLOCKS];
107 uint8_t sub_sample_type;
108 int16_t prev_dc_value[_JPEG_MAX_CHANNELS];
109 uint8_t *current_huff_symbol_len_table;
110 uint8_t *current_huff_symbol_table;
111 uint16_t *current_huff_symbol_start_table;
112 uint16_t *current_quant_table;
113 uint8_t data_buffer[_JPEG_MAX_DATA_BUF_LEN];
115 uint16_t buffer_index;
119typedef struct gl_jpeg_types
125 uint16_t image_offset_x;
126 uint16_t image_offset_y;
142} jpeg_color_space_pointers_t;
147 GL_DRAW_IMAGE_SUCCESS = 0,
148 GL_DRAW_IMAGE_UNSUPPORTED_FORMAT,
150 GL_DRAW_IMAGE_DEST_ERROR,
151 GL_DRAW_IMAGE_JPEG_ERROR_1,
152 GL_DRAW_IMAGE_JPEG_ERROR_2,
153 GL_DRAW_IMAGE_JPEG_ERROR_3,
154 GL_DRAW_IMAGE_JPEG_ERROR_4,
155 GL_DRAW_IMAGE_JPEG_ERROR_5,
156 GL_DRAW_IMAGE_JPEG_ERROR_6,
157 GL_DRAW_IMAGE_JPEG_ERROR_7,
158 GL_DRAW_IMAGE_JPEG_ERROR_8,
159 GL_DRAW_IMAGE_JPEG_ERROR_9,
160 GL_DRAW_IMAGE_JPEG_ERROR_10,
161 GL_DRAW_IMAGE_JPEG_ERROR_11,
162 GL_DRAW_IMAGE_JPEG_ERROR_12,
163 GL_DRAW_IMAGE_JPEG_ERROR_13,
164 GL_DRAW_IMAGE_JPEG_ERROR_14,
165 GL_DRAW_IMAGE_JPEG_ERROR_15,
166 GL_DRAW_IMAGE_JPEG_ERROR_16
167} gl_draw_image_result_t;
171 const code uint8_t * image_file_as_array;
172 jpeg_decoder_app0_t app0;
173 jpeg_decoder_sof0_t sof0;
174 jpeg_decoder_dqt_t dqt;
175 jpeg_decoder_dri_t dri;
176 jpeg_decoder_dht_t dht;
177 jpeg_decoder_sos_t sos;
178 jpeg_decoder_huff_t huff;
179 jpeg_work_memory_t work_memory;
180 jpeg_drawing_t drawing;
181 gl_draw_image_result_t error;
Declaration of types for Graphic Library.
The context structure for storing rectangle by its top left point and width and height (in pixels).
Definition gl_types.h:131