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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-01-18 22:16:19 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-01-18 22:18:36 +0400
commitf6624b84cf75aecad2899e3e43fc28fd9d2ea0d8 (patch)
treefbe86f35b6c460201a646f72389bca1248ff1e0f
parent7142b970853f209f6c43319b7f862bcbdbea3728 (diff)
Send sequencer render context as const pointer rather than as value
No functional changes just creepy to send rather huge structure by value.
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h30
-rw-r--r--source/blender/blenkernel/intern/seqcache.c18
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c139
-rw-r--r--source/blender/blenkernel/intern/seqmodifier.c8
-rw-r--r--source/blender/blenkernel/intern/sequencer.c198
-rw-r--r--source/blender/editors/render/render_opengl.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c6
-rw-r--r--source/blender/render/intern/source/pipeline.c2
8 files changed, 203 insertions, 200 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index c723797ac2b..3ac04a32f38 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -153,13 +153,13 @@ struct SeqEffectHandle {
* float-rects or byte-rects
* (mixed cases are handled one layer up...) */
- struct ImBuf * (*execute)(SeqRenderData context, struct Sequence *seq, float cfra, float facf0, float facf1,
+ struct ImBuf * (*execute)(const SeqRenderData *context, struct Sequence *seq, float cfra, float facf0, float facf1,
struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3);
- struct ImBuf * (*init_execution)(SeqRenderData context, struct ImBuf *ibuf1, struct ImBuf *ibuf2,
+ struct ImBuf * (*init_execution)(const SeqRenderData *context, struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3);
- void (*execute_slice)(SeqRenderData context, struct Sequence *seq, float cfra, float facf0, float facf1,
+ void (*execute_slice)(const SeqRenderData *context, struct Sequence *seq, float cfra, float facf0, float facf1,
struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3,
int start_line, int total_lines, struct ImBuf *out);
};
@@ -172,11 +172,11 @@ struct SeqEffectHandle {
* sequencer render functions
* ********************************************************************** */
-struct ImBuf *BKE_sequencer_give_ibuf(SeqRenderData context, float cfra, int chanshown);
-struct ImBuf *BKE_sequencer_give_ibuf_threaded(SeqRenderData context, float cfra, int chanshown);
-struct ImBuf *BKE_sequencer_give_ibuf_direct(SeqRenderData context, float cfra, struct Sequence *seq);
-struct ImBuf *BKE_sequencer_give_ibuf_seqbase(SeqRenderData context, float cfra, int chan_shown, struct ListBase *seqbasep);
-void BKE_sequencer_give_ibuf_prefetch_request(SeqRenderData context, float cfra, int chan_shown);
+struct ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int chanshown);
+struct ImBuf *BKE_sequencer_give_ibuf_threaded(const SeqRenderData *context, float cfra, int chanshown);
+struct ImBuf *BKE_sequencer_give_ibuf_direct(const SeqRenderData *context, float cfra, struct Sequence *seq);
+struct ImBuf *BKE_sequencer_give_ibuf_seqbase(const SeqRenderData *context, float cfra, int chan_shown, struct ListBase *seqbasep);
+void BKE_sequencer_give_ibuf_prefetch_request(const SeqRenderData *context, float cfra, int chan_shown);
/* **********************************************************************
* sequencer.c
@@ -227,7 +227,7 @@ struct StripElem *BKE_sequencer_give_stripelem(struct Sequence *seq, int cfra);
/* intern */
void BKE_sequencer_update_changed_seq_and_deps(struct Scene *scene, struct Sequence *changed_seq, int len_change, int ibuf_change);
-int BKE_sequencer_input_have_to_preprocess(SeqRenderData context, struct Sequence *seq, float cfra);
+int BKE_sequencer_input_have_to_preprocess(const SeqRenderData *context, struct Sequence *seq, float cfra);
struct SeqIndexBuildContext *BKE_sequencer_proxy_rebuild_context(struct Main *bmain, struct Scene *scene, struct Sequence *seq);
void BKE_sequencer_proxy_rebuild(struct SeqIndexBuildContext *context, short *stop, short *do_update, float *progress);
@@ -250,19 +250,19 @@ void BKE_sequencer_cache_destruct(void);
void BKE_sequencer_cache_cleanup(void);
/* returned ImBuf is properly refed and has to be freed */
-struct ImBuf *BKE_sequencer_cache_get(SeqRenderData context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type);
+struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type);
/* passed ImBuf is properly refed, so ownership is *not*
* transferred to the cache.
* you can pass the same ImBuf multiple times to the cache without problems.
*/
-void BKE_sequencer_cache_put(SeqRenderData context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type, struct ImBuf *nval);
+void BKE_sequencer_cache_put(const SeqRenderData *context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type, struct ImBuf *nval);
void BKE_sequencer_cache_cleanup_sequence(struct Sequence *seq);
-struct ImBuf *BKE_sequencer_preprocessed_cache_get(SeqRenderData context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type);
-void BKE_sequencer_preprocessed_cache_put(SeqRenderData context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type, struct ImBuf *ibuf);
+struct ImBuf *BKE_sequencer_preprocessed_cache_get(const SeqRenderData *context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type);
+void BKE_sequencer_preprocessed_cache_put(const SeqRenderData *context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type, struct ImBuf *ibuf);
void BKE_sequencer_preprocessed_cache_cleanup(void);
void BKE_sequencer_preprocessed_cache_cleanup_sequence(struct Sequence *seq);
@@ -414,13 +414,13 @@ void BKE_sequence_modifier_clear(struct Sequence *seq);
void BKE_sequence_modifier_free(struct SequenceModifierData *smd);
void BKE_sequence_modifier_unique_name(struct Sequence *seq, struct SequenceModifierData *smd);
struct SequenceModifierData *BKE_sequence_modifier_find_by_name(struct Sequence *seq, const char *name);
-struct ImBuf *BKE_sequence_modifier_apply_stack(SeqRenderData context, struct Sequence *seq, struct ImBuf *ibuf, int cfra);
+struct ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context, struct Sequence *seq, struct ImBuf *ibuf, int cfra);
void BKE_sequence_modifier_list_copy(struct Sequence *seqn, struct Sequence *seq);
int BKE_sequence_supports_modifiers(struct Sequence *seq);
/* internal filters */
-struct ImBuf *BKE_sequencer_render_mask_input(SeqRenderData context, int mask_input_type, struct Sequence *mask_sequence, struct Mask *mask_id, int cfra, int make_float);
+struct ImBuf *BKE_sequencer_render_mask_input(const SeqRenderData *context, int mask_input_type, struct Sequence *mask_sequence, struct Mask *mask_id, int cfra, int make_float);
void BKE_sequencer_color_balance_apply(struct StripColorBalance *cb, struct ImBuf *ibuf, float mul, short make_float, struct ImBuf *mask_input);
#endif /* __BKE_SEQUENCER_H__ */
diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c
index 38d3d46ee6b..a85e70d2afc 100644
--- a/source/blender/blenkernel/intern/seqcache.c
+++ b/source/blender/blenkernel/intern/seqcache.c
@@ -209,13 +209,13 @@ void BKE_sequencer_cache_cleanup_sequence(Sequence *seq)
IMB_moviecache_cleanup(moviecache, seqcache_key_check_seq, seq);
}
-struct ImBuf *BKE_sequencer_cache_get(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type)
+struct ImBuf *BKE_sequencer_cache_get(const SeqRenderData *context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type)
{
if (moviecache && seq) {
SeqCacheKey key;
key.seq = seq;
- key.context = context;
+ key.context = *context;
key.cfra = cfra - seq->start;
key.type = type;
@@ -225,11 +225,11 @@ struct ImBuf *BKE_sequencer_cache_get(SeqRenderData context, Sequence *seq, floa
return NULL;
}
-void BKE_sequencer_cache_put(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type, ImBuf *i)
+void BKE_sequencer_cache_put(const SeqRenderData *context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type, ImBuf *i)
{
SeqCacheKey key;
- if (i == NULL || context.skip_cache) {
+ if (i == NULL || context->skip_cache) {
return;
}
@@ -238,7 +238,7 @@ void BKE_sequencer_cache_put(SeqRenderData context, Sequence *seq, float cfra, s
}
key.seq = seq;
- key.context = context;
+ key.context = *context;
key.cfra = cfra - seq->start;
key.type = type;
@@ -271,7 +271,7 @@ static void preprocessed_cache_destruct(void)
preprocess_cache = NULL;
}
-ImBuf *BKE_sequencer_preprocessed_cache_get(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type)
+ImBuf *BKE_sequencer_preprocessed_cache_get(const SeqRenderData *context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type)
{
SeqPreprocessCacheElem *elem;
@@ -288,7 +288,7 @@ ImBuf *BKE_sequencer_preprocessed_cache_get(SeqRenderData context, Sequence *seq
if (elem->type != type)
continue;
- if (seq_cmp_render_data(&elem->context, &context) != 0)
+ if (seq_cmp_render_data(&elem->context, context) != 0)
continue;
IMB_refImBuf(elem->ibuf);
@@ -298,7 +298,7 @@ ImBuf *BKE_sequencer_preprocessed_cache_get(SeqRenderData context, Sequence *seq
return NULL;
}
-void BKE_sequencer_preprocessed_cache_put(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type, ImBuf *ibuf)
+void BKE_sequencer_preprocessed_cache_put(const SeqRenderData *context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type, ImBuf *ibuf)
{
SeqPreprocessCacheElem *elem;
@@ -314,7 +314,7 @@ void BKE_sequencer_preprocessed_cache_put(SeqRenderData context, Sequence *seq,
elem->seq = seq;
elem->type = type;
- elem->context = context;
+ elem->context = *context;
elem->ibuf = ibuf;
preprocess_cache->cfra = cfra;
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 1507e1742cd..9755d4b22e7 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -97,11 +97,12 @@ enum {
GlowA = 3
};
-static ImBuf *prepare_effect_imbufs(SeqRenderData context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
+static ImBuf *prepare_effect_imbufs(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
ImBuf *out;
- int x = context.rectx;
- int y = context.recty;
+ Scene *scene = context->scene;
+ int x = context->rectx;
+ int y = context->recty;
if (!ibuf1 && !ibuf2 && !ibuf3) {
/* hmmm, global float option ? */
@@ -120,13 +121,13 @@ static ImBuf *prepare_effect_imbufs(SeqRenderData context, ImBuf *ibuf1, ImBuf *
}
if (ibuf1 && !ibuf1->rect_float && out->rect_float) {
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf1, TRUE);
+ BKE_sequencer_imbuf_to_sequencer_space(scene, ibuf1, TRUE);
}
if (ibuf2 && !ibuf2->rect_float && out->rect_float) {
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf2, TRUE);
+ BKE_sequencer_imbuf_to_sequencer_space(scene, ibuf2, TRUE);
}
if (ibuf3 && !ibuf3->rect_float && out->rect_float) {
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf3, TRUE);
+ BKE_sequencer_imbuf_to_sequencer_space(scene, ibuf3, TRUE);
}
if (ibuf1 && !ibuf1->rect && !out->rect_float) {
@@ -140,7 +141,7 @@ static ImBuf *prepare_effect_imbufs(SeqRenderData context, ImBuf *ibuf1, ImBuf *
}
if (out->rect_float)
- IMB_colormanagement_assign_float_colorspace(out, context.scene->sequencer_colorspace_settings.name);
+ IMB_colormanagement_assign_float_colorspace(out, scene->sequencer_colorspace_settings.name);
return out;
}
@@ -284,23 +285,23 @@ static void do_alphaover_effect_float(float facf0, float facf1, int x, int y, f
}
}
-static void do_alphaover_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0,
+static void do_alphaover_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0,
float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3),
int start_line, int total_lines, ImBuf *out)
{
if (out->rect_float) {
float *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_float_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_float_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_alphaover_effect_float(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_alphaover_effect_float(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
else {
unsigned char *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_byte_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_byte_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_alphaover_effect_byte(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_alphaover_effect_byte(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
}
@@ -446,23 +447,23 @@ static void do_alphaunder_effect_float(float facf0, float facf1, int x, int y,
}
}
-static void do_alphaunder_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+static void do_alphaunder_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra),
float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3),
int start_line, int total_lines, ImBuf *out)
{
if (out->rect_float) {
float *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_float_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_float_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_alphaunder_effect_float(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_alphaunder_effect_float(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
else {
unsigned char *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_byte_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_byte_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_alphaunder_effect_byte(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_alphaunder_effect_byte(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
}
@@ -556,23 +557,23 @@ static void do_cross_effect_float(float facf0, float facf1, int x, int y, float
}
}
-static void do_cross_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+static void do_cross_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra),
float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3),
int start_line, int total_lines, ImBuf *out)
{
if (out->rect_float) {
float *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_float_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_float_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_cross_effect_float(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_cross_effect_float(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
else {
unsigned char *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_byte_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_byte_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_cross_effect_byte(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_cross_effect_byte(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
}
@@ -798,7 +799,7 @@ static void do_gammacross_effect_float(float facf0, float UNUSED(facf1), int x,
}
}
-static struct ImBuf *gammacross_init_execution(SeqRenderData context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
+static struct ImBuf *gammacross_init_execution(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
build_gammatabs();
@@ -806,23 +807,23 @@ static struct ImBuf *gammacross_init_execution(SeqRenderData context, ImBuf *ibu
return out;
}
-static void do_gammacross_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+static void do_gammacross_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra),
float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3),
int start_line, int total_lines, ImBuf *out)
{
if (out->rect_float) {
float *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_float_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_float_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_gammacross_effect_float(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_gammacross_effect_float(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
else {
unsigned char *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_byte_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_byte_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_gammacross_effect_byte(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_gammacross_effect_byte(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
}
@@ -913,22 +914,22 @@ static void do_add_effect_float(float facf0, float facf1, int x, int y, float *r
}
}
-static void do_add_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0, float facf1,
+static void do_add_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0, float facf1,
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
{
if (out->rect_float) {
float *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_float_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_float_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_add_effect_float(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_add_effect_float(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
else {
unsigned char *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_byte_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_byte_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_add_effect_byte(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_add_effect_byte(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
}
@@ -1018,22 +1019,22 @@ static void do_sub_effect_float(float UNUSED(facf0), float facf1, int x, int y,
}
}
-static void do_sub_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0, float facf1,
+static void do_sub_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0, float facf1,
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
{
if (out->rect_float) {
float *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_float_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_float_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_sub_effect_float(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_sub_effect_float(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
else {
unsigned char *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_byte_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_byte_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_sub_effect_byte(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_sub_effect_byte(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
}
@@ -1215,22 +1216,22 @@ static void do_mul_effect_float(float facf0, float facf1, int x, int y, float *r
}
}
-static void do_mul_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0, float facf1,
+static void do_mul_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0, float facf1,
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
{
if (out->rect_float) {
float *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_float_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_float_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_mul_effect_float(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_mul_effect_float(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
else {
unsigned char *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_byte_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_byte_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
- do_mul_effect_byte(facf0, facf1, context.rectx, total_lines, rect1, rect2, rect_out);
+ do_mul_effect_byte(facf0, facf1, context->rectx, total_lines, rect1, rect2, rect_out);
}
}
@@ -1663,17 +1664,17 @@ static void do_wipe_effect_float(Sequence *seq, float facf0, float UNUSED(facf1)
}
}
-static ImBuf *do_wipe_effect(SeqRenderData context, Sequence *seq, float UNUSED(cfra), float facf0, float facf1,
+static ImBuf *do_wipe_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(cfra), float facf0, float facf1,
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
- do_wipe_effect_float(seq, facf0, facf1, context.rectx, context.recty, ibuf1->rect_float,
+ do_wipe_effect_float(seq, facf0, facf1, context->rectx, context->recty, ibuf1->rect_float,
ibuf2->rect_float, out->rect_float);
}
else {
- do_wipe_effect_byte(seq, facf0, facf1, context.rectx, context.recty, (unsigned char *) ibuf1->rect,
+ do_wipe_effect_byte(seq, facf0, facf1, context->rectx, context->recty, (unsigned char *) ibuf1->rect,
(unsigned char *) ibuf2->rect, (unsigned char *) out->rect);
}
@@ -1803,12 +1804,12 @@ static void do_transform(Scene *scene, Sequence *seq, float UNUSED(facf0), int x
}
-static ImBuf *do_transform_effect(SeqRenderData context, Sequence *seq, float UNUSED(cfra), float facf0,
+static ImBuf *do_transform_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(cfra), float facf0,
float UNUSED(facf1), ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
- do_transform(context.scene, seq, facf0, context.rectx, context.recty, ibuf1, out);
+ do_transform(context->scene, seq, facf0, context->rectx, context->recty, ibuf1, out);
return out;
}
@@ -2091,19 +2092,19 @@ static void do_glow_effect_float(Sequence *seq, int render_size, float facf0, fl
RVAddBitmaps_float(inbuf, outbuf, outbuf, x, y);
}
-static ImBuf *do_glow_effect(SeqRenderData context, Sequence *seq, float UNUSED(cfra), float facf0, float facf1,
+static ImBuf *do_glow_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(cfra), float facf0, float facf1,
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
- int render_size = 100 * context.rectx / context.scene->r.xsch;
+ int render_size = 100 * context->rectx / context->scene->r.xsch;
if (out->rect_float) {
- do_glow_effect_float(seq, render_size, facf0, facf1, context.rectx, context.recty,
+ do_glow_effect_float(seq, render_size, facf0, facf1, context->rectx, context->recty,
ibuf1->rect_float, ibuf2->rect_float, out->rect_float);
}
else {
- do_glow_effect_byte(seq, render_size, facf0, facf1, context.rectx, context.recty,
+ do_glow_effect_byte(seq, render_size, facf0, facf1, context->rectx, context->recty,
(unsigned char *) ibuf1->rect, (unsigned char *) ibuf2->rect, (unsigned char *) out->rect);
}
@@ -2148,7 +2149,7 @@ static int early_out_color(Sequence *UNUSED(seq), float UNUSED(facf0), float UNU
return EARLY_NO_INPUT;
}
-static ImBuf *do_solid_color(SeqRenderData context, Sequence *seq, float UNUSED(cfra), float facf0, float facf1,
+static ImBuf *do_solid_color(const SeqRenderData *context, Sequence *seq, float UNUSED(cfra), float facf0, float facf1,
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
@@ -2157,8 +2158,8 @@ static ImBuf *do_solid_color(SeqRenderData context, Sequence *seq, float UNUSED(
unsigned char *rect;
float *rect_float;
- int x; /*= context.rectx;*/ /*UNUSED*/
- int y; /*= context.recty;*/ /*UNUSED*/
+ int x; /*= context->rectx;*/ /*UNUSED*/
+ int y; /*= context->recty;*/ /*UNUSED*/
if (out->rect) {
unsigned char col0[3];
@@ -2241,7 +2242,7 @@ static int early_out_multicam(Sequence *UNUSED(seq), float UNUSED(facf0), float
return EARLY_NO_INPUT;
}
-static ImBuf *do_multicam(SeqRenderData context, Sequence *seq, float cfra, float UNUSED(facf0), float UNUSED(facf1),
+static ImBuf *do_multicam(const SeqRenderData *context, Sequence *seq, float cfra, float UNUSED(facf0), float UNUSED(facf1),
ImBuf *UNUSED(ibuf1), ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3))
{
ImBuf *i;
@@ -2253,7 +2254,7 @@ static ImBuf *do_multicam(SeqRenderData context, Sequence *seq, float cfra, floa
return NULL;
}
- ed = context.scene->ed;
+ ed = context->scene->ed;
if (!ed) {
return NULL;
}
@@ -2291,13 +2292,13 @@ static int early_out_adjustment(Sequence *UNUSED(seq), float UNUSED(facf0), floa
return EARLY_NO_INPUT;
}
-static ImBuf *do_adjustment_impl(SeqRenderData context, Sequence *seq, float cfra)
+static ImBuf *do_adjustment_impl(const SeqRenderData *context, Sequence *seq, float cfra)
{
Editing *ed;
ListBase *seqbasep;
ImBuf *i = NULL;
- ed = context.scene->ed;
+ ed = context->scene->ed;
seqbasep = BKE_sequence_seqbase(&ed->seqbase, seq);
@@ -2323,14 +2324,14 @@ static ImBuf *do_adjustment_impl(SeqRenderData context, Sequence *seq, float cfr
return i;
}
-static ImBuf *do_adjustment(SeqRenderData context, Sequence *seq, float cfra, float UNUSED(facf0), float UNUSED(facf1),
+static ImBuf *do_adjustment(const SeqRenderData *context, Sequence *seq, float cfra, float UNUSED(facf0), float UNUSED(facf1),
ImBuf *UNUSED(ibuf1), ImBuf *UNUSED(ibuf2), ImBuf *UNUSED(ibuf3))
{
ImBuf *i = NULL;
ImBuf *out;
Editing *ed;
- ed = context.scene->ed;
+ ed = context->scene->ed;
if (!ed) {
return NULL;
@@ -2536,17 +2537,17 @@ void BKE_sequence_effect_speed_rebuild_map(Scene *scene, Sequence *seq, int forc
}
}
-static ImBuf *do_speed_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra),
+static ImBuf *do_speed_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra),
float facf0, float facf1, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
- do_cross_effect_float(facf0, facf1, context.rectx, context.recty,
+ do_cross_effect_float(facf0, facf1, context->rectx, context->recty,
ibuf1->rect_float, ibuf2->rect_float, out->rect_float);
}
else {
- do_cross_effect_byte(facf0, facf1, context.rectx, context.recty,
+ do_cross_effect_byte(facf0, facf1, context->rectx, context->recty,
(unsigned char *) ibuf1->rect, (unsigned char *) ibuf2->rect, (unsigned char *) out->rect);
}
return out;
@@ -2554,16 +2555,16 @@ static ImBuf *do_speed_effect(SeqRenderData context, Sequence *UNUSED(seq), floa
/*********************** overdrop *************************/
-static void do_overdrop_effect(SeqRenderData context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0, float facf1,
+static void do_overdrop_effect(const SeqRenderData *context, Sequence *UNUSED(seq), float UNUSED(cfra), float facf0, float facf1,
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *UNUSED(ibuf3), int start_line, int total_lines, ImBuf *out)
{
- int x = context.rectx;
+ int x = context->rectx;
int y = total_lines;
if (out->rect_float) {
float *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_float_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_float_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
do_drop_effect_float(facf0, facf1, x, y, rect1, rect2, rect_out);
do_alphaover_effect_float(facf0, facf1, x, y, rect1, rect2, rect_out);
@@ -2571,7 +2572,7 @@ static void do_overdrop_effect(SeqRenderData context, Sequence *UNUSED(seq), flo
else {
unsigned char *rect1 = NULL, *rect2 = NULL, *rect_out = NULL;
- slice_get_byte_buffers(&context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
+ slice_get_byte_buffers(context, ibuf1, ibuf2, NULL, out, start_line, &rect1, &rect2, NULL, &rect_out);
do_drop_effect_byte(facf0, facf1, x, y, rect1, rect2, rect_out);
do_alphaover_effect_byte(facf0, facf1, x, y, rect1, rect2, rect_out);
@@ -2642,7 +2643,7 @@ static void get_default_fac_fade(Sequence *seq, float cfra, float *facf0, float
*facf1 /= seq->len;
}
-static struct ImBuf *init_execution(SeqRenderData context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
+static struct ImBuf *init_execution(const SeqRenderData *context, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c
index b374fb14657..b3b5fc1e8d0 100644
--- a/source/blender/blenkernel/intern/seqmodifier.c
+++ b/source/blender/blenkernel/intern/seqmodifier.c
@@ -77,7 +77,7 @@ typedef struct ModifierThread {
} ModifierThread;
-static ImBuf *modifier_mask_get(SequenceModifierData *smd, SeqRenderData context, int cfra, int make_float)
+static ImBuf *modifier_mask_get(SequenceModifierData *smd, const SeqRenderData *context, int cfra, int make_float)
{
return BKE_sequencer_render_mask_input(context, smd->mask_input_type, smd->mask_sequence, smd->mask_id, cfra, make_float);
}
@@ -649,14 +649,14 @@ SequenceModifierData *BKE_sequence_modifier_find_by_name(Sequence *seq, const ch
return BLI_findstring(&(seq->modifiers), name, offsetof(SequenceModifierData, name));
}
-ImBuf *BKE_sequence_modifier_apply_stack(SeqRenderData context, Sequence *seq, ImBuf *ibuf, int cfra)
+ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context, Sequence *seq, ImBuf *ibuf, int cfra)
{
SequenceModifierData *smd;
ImBuf *processed_ibuf = ibuf;
if (seq->modifiers.first && (seq->flag & SEQ_USE_LINEAR_MODIFIERS)) {
processed_ibuf = IMB_dupImBuf(ibuf);
- BKE_sequencer_imbuf_from_sequencer_space(context.scene, processed_ibuf);
+ BKE_sequencer_imbuf_from_sequencer_space(context->scene, processed_ibuf);
}
for (smd = seq->modifiers.first; smd; smd = smd->next) {
@@ -684,7 +684,7 @@ ImBuf *BKE_sequence_modifier_apply_stack(SeqRenderData context, Sequence *seq, I
}
if (seq->modifiers.first && (seq->flag & SEQ_USE_LINEAR_MODIFIERS)) {
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, processed_ibuf, FALSE);
+ BKE_sequencer_imbuf_to_sequencer_space(context->scene, processed_ibuf, FALSE);
}
return processed_ibuf;
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 337d9756296..d02cdae5a7b 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -85,10 +85,10 @@
# include "AUD_C-API.h"
#endif
-static ImBuf *seq_render_strip_stack(SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown);
-static ImBuf *seq_render_strip(SeqRenderData context, Sequence *seq, float cfra);
+static ImBuf *seq_render_strip_stack(const SeqRenderData *context, ListBase *seqbasep, float cfra, int chanshown);
+static ImBuf *seq_render_strip(const SeqRenderData *context, Sequence *seq, float cfra);
static void seq_free_animdata(Scene *scene, Sequence *seq);
-static ImBuf *seq_render_mask(SeqRenderData context, Mask *mask, float nr, short make_float);
+static ImBuf *seq_render_mask(const SeqRenderData *context, Mask *mask, float nr, short make_float);
/* **** XXX ******** */
#define SELECT 1
@@ -1367,12 +1367,12 @@ static int seq_proxy_get_fname(Sequence *seq, int cfra, int render_size, char *n
return TRUE;
}
-static ImBuf *seq_proxy_fetch(SeqRenderData context, Sequence *seq, int cfra)
+static ImBuf *seq_proxy_fetch(const SeqRenderData *context, Sequence *seq, int cfra)
{
char name[PROXY_MAXFILE];
- IMB_Proxy_Size psize = seq_rendersize_to_proxysize(context.preview_render_size);
+ IMB_Proxy_Size psize = seq_rendersize_to_proxysize(context->preview_render_size);
int size_flags;
- int render_size = context.preview_render_size;
+ int render_size = context->preview_render_size;
/* dirty hack to distinguish 100% render size from PROXY_100 */
if (render_size == 99) {
@@ -1419,7 +1419,7 @@ static ImBuf *seq_proxy_fetch(SeqRenderData context, Sequence *seq, int cfra)
ImBuf *ibuf = IMB_loadiffname(name, IB_rect, NULL);
if (ibuf)
- sequencer_imbuf_assign_spaces(context.scene, ibuf);
+ sequencer_imbuf_assign_spaces(context->scene, ibuf);
return ibuf;
}
@@ -1428,7 +1428,7 @@ static ImBuf *seq_proxy_fetch(SeqRenderData context, Sequence *seq, int cfra)
}
}
-static void seq_proxy_build_frame(SeqRenderData context, Sequence *seq, int cfra, int proxy_render_size)
+static void seq_proxy_build_frame(const SeqRenderData *context, Sequence *seq, int cfra, int proxy_render_size)
{
char name[PROXY_MAXFILE];
int quality;
@@ -1442,8 +1442,8 @@ static void seq_proxy_build_frame(SeqRenderData context, Sequence *seq, int cfra
ibuf = seq_render_strip(context, seq, cfra);
- rectx = (proxy_render_size * context.scene->r.xsch) / 100;
- recty = (proxy_render_size * context.scene->r.ysch) / 100;
+ rectx = (proxy_render_size * context->scene->r.xsch) / 100;
+ recty = (proxy_render_size * context->scene->r.ysch) / 100;
if (ibuf->x != rectx || ibuf->y != recty) {
IMB_scalefastImBuf(ibuf, (short)rectx, (short)recty);
@@ -1540,16 +1540,16 @@ void BKE_sequencer_proxy_rebuild(SeqIndexBuildContext *context, short *stop, sho
for (cfra = seq->startdisp + seq->startstill; cfra < seq->enddisp - seq->endstill; cfra++) {
if (context->size_flags & IMB_PROXY_25) {
- seq_proxy_build_frame(render_context, seq, cfra, 25);
+ seq_proxy_build_frame(&render_context, seq, cfra, 25);
}
if (context->size_flags & IMB_PROXY_50) {
- seq_proxy_build_frame(render_context, seq, cfra, 50);
+ seq_proxy_build_frame(&render_context, seq, cfra, 50);
}
if (context->size_flags & IMB_PROXY_75) {
- seq_proxy_build_frame(render_context, seq, cfra, 75);
+ seq_proxy_build_frame(&render_context, seq, cfra, 75);
}
if (context->size_flags & IMB_PROXY_100) {
- seq_proxy_build_frame(render_context, seq, cfra, 100);
+ seq_proxy_build_frame(&render_context, seq, cfra, 100);
}
*progress = (float) (cfra - seq->startdisp - seq->startstill) / (seq->enddisp - seq->endstill - seq->startdisp - seq->startstill);
@@ -1827,7 +1827,7 @@ static void *color_balance_do_thread(void *thread_data_v)
return NULL;
}
-ImBuf *BKE_sequencer_render_mask_input(SeqRenderData context, int mask_input_type, Sequence *mask_sequence, Mask *mask_id, int cfra, int make_float)
+ImBuf *BKE_sequencer_render_mask_input(const SeqRenderData *context, int mask_input_type, Sequence *mask_sequence, Mask *mask_id, int cfra, int make_float)
{
ImBuf *mask_input = NULL;
@@ -1894,7 +1894,7 @@ void BKE_sequencer_color_balance_apply(StripColorBalance *cb, ImBuf *ibuf, float
* - Premultiply
*/
-int BKE_sequencer_input_have_to_preprocess(SeqRenderData UNUSED(context), Sequence *seq, float UNUSED(cfra))
+int BKE_sequencer_input_have_to_preprocess(const SeqRenderData *UNUSED(context), Sequence *seq, float UNUSED(cfra))
{
float mul;
@@ -1923,9 +1923,10 @@ int BKE_sequencer_input_have_to_preprocess(SeqRenderData UNUSED(context), Sequen
return FALSE;
}
-static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra, ImBuf *ibuf,
+static ImBuf *input_preprocess(const SeqRenderData *context, Sequence *seq, float cfra, ImBuf *ibuf,
int is_proxy_image, int is_preprocessed)
{
+ Scene *scene = context->scene;
float mul;
ibuf = IMB_makeSingleUser(ibuf);
@@ -1942,7 +1943,7 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra,
int sx, sy, dx, dy;
if (is_proxy_image) {
- double f = seq_rendersize_to_scale_factor(context.preview_render_size);
+ double f = seq_rendersize_to_scale_factor(context->preview_render_size);
if (f != 1.0) {
IMB_scalefastImBuf(ibuf, ibuf->x / f, ibuf->y / f);
@@ -1957,8 +1958,8 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra,
}
if (is_preprocessed) {
- double xscale = context.scene->r.xsch ? ((double)context.rectx / (double)context.scene->r.xsch) : 1.0;
- double yscale = context.scene->r.ysch ? ((double)context.recty / (double)context.scene->r.ysch) : 1.0;
+ double xscale = scene->r.xsch ? ((double)context->rectx / (double)scene->r.xsch) : 1.0;
+ double yscale = scene->r.ysch ? ((double)context->recty / (double)scene->r.ysch) : 1.0;
if (seq->flag & SEQ_USE_TRANSFORM) {
t.xofs *= xscale;
t.yofs *= yscale;
@@ -1976,12 +1977,12 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra,
if (seq->flag & SEQ_USE_TRANSFORM) {
if (is_preprocessed) {
- dx = context.rectx;
- dy = context.recty;
+ dx = context->rectx;
+ dy = context->recty;
}
else {
- dx = context.scene->r.xsch;
- dy = context.scene->r.ysch;
+ dx = scene->r.xsch;
+ dy = scene->r.ysch;
}
}
else {
@@ -1999,7 +2000,7 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra,
ImBuf *i = IMB_allocImBuf(dx, dy, 32, ibuf->rect_float ? IB_rectfloat : IB_rect);
IMB_rectcpy(i, ibuf, t.xofs, t.yofs, c.left, c.bottom, sx, sy);
- sequencer_imbuf_assign_spaces(context.scene, i);
+ sequencer_imbuf_assign_spaces(scene, i);
IMB_freeImBuf(ibuf);
@@ -2027,7 +2028,7 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra,
if (seq->flag & SEQ_MAKE_FLOAT) {
if (!ibuf->rect_float) {
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf, TRUE);
+ BKE_sequencer_imbuf_to_sequencer_space(scene, ibuf, TRUE);
}
if (ibuf->rect) {
@@ -2039,12 +2040,12 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra,
multibuf(ibuf, mul);
}
- if (ibuf->x != context.rectx || ibuf->y != context.recty) {
- if (context.scene->r.mode & R_OSA) {
- IMB_scaleImBuf(ibuf, (short)context.rectx, (short)context.recty);
+ if (ibuf->x != context->rectx || ibuf->y != context->recty) {
+ if (scene->r.mode & R_OSA) {
+ IMB_scaleImBuf(ibuf, (short)context->rectx, (short)context->recty);
}
else {
- IMB_scalefastImBuf(ibuf, (short)context.rectx, (short)context.recty);
+ IMB_scalefastImBuf(ibuf, (short)context->rectx, (short)context->recty);
}
}
@@ -2060,7 +2061,7 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra,
return ibuf;
}
-static ImBuf *copy_from_ibuf_still(SeqRenderData context, Sequence *seq, float nr)
+static ImBuf *copy_from_ibuf_still(const SeqRenderData *context, Sequence *seq, float nr)
{
ImBuf *rval = NULL;
ImBuf *ibuf = NULL;
@@ -2080,7 +2081,7 @@ static ImBuf *copy_from_ibuf_still(SeqRenderData context, Sequence *seq, float n
return rval;
}
-static void copy_to_ibuf_still(SeqRenderData context, Sequence *seq, float nr, ImBuf *ibuf)
+static void copy_to_ibuf_still(const SeqRenderData *context, Sequence *seq, float nr, ImBuf *ibuf)
{
/* warning: ibuf may be NULL if the video fails to load */
if (nr == 0 || nr == seq->len - 1) {
@@ -2090,7 +2091,7 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence *seq, float nr, I
ibuf = IMB_dupImBuf(ibuf);
if (ibuf) {
- sequencer_imbuf_assign_spaces(context.scene, ibuf);
+ sequencer_imbuf_assign_spaces(context->scene, ibuf);
}
if (nr == 0) {
@@ -2109,7 +2110,7 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence *seq, float nr, I
typedef struct RenderEffectInitData {
struct SeqEffectHandle *sh;
- SeqRenderData context;
+ const SeqRenderData *context;
Sequence *seq;
float cfra, facf0, facf1;
ImBuf *ibuf1, *ibuf2, *ibuf3;
@@ -2119,7 +2120,7 @@ typedef struct RenderEffectInitData {
typedef struct RenderEffectThread {
struct SeqEffectHandle *sh;
- SeqRenderData context;
+ const SeqRenderData *context;
Sequence *seq;
float cfra, facf0, facf1;
ImBuf *ibuf1, *ibuf2, *ibuf3;
@@ -2160,7 +2161,7 @@ static void *render_effect_execute_do_thread(void *thread_data_v)
return NULL;
}
-static ImBuf *seq_render_effect_execute_threaded(struct SeqEffectHandle *sh, SeqRenderData context, Sequence *seq,
+static ImBuf *seq_render_effect_execute_threaded(struct SeqEffectHandle *sh, const SeqRenderData *context, Sequence *seq,
float cfra, float facf0, float facf1,
ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
{
@@ -2184,8 +2185,9 @@ static ImBuf *seq_render_effect_execute_threaded(struct SeqEffectHandle *sh, Seq
return out;
}
-static ImBuf *seq_render_effect_strip_impl(SeqRenderData context, Sequence *seq, float cfra)
+static ImBuf *seq_render_effect_strip_impl(const SeqRenderData *context, Sequence *seq, float cfra)
{
+ Scene *scene = context->scene;
float fac, facf;
int early_out;
int i;
@@ -2201,21 +2203,21 @@ static ImBuf *seq_render_effect_strip_impl(SeqRenderData context, Sequence *seq,
if (!sh.execute && !(sh.execute_slice && sh.init_execution)) {
/* effect not supported in this version... */
- out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
+ out = IMB_allocImBuf(context->rectx, context->recty, 32, IB_rect);
return out;
}
if (seq->flag & SEQ_USE_EFFECT_DEFAULT_FADE) {
sh.get_default_fac(seq, cfra, &fac, &facf);
- if ((context.scene->r.mode & R_FIELDS) == 0)
+ if ((scene->r.mode & R_FIELDS) == 0)
facf = fac;
}
else {
- fcu = id_data_find_fcurve(&context.scene->id, seq, &RNA_Sequence, "effect_fader", 0, NULL);
+ fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "effect_fader", 0, NULL);
if (fcu) {
fac = facf = evaluate_fcurve(fcu, cfra);
- if (context.scene->r.mode & R_FIELDS) {
+ if (scene->r.mode & R_FIELDS) {
facf = evaluate_fcurve(fcu, cfra + 0.5f);
}
}
@@ -2278,13 +2280,13 @@ static ImBuf *seq_render_effect_strip_impl(SeqRenderData context, Sequence *seq,
}
if (out == NULL) {
- out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
+ out = IMB_allocImBuf(context->rectx, context->recty, 32, IB_rect);
}
return out;
}
-static ImBuf *seq_render_movieclip_strip(SeqRenderData context, Sequence *seq, float nr)
+static ImBuf *seq_render_movieclip_strip(const SeqRenderData *context, Sequence *seq, float nr)
{
ImBuf *ibuf = NULL;
MovieClipUser user;
@@ -2300,7 +2302,7 @@ static ImBuf *seq_render_movieclip_strip(SeqRenderData context, Sequence *seq, f
user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL;
- switch (seq_rendersize_to_proxysize(context.preview_render_size)) {
+ switch (seq_rendersize_to_proxysize(context->preview_render_size)) {
case IMB_PROXY_NONE:
user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL;
break;
@@ -2333,7 +2335,7 @@ static ImBuf *seq_render_movieclip_strip(SeqRenderData context, Sequence *seq, f
}
-static ImBuf *seq_render_mask(SeqRenderData context, Mask *mask, float nr, short make_float)
+static ImBuf *seq_render_mask(const SeqRenderData *context, Mask *mask, float nr, short make_float)
{
/* TODO - add option to rasterize to alpha imbuf? */
ImBuf *ibuf = NULL;
@@ -2351,16 +2353,16 @@ static ImBuf *seq_render_mask(SeqRenderData context, Mask *mask, float nr, short
BKE_mask_evaluate(mask_temp, mask->sfra + nr, true);
- maskbuf = MEM_mallocN(sizeof(float) * context.rectx * context.recty, __func__);
+ maskbuf = MEM_mallocN(sizeof(float) * context->rectx * context->recty, __func__);
mr_handle = BKE_maskrasterize_handle_new();
- BKE_maskrasterize_handle_init(mr_handle, mask_temp, context.rectx, context.recty, TRUE, TRUE, TRUE);
+ BKE_maskrasterize_handle_init(mr_handle, mask_temp, context->rectx, context->recty, TRUE, TRUE, TRUE);
BKE_mask_free_nolib(mask_temp);
MEM_freeN(mask_temp);
- BKE_maskrasterize_buffer(mr_handle, context.rectx, context.recty, maskbuf);
+ BKE_maskrasterize_buffer(mr_handle, context->rectx, context->recty, maskbuf);
BKE_maskrasterize_handle_free(mr_handle);
}
@@ -2371,11 +2373,11 @@ static ImBuf *seq_render_mask(SeqRenderData context, Mask *mask, float nr, short
float *fp_src;
float *fp_dst;
- ibuf = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rectfloat);
+ ibuf = IMB_allocImBuf(context->rectx, context->recty, 32, IB_rectfloat);
fp_src = maskbuf;
fp_dst = ibuf->rect_float;
- i = context.rectx * context.recty;
+ i = context->rectx * context->recty;
while (--i) {
fp_dst[0] = fp_dst[1] = fp_dst[2] = *fp_src;
fp_dst[3] = 1.0f;
@@ -2389,11 +2391,11 @@ static ImBuf *seq_render_mask(SeqRenderData context, Mask *mask, float nr, short
float *fp_src;
unsigned char *ub_dst;
- ibuf = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
+ ibuf = IMB_allocImBuf(context->rectx, context->recty, 32, IB_rect);
fp_src = maskbuf;
ub_dst = (unsigned char *)ibuf->rect;
- i = context.rectx * context.recty;
+ i = context->rectx * context->recty;
while (--i) {
ub_dst[0] = ub_dst[1] = ub_dst[2] = (unsigned char)(*fp_src * 255.0f); /* already clamped */
ub_dst[3] = 255;
@@ -2408,14 +2410,14 @@ static ImBuf *seq_render_mask(SeqRenderData context, Mask *mask, float nr, short
return ibuf;
}
-static ImBuf *seq_render_mask_strip(SeqRenderData context, Sequence *seq, float nr)
+static ImBuf *seq_render_mask_strip(const SeqRenderData *context, Sequence *seq, float nr)
{
short make_float = seq->flag & SEQ_MAKE_FLOAT;
return seq_render_mask(context, seq->mask, nr, make_float);
}
-static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float nr)
+static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq, float nr)
{
ImBuf *ibuf = NULL;
float frame;
@@ -2457,8 +2459,8 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
const short is_rendering = G.is_rendering;
const short is_background = G.background;
const int do_seq_gl = is_rendering ?
- 0 /* (context.scene->r.seq_flag & R_SEQ_GL_REND) */ :
- (context.scene->r.seq_flag & R_SEQ_GL_PREV);
+ 0 /* (context->scene->r.seq_flag & R_SEQ_GL_REND) */ :
+ (context->scene->r.seq_flag & R_SEQ_GL_PREV);
int do_seq;
// int have_seq = FALSE; /* UNUSED */
int have_comp = FALSE;
@@ -2493,7 +2495,7 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
}
/* prevent eternal loop */
- do_seq = context.scene->r.scemode & R_DOSEQ;
+ do_seq = context->scene->r.scemode & R_DOSEQ;
scene->r.scemode &= ~R_DOSEQ;
#ifdef DURIAN_CAMERA_SWITCH
@@ -2508,13 +2510,13 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
char err_out[256] = "unknown";
/* for old scened this can be uninitialized,
* should probably be added to do_versions at some point if the functionality stays */
- if (context.scene->r.seq_prev_type == 0)
- context.scene->r.seq_prev_type = 3 /* == OB_SOLID */;
+ if (context->scene->r.seq_prev_type == 0)
+ context->scene->r.seq_prev_type = 3 /* == OB_SOLID */;
/* opengl offscreen render */
- BKE_scene_update_for_newframe(context.eval_ctx, context.bmain, scene, scene->lay);
- ibuf = sequencer_view3d_cb(scene, camera, context.rectx, context.recty, IB_rect,
- context.scene->r.seq_prev_type, context.scene->r.seq_flag & R_SEQ_SOLID_TEX,
+ BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene, scene->lay);
+ ibuf = sequencer_view3d_cb(scene, camera, context->rectx, context->recty, IB_rect,
+ context->scene->r.seq_prev_type, context->scene->r.seq_flag & R_SEQ_SOLID_TEX,
TRUE, scene->r.alphamode, err_out);
if (ibuf == NULL) {
fprintf(stderr, "seq_render_scene_strip failed to get opengl buffer: %s\n", err_out);
@@ -2536,8 +2538,8 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
if (re == NULL)
re = RE_NewRender(scene->id.name);
- BKE_scene_update_for_newframe(context.eval_ctx, context.bmain, scene, scene->lay);
- RE_BlenderFrame(re, context.bmain, scene, NULL, camera, scene->lay, frame, FALSE);
+ BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene, scene->lay);
+ RE_BlenderFrame(re, context->bmain, scene, NULL, camera, scene->lay, frame, FALSE);
/* restore previous state after it was toggled on & off by RE_BlenderFrame */
G.is_rendering = is_rendering;
@@ -2554,7 +2556,7 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
}
/* float buffers in the sequencer are not linear */
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf, FALSE);
+ BKE_sequencer_imbuf_to_sequencer_space(context->scene, ibuf, FALSE);
}
else if (rres.rect32) {
ibuf = IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rect);
@@ -2572,7 +2574,7 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
scene->r.cfra = oldcfra;
if (frame != oldcfra) {
- BKE_scene_update_for_newframe(context.eval_ctx, context.bmain, scene, scene->lay);
+ BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene, scene->lay);
}
#ifdef DURIAN_CAMERA_SWITCH
@@ -2583,7 +2585,7 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
return ibuf;
}
-static ImBuf *do_render_strip_uncached(SeqRenderData context, Sequence *seq, float cfra)
+static ImBuf *do_render_strip_uncached(const SeqRenderData *context, Sequence *seq, float cfra)
{
ImBuf *ibuf = NULL;
float nr = give_stripelem_index(seq, cfra);
@@ -2620,7 +2622,7 @@ static ImBuf *do_render_strip_uncached(SeqRenderData context, Sequence *seq, flo
float f_cfra;
SpeedControlVars *s = (SpeedControlVars *)seq->effectdata;
- BKE_sequence_effect_speed_rebuild_map(context.scene, seq, 0);
+ BKE_sequence_effect_speed_rebuild_map(context->scene, seq, 0);
/* weeek! */
f_cfra = seq->start + s->frameMap[(int)nr];
@@ -2666,7 +2668,7 @@ static ImBuf *do_render_strip_uncached(SeqRenderData context, Sequence *seq, flo
imb_freerectImBuf(ibuf);
/* all sequencer color is done in SRGB space, linear gives odd crossfades */
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf, FALSE);
+ BKE_sequencer_imbuf_to_sequencer_space(context->scene, ibuf, FALSE);
copy_to_ibuf_still(context, seq, nr, ibuf);
@@ -2685,10 +2687,10 @@ static ImBuf *do_render_strip_uncached(SeqRenderData context, Sequence *seq, flo
ibuf = IMB_anim_absolute(seq->anim, nr + seq->anim_startofs,
seq->strip->proxy ? seq->strip->proxy->tc : IMB_TC_RECORD_RUN,
- seq_rendersize_to_proxysize(context.preview_render_size));
+ seq_rendersize_to_proxysize(context->preview_render_size));
if (ibuf) {
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf, FALSE);
+ BKE_sequencer_imbuf_to_sequencer_space(context->scene, ibuf, FALSE);
/* we don't need both (speed reasons)! */
if (ibuf->rect_float && ibuf->rect) {
@@ -2709,7 +2711,7 @@ static ImBuf *do_render_strip_uncached(SeqRenderData context, Sequence *seq, flo
ibuf = seq_render_scene_strip(context, seq, nr);
/* Scene strips update all animation, so we need to restore original state.*/
- BKE_animsys_evaluate_all_animation(context.bmain, context.scene, cfra);
+ BKE_animsys_evaluate_all_animation(context->bmain, context->scene, cfra);
copy_to_ibuf_still(context, seq, nr, ibuf);
break;
@@ -2726,7 +2728,7 @@ static ImBuf *do_render_strip_uncached(SeqRenderData context, Sequence *seq, flo
ibuf = i;
if (ibuf->rect_float)
- BKE_sequencer_imbuf_to_sequencer_space(context.scene, ibuf, FALSE);
+ BKE_sequencer_imbuf_to_sequencer_space(context->scene, ibuf, FALSE);
copy_to_ibuf_still(context, seq, nr, ibuf);
}
@@ -2745,12 +2747,12 @@ static ImBuf *do_render_strip_uncached(SeqRenderData context, Sequence *seq, flo
}
if (ibuf)
- sequencer_imbuf_assign_spaces(context.scene, ibuf);
+ sequencer_imbuf_assign_spaces(context->scene, ibuf);
return ibuf;
}
-static ImBuf *seq_render_strip(SeqRenderData context, Sequence *seq, float cfra)
+static ImBuf *seq_render_strip(const SeqRenderData *context, Sequence *seq, float cfra)
{
ImBuf *ibuf = NULL;
int use_preprocess = FALSE;
@@ -2795,11 +2797,11 @@ static ImBuf *seq_render_strip(SeqRenderData context, Sequence *seq, float cfra)
}
if (ibuf == NULL) {
- ibuf = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
- sequencer_imbuf_assign_spaces(context.scene, ibuf);
+ ibuf = IMB_allocImBuf(context->rectx, context->recty, 32, IB_rect);
+ sequencer_imbuf_assign_spaces(context->scene, ibuf);
}
- if (ibuf->x != context.rectx || ibuf->y != context.recty)
+ if (ibuf->x != context->rectx || ibuf->y != context->recty)
use_preprocess = TRUE;
if (use_preprocess)
@@ -2847,7 +2849,7 @@ static int seq_get_early_out_for_blend_mode(Sequence *seq)
return early_out;
}
-static ImBuf *seq_render_strip_stack(SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown)
+static ImBuf *seq_render_strip_stack(const SeqRenderData *context, ListBase *seqbasep, float cfra, int chanshown)
{
Sequence *seq_arr[MAXSEQ + 1];
int count;
@@ -2905,7 +2907,7 @@ static ImBuf *seq_render_strip_stack(SeqRenderData context, ListBase *seqbasep,
break;
case EARLY_USE_INPUT_1:
if (i == 0) {
- out = IMB_allocImBuf(context.rectx, context.recty, 32, IB_rect);
+ out = IMB_allocImBuf(context->rectx, context->recty, 32, IB_rect);
}
break;
case EARLY_DO_EFFECT:
@@ -2963,9 +2965,9 @@ static ImBuf *seq_render_strip_stack(SeqRenderData context, ListBase *seqbasep,
* you have to free after usage!
*/
-ImBuf *BKE_sequencer_give_ibuf(SeqRenderData context, float cfra, int chanshown)
+ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int chanshown)
{
- Editing *ed = BKE_sequencer_editing_get(context.scene, FALSE);
+ Editing *ed = BKE_sequencer_editing_get(context->scene, FALSE);
int count;
ListBase *seqbasep;
@@ -2983,13 +2985,13 @@ ImBuf *BKE_sequencer_give_ibuf(SeqRenderData context, float cfra, int chanshown)
return seq_render_strip_stack(context, seqbasep, cfra, chanshown);
}
-ImBuf *BKE_sequencer_give_ibuf_seqbase(SeqRenderData context, float cfra, int chanshown, ListBase *seqbasep)
+ImBuf *BKE_sequencer_give_ibuf_seqbase(const SeqRenderData *context, float cfra, int chanshown, ListBase *seqbasep)
{
return seq_render_strip_stack(context, seqbasep, cfra, chanshown);
}
-ImBuf *BKE_sequencer_give_ibuf_direct(SeqRenderData context, float cfra, Sequence *seq)
+ImBuf *BKE_sequencer_give_ibuf_direct(const SeqRenderData *context, float cfra, Sequence *seq)
{
return seq_render_strip(context, seq, cfra);
}
@@ -3038,7 +3040,7 @@ typedef struct PrefetchQueueElem {
ImBuf *ibuf;
} PrefetchQueueElem;
-void BKE_sequencer_give_ibuf_prefetch_request(SeqRenderData context, float cfra, int chanshown)
+void BKE_sequencer_give_ibuf_prefetch_request(const SeqRenderData *context, float cfra, int chanshown)
{
PrefetchQueueElem *e;
if (seq_thread_shutdown) {
@@ -3046,11 +3048,11 @@ void BKE_sequencer_give_ibuf_prefetch_request(SeqRenderData context, float cfra,
}
e = MEM_callocN(sizeof(PrefetchQueueElem), "prefetch_queue_elem");
- e->rectx = context.rectx;
- e->recty = context.recty;
+ e->rectx = context->rectx;
+ e->recty = context->recty;
e->cfra = cfra;
e->chanshown = chanshown;
- e->preview_render_size = context.preview_render_size;
+ e->preview_render_size = context->preview_render_size;
e->monoton_cfra = monoton_cfra++;
pthread_mutex_lock(&queue_lock);
@@ -3062,7 +3064,7 @@ void BKE_sequencer_give_ibuf_prefetch_request(SeqRenderData context, float cfra,
pthread_mutex_unlock(&wakeup_lock);
}
-ImBuf *BKE_sequencer_give_ibuf_threaded(SeqRenderData context, float cfra, int chanshown)
+ImBuf *BKE_sequencer_give_ibuf_threaded(const SeqRenderData *context, float cfra, int chanshown)
{
PrefetchQueueElem *e = NULL;
int found_something = FALSE;
@@ -3078,9 +3080,9 @@ ImBuf *BKE_sequencer_give_ibuf_threaded(SeqRenderData context, float cfra, int c
for (e = prefetch_done.first; e; e = e->next) {
if (cfra == e->cfra &&
chanshown == e->chanshown &&
- context.rectx == e->rectx &&
- context.recty == e->recty &&
- context.preview_render_size == e->preview_render_size)
+ context->rectx == e->rectx &&
+ context->recty == e->recty &&
+ context->preview_render_size == e->preview_render_size)
{
success = TRUE;
found_something = TRUE;
@@ -3092,9 +3094,9 @@ ImBuf *BKE_sequencer_give_ibuf_threaded(SeqRenderData context, float cfra, int c
for (e = prefetch_wait.first; e; e = e->next) {
if (cfra == e->cfra &&
chanshown == e->chanshown &&
- context.rectx == e->rectx &&
- context.recty == e->recty &&
- context.preview_render_size == e->preview_render_size)
+ context->rectx == e->rectx &&
+ context->recty == e->recty &&
+ context->preview_render_size == e->preview_render_size)
{
found_something = TRUE;
break;
@@ -3112,9 +3114,9 @@ ImBuf *BKE_sequencer_give_ibuf_threaded(SeqRenderData context, float cfra, int c
if (tslot->current &&
cfra == tslot->current->cfra &&
chanshown == tslot->current->chanshown &&
- context.rectx == tslot->current->rectx &&
- context.recty == tslot->current->recty &&
- context.preview_render_size == tslot->current->preview_render_size)
+ context->rectx == tslot->current->rectx &&
+ context->recty == tslot->current->recty &&
+ context->preview_render_size == tslot->current->preview_render_size)
{
found_something = TRUE;
break;
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 1fe8f1d475c..6ad7e8aaf5a 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -152,7 +152,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
context = BKE_sequencer_new_render_data(oglrender->bmain->eval_ctx, oglrender->bmain,
scene, oglrender->sizex, oglrender->sizey, 100.0f);
- ibuf = BKE_sequencer_give_ibuf(context, CFRA, chanshown);
+ ibuf = BKE_sequencer_give_ibuf(&context, CFRA, chanshown);
if (ibuf) {
ImBuf *linear_ibuf;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 6142814fd3d..42f7e1b45b2 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -846,11 +846,11 @@ ImBuf *sequencer_ibuf_get(struct Main *bmain, Scene *scene, SpaceSeq *sseq, int
G.is_break = FALSE;
if (special_seq_update)
- ibuf = BKE_sequencer_give_ibuf_direct(context, cfra + frame_ofs, special_seq_update);
+ ibuf = BKE_sequencer_give_ibuf_direct(&context, cfra + frame_ofs, special_seq_update);
else if (!U.prefetchframes) // XXX || (G.f & G_PLAYANIM) == 0) {
- ibuf = BKE_sequencer_give_ibuf(context, cfra + frame_ofs, sseq->chanshown);
+ ibuf = BKE_sequencer_give_ibuf(&context, cfra + frame_ofs, sseq->chanshown);
else
- ibuf = BKE_sequencer_give_ibuf_threaded(context, cfra + frame_ofs, sseq->chanshown);
+ ibuf = BKE_sequencer_give_ibuf_threaded(&context, cfra + frame_ofs, sseq->chanshown);
/* restore state so real rendering would be canceled (if needed) */
G.is_break = is_break;
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 01d02808def..5df923c4ac7 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2214,7 +2214,7 @@ static void do_render_seq(Render *re)
re->result->rectx, re->result->recty, 100);
}
- out = BKE_sequencer_give_ibuf(context, cfra, 0);
+ out = BKE_sequencer_give_ibuf(&context, cfra, 0);
if (out) {
ibuf = IMB_dupImBuf(out);