Blender V2.61 - r43446
Defines | Functions

colortools.c File Reference

#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "DNA_color_types.h"
#include "DNA_curve_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_colortools.h"
#include "BKE_curve.h"
#include "BKE_fcurve.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"

Go to the source code of this file.

Defines

#define INV_255   (1.f/255.f)

Functions

CurveMappingcurvemapping_add (int tot, float minx, float miny, float maxx, float maxy)
void curvemapping_free (CurveMapping *cumap)
CurveMappingcurvemapping_copy (CurveMapping *cumap)
void curvemapping_set_black_white (CurveMapping *cumap, const float black[3], const float white[3])
void curvemap_remove (CurveMap *cuma, int flag)
void curvemap_insert (CurveMap *cuma, float x, float y)
void curvemap_reset (CurveMap *cuma, rctf *clipr, int preset, int slope)
void curvemap_sethandle (CurveMap *cuma, int type)
static void calchandle_curvemap (BezTriple *bezt, BezTriple *prev, BezTriple *next, int UNUSED(mode))
static float curvemap_calc_extend (CurveMap *cuma, float x, const float first[2], const float last[2])
static void curvemap_make_table (CurveMap *cuma, rctf *clipr)
void curvemapping_premultiply (CurveMapping *cumap, int restore)
static int sort_curvepoints (const void *a1, const void *a2)
void curvemapping_changed (CurveMapping *cumap, int rem_doubles)
float curvemap_evaluateF (CurveMap *cuma, float value)
float curvemapping_evaluateF (CurveMapping *cumap, int cur, float value)
void curvemapping_evaluate3F (CurveMapping *cumap, float vecout[3], const float vecin[3])
void curvemapping_evaluateRGBF (CurveMapping *cumap, float vecout[3], const float vecin[3])
void curvemapping_evaluate_premulRGBF (CurveMapping *cumap, float vecout[3], const float vecin[3])
void curvemapping_do_ibuf (CurveMapping *cumap, ImBuf *ibuf)
int curvemapping_RGBA_does_something (CurveMapping *cumap)
void curvemapping_initialize (CurveMapping *cumap)
void curvemapping_table_RGBA (CurveMapping *cumap, float **array, int *size)
DO_INLINE int get_bin_float (float f)
DO_INLINE void save_sample_line (Scopes *scopes, const int idx, const float fx, float *rgb, float *ycc)
void scopes_update (Scopes *scopes, ImBuf *ibuf, int use_color_management)
void scopes_free (Scopes *scopes)
void scopes_new (Scopes *scopes)

Detailed Description

Definition in file colortools.c.


Define Documentation

#define INV_255   (1.f/255.f)

Definition at line 858 of file colortools.c.

Referenced by scopes_update().


Function Documentation

static void calchandle_curvemap ( BezTriple bezt,
BezTriple prev,
BezTriple next,
int   UNUSEDmode 
) [static]
static float curvemap_calc_extend ( CurveMap cuma,
float  x,
const float  first[2],
const float  last[2] 
) [static]
float curvemap_evaluateF ( CurveMap cuma,
float  value 
)
void curvemap_insert ( CurveMap cuma,
float  x,
float  y 
)
static void curvemap_make_table ( CurveMap cuma,
rctf clipr 
) [static]
void curvemap_remove ( CurveMap cuma,
int  flag 
)
void curvemap_reset ( CurveMap cuma,
rctf clipr,
int  preset,
int  slope 
)
void curvemap_sethandle ( CurveMap cuma,
int  type 
)
CurveMapping* curvemapping_add ( int  tot,
float  minx,
float  miny,
float  maxx,
float  maxy 
) [read]
void curvemapping_changed ( CurveMapping cumap,
int  rem_doubles 
)
CurveMapping* curvemapping_copy ( CurveMapping cumap) [read]
void curvemapping_do_ibuf ( CurveMapping cumap,
ImBuf ibuf 
)
void curvemapping_evaluate3F ( CurveMapping cumap,
float  vecout[3],
const float  vecin[3] 
)

Definition at line 711 of file colortools.c.

References curvemapping_evaluateF().

Referenced by node_shader_exec_curve_vec().

void curvemapping_evaluate_premulRGBF ( CurveMapping cumap,
float  vecout[3],
const float  vecin[3] 
)
float curvemapping_evaluateF ( CurveMapping cumap,
int  cur,
float  value 
)
void curvemapping_evaluateRGBF ( CurveMapping cumap,
float  vecout[3],
const float  vecin[3] 
)
void curvemapping_free ( CurveMapping cumap)
void curvemapping_initialize ( CurveMapping cumap)
void curvemapping_premultiply ( CurveMapping cumap,
int  restore 
)
int curvemapping_RGBA_does_something ( CurveMapping cumap)
void curvemapping_set_black_white ( CurveMapping cumap,
const float  black[3],
const float  white[3] 
)
void curvemapping_table_RGBA ( CurveMapping cumap,
float **  array,
int *  size 
)
DO_INLINE int get_bin_float ( float  f)

Definition at line 860 of file colortools.c.

References CLAMP().

Referenced by make_histogram_view_from_ibuf_float(), and scopes_update().

DO_INLINE void save_sample_line ( Scopes scopes,
const int  idx,
const float  fx,
float *  rgb,
float *  ycc 
)
void scopes_free ( Scopes scopes)
void scopes_new ( Scopes scopes)
void scopes_update ( Scopes scopes,
ImBuf ibuf,
int  use_color_management 
)
static int sort_curvepoints ( const void *  a1,
const void *  a2 
) [static]

Definition at line 601 of file colortools.c.

References CurveMapPoint::x.

Referenced by curvemapping_changed().