Fix: VSE frame interpolation is broken
Caused by incorrect output of `SEQ_give_frame_index` for effect strips. Also since output value is float, it has to be truncated to integer, when image bufferes are rendered for the effect. Pull Request: https://projects.blender.org/blender/blender/pulls/123914
This commit is contained in:
committed by
Richard Antalik
parent
beb8ec4fe1
commit
952f41a9fd
@@ -923,7 +923,8 @@ 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(scene, seq, timeline_frame, i);
|
||||
int target_frame = floor(
|
||||
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. */
|
||||
|
||||
@@ -62,10 +62,11 @@ float SEQ_give_frame_index(const Scene *scene, Sequence *seq, float timeline_fra
|
||||
float frame_index;
|
||||
float sta = SEQ_time_start_frame_get(seq);
|
||||
float end = SEQ_time_content_end_frame_get(scene, seq) - 1;
|
||||
const float frame_index_max = seq->len - 1;
|
||||
float frame_index_max = seq->len - 1;
|
||||
|
||||
if (seq->type & SEQ_TYPE_EFFECT) {
|
||||
end = SEQ_time_right_handle_frame_get(scene, seq);
|
||||
frame_index_max = end - sta;
|
||||
}
|
||||
|
||||
if (end < sta) {
|
||||
|
||||
Reference in New Issue
Block a user