PandA-2024.02
Macros | Functions | Variables
marker.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define M_SOI   0xd8 /* Start of Image */
 
#define M_SOF0   0xc0 /* Baseline DCT ( Huffman ) */
 
#define M_SOS   0xda /* Start of Scan ( Head of Compressed Data ) */
 
#define M_DHT   0xc4 /* Huffman Table */
 
#define M_DQT   0xdb /* Quantization Table */
 
#define M_EOI   0xd9 /* End of Image */
 
#define READ_MARKERS_REP   10
 
#define GET_SOF_REP   3
 
#define GET_SOS_REP   3
 
#define GET_DHT_REP   4
 
#define GET_DQT_REP   2
 

Functions

int read_byte (void)
 
short read_word (void)
 
int first_marker (void)
 
int next_marker (void)
 
void get_sof ()
 
void get_sos ()
 
void get_dht ()
 
void get_dqt ()
 
void read_markers (unsigned char *buf)
 

Variables

int i_marker = 0
 
const int out_unread_marker [READ_MARKERS_REP]
 
int out_length_get_sof = 17
 
int out_data_precision_get_sof = 8
 
int out_p_jinfo_image_height_get_sof = 59
 
int out_p_jinfo_image_width_get_sof = 90
 
int out_p_jinfo_num_components_get_sof = 3
 
const int out_index_get_sof [GET_SOF_REP] = { 0, 1, 2 }
 
const int out_id_get_sof [GET_SOF_REP] = { 1, 2, 3 }
 
const int out_h_samp_factor_get_sof [GET_SOF_REP] = { 2, 1, 1 }
 
const int out_v_samp_factor_get_sof [GET_SOF_REP] = { 2, 1, 1 }
 
const int out_quant_tbl_no_get_sof [GET_SOF_REP] = { 0, 1, 1 }
 
int i_get_sos = 0
 
int out_length_get_sos = 12
 
int out_num_comp_get_sos = 3
 
const int out_comp_id_get_sos [GET_SOS_REP] = { 1, 2, 3 }
 
const int out_dc_tbl_no_get_sos [GET_SOS_REP] = { 0, 1, 1 }
 
const int out_ac_tbl_no_get_sos [GET_SOS_REP] = { 0, 1, 1 }
 
int i_get_dht = 0
 
const int out_length_get_dht [GET_DHT_REP] = { 29, 179, 29, 179 }
 
const int out_index_get_dht [GET_DHT_REP] = { 0x0, 0x10, 0x1, 0x11 }
 
const int out_count_get_dht [GET_DHT_REP] = { 12, 162, 12, 162 }
 
int i_get_dqt = 0
 
const int out_length_get_dqt [GET_DQT_REP] = { 65, 65 }
 
const int out_prec_get_dht [GET_DQT_REP] = { 0, 0 }
 
const int out_num_get_dht [GET_DQT_REP] = { 0, 1 }
 
const int izigzag_index [64]
 
static unsigned char * ReadBuf
 

Macro Definition Documentation

◆ GET_DHT_REP

#define GET_DHT_REP   4

Definition at line 124 of file marker.c.

◆ GET_DQT_REP

#define GET_DQT_REP   2

Definition at line 138 of file marker.c.

◆ GET_SOF_REP

#define GET_SOF_REP   3

Definition at line 86 of file marker.c.

◆ GET_SOS_REP

#define GET_SOS_REP   3

Definition at line 108 of file marker.c.

◆ M_DHT

#define M_DHT   0xc4 /* Huffman Table */

Definition at line 56 of file marker.c.

Referenced by read_markers().

◆ M_DQT

#define M_DQT   0xdb /* Quantization Table */

Definition at line 57 of file marker.c.

Referenced by read_markers().

◆ M_EOI

#define M_EOI   0xd9 /* End of Image */

Definition at line 58 of file marker.c.

Referenced by read_markers().

◆ M_SOF0

#define M_SOF0   0xc0 /* Baseline DCT ( Huffman ) */

Definition at line 54 of file marker.c.

Referenced by read_markers().

◆ M_SOI

#define M_SOI   0xd8 /* Start of Image */

Definition at line 53 of file marker.c.

Referenced by first_marker(), and read_markers().

◆ M_SOS

#define M_SOS   0xda /* Start of Scan ( Head of Compressed Data ) */

Definition at line 55 of file marker.c.

Referenced by read_markers().

◆ READ_MARKERS_REP

#define READ_MARKERS_REP   10

Definition at line 66 of file marker.c.

Function Documentation

◆ first_marker()

int first_marker ( void  )

Definition at line 187 of file marker.c.

References c1, c2, EXIT, M_SOI, main_result, and read_byte().

Here is the call graph for this function:

◆ get_dht()

void get_dht ( )

◆ get_dqt()

void get_dqt ( )

Definition at line 498 of file marker.c.

References DCTSIZE2, i_get_dqt, izigzag_index, main_result, out_length_get_dqt, out_num_get_dht, out_prec_get_dht, p_jinfo_quant_tbl_quantval, read_byte(), and read_word().

Here is the call graph for this function:

◆ get_sof()

void get_sof ( )

◆ get_sos()

void get_sos ( )

◆ next_marker()

int next_marker ( void  )

Definition at line 205 of file marker.c.

References read_byte().

Here is the call graph for this function:

