COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
jcomapi.cpp File Reference
#include "jinclude.h"
#include "jpeglib.h"
Include dependency graph for jcomapi.cpp:

Macros

#define JPEG_INTERNALS
 

Functions

void jpeg_abort (j_common_ptr cinfo)
 
void jpeg_destroy (j_common_ptr cinfo)
 
JQUANT_TBLjpeg_alloc_quant_table (j_common_ptr cinfo)
 
JHUFF_TBLjpeg_alloc_huff_table (j_common_ptr cinfo)
 

Macro Definition Documentation

#define JPEG_INTERNALS

Function Documentation

void jpeg_abort ( j_common_ptr  cinfo)
30 {
31  int pool;
32 
33  /* Do nothing if called on a not-initialized or destroyed JPEG object. */
34  if (cinfo->mem == NULL)
35  return;
36 
37  /* Releasing pools in reverse order might help avoid fragmentation
38  * with some (brain-damaged) malloc libraries.
39  */
40  for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) {
41  (*cinfo->mem->free_pool) (cinfo, pool);
42  }
43 
44  /* Reset overall state for possible reuse of object */
45  if (cinfo->is_decompressor) {
46  cinfo->global_state = DSTATE_START;
47  /* Try to keep application from accessing now-deleted marker list.
48  * A bit kludgy to do it here, but this is the most central place.
49  */
50  ((j_decompress_ptr) cinfo)->marker_list = NULL;
51  } else {
52  cinfo->global_state = CSTATE_START;
53  }
54 }
struct jpeg_decompress_struct * j_decompress_ptr
Definition: jpeglib.h:268
#define CSTATE_START
Definition: jpegint.h:25
void(* free_pool)()
Definition: jpeglib.h:796
#define DSTATE_START
Definition: jpegint.h:29
#define JPOOL_NUMPOOLS
Definition: jpeglib.h:755
#define JPOOL_PERMANENT
Definition: jpeglib.h:753
boolean is_decompressor
Definition: jpeglib.h:259
struct jpeg_memory_mgr * mem
Definition: jpeglib.h:259
int global_state
Definition: jpeglib.h:259
void jpeg_destroy ( j_common_ptr  cinfo)
70 {
71  /* We need only tell the memory manager to release everything. */
72  /* NB: mem pointer is NULL if memory mgr failed to initialize. */
73  if (cinfo->mem != NULL)
74  (*cinfo->mem->self_destruct) (cinfo);
75  cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */
76  cinfo->global_state = 0; /* mark it destroyed */
77 }
void(* self_destruct)()
Definition: jpeglib.h:797
struct jpeg_memory_mgr * mem
Definition: jpeglib.h:259
int global_state
Definition: jpeglib.h:259
JQUANT_TBL* jpeg_alloc_quant_table ( j_common_ptr  cinfo)
87 {
88  JQUANT_TBL *tbl;
89 
90  tbl = (JQUANT_TBL *)
91  (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL));
92  tbl->sent_table = FALSE; /* make sure this is false in any new table */
93  return tbl;
94 }
void *(* alloc_small)()
Definition: jpeglib.h:764
boolean sent_table
Definition: jpeglib.h:99
Definition: jpeglib.h:88
#define SIZEOF(object)
Definition: jinclude.h:80
#define FALSE
Definition: jpleph.cpp:69
#define JPOOL_PERMANENT
Definition: jpeglib.h:753
struct jpeg_memory_mgr * mem
Definition: jpeglib.h:259
JHUFF_TBL* jpeg_alloc_huff_table ( j_common_ptr  cinfo)
99 {
100  JHUFF_TBL *tbl;
101 
102  tbl = (JHUFF_TBL *)
103  (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL));
104  tbl->sent_table = FALSE; /* make sure this is false in any new table */
105  return tbl;
106 }
void *(* alloc_small)()
Definition: jpeglib.h:764
#define SIZEOF(object)
Definition: jinclude.h:80
#define FALSE
Definition: jpleph.cpp:69
boolean sent_table
Definition: jpeglib.h:115
#define JPOOL_PERMANENT
Definition: jpeglib.h:753
Definition: jpeglib.h:105
struct jpeg_memory_mgr * mem
Definition: jpeglib.h:259