Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pnmimage/ppmcmap.cxx File Reference

#include "ppmcmap.h"

Go to the source code of this file.

Defines

#define HASH_SIZE   20023
#define ppm_hashpixel(p)   ( ( ( (long) PPM_GETR(p) * 33023 + (long) PPM_GETG(p) * 30013 + (long) PPM_GETB(p) * 27011 ) & 0x7fffffff ) % HASH_SIZE )

Functions

colorhist_vector ppm_computecolorhist (pixel **pixels, int cols, int rows, int maxcolors, int *colorsP)
void ppm_addtocolorhist (colorhist_vector chv, int *colorsP, int maxcolors, pixel *colorP, int value, int position)
colorhash_table ppm_computecolorhash (pixel **pixels, int cols, int rows, int maxcolors, int *colorsP)
colorhash_table ppm_alloccolorhash ()
int ppm_addtocolorhash (colorhash_table cht, pixel *colorP, int value)
colorhist_vector ppm_colorhashtocolorhist (colorhash_table cht, int maxcolors)
colorhash_table ppm_colorhisttocolorhash (colorhist_vector chv, int colors)
int ppm_lookupcolor (colorhash_table cht, pixel *colorP)
void ppm_freecolorhist (colorhist_vector chv)
void ppm_freecolorhash (colorhash_table cht)


Detailed Description

Definition in file ppmcmap.cxx.


Define Documentation

#define HASH_SIZE   20023
 

Definition at line 18 of file ppmcmap.cxx.

Referenced by ppm_alloccolorhash(), ppm_colorhashtocolorhist(), and ppm_freecolorhash().

#define ppm_hashpixel  )     ( ( ( (long) PPM_GETR(p) * 33023 + (long) PPM_GETG(p) * 30013 + (long) PPM_GETB(p) * 27011 ) & 0x7fffffff ) % HASH_SIZE )
 

Definition at line 23 of file ppmcmap.cxx.

Referenced by ppm_addtocolorhash(), ppm_colorhisttocolorhash(), ppm_computecolorhash(), and ppm_lookupcolor().


Function Documentation

int ppm_addtocolorhash colorhash_table  cht,
pixel colorP,
int  value
 

Definition at line 141 of file ppmcmap.cxx.

References colorhist_list_item::ch, colorhist_item::color, malloc(), colorhist_list_item::next, ppm_hashpixel, and colorhist_item::value.

void ppm_addtocolorhist colorhist_vector  chv,
int *  colorsP,
int  maxcolors,
pixel colorP,
int  value,
int  position
 

Definition at line 43 of file ppmcmap.cxx.

References colorhist_item::color, PPM_EQUAL, and colorhist_item::value.

colorhash_table ppm_alloccolorhash void   ) 
 

Definition at line 125 of file ppmcmap.cxx.

References colorhash_table, HASH_SIZE, malloc(), and pm_error().

Referenced by ppm_colorhisttocolorhash(), and ppm_computecolorhash().

colorhist_vector ppm_colorhashtocolorhist colorhash_table  cht,
int  maxcolors
 

Definition at line 160 of file ppmcmap.cxx.

References colorhist_list_item::ch, HASH_SIZE, malloc(), colorhist_list_item::next, and pm_error().

Referenced by ppm_computecolorhist().

colorhash_table ppm_colorhisttocolorhash colorhist_vector  chv,
int  colors
 

Definition at line 188 of file ppmcmap.cxx.

References colorhist_list_item::ch, colorhist_item::color, colorhash_table, malloc(), colorhist_list_item::next, pm_error(), ppm_alloccolorhash(), PPM_EQUAL, PPM_GETB, PPM_GETG, PPM_GETR, ppm_hashpixel, and colorhist_item::value.

colorhash_table ppm_computecolorhash pixel **  pixels,
int  cols,
int  rows,
int  maxcolors,
int *  colorsP
 

Definition at line 82 of file ppmcmap.cxx.

References colorhist_list_item::ch, colorhist_item::color, colorhash_table, malloc(), colorhist_list_item::next, pm_error(), ppm_alloccolorhash(), PPM_EQUAL, ppm_freecolorhash(), ppm_hashpixel, and colorhist_item::value.

Referenced by ppm_computecolorhist().

colorhist_vector ppm_computecolorhist pixel **  pixels,
int  cols,
int  rows,
int  maxcolors,
int *  colorsP
 

Definition at line 27 of file ppmcmap.cxx.

References colorhash_table, ppm_colorhashtocolorhist(), ppm_computecolorhash(), and ppm_freecolorhash().

void ppm_freecolorhash colorhash_table  cht  ) 
 

Definition at line 241 of file ppmcmap.cxx.

References HASH_SIZE, and colorhist_list_item::next.

Referenced by ppm_computecolorhash(), ppm_computecolorhist(), and PNMFileTypeTGA::Reader::read_data().

void ppm_freecolorhist colorhist_vector  chv  ) 
 

Definition at line 235 of file ppmcmap.cxx.

Referenced by PNMFileTypeTGA::Reader::read_data().

int ppm_lookupcolor colorhash_table  cht,
pixel colorP
 

Definition at line 220 of file ppmcmap.cxx.

References colorhist_list_item::ch, colorhist_item::color, colorhist_list_item::next, PPM_EQUAL, ppm_hashpixel, and colorhist_item::value.

Referenced by BMPwriterow().


Generated on Fri May 2 00:46:05 2003 for Panda by doxygen1.3