diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-08-24 02:01:48 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-08-24 02:10:12 +0300 |
commit | 929d7597b345027b848c2997720e52b89c46a0ff (patch) | |
tree | e0882cc98e552a713e1336e07c55159087b7fece /source/blender/sequencer/intern/render.c | |
parent | a57ba4147f1344e9379a271fc752036969574a2d (diff) |
VSE: Cleanup speed effect math
Simplify logic of speed effect frame calculation by using discrete math
where possible. Only `SEQ_SPEED_MULTIPLY` mode with animation requires
frame map to be built. Frame map building was simplified by removing
unused branches.
Functional change: Animating strip in negative range will reverse playback.
I assume this was limitation of previous system, where each frame map item
was limited to be within correct frame range. Now frame map can contain
values that point beyond usable range and they are limited by
`seq_speed_effect_target_frame_get`. This way it is possible to control
playback rate in both directions.
Mostly fixes T89120 apart from offset handling.
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11939
Diffstat (limited to 'source/blender/sequencer/intern/render.c')
-rw-r--r-- | source/blender/sequencer/intern/render.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index aba84743621..0c07a25e2e2 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -840,7 +840,7 @@ static ImBuf *seq_render_effect_strip_impl(const SeqRenderData *context, for (i = 0; i < 3; i++) { /* Speed effect requires time remapping of `timeline_frame` for input(s). */ if (input[0] && seq->type == SEQ_TYPE_SPEED) { - float target_frame = seq_speed_effect_target_frame_get(context, seq, timeline_frame, i); + float target_frame = seq_speed_effect_target_frame_get(scene, seq, timeline_frame, i); ibuf[i] = seq_render_strip(context, state, input[0], target_frame); } else { /* Other effects. */ |