Niotso  git revision 558726a9f13d7c3423a683dd2f4323589b66c310
The New Implementation of The Sims Online
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
opngreduc.c File Reference
#include "opngreduc.h"
#include <assert.h>

Macros

#define OPNG_ASSERT(cond)   assert(cond)
 
#define OPNG_ASSERT_MSG(cond, msg)   assert(cond)
 
#define opng_debug(level, msg)   ((void)0)
 
#define OPNG_CMP_RGB(R1, G1, B1, R2, G2, B2)
 
#define OPNG_CMP_ARGB(A1, R1, G1, B1, A2, R2, G2, B2)
 

Functions

static int opng_insert_palette_entry (png_colorp palette, int *num_palette, png_bytep trans_alpha, int *num_trans, int max_tuples, unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha, int *index)
 
static void opng_get_alpha_row (png_row_infop row_info_ptr, png_color_16p trans_color, png_bytep row, png_bytep alpha_row)
 
static png_uint_32 opng_analyze_bits (png_structp png_ptr, png_infop info_ptr, png_uint_32 reductions)
 
static png_uint_32 opng_reduce_bits (png_structp png_ptr, png_infop info_ptr, png_uint_32 reductions)
 
static png_uint_32 opng_reduce_palette_bits (png_structp png_ptr, png_infop info_ptr, png_uint_32 reductions)
 
static png_uint_32 opng_reduce_to_palette (png_structp png_ptr, png_infop info_ptr, png_uint_32 reductions)
 
static void opng_analyze_sample_usage (png_structp png_ptr, png_infop info_ptr, png_bytep usage_map)
 
static void opng_set_num_palette (png_structp png_ptr, png_infop info_ptr, int num_palette)
 
static void opng_set_num_trans (png_structp png_ptr, png_infop info_ptr, int num_trans)
 
static png_uint_32 opng_reduce_palette (png_structp png_ptr, png_infop info_ptr, png_uint_32 reductions)
 
png_uint_32 PNGAPI opng_reduce_image (png_structp png_ptr, png_infop info_ptr, png_uint_32 reductions)
 

Macro Definition Documentation

#define OPNG_ASSERT (   cond)    assert(cond)
#define OPNG_ASSERT_MSG (   cond,
  msg 
)    assert(cond)
#define OPNG_CMP_ARGB (   A1,
  R1,
  G1,
  B1,
  A2,
  R2,
  G2,
  B2 
)
Value:
(((int)(A1) != (int)(A2)) ? \
((int)(A1) - (int)(A2)) : \
(((int)(R1) != (R2)) ? \
((int)(R1) - (int)(R2)) : \
(((int)(G1) != (int)(G2)) ? \
((int)(G1) - (int)(G2)) : \
((int)(B1) - (int)(B2)))))
#define OPNG_CMP_RGB (   R1,
  G1,
  B1,
  R2,
  G2,
  B2 
)
Value:
(((int)(R1) != (int)(R2)) ? \
((int)(R1) - (int)(R2)) : \
(((int)(G1) != (int)(G2)) ? \
((int)(G1) - (int)(G2)) : \
((int)(B1) - (int)(B2))))
#define opng_debug (   level,
  msg 
)    ((void)0)

Function Documentation

static png_uint_32 opng_analyze_bits ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32  reductions 
)
static
static void opng_analyze_sample_usage ( png_structp  png_ptr,
png_infop  info_ptr,
png_bytep  usage_map 
)
static
static void opng_get_alpha_row ( png_row_infop  row_info_ptr,
png_color_16p  trans_color,
png_bytep  row,
png_bytep  alpha_row 
)
static
static int opng_insert_palette_entry ( png_colorp  palette,
int *  num_palette,
png_bytep  trans_alpha,
int *  num_trans,
int  max_tuples,
unsigned int  red,
unsigned int  green,
unsigned int  blue,
unsigned int  alpha,
int *  index 
)
static
static png_uint_32 opng_reduce_bits ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32  reductions 
)
static
png_uint_32 PNGAPI opng_reduce_image ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32  reductions 
)
static png_uint_32 opng_reduce_palette ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32  reductions 
)
static
static png_uint_32 opng_reduce_palette_bits ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32  reductions 
)
static
static png_uint_32 opng_reduce_to_palette ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32  reductions 
)
static
static void opng_set_num_palette ( png_structp  png_ptr,
png_infop  info_ptr,
int  num_palette 
)
static
static void opng_set_num_trans ( png_structp  png_ptr,
png_infop  info_ptr,
int  num_trans 
)
static