Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
jcomapi.c File Reference
#include "jinclude.h"
#include "jpeglib.h"

Go to the source code of this file.

Defines

#define JPEG_INTERNALS

Functions

 jpeg_abort (j_common_ptr cinfo)
 jpeg_destroy (j_common_ptr cinfo)
 jpeg_alloc_quant_table (j_common_ptr cinfo)
 jpeg_alloc_huff_table (j_common_ptr cinfo)

Define Documentation

Definition at line 12 of file jcomapi.c.


Function Documentation

Definition at line 29 of file jcomapi.c.

{
  int pool;

  /* Do nothing if called on a not-initialized or destroyed JPEG object. */
  if (cinfo->mem == NULL)
    return;

  /* Releasing pools in reverse order might help avoid fragmentation
   * with some (brain-damaged) malloc libraries.
   */
  for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) {
    (*cinfo->mem->free_pool) (cinfo, pool);
  }

  /* Reset overall state for possible reuse of object */
  if (cinfo->is_decompressor) {
    cinfo->global_state = DSTATE_START;
    /* Try to keep application from accessing now-deleted marker list.
     * A bit kludgy to do it here, but this is the most central place.
     */
    ((j_decompress_ptr) cinfo)->marker_list = NULL;
  } else {
    cinfo->global_state = CSTATE_START;
  }
}

Here is the caller graph for this function:

Definition at line 98 of file jcomapi.c.

{
  JHUFF_TBL *tbl;

  tbl = (JHUFF_TBL *)
    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL));
  tbl->sent_table = FALSE;  /* make sure this is false in any new table */
  return tbl;
}

Here is the caller graph for this function:

Definition at line 86 of file jcomapi.c.

{
  JQUANT_TBL *tbl;

  tbl = (JQUANT_TBL *)
    (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL));
  tbl->sent_table = FALSE;  /* make sure this is false in any new table */
  return tbl;
}

Here is the caller graph for this function:

Definition at line 69 of file jcomapi.c.

{
  /* We need only tell the memory manager to release everything. */
  /* NB: mem pointer is NULL if memory mgr failed to initialize. */
  if (cinfo->mem != NULL)
    (*cinfo->mem->self_destruct) (cinfo);
  cinfo->mem = NULL;        /* be safe if jpeg_destroy is called twice */
  cinfo->global_state = 0;  /* mark it destroyed */
}

Here is the caller graph for this function: