1
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
40
43
44
45
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
78
79
80
84
85
86
95
96
97
98
99
100
101
102
103
104
105
106
/* ... */
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
/* ... */
GLOBAL(void)
jpeg_abort (j_common_ptr cinfo)
{
int pool;
if (cinfo->mem == NULL)
return;
/* ... */
for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) {
(*cinfo->mem->free_pool) (cinfo, pool);
}for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { ... }
if (cinfo->is_decompressor) {
cinfo->global_state = DSTATE_START;
/* ... */
((j_decompress_ptr) cinfo)->marker_list = NULL;
}if (cinfo->is_decompressor) { ... } else {
cinfo->global_state = CSTATE_START;
}else { ... }
}{ ... }
/* ... */
GLOBAL(void)
jpeg_destroy (j_common_ptr cinfo)
{
if (cinfo->mem != NULL)
(*cinfo->mem->self_destruct) (cinfo);
cinfo->mem = NULL;
cinfo->global_state = 0;
}{ ... }
/* ... */
GLOBAL(JQUANT_TBL *)
jpeg_alloc_quant_table (j_common_ptr cinfo)
{
JQUANT_TBL *tbl;
tbl = (JQUANT_TBL *)
(*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL));
tbl->sent_table = FALSE;
return tbl;
}{ ... }
GLOBAL(JHUFF_TBL *)
jpeg_alloc_huff_table (j_common_ptr cinfo)
{
JHUFF_TBL *tbl;
tbl = (JHUFF_TBL *)
(*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL));
tbl->sent_table = FALSE;
return tbl;
}{ ... }