Blender V2.61 - r43446
Classes | Typedefs | Functions

divers.c File Reference

#include "BLI_blenlib.h"
#include "BLI_rand.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "IMB_allocimbuf.h"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Classes

struct  DitherContext

Typedefs

typedef struct DitherContext DitherContext

Functions

void IMB_de_interlace (ImBuf *ibuf)
void IMB_interlace (ImBuf *ibuf)
DitherContextcreate_dither_context (int w, float factor)
static void clear_dither_context (DitherContext *di)
static void dither_finish_row (DitherContext *di)
MINLINE unsigned char dither_value (unsigned short v_in, DitherContext *di, int i)
MINLINE void byte_to_float_v4 (float f[4], const uchar b[4])
MINLINE void float_to_byte_v4 (uchar b[4], const float f[4])
MINLINE void ushort_to_byte_v4 (uchar b[4], const unsigned short us[4])
MINLINE void ushort_to_byte_dither_v4 (uchar b[4], const unsigned short us[4], DitherContext *di)
MINLINE void float_to_byte_dither_v4 (uchar b[4], const float f[4], DitherContext *di)
void IMB_buffer_byte_from_float (uchar *rect_to, const float *rect_from, int channels_from, float dither, int profile_to, int profile_from, int predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_from_byte (float *rect_to, const uchar *rect_from, int profile_to, int profile_from, int predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_from_float (float *rect_to, const float *rect_from, int channels_from, int profile_to, int profile_from, int predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_byte_from_byte (uchar *rect_to, const uchar *rect_from, int profile_to, int profile_from, int predivide, int width, int height, int stride_to, int stride_from)
void IMB_rect_from_float (ImBuf *ibuf)
void IMB_partial_rect_from_float (ImBuf *ibuf, float *buffer, int x, int y, int w, int h)
void IMB_float_from_rect (ImBuf *ibuf)
void IMB_float_from_rect_simple (ImBuf *ibuf)
void IMB_convert_profile (ImBuf *ibuf, int profile)
float * IMB_float_profile_ensure (ImBuf *ibuf, int profile, int *alloc)
void IMB_color_to_bw (ImBuf *ibuf)

Detailed Description

Definition in file divers.c.


Typedef Documentation

typedef struct DitherContext DitherContext

Function Documentation

MINLINE void byte_to_float_v4 ( float  f[4],
const uchar  b[4] 
)

Definition at line 167 of file divers.c.

Referenced by IMB_buffer_byte_from_byte(), and IMB_buffer_float_from_byte().

static void clear_dither_context ( DitherContext di) [static]

Definition at line 127 of file divers.c.

References DitherContext::error_buf, and MEM_freeN().

Referenced by IMB_buffer_byte_from_float().

DitherContext* create_dither_context ( int  w,
float  factor 
)
static void dither_finish_row ( DitherContext di) [static]
MINLINE unsigned char dither_value ( unsigned short  v_in,
DitherContext di,
int  i 
)
MINLINE void float_to_byte_dither_v4 ( uchar  b[4],
const float  f[4],
DitherContext di 
)

Definition at line 196 of file divers.c.

References FTOUSHORT, and ushort_to_byte_dither_v4().

Referenced by IMB_buffer_byte_from_float().

MINLINE void float_to_byte_v4 ( uchar  b[4],
const float  f[4] 
)

Definition at line 175 of file divers.c.

References F4TOCHAR4.

Referenced by IMB_buffer_byte_from_byte(), and IMB_buffer_byte_from_float().

void IMB_buffer_byte_from_byte ( uchar rect_to,
const uchar rect_from,
int  profile_to,
int  profile_from,
int  predivide,
int  width,
int  height,
int  stride_to,
int  stride_from 
)
void IMB_buffer_byte_from_float ( uchar rect_to,
const float *  rect_from,
int  channels_from,
float  dither,
int  profile_to,
int  profile_from,
int  predivide,
int  width,
int  height,
int  stride_to,
int  stride_from 
)
void IMB_buffer_float_from_byte ( float *  rect_to,
const uchar rect_from,
int  profile_to,
int  profile_from,
int  predivide,
int  width,
int  height,
int  stride_to,
int  stride_from 
)
void IMB_buffer_float_from_float ( float *  rect_to,
const float *  rect_from,
int  channels_from,
int  profile_to,
int  profile_from,
int  predivide,
int  width,
int  height,
int  stride_to,
int  stride_from 
)
void IMB_color_to_bw ( ImBuf ibuf)
void IMB_convert_profile ( ImBuf ibuf,
int  profile 
)
void IMB_de_interlace ( struct ImBuf ibuf)
Attention:
Defined in divers.c

Definition at line 49 of file divers.c.

References ImBuf::flags, IB_fields, IB_rect, IMB_allocImBuf(), IMB_freeImBuf(), IMB_rectcpy(), NULL, ImBuf::rect, ImBuf::x, and ImBuf::y.

Referenced by de_interlace(), and IMB_loadiffname().

void IMB_float_from_rect ( ImBuf ibuf)
void IMB_float_from_rect_simple ( ImBuf ibuf)
float* IMB_float_profile_ensure ( ImBuf ibuf,
int  profile,
int *  alloc 
)
void IMB_interlace ( ImBuf ibuf)
void IMB_partial_rect_from_float ( ImBuf ibuf,
float *  buffer,
int  x,
int  y,
int  w,
int  h 
)
void IMB_rect_from_float ( ImBuf ibuf)
MINLINE void ushort_to_byte_dither_v4 ( uchar  b[4],
const unsigned short  us[4],
DitherContext di 
)

Definition at line 188 of file divers.c.

References dither_value().

Referenced by float_to_byte_dither_v4(), and IMB_buffer_byte_from_float().

MINLINE void ushort_to_byte_v4 ( uchar  b[4],
const unsigned short  us[4] 
)

Definition at line 180 of file divers.c.

References USHORTTOUCHAR.

Referenced by IMB_buffer_byte_from_float().