49 unsigned char *mask_rect,
50 const float *mask_rect_float,
98 if (!mask_input->
rect) {
133 int offset = 4 * start_line * ibuf->
x;
138 handle->
height = tot_line;
155 if (
mask->rect_float) {
191 init_data.apply_callback = apply_callback;
208 for (
c = 0;
c < 3;
c++) {
213 for (
c = 0;
c < 3;
c++) {
216 if (cb.
lift[
c] > 1.0f) {
225 for (
c = 0;
c < 3;
c++) {
226 if (cb.
gain[
c] != 0.0f) {
230 cb.
gain[
c] = 1000000;
236 for (
c = 0;
c < 3;
c++) {
237 if (cb.
gamma[
c] != 0.0f) {
254 for (
c = 0;
c < 3;
c++) {
256 if (cb.
slope[
c] != 0.0f) {
272 if (cb.
power[
c] != 0.0f) {
295 float in,
const float lift,
const float gain,
const float gamma,
const float mul)
297 float x = (((in - 1.0f) * lift) + 1.0f) * gain;
305 CLAMP(
x, FLT_MIN, FLT_MAX);
323 x =
powf(
x / pivot, power) * pivot;
325 CLAMP(
x, FLT_MIN, FLT_MAX);
331 for (
int y = 0;
y < 256;
y++) {
339 float slope,
float offset,
float power,
float pivot,
float *table,
float mul)
341 for (
int y = 0;
y < 256;
y++) {
350 unsigned char *mask_rect,
356 unsigned char *cp = rect;
358 unsigned char *m = mask_rect;
368 for (
c = 0;
c < 3;
c++) {
378 float m_normal = (
float)m[
c] / 255.0f;
380 p[
c] = p[
c] * (1.0f - m_normal) +
t * m_normal;
399 unsigned char *mask_rect,
404 float cb_tab[4][256];
406 unsigned char *p = rect;
408 unsigned char *m = mask_rect;
416 for (
c = 0;
c < 3;
c++) {
425 for (i = 0; i < 256; i++) {
426 cb_tab[3][i] = ((
float)i) * (1.0f / 255.0f);
431 const float t[3] = {m[0] / 255.0f, m[1] / 255.0f, m[2] / 255.0f};
433 p[0] = p[0] * (1.0f -
t[0]) +
t[0] * cb_tab[0][p[0]];
434 p[1] = p[1] * (1.0f -
t[1]) +
t[1] * cb_tab[1][p[1]];
435 p[2] = p[2] * (1.0f -
t[2]) +
t[2] * cb_tab[2][p[2]];
440 o[0] = cb_tab[0][p[0]];
441 o[1] = cb_tab[1][p[1]];
442 o[2] = cb_tab[2][p[2]];
445 o[3] = cb_tab[3][p[3]];
454 const float *mask_rect_float,
459 float *p = rect_float;
461 const float *m = mask_rect_float;
466 for (
c = 0;
c < 3;
c++) {
476 p[
c] = p[
c] * (1.0f - m[
c]) +
t * m[
c];
520 int offset = 4 * start_line * ibuf->
x;
527 handle->
height = tot_line;
543 if (
mask->rect_float) {
558 unsigned char *rect = thread_data->
rect;
559 unsigned char *mask_rect = thread_data->
mask_rect;
562 float mul = thread_data->
mul;
585 for (
c = 0;
c < 3;
c++) {
634 "ColorBalanceModifierData",
662 unsigned char *mask_rect,
663 const float *mask_rect_float,
671 multiplier[0] = (
data->white[0] != 0.0f) ? 1.0f /
data->white[0] : FLT_MAX;
672 multiplier[1] = (
data->white[1] != 0.0f) ? 1.0f /
data->white[1] : FLT_MAX;
673 multiplier[2] = (
data->white[2] != 0.0f) ? 1.0f /
data->white[2] : FLT_MAX;
677 int pixel_index = (
y *
width +
x) * 4;
692 for (
int i = 0; i < 3; i++) {
697 if (mask_rect_float) {
700 else if (mask_rect) {
730 "WhiteBalanceModifierData",
770 unsigned char *mask_rect,
771 const float *mask_rect_float,
779 int pixel_index = (
y *
width +
x) * 4;
782 float *pixel = rect_float + pixel_index;
787 if (mask_rect_float) {
788 const float *m = mask_rect_float + pixel_index;
790 pixel[0] = pixel[0] * (1.0f - m[0]) +
result[0] * m[0];
791 pixel[1] = pixel[1] * (1.0f - m[1]) +
result[1] * m[1];
792 pixel[2] = pixel[2] * (1.0f - m[2]) +
result[2] * m[2];
801 unsigned char *pixel = rect + pixel_index;
802 float result[3], tempc[4];
813 tempc[0] = tempc[0] * (1.0f -
t[0]) +
result[0] *
t[0];
814 tempc[1] = tempc[1] * (1.0f -
t[1]) +
result[1] *
t[1];
815 tempc[2] = tempc[2] * (1.0f -
t[2]) +
result[2] *
t[2];
833 const float black[3] = {0.0f, 0.0f, 0.0f};
834 const float white[3] = {1.0f, 1.0f, 1.0f};
848 "CurvesModifierData",
870 for (
c = 0;
c < 3;
c++) {
900 unsigned char *mask_rect,
901 const float *mask_rect_float,
909 int pixel_index = (
y *
width +
x) * 4;
910 float pixel[3],
result[3],
mask[3] = {1.0f, 1.0f, 1.0f};
920 rgb_to_hsv(pixel[0], pixel[1], pixel[2], hsv, hsv + 1, hsv + 2);
928 hsv[1] *= (f * 2.0f);
932 hsv[2] *= (f * 2.0f);
934 hsv[0] = hsv[0] -
floorf(hsv[0]);
935 CLAMP(hsv[1], 0.0f, 1.0f);
940 if (mask_rect_float) {
943 else if (mask_rect) {
972 "HueCorrectModifierData",
995 unsigned char *mask_rect,
996 const float *mask_rect_float,
1005 float brightness =
data->bright / 100.0f;
1006 float contrast =
data->contrast;
1007 float delta = contrast / 200.0f;
1014 a = 1.0f - delta * 2.0f;
1016 b =
a * (brightness - delta);
1020 a =
max_ff(1.0f - delta * 2.0f, 0.0f);
1021 b =
a * brightness + delta;
1026 int pixel_index = (
y *
width +
x) * 4;
1029 unsigned char *pixel = rect + pixel_index;
1031 for (
c = 0;
c < 3;
c++) {
1032 i = (
float)pixel[
c] / 255.0f;
1036 unsigned char *m = mask_rect + pixel_index;
1037 float t = (
float)m[
c] / 255.0f;
1039 v = (
float)pixel[
c] / 255.0f * (1.0f -
t) +
v *
t;
1045 else if (rect_float) {
1046 float *pixel = rect_float + pixel_index;
1048 for (
c = 0;
c < 3;
c++) {
1052 if (mask_rect_float) {
1053 const float *m = mask_rect_float + pixel_index;
1055 pixel[
c] = pixel[
c] * (1.0f - m[
c]) +
v * m[
c];
1079 "BrightContrastModifierData",
1095 unsigned char *rect,
1097 unsigned char *mask_rect,
1098 const float *mask_rect_float,
1103 if (rect && !mask_rect) {
1107 if (rect_float && !mask_rect_float) {
1113 int pixel_index = (
y *
width +
x) * 4;
1116 unsigned char *pixel = rect + pixel_index;
1117 unsigned char *mask_pixel = mask_rect + pixel_index;
1118 unsigned char mask =
min_iii(mask_pixel[0], mask_pixel[1], mask_pixel[2]);
1124 pixel[3] = (
float)(pixel[3] *
mask) / 255.0f;
1126 else if (rect_float) {
1128 float *pixel = rect_float + pixel_index;
1129 const float *mask_pixel = mask_rect_float + pixel_index;
1130 float mask =
min_fff(mask_pixel[0], mask_pixel[1], mask_pixel[2]);
1135 for (
c = 0;
c < 4;
c++) {
1136 pixel[
c] = pixel[
c] *
mask;
1153 "SequencerMaskModifierData",
1193 unsigned char *rect,
1195 unsigned char *mask_rect,
1196 const float *mask_rect_float,
1202 int pixel_index = (
y *
width +
x) * 4;
1214 if (mask_rect_float) {
1217 else if (mask_rect) {
1225 output[0] /= ((dr == 0.0f) ? 1.0f : dr);
1226 output[1] /= ((dg == 0.0f) ? 1.0f : dg);
1227 output[2] /= ((db == 0.0f) ? 1.0f : db);
1228 const float igm = avg->
igm;
1252 unsigned char *rect,
1254 unsigned char *mask_rect,
1255 const float *mask_rect_float,
1265 int pixel_index = (
y *
width +
x) * 4;
1277 if (mask_rect_float) {
1280 else if (mask_rect) {
1286 float I_g = avg->
cav[0] + ic * (avg->
lav - avg->
cav[0]);
1287 float I_a = I_l + ia * (I_g - I_l);
1290 I_g = avg->
cav[1] + ic * (avg->
lav - avg->
cav[1]);
1291 I_a = I_l + ia * (I_g - I_l);
1294 I_g = avg->
cav[2] + ic * (avg->
lav - avg->
cav[2]);
1295 I_a = I_l + ia * (I_g - I_l);
1320 int p = ibuf->
x * ibuf->
y;
1322 unsigned char *cp = (
unsigned char *)ibuf->
rect;
1323 float avl, maxl = -FLT_MAX, minl = FLT_MAX;
1324 const float sc = 1.0f / p;
1326 float cav[4] = {0.0f, 0.0f, 0.0f, 0.0f};
1340 maxl = (
L > maxl) ?
L : maxl;
1341 minl = (
L < minl) ?
L : minl;
1349 data.lav = Lav * sc;
1351 maxl =
logf(maxl + 1e-5f);
1352 minl =
logf(minl + 1e-5f);
1354 data.auto_key = (maxl > minl) ? ((maxl - avl) / (maxl - minl)) : 1.0f;
1355 float al =
expf(avl);
1356 data.al = (al == 0.0f) ? 0.0f : (tmmd->
key / al);
1369 "SequencerTonemapModifierData",
1385 #define INIT_TYPE(typeName) (modifiersTypes[seqModifierType_##typeName] = &seqModifier_##typeName)
1453 smd_next = smd->
next;
1494 ImBuf *processed_ibuf = ibuf;
1517 frame_offset = seq->
start;
1526 if (processed_ibuf == ibuf) {
1542 return processed_ibuf;
1605 if (smd->mask_sequence) {
typedef float(TangentPoint)[2]
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE int min_iii(int a, int b, int c)
MINLINE float min_fff(float a, float b, float c)
MINLINE void straight_uchar_to_premul_float(float result[4], const unsigned char color[4])
void rgb_to_hsv(float r, float g, float b, float *r_h, float *r_s, float *r_v)
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_b)
void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
MINLINE void premul_float_to_straight_uchar(unsigned char *result, const float color[4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void mul_v3_v3(float r[3], const float a[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void add_v3_v3(float r[3], const float a[3])
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_len)
#define BLO_read_data_address(reader, ptr_p)
void BLO_write_struct_by_name(BlendWriter *writer, const char *struct_name, const void *data_ptr)
#define BLO_write_struct(writer, struct_name, data_ptr)
void BLO_read_list(BlendDataReader *reader, struct ListBase *list)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define CTX_N_(context, msgid)
#define BLT_I18NCONTEXT_ID_SEQUENCE
#define CTX_DATA_(context, msgid)
#define R_IMF_PLANES_RGBA
#define SEQ_COLOR_BALANCE_INVERSE_GAMMA
@ SEQUENCE_MODIFIER_EXPANDED
struct WhiteBalanceModifierData WhiteBalanceModifierData
@ NUM_SEQUENCE_MODIFIER_TYPES
@ seqModifierType_HueCorrect
@ SEQUENCE_MASK_INPUT_STRIP
struct ColorBalanceModifierData ColorBalanceModifierData
struct CurvesModifierData CurvesModifierData
#define SEQ_COLOR_BALANCE_INVERSE_POWER
struct SequencerTonemapModifierData SequencerTonemapModifierData
@ SEQ_TONEMAP_RD_PHOTORECEPTOR
#define SEQ_COLOR_BALANCE_INVERSE_GAIN
@ SEQUENCE_MASK_TIME_RELATIVE
@ SEQ_COLOR_BALANCE_METHOD_LIFTGAMMAGAIN
@ SEQ_USE_LINEAR_MODIFIERS
struct HueCorrectModifierData HueCorrectModifierData
#define SEQ_COLOR_BALANCE_INVERSE_SLOPE
#define SEQ_COLOR_BALANCE_INVERSE_LIFT
struct BrightContrastModifierData BrightContrastModifierData
#define SEQ_COLOR_BALANCE_INVERSE_OFFSET
struct SequencerMaskModifierData SequencerMaskModifierData
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3])
void IMB_colormanagement_scene_linear_to_colorspace_v3(float pixel[3], struct ColorSpace *colorspace)
void IMB_colormanagement_colorspace_to_scene_linear_v3(float pixel[3], struct ColorSpace *colorspace)
void IMB_float_from_rect(struct ImBuf *ibuf)
bool imb_addrectfloatImBuf(struct ImBuf *ibuf, const unsigned int channels)
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
void IMB_rect_from_float(struct ImBuf *ibuf)
void imb_freerectImBuf(struct ImBuf *ibuf)
void IMB_processor_apply_threaded(int buffer_lines, int handle_size, void *init_customdata, void(init_handle)(void *handle, int start_line, int tot_line, void *customdata), void *(do_thread)(void *))
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product BrightContrast
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
static void mul(btAlignedObjectArray< T > &items, const Q &value)
SyclQueue void void size_t num_bytes void
void IMB_freeImBuf(ImBuf *UNUSED(ibuf))
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_global KernelShaderEvalInput * input
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
ccl_device_inline float3 pow(float3 v, float e)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
ImBuf * seq_render_mask(const SeqRenderData *context, Mask *mask, float frame_index, bool make_float)
ImBuf * seq_render_strip(const SeqRenderData *context, SeqRenderState *state, Sequence *seq, float timeline_frame)
void seq_render_state_init(SeqRenderState *state)
void seq_imbuf_to_sequencer_space(Scene *scene, ImBuf *ibuf, bool make_float)
void SEQ_render_imbuf_from_sequencer_space(Scene *scene, ImBuf *ibuf)
struct ColorBalanceThread ColorBalanceThread
static void hue_correct_apply_threaded(int width, int height, unsigned char *rect, float *rect_float, unsigned char *mask_rect, const float *mask_rect_float, void *data_v)
static void curves_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
void SEQ_modifier_blend_write(BlendWriter *writer, ListBase *modbase)
bool SEQ_modifier_remove(Sequence *seq, SequenceModifierData *smd)
struct BrightContrastThreadData BrightContrastThreadData
static void tonemapmodifier_init_data(SequenceModifierData *smd)
static void whiteBalance_apply_threaded(int width, int height, unsigned char *rect, float *rect_float, unsigned char *mask_rect, const float *mask_rect_float, void *data_v)
void(* modifier_apply_threaded_cb)(int width, int height, unsigned char *rect, float *rect_float, unsigned char *mask_rect, const float *mask_rect_float, void *data_v)
struct WhiteBalanceThreadData WhiteBalanceThreadData
static void hue_correct_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
static void modifier_apply_threaded(ImBuf *ibuf, ImBuf *mask, modifier_apply_threaded_cb apply_callback, void *user_data)
SequenceModifierData * SEQ_modifier_new(Sequence *seq, const char *name, int type)
static StripColorBalance calc_cb_lgg(StripColorBalance *cb_)
static void make_cb_table_float_lgg(float lift, float gain, float gamma, float *table, float mul)
static void hue_correct_free_data(SequenceModifierData *smd)
void SEQ_modifier_free(SequenceModifierData *smd)
ImBuf * SEQ_modifier_apply_stack(const SeqRenderData *context, Sequence *seq, ImBuf *ibuf, int timeline_frame)
static void tonemapmodifier_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
MINLINE float color_balance_fl_lgg(float in, const float lift, const float gain, const float gamma, const float mul)
static void maskmodifier_apply(struct SequenceModifierData *UNUSED(smd), ImBuf *ibuf, ImBuf *mask)
static void sequence_modifier_type_info_init(void)
void SEQ_modifier_blend_read_lib(BlendLibReader *reader, Scene *scene, ListBase *lb)
static void * modifier_do_thread(void *thread_data_v)
static void modifier_color_balance_apply(StripColorBalance *cb, ImBuf *ibuf, float mul, bool make_float, ImBuf *mask_input)
#define INIT_TYPE(typeName)
static SequenceModifierTypeInfo seqModifier_HueCorrect
static void brightcontrast_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
MINLINE float color_balance_fl_sop(float in, const float slope, const float offset, const float power, const float pivot, float mul)
struct ModifierInitData ModifierInitData
static ImBuf * modifier_mask_get(SequenceModifierData *smd, const SeqRenderData *context, int timeline_frame, int fra_offset, bool make_float)
static void tonemapmodifier_apply_threaded_simple(int width, int height, unsigned char *rect, float *rect_float, unsigned char *mask_rect, const float *mask_rect_float, void *data_v)
SequenceModifierData * SEQ_modifier_find_by_name(Sequence *seq, const char *name)
static void hue_correct_init_data(SequenceModifierData *smd)
static SequenceModifierTypeInfo seqModifier_Curves
void SEQ_modifier_clear(Sequence *seq)
static void hue_correct_copy_data(SequenceModifierData *target, SequenceModifierData *smd)
static void curves_copy_data(SequenceModifierData *target, SequenceModifierData *smd)
struct AvgLogLum AvgLogLum
static void maskmodifier_apply_threaded(int width, int height, unsigned char *rect, float *rect_float, unsigned char *mask_rect, const float *mask_rect_float, void *UNUSED(data_v))
static void curves_free_data(SequenceModifierData *smd)
void SEQ_modifier_blend_read_data(BlendDataReader *reader, ListBase *lb)
static void brightcontrast_apply_threaded(int width, int height, unsigned char *rect, float *rect_float, unsigned char *mask_rect, const float *mask_rect_float, void *data_v)
static SequenceModifierTypeInfo seqModifier_Mask
static SequenceModifierTypeInfo seqModifier_ColorBalance
static StripColorBalance calc_cb(StripColorBalance *cb_)
static SequenceModifierTypeInfo seqModifier_WhiteBalance
static SequenceModifierTypeInfo seqModifier_BrightContrast
static void * color_balance_do_thread(void *thread_data_v)
const SequenceModifierTypeInfo * SEQ_modifier_type_info_get(int type)
static void curves_init_data(SequenceModifierData *smd)
static SequenceModifierTypeInfo * modifiersTypes[NUM_SEQUENCE_MODIFIER_TYPES]
void SEQ_modifier_list_copy(Sequence *seqn, Sequence *seq)
static void whiteBalance_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
static void color_balance_byte_float(StripColorBalance *cb_, unsigned char *rect, float *rect_float, unsigned char *mask_rect, int width, int height, float mul)
static void whiteBalance_init_data(SequenceModifierData *smd)
static SequenceModifierTypeInfo seqModifier_Tonemap
static void modifier_init_handle(void *handle_v, int start_line, int tot_line, void *init_data_v)
int SEQ_sequence_supports_modifiers(Sequence *seq)
struct ColorBalanceInitData ColorBalanceInitData
static StripColorBalance calc_cb_sop(StripColorBalance *cb_)
static ImBuf * modifier_render_mask_input(const SeqRenderData *context, int mask_input_type, Sequence *mask_sequence, Mask *mask_id, int timeline_frame, int fra_offset, bool make_float)
struct ModifierThread ModifierThread
static void color_balance_byte_byte(StripColorBalance *cb_, unsigned char *rect, unsigned char *mask_rect, int width, int height, float mul)
static void colorBalance_init_data(SequenceModifierData *smd)
static void color_balance_float_float(StripColorBalance *cb_, float *rect_float, const float *mask_rect_float, int width, int height, float mul)
static void curves_apply_threaded(int width, int height, unsigned char *rect, float *rect_float, unsigned char *mask_rect, const float *mask_rect_float, void *data_v)
static void colorBalance_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
void SEQ_modifier_unique_name(Sequence *seq, SequenceModifierData *smd)
static void color_balance_init_handle(void *handle_v, int start_line, int tot_line, void *init_data_v)
static void make_cb_table_float_sop(float slope, float offset, float power, float pivot, float *table, float mul)
static void tonemapmodifier_apply_threaded_photoreceptor(int width, int height, unsigned char *rect, float *rect_float, unsigned char *mask_rect, const float *mask_rect_float, void *data_v)
static bool modifierTypesInit
SequencerTonemapModifierData * tmmd
struct ColorSpace * colorspace
StripColorBalance color_balance
unsigned char * mask_rect
char name[MAX_COLORSPACE_NAME]
struct CurveMapping curve_mapping
struct CurveMapping curve_mapping
struct ColorSpace * rect_colorspace
struct ColorSpace * float_colorspace
modifier_apply_threaded_cb apply_callback
modifier_apply_threaded_cb apply_callback
unsigned char * mask_rect
struct SequenceModifierData * next
struct SequenceModifierData * prev
struct Sequence * mask_sequence
void(* init_data)(struct SequenceModifierData *smd)
void(* free_data)(struct SequenceModifierData *smd)
void(* apply)(struct SequenceModifierData *smd, struct ImBuf *ibuf, struct ImBuf *mask)
void(* copy_data)(struct SequenceModifierData *smd, struct SequenceModifierData *target)