Often in previs setups, you have several "variations" of image/movie strips for review, where the topmost one completely covers the others under it. VSE rendering already had an optimization where if there's a fully opaque strip that covers the whole screen, then the lower strips are skipped from processing/rendering. However, it was not handling the case of non-fullscreen strips (e.g. you'd have a Color strip near top & bottom for letterboxing, and an opaque strip "in the middle"). This adds a simple "occluder tracking", and skips strips that are completely covered by any single opaque strip that is above it (like outlined in #117790 task). Playback of Gold previs between 1:42 and 1:55, on Windows/Ryzen5950X: - Average frame time 28.5ms -> 23.8ms - Median frame time 24.1ms -> 21.5ms - Two slowest frames: 263->189ms, 194->178ms Rendering the Gold previs movie: 325s -> 304s (93% of previous time) Pull Request: https://projects.blender.org/blender/blender/pulls/118396
51 lines
1.8 KiB
C++
51 lines
1.8 KiB
C++
/* SPDX-FileCopyrightText: 2024 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
/** \file
|
|
* \ingroup sequencer
|
|
*/
|
|
|
|
#include "BLI_vector.hh"
|
|
|
|
struct ImBuf;
|
|
struct LinkNode;
|
|
struct ListBase;
|
|
struct Scene;
|
|
struct SeqEffectHandle;
|
|
struct SeqRenderData;
|
|
struct Sequence;
|
|
|
|
/* mutable state for sequencer */
|
|
struct SeqRenderState {
|
|
LinkNode *scene_parents = nullptr;
|
|
};
|
|
|
|
ImBuf *seq_render_give_ibuf_seqbase(const SeqRenderData *context,
|
|
float timeline_frame,
|
|
int chan_shown,
|
|
ListBase *channels,
|
|
ListBase *seqbasep);
|
|
ImBuf *seq_render_effect_execute_threaded(SeqEffectHandle *sh,
|
|
const SeqRenderData *context,
|
|
Sequence *seq,
|
|
float timeline_frame,
|
|
float fac,
|
|
ImBuf *ibuf1,
|
|
ImBuf *ibuf2,
|
|
ImBuf *ibuf3);
|
|
void seq_imbuf_to_sequencer_space(const Scene *scene, ImBuf *ibuf, bool make_float);
|
|
blender::Vector<Sequence *> seq_get_shown_sequences(
|
|
const Scene *scene, ListBase *channels, ListBase *seqbase, int timeline_frame, int chanshown);
|
|
ImBuf *seq_render_strip(const SeqRenderData *context,
|
|
SeqRenderState *state,
|
|
Sequence *seq,
|
|
float timeline_frame);
|
|
ImBuf *seq_render_mask(const SeqRenderData *context,
|
|
Mask *mask,
|
|
float frame_index,
|
|
bool make_float);
|
|
void seq_imbuf_assign_spaces(const Scene *scene, ImBuf *ibuf);
|