16#include "RNA_prototypes.hh"
36 v->speed_fader = 1.0f;
37 v->speed_fader_length = 0.0f;
38 v->speed_fader_frame_number = 0.0f;
44 v->frameMap =
nullptr;
66 v->frameMap =
nullptr;
84 if ((strip->
input1 ==
nullptr) || (effect_strip_length < 1)) {
99 v->frameMap[0] = 0.0f;
101 float target_frame = 0;
102 for (
int frame_index = 1; frame_index < effect_strip_length; frame_index++) {
105 CLAMP(target_frame, 0, target_frame_max);
106 v->frameMap[frame_index] = target_frame;
113 if (
v->frameMap !=
nullptr) {
122 float timeline_frame,
125 if (strip_speed->
input1 ==
nullptr) {
134 float target_frame = 0.0f;
141 const float ratio = frame_index / speed_effetct_length;
142 target_frame = target_content_length * ratio;
147 if (fcu !=
nullptr) {
149 target_frame = s->
frameMap[frame_index];
165 target_frame += strip_speed->
start;
174 return input == 0 ? target_frame :
ceil(target_frame);
179 float timeline_frame)
182 scene, strip_speed, timeline_frame, 0);
183 return target_frame -
floor(target_frame);
189 float timeline_frame,
201 out = cross_effect.
execute(context,
state,
nullptr, timeline_frame, fac, ibuf1, ibuf2);
float evaluate_fcurve(const FCurve *fcu, float evaltime)
FCurve * id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *prop_name, int index, bool *r_driven)
MINLINE int round_fl_to_int(float a)
@ SEQ_SPEED_USE_INTERPOLATION
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
static float speed_effect_interpolation_ratio_get(Scene *scene, Strip *strip_speed, float timeline_frame)
EffectHandle strip_effect_handle_get(Strip *strip)
static void free_speed_effect(Strip *strip, const bool)
float give_frame_index(const Scene *scene, const Strip *strip, float timeline_frame)
static void copy_speed_effect(Strip *dst, const Strip *src, const int)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
static void init_speed_effect(Strip *strip)
static ImBuf * do_speed_effect(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
static FCurve * strip_effect_speed_speed_factor_curve_get(Scene *scene, Strip *strip)
int time_strip_length_get(const Scene *scene, const Strip *strip)
static void strip_effect_speed_frame_map_ensure(Scene *scene, Strip *strip)
float strip_speed_effect_target_frame_get(Scene *scene, Strip *strip_speed, float timeline_frame, int input)
void speed_effect_get_handle(EffectHandle &rval)
void strip_effect_speed_rebuild_map(Scene *scene, Strip *strip)
EffectHandle effect_handle_get(StripType strip_type)
static StripEarlyOut early_out_speed(const Strip *, float)
static void load_speed_effect(Strip *strip)
static int num_inputs_speed()
float speed_fader_frame_number
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(* free)(Strip *strip, bool do_id_user)
StripEarlyOut(* early_out)(const Strip *strip, float fac)
void(* load)(Strip *seqconst)
void(* init)(Strip *strip)