diff options
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 86cf04eded8..7b9262320af 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1467,8 +1467,8 @@ static void seq_proxy_build_frame(const SeqRenderData *context, Sequence *seq, i 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 * ibuf->x) / 100; + recty = (proxy_render_size * ibuf->y) / 100; if (ibuf->x != rectx || ibuf->y != recty) { IMB_scalefastImBuf(ibuf, (short)rectx, (short)recty); @@ -1562,6 +1562,7 @@ void BKE_sequencer_proxy_rebuild(SeqIndexBuildContext *context, short *stop, sho (scene->r.size * (float) scene->r.xsch) / 100.0f + 0.5f, (scene->r.size * (float) scene->r.ysch) / 100.0f + 0.5f, 100); render_context.skip_cache = true; + render_context.is_proxy_render = true; for (cfra = seq->startdisp + seq->startstill; cfra < seq->enddisp - seq->endstill; cfra++) { if (context->size_flags & IMB_PROXY_25) { @@ -1919,10 +1920,14 @@ void BKE_sequencer_color_balance_apply(StripColorBalance *cb, ImBuf *ibuf, float * - Premultiply */ -int BKE_sequencer_input_have_to_preprocess(const SeqRenderData *UNUSED(context), Sequence *seq, float UNUSED(cfra)) +int BKE_sequencer_input_have_to_preprocess(const SeqRenderData *context, Sequence *seq, float UNUSED(cfra)) { float mul; + if (context->is_proxy_render) { + return FALSE; + } + if (seq->flag & (SEQ_FILTERY | SEQ_USE_CROP | SEQ_USE_TRANSFORM | SEQ_FLIPX | SEQ_FLIPY | SEQ_MAKE_FLOAT)) { return TRUE; } @@ -2806,8 +2811,12 @@ static ImBuf *seq_render_strip(const SeqRenderData *context, Sequence *seq, floa if (ibuf == NULL) ibuf = do_render_strip_uncached(context, seq, cfra); - if (ibuf) + if (ibuf) { + if (ELEM(seq->type, SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP)) { + is_proxy_image = (context->preview_render_size != 100); + } BKE_sequencer_preprocessed_cache_put(context, seq, cfra, SEQ_STRIPELEM_IBUF, ibuf); + } } } @@ -2826,8 +2835,11 @@ static ImBuf *seq_render_strip(const SeqRenderData *context, Sequence *seq, floa sequencer_imbuf_assign_spaces(context->scene, ibuf); } - if (ibuf->x != context->rectx || ibuf->y != context->recty) + if (context->is_proxy_render == false && + (ibuf->x != context->rectx || ibuf->y != context->recty)) + { use_preprocess = TRUE; + } if (use_preprocess) ibuf = input_preprocess(context, seq, cfra, ibuf, is_proxy_image, is_preprocessed); @@ -4011,11 +4023,19 @@ void BKE_sequencer_offset_animdata(Scene *scene, Sequence *seq, int ofs) for (fcu = scene->adt->action->curves.first; fcu; fcu = fcu->next) { if (strstr(fcu->rna_path, "sequence_editor.sequences_all[") && strstr(fcu->rna_path, str)) { unsigned int i; - for (i = 0; i < fcu->totvert; i++) { - BezTriple *bezt = &fcu->bezt[i]; - bezt->vec[0][0] += ofs; - bezt->vec[1][0] += ofs; - bezt->vec[2][0] += ofs; + if (fcu->bezt) { + for (i = 0; i < fcu->totvert; i++) { + BezTriple *bezt = &fcu->bezt[i]; + bezt->vec[0][0] += ofs; + bezt->vec[1][0] += ofs; + bezt->vec[2][0] += ofs; + } + } + if (fcu->fpt) { + for (i = 0; i < fcu->totvert; i++) { + FPoint *fpt = &fcu->fpt[i]; + fpt->vec[0] += ofs; + } } } } |