◆ read_byte()

int read_byte ( void  )

Definition at line 169 of file marker.c.

References ReadBuf.

◆ read_markers()

void read_markers ( unsigned char *  buf)

Definition at line 555 of file marker.c.

References first_marker(), get_dht(), get_dqt(), get_sof(), get_sos(), i_marker, M_DHT, M_DQT, M_EOI, M_SOF0, M_SOI, M_SOS, main_result, next_marker(), out_unread_marker, and ReadBuf.

Here is the call graph for this function:

◆ read_word()

short read_word ( void  )

Definition at line 176 of file marker.c.

References ReadBuf.

Variable Documentation

◆ i_get_dht

int i_get_dht = 0

Definition at line 125 of file marker.c.

◆ i_get_dqt

int i_get_dqt = 0

Definition at line 139 of file marker.c.

◆ i_get_sos

int i_get_sos = 0

Definition at line 109 of file marker.c.

◆ i_marker

int i_marker = 0

Definition at line 67 of file marker.c.

◆ izigzag_index

const int izigzag_index[64]
Initial value:
= { 0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
27, 20, 13, 6, 7, 14, 21, 28,
35, 42, 49, 56, 57, 50, 43, 36,
29, 22, 15, 23, 30, 37, 44, 51,
58, 59, 52, 45, 38, 31, 39, 46,
53, 60, 61, 54, 47, 55, 62, 63
}

Definition at line 148 of file marker.c.

◆ out_ac_tbl_no_get_sos

const int out_ac_tbl_no_get_sos[GET_SOS_REP] = { 0, 1, 1 }

Definition at line 114 of file marker.c.

◆ out_comp_id_get_sos

const int out_comp_id_get_sos[GET_SOS_REP] = { 1, 2, 3 }

Definition at line 112 of file marker.c.

◆ out_count_get_dht

const int out_count_get_dht[GET_DHT_REP] = { 12, 162, 12, 162 }

Definition at line 128 of file marker.c.

◆ out_data_precision_get_sof

int out_data_precision_get_sof = 8

Definition at line 88 of file marker.c.

◆ out_dc_tbl_no_get_sos

const int out_dc_tbl_no_get_sos[GET_SOS_REP] = { 0, 1, 1 }

Definition at line 113 of file marker.c.

◆ out_h_samp_factor_get_sof

const int out_h_samp_factor_get_sof[GET_SOF_REP] = { 2, 1, 1 }

Definition at line 94 of file marker.c.

◆ out_id_get_sof

const int out_id_get_sof[GET_SOF_REP] = { 1, 2, 3 }

Definition at line 93 of file marker.c.

◆ out_index_get_dht

const int out_index_get_dht[GET_DHT_REP] = { 0x0, 0x10, 0x1, 0x11 }

Definition at line 127 of file marker.c.

◆ out_index_get_sof

const int out_index_get_sof[GET_SOF_REP] = { 0, 1, 2 }

Definition at line 92 of file marker.c.

◆ out_length_get_dht

const int out_length_get_dht[GET_DHT_REP] = { 29, 179, 29, 179 }

Definition at line 126 of file marker.c.

◆ out_length_get_dqt

const int out_length_get_dqt[GET_DQT_REP] = { 65, 65 }

Definition at line 140 of file marker.c.

◆ out_length_get_sof

int out_length_get_sof = 17

Definition at line 87 of file marker.c.

◆ out_length_get_sos

int out_length_get_sos = 12

Definition at line 110 of file marker.c.

◆ out_num_comp_get_sos

int out_num_comp_get_sos = 3

Definition at line 111 of file marker.c.

◆ out_num_get_dht

const int out_num_get_dht[GET_DQT_REP] = { 0, 1 }

Definition at line 142 of file marker.c.

◆ out_p_jinfo_image_height_get_sof

int out_p_jinfo_image_height_get_sof = 59

Definition at line 89 of file marker.c.

◆ out_p_jinfo_image_width_get_sof

int out_p_jinfo_image_width_get_sof = 90

Definition at line 90 of file marker.c.

◆ out_p_jinfo_num_components_get_sof

int out_p_jinfo_num_components_get_sof = 3

Definition at line 91 of file marker.c.

◆ out_prec_get_dht

const int out_prec_get_dht[GET_DQT_REP] = { 0, 0 }

Definition at line 141 of file marker.c.

◆ out_quant_tbl_no_get_sof

const int out_quant_tbl_no_get_sof[GET_SOF_REP] = { 0, 1, 1 }

Definition at line 96 of file marker.c.

◆ out_unread_marker

const int out_unread_marker[READ_MARKERS_REP]
Initial value:
=
{ 0xd8, 0xe0, 0xdb, 0xdb, 0xc0, 0xc4, 0xc4, 0xc4, 0xc4, 0xda }

Definition at line 68 of file marker.c.

◆ out_v_samp_factor_get_sof

const int out_v_samp_factor_get_sof[GET_SOF_REP] = { 2, 1, 1 }

Definition at line 95 of file marker.c.

◆ ReadBuf

unsigned char* ReadBuf
static

Definition at line 162 of file marker.c.

Referenced by get_sos(), read_byte(), read_markers(), and read_word().


Generated on Mon Feb 12 2024 13:03:07 for PandA-2024.02 by doxygen 1.8.13