35 if (wipe->
angle < 0.0f) {
44 if (wipe->
angle < 0.0f) {
47 this->
pos = this->
size * 0.5f + offset;
56 float blend_width = wipe->
edgeWidth * ((width + height) / 2.0f);
63 blend_width = std::min(blend_width, fac * this->
size.y);
64 blend_width = std::min(blend_width, this->
size.y - fac * this->size.y);
77 float delta_neg = angle_width * (this->
forward ? fac : (1.0f - fac));
78 float delta_pos = angle_width * (this->
forward ? (1.0f - fac) : fac);
79 this->
clock_angles.x = std::max(angle_cur - delta_neg, 0.0f);
98 if (inv_width == 0.0f) {
99 return dist < 0.0f ? 0.0f : 1.0f;
101 return dist * inv_width + 0.5f;
107 switch (
data->type) {
121 float dist = std::min(dist1, dist2);
153 if (!
data->forward) {
185 const Strip *strip,
float fac,
int width,
int height,
const T *rect1,
const T *rect2,
T *
out)
193 const T *cp1 = rect1 + y_range.
first() * width * 4;
194 const T *cp2 = rect2 + y_range.
first() * width * 4;
195 T *rt =
out + y_range.
first() * width * 4;
196 for (
const int y : y_range) {
197 for (
int x = 0;
x < width;
x++) {
200 memcpy(rt, cp2,
sizeof(
T) * 4);
202 else if (
blend >= 1.0f) {
203 memcpy(rt, cp1,
sizeof(
T) * 4);
230 if (
out->float_buffer.data) {
237 out->float_buffer.data);
246 out->byte_buffer.data);
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
BMesh const char void * data
constexpr int64_t first() const
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
T length_squared(const VecBase< T, Size > &a)
T distance(const T &a, const T &b)
T length(const VecBase< T, Size > &a)
T dot(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
static void free_wipe_effect(Strip *strip, const bool)
void wipe_effect_get_handle(EffectHandle &rval)
static void copy_wipe_effect(Strip *dst, const Strip *src, const int)
static int num_inputs_wipe()
static void init_wipe_effect(Strip *strip)
void store_premul_pixel(const blender::float4 &pix, uchar *dst)
ImBuf * prepare_effect_imbufs(const RenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, bool uninitialized_pixels)
void get_default_fac_fade(const Scene *scene, const Strip *strip, float timeline_frame, float *fac)
blender::float4 load_premul_pixel(const uchar *ptr)
static void do_wipe_effect(const Strip *strip, float fac, int width, int height, const T *rect1, const T *rect2, T *out)
static float calc_wipe_blend(const WipeData *data, int x, int y)
static float calc_wipe_band(float dist, float inv_width)
StripEarlyOut early_out_fade(const Strip *, float fac)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
VecBase< float, 4 > float4
VecBase< float, 2 > float2
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
void(* copy)(Strip *dst, const Strip *src, int flag)
ImBuf *(* execute)(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
void(* get_default_fac)(const Scene *scene, const Strip *strip, float timeline_frame, float *fac)
void(* free)(Strip *strip, bool do_id_user)
StripEarlyOut(* early_out)(const Strip *strip, float fac)
void(* init)(Strip *strip)
WipeData(const WipeVars *wipe, int width, int height, float fac)
float clock_angle_inv_dif
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)