1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #define JPEG_INTERNALS
- #include "jinclude.h"
- #include "jpeglib.h"
- GLOBAL void
- jpeg_abort (j_common_ptr cinfo)
- {
- int pool;
-
- for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) {
- (*cinfo->mem->free_pool) (cinfo, pool);
- }
-
- cinfo->global_state = (cinfo->is_decompressor ? DSTATE_START : CSTATE_START);
- }
- 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;
- }
|