81 size_t offset = size_t(
x) * start_line;
82 for (
int yi = start_line; yi < start_line + total_lines; yi++) {
83 for (
int xi = 0; xi <
x; xi++) {
85 float xt = xi - translate_x;
86 float yt = yi - translate_y;
89 float xr = c * xt + s * yt;
90 float yr = -s * xt + c * yt;
101 switch (interpolation) {
144 float scale_x, scale_y;
146 scale_x = scale_y =
transform->ScalexIni;
153 const int x = context->rectx;
154 const int y = context->recty;
157 float translate_x, translate_y;
160 double proxy_size_comp = context->scene->r.size / 100.0;
165 translate_x =
transform->xIni * proxy_size_comp + (
x / 2.0f);
166 translate_y =
transform->yIni * proxy_size_comp + (
y / 2.0f);
169 translate_x =
x * (
transform->xIni / 100.0f) + (
x / 2.0f);
170 translate_y =
y * (
transform->yIni / 100.0f) + (
y / 2.0f);
189 transform->interpolation);
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
float4 interpolate_nearest_border_fl(const ImBuf *in, float u, float v)
uchar4 interpolate_nearest_border_byte(const ImBuf *in, float u, float v)
uchar4 interpolate_cubic_bspline_byte(const ImBuf *in, float u, float v)
float4 interpolate_cubic_bspline_fl(const ImBuf *in, float u, float v)
uchar4 interpolate_bilinear_border_byte(const ImBuf *in, float u, float v)
float4 interpolate_bilinear_border_fl(const ImBuf *in, float u, float v)
static void copy_transform_effect(Strip *dst, const Strip *src, const int)
double rendersize_to_scale_factor(int render_size)
static void free_transform_effect(Strip *strip, const bool)
static ImBuf * do_transform_effect(const RenderData *context, Strip *strip, float, float, ImBuf *src1, ImBuf *)
ImBuf * prepare_effect_imbufs(const RenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, bool uninitialized_pixels)
static void init_transform_effect(Strip *strip)
void transform_effect_get_handle(EffectHandle &rval)
static int num_inputs_transform()
static void transform_image(int x, int y, int start_line, int total_lines, const ImBuf *ibuf, ImBuf *out, float scale_x, float scale_y, float translate_x, float translate_y, float rotate, int interpolation)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
blender::VecBase< uint8_t, 4 > uchar4
VecBase< float, 4 > float4
static void rotate(float new_co[3], float a, const float ax[3], const float co[3])
void(* copy)(Strip *dst, const Strip *src, int flag)
ImBuf *(* execute)(const RenderData *context, Strip *strip, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
void(* free)(Strip *strip, bool do_id_user)
void(* init)(Strip *strip)