Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2020-12-19 07:57:27 +0300
committerRichard Antalik <richardantalik@gmail.com>2020-12-19 08:29:15 +0300
commit046ca0749a9389ec52da90b29c8b2032f3225c51 (patch)
tree27ffdc0dc4d986296f3933370c1071ea5c505b94 /source/blender/sequencer/intern/render.c
parent6942dd9f49003ead61f9a0e52b398ebc74a5e3cb (diff)
Cleanup: Rename BKE_sequencer functions
API functions get SEQ_ prefix. Intern functions get seq_ prefix Functions also have appropriate category included in name.
Diffstat (limited to 'source/blender/sequencer/intern/render.c')
-rw-r--r--source/blender/sequencer/intern/render.c79
1 files changed, 37 insertions, 42 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c
index 2e757a06751..84f2a6df647 100644
--- a/source/blender/sequencer/intern/render.c
+++ b/source/blender/sequencer/intern/render.c
@@ -461,9 +461,9 @@ static bool sequencer_use_crop(const Sequence *seq)
return false;
}
-static bool BKE_sequencer_input_have_to_preprocess(const SeqRenderData *context,
- Sequence *seq,
- float UNUSED(timeline_frame))
+static bool seq_input_have_to_preprocess(const SeqRenderData *context,
+ Sequence *seq,
+ float UNUSED(timeline_frame))
{
float mul;
@@ -717,8 +717,7 @@ static ImBuf *input_preprocess(const SeqRenderData *context,
}
if (seq->modifiers.first) {
- ImBuf *ibuf_new = BKE_sequence_modifier_apply_stack(
- context, seq, preprocessed_ibuf, timeline_frame);
+ ImBuf *ibuf_new = SEQ_modifier_apply_stack(context, seq, preprocessed_ibuf, timeline_frame);
if (ibuf_new != preprocessed_ibuf) {
IMB_metadata_copy(ibuf_new, preprocessed_ibuf);
@@ -748,8 +747,7 @@ static ImBuf *seq_render_preprocess_ibuf(const SeqRenderData *context,
/* Proxies are not stored in cache. */
if (!is_proxy_image) {
- BKE_sequencer_cache_put(
- context, seq, timeline_frame, SEQ_CACHE_STORE_RAW, ibuf, cost, false);
+ seq_cache_put(context, seq, timeline_frame, SEQ_CACHE_STORE_RAW, ibuf, cost, false);
}
/* Reset timer so we can get partial render time. */
@@ -758,8 +756,7 @@ static ImBuf *seq_render_preprocess_ibuf(const SeqRenderData *context,
}
float cost = seq_estimate_render_cost_end(context->scene, begin);
- BKE_sequencer_cache_put(
- context, seq, timeline_frame, SEQ_CACHE_STORE_PREPROCESSED, ibuf, cost, false);
+ seq_cache_put(context, seq, timeline_frame, SEQ_CACHE_STORE_PREPROCESSED, ibuf, cost, false);
return ibuf;
}
@@ -868,7 +865,7 @@ static ImBuf *seq_render_effect_strip_impl(const SeqRenderData *context,
float fac, facf;
int early_out;
int i;
- struct SeqEffectHandle sh = BKE_sequence_get_effect(seq);
+ struct SeqEffectHandle sh = SEQ_effect_handle_get(seq);
FCurve *fcu = NULL;
ImBuf *ibuf[3];
Sequence *input[3];
@@ -910,8 +907,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 = BKE_sequencer_speed_effect_target_frame_get(
- context, seq, timeline_frame, i);
+ float target_frame = seq_speed_effect_target_frame_get(context, seq, timeline_frame, i);
ibuf[i] = seq_render_strip(context, state, input[0], target_frame);
}
else { /* Other effects. */
@@ -921,7 +917,7 @@ static ImBuf *seq_render_effect_strip_impl(const SeqRenderData *context,
}
}
- if (ibuf[0] && (ibuf[1] || BKE_sequence_effect_get_num_inputs(seq->type) == 1)) {
+ if (ibuf[0] && (ibuf[1] || SEQ_effect_get_num_inputs(seq->type) == 1)) {
if (sh.multithreaded) {
out = seq_render_effect_execute_threaded(
&sh, context, seq, timeline_frame, fac, facf, ibuf[0], ibuf[1], ibuf[2]);
@@ -1628,7 +1624,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context,
}
if (view_id != context->view_id) {
- BKE_sequencer_cache_put(
+ seq_cache_put(
&localcontext, seq, timeline_frame, SEQ_CACHE_STORE_RAW, ibufs_arr[view_id], 0, false);
}
@@ -1677,7 +1673,7 @@ static ImBuf *do_render_strip_seqbase(const SeqRenderData *context,
ListBase *seqbase = NULL;
int offset;
- seqbase = BKE_sequence_seqbase_get(seq, &offset);
+ seqbase = SEQ_get_seqbase_from_sequence(seq, &offset);
if (seqbase && !BLI_listbase_is_empty(seqbase)) {
@@ -1806,15 +1802,14 @@ ImBuf *seq_render_strip(const SeqRenderData *context,
clock_t begin = seq_estimate_render_cost_begin();
- ibuf = BKE_sequencer_cache_get(
- context, seq, timeline_frame, SEQ_CACHE_STORE_PREPROCESSED, false);
+ ibuf = seq_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_PREPROCESSED, false);
if (ibuf != NULL) {
return ibuf;
}
/* Proxies are not stored in cache. */
if (!SEQ_can_use_proxy(seq, SEQ_rendersize_to_proxysize(context->preview_render_size))) {
- ibuf = BKE_sequencer_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_RAW, false);
+ ibuf = seq_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_RAW, false);
}
if (ibuf == NULL) {
@@ -1822,7 +1817,7 @@ ImBuf *seq_render_strip(const SeqRenderData *context,
}
if (ibuf) {
- use_preprocess = BKE_sequencer_input_have_to_preprocess(context, seq, timeline_frame);
+ use_preprocess = seq_input_have_to_preprocess(context, seq, timeline_frame);
ibuf = seq_render_preprocess_ibuf(
context, seq, ibuf, timeline_frame, begin, use_preprocess, is_proxy_image);
}
@@ -1851,7 +1846,7 @@ static bool seq_must_swap_input_in_blend_mode(Sequence *seq)
static int seq_get_early_out_for_blend_mode(Sequence *seq)
{
- struct SeqEffectHandle sh = BKE_sequence_get_blend(seq);
+ struct SeqEffectHandle sh = seq_effect_get_sequence_blend(seq);
float facf = seq->blend_opacity / 100.0f;
int early_out = sh.early_out(seq, facf, facf);
@@ -1874,7 +1869,7 @@ static ImBuf *seq_render_strip_stack_apply_effect(
const SeqRenderData *context, Sequence *seq, float timeline_frame, ImBuf *ibuf1, ImBuf *ibuf2)
{
ImBuf *out;
- struct SeqEffectHandle sh = BKE_sequence_get_blend(seq);
+ struct SeqEffectHandle sh = seq_effect_get_sequence_blend(seq);
float facf = seq->blend_opacity / 100.0f;
int swap_input = seq_must_swap_input_in_blend_mode(seq);
@@ -1922,7 +1917,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context,
int early_out;
Sequence *seq = seq_arr[i];
- out = BKE_sequencer_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_COMPOSITE, false);
+ out = seq_cache_get(context, seq, timeline_frame, SEQ_CACHE_STORE_COMPOSITE, false);
if (out) {
break;
@@ -1954,7 +1949,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context,
out = seq_render_strip_stack_apply_effect(context, seq, timeline_frame, ibuf1, ibuf2);
float cost = seq_estimate_render_cost_end(context->scene, begin);
- BKE_sequencer_cache_put(
+ seq_cache_put(
context, seq_arr[i], timeline_frame, SEQ_CACHE_STORE_COMPOSITE, out, cost, false);
IMB_freeImBuf(ibuf1);
@@ -1983,7 +1978,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context,
}
float cost = seq_estimate_render_cost_end(context->scene, begin);
- BKE_sequencer_cache_put(
+ seq_cache_put(
context, seq_arr[i], timeline_frame, SEQ_CACHE_STORE_COMPOSITE, out, cost, false);
}
@@ -1998,7 +1993,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context,
ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, int chanshown)
{
Scene *scene = context->scene;
- Editing *ed = BKE_sequencer_editing_get(scene, false);
+ Editing *ed = SEQ_editing_get(scene, false);
ListBase *seqbasep;
if (ed == NULL) {
@@ -2023,11 +2018,11 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame,
count = seq_get_shown_sequences(seqbasep, timeline_frame, chanshown, seq_arr);
if (count) {
- out = BKE_sequencer_cache_get(
+ out = seq_cache_get(
context, seq_arr[count - 1], timeline_frame, SEQ_CACHE_STORE_FINAL_OUT, false);
}
- BKE_sequencer_cache_free_temp_cache(context->scene, context->task_id, timeline_frame);
+ seq_cache_free_temp_cache(context->scene, context->task_id, timeline_frame);
clock_t begin = seq_estimate_render_cost_begin();
float cost = 0;
@@ -2038,27 +2033,27 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame,
cost = seq_estimate_render_cost_end(context->scene, begin);
if (context->is_prefetch_render) {
- BKE_sequencer_cache_put(context,
- seq_arr[count - 1],
- timeline_frame,
- SEQ_CACHE_STORE_FINAL_OUT,
- out,
- cost,
- false);
+ seq_cache_put(context,
+ seq_arr[count - 1],
+ timeline_frame,
+ SEQ_CACHE_STORE_FINAL_OUT,
+ out,
+ cost,
+ false);
}
else {
- BKE_sequencer_cache_put_if_possible(context,
- seq_arr[count - 1],
- timeline_frame,
- SEQ_CACHE_STORE_FINAL_OUT,
- out,
- cost,
- false);
+ seq_cache_put_if_possible(context,
+ seq_arr[count - 1],
+ timeline_frame,
+ SEQ_CACHE_STORE_FINAL_OUT,
+ out,
+ cost,
+ false);
}
BLI_mutex_unlock(&seq_render_mutex);
}
- BKE_sequencer_prefetch_start(context, timeline_frame, cost);
+ seq_prefetch_start(context, timeline_frame, cost);
return out;
}