65 unsigned char *mask_rect,
66 const float *mask_rect_float,
114 if (!mask_input->
rect) {
149 int offset = 4 * start_line * ibuf->
x;
154 handle->
height = tot_line;
159 handle->
rect = (
unsigned char *)ibuf->
rect + offset;
171 if (
mask->rect_float) {
207 init_data.apply_callback = apply_callback;
224 for (
c = 0;
c < 3;
c++) {
229 for (
c = 0;
c < 3;
c++) {
232 if (cb.
lift[
c] > 1.0f) {
241 for (
c = 0;
c < 3;
c++) {
242 if (cb.
gain[
c] != 0.0f) {
246 cb.
gain[
c] = 1000000;
252 for (
c = 0;
c < 3;
c++) {
253 if (cb.
gamma[
c] != 0.0f) {
267 float in,
const float lift,
const float gain,
const float gamma,
const float mul)
269 float x = (((in - 1.0f) * lift) + 1.0f) * gain;
277 CLAMP(
x, FLT_MIN, FLT_MAX);
285 for (
y = 0;
y < 256;
y++) {
294 unsigned char *mask_rect,
300 unsigned char *cp = rect;
302 unsigned char *m = mask_rect;
312 for (
c = 0;
c < 3;
c++) {
316 float m_normal = (
float)m[
c] / 255.0f;
318 p[
c] = p[
c] * (1.0f - m_normal) +
t * m_normal;
337 unsigned char *mask_rect,
342 float cb_tab[4][256];
344 unsigned char *p = rect;
346 unsigned char *m = mask_rect;
354 for (
c = 0;
c < 3;
c++) {
358 for (i = 0; i < 256; i++) {
359 cb_tab[3][i] = ((
float)i) * (1.0f / 255.0f);
364 const float t[3] = {m[0] / 255.0f, m[1] / 255.0f, m[2] / 255.0f};
366 p[0] = p[0] * (1.0f -
t[0]) +
t[0] * cb_tab[0][p[0]];
367 p[1] = p[1] * (1.0f -
t[1]) +
t[1] * cb_tab[1][p[1]];
368 p[2] = p[2] * (1.0f -
t[2]) +
t[2] * cb_tab[2][p[2]];
373 o[0] = cb_tab[0][p[0]];
374 o[1] = cb_tab[1][p[1]];
375 o[2] = cb_tab[2][p[2]];
378 o[3] = cb_tab[3][p[3]];
387 const float *mask_rect_float,
392 float *p = rect_float;
394 const float *m = mask_rect_float;
399 for (
c = 0;
c < 3;
c++) {
403 p[
c] = p[
c] * (1.0f - m[
c]) +
t * m[
c];
447 int offset = 4 * start_line * ibuf->
x;
454 handle->
height = tot_line;
458 handle->
rect = (
unsigned char *)ibuf->
rect + offset;
470 if (
mask->rect_float) {
485 unsigned char *rect = thread_data->
rect;
486 unsigned char *mask_rect = thread_data->
mask_rect;
489 float mul = thread_data->
mul;
511 for (
c = 0;
c < 3;
c++) {
557 "ColorBalanceModifierData",
585 unsigned char *mask_rect,
586 const float *mask_rect_float,
594 multiplier[0] = (
data->white[0] != 0.0f) ? 1.0f /
data->white[0] : FLT_MAX;
595 multiplier[1] = (
data->white[1] != 0.0f) ? 1.0f /
data->white[1] : FLT_MAX;
596 multiplier[2] = (
data->white[2] != 0.0f) ? 1.0f /
data->white[2] : FLT_MAX;
600 int pixel_index = (
y *
width +
x) * 4;
601 float rgba[4],
result[4],
mask[3] = {1.0f, 1.0f, 1.0f};
615 for (
int i = 0; i < 3; i++) {
616 result[i] = 1.0f -
powf(1.0f - rgba[i], multiplier[i]);
620 if (mask_rect_float) {
623 else if (mask_rect) {
653 "WhiteBalanceModifierData",
693 unsigned char *mask_rect,
694 const float *mask_rect_float,
702 int pixel_index = (
y *
width +
x) * 4;
705 float *pixel = rect_float + pixel_index;
710 if (mask_rect_float) {
711 const float *m = mask_rect_float + pixel_index;
713 pixel[0] = pixel[0] * (1.0f - m[0]) +
result[0] * m[0];
714 pixel[1] = pixel[1] * (1.0f - m[1]) +
result[1] * m[1];
715 pixel[2] = pixel[2] * (1.0f - m[2]) +
result[2] * m[2];
724 unsigned char *pixel = rect + pixel_index;
725 float result[3], tempc[4];
736 tempc[0] = tempc[0] * (1.0f -
t[0]) +
result[0] *
t[0];
737 tempc[1] = tempc[1] * (1.0f -
t[1]) +
result[1] *
t[1];
738 tempc[2] = tempc[2] * (1.0f -
t[2]) +
result[2] *
t[2];
756 const float black[3] = {0.0f, 0.0f, 0.0f};
757 const float white[3] = {1.0f, 1.0f, 1.0f};
771 "CurvesModifierData",
793 for (
c = 0;
c < 3;
c++) {
823 unsigned char *mask_rect,
824 const float *mask_rect_float,
832 int pixel_index = (
y *
width +
x) * 4;
833 float pixel[3],
result[3],
mask[3] = {1.0f, 1.0f, 1.0f};
843 rgb_to_hsv(pixel[0], pixel[1], pixel[2], hsv, hsv + 1, hsv + 2);
851 hsv[1] *= (f * 2.0f);
855 hsv[2] *= (f * 2.0f);
857 hsv[0] = hsv[0] -
floorf(hsv[0]);
858 CLAMP(hsv[1], 0.0f, 1.0f);
863 if (mask_rect_float) {
866 else if (mask_rect) {
895 "HueCorrectModifierData",
918 unsigned char *mask_rect,
919 const float *mask_rect_float,
928 float brightness =
data->bright / 100.0f;
929 float contrast =
data->contrast;
930 float delta = contrast / 200.0f;
937 a = 1.0f - delta * 2.0f;
939 b =
a * (brightness - delta);
943 a =
max_ff(1.0f - delta * 2.0f, 0.0f);
944 b =
a * brightness + delta;
949 int pixel_index = (
y *
width +
x) * 4;
952 unsigned char *pixel = rect + pixel_index;
954 for (
c = 0;
c < 3;
c++) {
955 i = (
float)pixel[
c] / 255.0f;
959 unsigned char *m = mask_rect + pixel_index;
960 float t = (
float)m[
c] / 255.0f;
962 v = (
float)pixel[
c] / 255.0f * (1.0f -
t) +
v *
t;
968 else if (rect_float) {
969 float *pixel = rect_float + pixel_index;
971 for (
c = 0;
c < 3;
c++) {
975 if (mask_rect_float) {
976 const float *m = mask_rect_float + pixel_index;
978 pixel[
c] = pixel[
c] * (1.0f - m[
c]) +
v * m[
c];
1002 "BrightContrastModifierData",
1018 unsigned char *rect,
1020 unsigned char *mask_rect,
1021 const float *mask_rect_float,
1026 if (rect && !mask_rect) {
1030 if (rect_float && !mask_rect_float) {
1036 int pixel_index = (
y *
width +
x) * 4;
1039 unsigned char *pixel = rect + pixel_index;
1040 unsigned char *mask_pixel = mask_rect + pixel_index;
1041 unsigned char mask =
min_iii(mask_pixel[0], mask_pixel[1], mask_pixel[2]);
1047 pixel[3] = (
float)(pixel[3] *
mask) / 255.0f;
1049 else if (rect_float) {
1051 float *pixel = rect_float + pixel_index;
1052 const float *mask_pixel = mask_rect_float + pixel_index;
1053 float mask =
min_fff(mask_pixel[0], mask_pixel[1], mask_pixel[2]);
1058 for (
c = 0;
c < 4;
c++) {
1059 pixel[
c] = pixel[
c] *
mask;
1075 "SequencerMaskModifierData",
1115 unsigned char *rect,
1117 unsigned char *mask_rect,
1118 const float *mask_rect_float,
1124 int pixel_index = (
y *
width +
x) * 4;
1125 float input[4],
output[4],
mask[3] = {1.0f, 1.0f, 1.0f};
1136 if (mask_rect_float) {
1139 else if (mask_rect) {
1147 output[0] /= ((dr == 0.0f) ? 1.0f : dr);
1148 output[1] /= ((dg == 0.0f) ? 1.0f : dg);
1149 output[2] /= ((db == 0.0f) ? 1.0f : db);
1150 const float igm = avg->
igm;
1174 unsigned char *rect,
1176 unsigned char *mask_rect,
1177 const float *mask_rect_float,
1187 int pixel_index = (
y *
width +
x) * 4;
1188 float input[4],
output[4],
mask[3] = {1.0f, 1.0f, 1.0f};
1199 if (mask_rect_float) {
1202 else if (mask_rect) {
1208 float I_g = avg->
cav[0] + ic * (avg->
lav - avg->
cav[0]);
1209 float I_a = I_l + ia * (I_g - I_l);
1212 I_g = avg->
cav[1] + ic * (avg->
lav - avg->
cav[1]);
1213 I_a = I_l + ia * (I_g - I_l);
1216 I_g = avg->
cav[2] + ic * (avg->
lav - avg->
cav[2]);
1217 I_a = I_l + ia * (I_g - I_l);
1242 int p = ibuf->
x * ibuf->
y;
1244 unsigned char *cp = (
unsigned char *)ibuf->
rect;
1245 float avl, maxl = -FLT_MAX, minl = FLT_MAX;
1246 const float sc = 1.0f / p;
1248 float cav[4] = {0.0f, 0.0f, 0.0f, 0.0f};
1262 maxl = (
L > maxl) ?
L : maxl;
1263 minl = (
L < minl) ?
L : minl;
1271 data.lav = Lav * sc;
1273 maxl =
logf(maxl + 1e-5f);
1274 minl =
logf(minl + 1e-5f);
1276 data.auto_key = (maxl > minl) ? ((maxl - avl) / (maxl - minl)) : 1.0f;
1277 float al =
expf(avl);
1278 data.al = (al == 0.0f) ? 0.0f : (tmmd->
key / al);
1291 "SequencerTonemapModifierData",
1307 #define INIT_TYPE(typeName) (modifiersTypes[seqModifierType_##typeName] = &seqModifier_##typeName)
1375 smd_next = smd->
next;
1416 ImBuf *processed_ibuf = ibuf;
1439 frame_offset = seq->
start;
1448 if (processed_ibuf == ibuf) {
1464 return processed_ibuf;
1527 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_findstring(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
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)
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, const size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t 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)
@ SEQ_USE_LINEAR_MODIFIERS
#define SEQ_COLOR_BALANCE_INVERSE_GAMMA
struct WhiteBalanceModifierData WhiteBalanceModifierData
@ SEQUENCE_MASK_INPUT_STRIP
struct ColorBalanceModifierData ColorBalanceModifierData
struct CurvesModifierData CurvesModifierData
@ SEQUENCE_MODIFIER_EXPANDED
@ SEQUENCE_MASK_TIME_RELATIVE
struct SequencerTonemapModifierData SequencerTonemapModifierData
@ NUM_SEQUENCE_MODIFIER_TYPES
@ seqModifierType_HueCorrect
#define SEQ_COLOR_BALANCE_INVERSE_GAIN
struct HueCorrectModifierData HueCorrectModifierData
@ SEQ_TONEMAP_RD_PHOTORECEPTOR
#define SEQ_COLOR_BALANCE_INVERSE_LIFT
struct BrightContrastModifierData BrightContrastModifierData
struct SequencerMaskModifierData SequencerMaskModifierData
_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 type
_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 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)
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
void IMB_rect_from_float(struct ImBuf *ibuf)
void IMB_freeImBuf(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 *))
bool imb_addrectfloatImBuf(struct ImBuf *ibuf)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
static void init_data(ModifierData *md)
Group RGB to Bright Vector Camera CLAMP
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance HueCorrect
Group RGB to Bright Vector Curves
Group RGB to BrightContrast
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Tonemap
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)
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)
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
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 SELECTID_Context context
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 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)
static void maskmodifier_apply(struct SequenceModifierData *UNUSED(smd), ImBuf *ibuf, ImBuf *mask)
MINLINE float color_balance_fl(float in, const float lift, const float gain, const float gamma, const float mul)
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)
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 make_cb_table_float(float lift, float gain, float gamma, float *table, float mul)
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 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 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)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)