gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
gl2gif.h File Reference
#include <stdio.h>
#include "PixelBuffer.h"
Include dependency graph for gl2gif.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_GIFCOLORS   256
 
#define PPM_GETR(p)   (((p)&0x3ff00000) >> 20)
 
#define PPM_GETG(p)   (((p)&0xffc00) >> 10)
 
#define PPM_GETB(p)   ((p)&0x3ff)
 
#define PPM_EQUAL(p, q)   ((p) == (q))
 
#define PPM_ASSIGN(p, red, grn, blu)   (p) = ((pixel)(red) << 20) | ((pixel)(grn) << 10) | (pixel)(blu)
 
#define PPM_LUMIN(p)   (0.299 * PPM_GETR(p) + 0.587 * PPM_GETG(p) + 0.114 * PPM_GETB(p))
 
#define PPM_DEPTH(newp, p, oldmaxval, newmaxval)
 

Typedefs

typedef unsigned int pixval
 
typedef unsigned long pixel
 
typedef int code_int
 
typedef long int count_int
 

Functions

void create_gif (FILE *outfile, PixelBuffer *buffer, int dither, int sort, int interlace, int transparency)
 

Macro Definition Documentation

◆ MAX_GIFCOLORS

#define MAX_GIFCOLORS   256

Definition at line 13 of file gl2gif.h.

◆ PPM_ASSIGN

#define PPM_ASSIGN (   p,
  red,
  grn,
  blu 
)    (p) = ((pixel)(red) << 20) | ((pixel)(grn) << 10) | (pixel)(blu)

Definition at line 29 of file gl2gif.h.

◆ PPM_DEPTH

#define PPM_DEPTH (   newp,
  p,
  oldmaxval,
  newmaxval 
)
Value:
PPM_ASSIGN((newp), \
((int)PPM_GETR(p) * (newmaxval) + (oldmaxval) / 2) / (oldmaxval), \
((int)PPM_GETG(p) * (newmaxval) + (oldmaxval) / 2) / (oldmaxval), \
((int)PPM_GETB(p) * (newmaxval) + (oldmaxval) / 2) / (oldmaxval))

Definition at line 35 of file gl2gif.h.

◆ PPM_EQUAL

#define PPM_EQUAL (   p,
 
)    ((p) == (q))

Definition at line 27 of file gl2gif.h.

◆ PPM_GETB

#define PPM_GETB (   p)    ((p)&0x3ff)

Definition at line 26 of file gl2gif.h.

◆ PPM_GETG

#define PPM_GETG (   p)    (((p)&0xffc00) >> 10)

Definition at line 25 of file gl2gif.h.

◆ PPM_GETR

#define PPM_GETR (   p)    (((p)&0x3ff00000) >> 20)

Definition at line 24 of file gl2gif.h.

◆ PPM_LUMIN

#define PPM_LUMIN (   p)    (0.299 * PPM_GETR(p) + 0.587 * PPM_GETG(p) + 0.114 * PPM_GETB(p))

Definition at line 32 of file gl2gif.h.

Typedef Documentation

◆ code_int

typedef int code_int

Definition at line 18 of file gl2gif.h.

◆ count_int

typedef long int count_int

Definition at line 19 of file gl2gif.h.

◆ pixel

typedef unsigned long pixel

Definition at line 17 of file gl2gif.h.

◆ pixval

typedef unsigned int pixval

Definition at line 16 of file gl2gif.h.

Function Documentation

◆ create_gif()

void create_gif ( FILE *  outfile,
PixelBuffer buffer,
int  dither,
int  sort,
int  interlace,
int  transparency 
)

Definition at line 1110 of file gl2gif.cpp.

Referenced by CreateOutputFile().

Here is the call graph for this function:
Here is the caller graph for this function:
PPM_GETG
#define PPM_GETG(p)
Definition: gl2gif.h:24
PPM_ASSIGN
#define PPM_ASSIGN(p, red, grn, blu)
Definition: gl2gif.h:28
PPM_GETB
#define PPM_GETB(p)
Definition: gl2gif.h:25
PPM_GETR
#define PPM_GETR(p)
Definition: gl2gif.h:23