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:
authorPeter Schlaile <peter@schlaile.de>2009-06-14 14:59:54 +0400
committerPeter Schlaile <peter@schlaile.de>2009-06-14 14:59:54 +0400
commit36e96e5b6e497926a6d7bbb215577bd3bf7bbee0 (patch)
tree1f2d69ee07f276a42a09a9bd05869d47d360ddc6 /source/blender
parent7aeadf2baa89aef3775fdf47efde77b76ec601a9 (diff)
== Sequencer ==
This fixes: * free_imbuf_seq() didn't free all scenes. That will lead to steady memory growth in case of nested timelines with several scenes. * sequencer panels were always jumping around, depending on strip type, which was caused by choosing always the same panel position and the silly limitation, that * effect strips had no filter option, which was therefore added. So you can apply color balance on effect filter output now :)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/src/buttons_scene.c14
-rw-r--r--source/blender/src/sequence.c45
2 files changed, 47 insertions, 12 deletions
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c
index 7c361b6113d..532ecad249f 100644
--- a/source/blender/src/buttons_scene.c
+++ b/source/blender/src/buttons_scene.c
@@ -570,7 +570,7 @@ static void seq_panel_editing()
UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Edit", "Sequencer",
- 10, 230, 318, 204) == 0) return;
+ 0, 0, 318, 204) == 0) return;
uiDefBut(block, LABEL,
0, give_seqname(last_seq),
@@ -754,7 +754,7 @@ static void seq_panel_input()
UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Input", "Sequencer",
- 10, 230, 318, 204) == 0) return;
+ 320, 0, 318, 204) == 0) return;
if (SEQ_HAS_PATH(last_seq)) {
uiDefBut(block, TEX,
@@ -897,7 +897,7 @@ static void seq_panel_filter_video()
UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Filter", "Sequencer",
- 10, 230, 318, 204) == 0) return;
+ 640, 0, 318, 204) == 0) return;
uiBlockBeginAlign(block);
@@ -1024,7 +1024,7 @@ static void seq_panel_filter_audio()
UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Filter", "Sequencer",
- 10, 230, 318, 204) == 0) return;
+ 640, 0, 318, 204) == 0) return;
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_SEQ_BUT_RELOAD, "Gain (dB):", 10,50,150,19, &last_seq->level, -96.0, 6.0, 100, 0, "");
@@ -1040,7 +1040,7 @@ static void seq_panel_effect()
UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Effect", "Sequencer",
- 10, 230, 318, 204) == 0) return;
+ 320, 0, 318, 204) == 0) return;
if(last_seq->type == SEQ_PLUGIN) {
PluginSeq *pis;
@@ -1168,7 +1168,7 @@ static void seq_panel_proxy()
UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Proxy", "Sequencer",
- 10, 230, 318, 204) == 0) return;
+ 960, 0, 318, 204) == 0) return;
uiBlockBeginAlign(block);
@@ -1276,7 +1276,7 @@ void sequencer_panels()
}
if (type == SEQ_PLUGIN || type >= SEQ_EFFECT) {
- panels |= SEQ_PANEL_EFFECT | SEQ_PANEL_PROXY;
+ panels |= SEQ_PANEL_EFFECT | SEQ_PANEL_FILTER| SEQ_PANEL_PROXY;
}
if (panels & SEQ_PANEL_EDITING) {
diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c
index cf2b28c6d72..44661b5fa91 100644
--- a/source/blender/src/sequence.c
+++ b/source/blender/src/sequence.c
@@ -1480,7 +1480,8 @@ static int input_have_to_preprocess(Sequence * seq, TStripElem* se, int cfra)
mul = seq->mul;
- if(seq->blend_mode == SEQ_BLEND_REPLACE) {
+ if(seq->blend_mode == SEQ_BLEND_REPLACE &&
+ !(seq->type & SEQ_EFFECT)) {
if (seq->ipo && seq->ipo->curve.first) {
do_seq_ipo(seq, cfra);
mul *= seq->facf0;
@@ -1568,7 +1569,8 @@ static void input_preprocess(Sequence * seq, TStripElem* se, int cfra)
mul = seq->mul;
- if(seq->blend_mode == SEQ_BLEND_REPLACE) {
+ if(seq->blend_mode == SEQ_BLEND_REPLACE &&
+ !(seq->type & SEQ_EFFECT)) {
if (seq->ipo && seq->ipo->curve.first) {
do_seq_ipo(seq, cfra);
mul *= seq->facf0;
@@ -1822,10 +1824,14 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
input_preprocess(seq, se, cfra);
}
} else if(seq->type & SEQ_EFFECT) {
+ int use_preprocess = FALSE;
/* should the effect be recalculated? */
if (!build_proxy_run && se->ibuf == 0) {
se->ibuf = seq_proxy_fetch(seq, cfra, render_size);
+ if (se->ibuf) {
+ use_preprocess = TRUE;
+ }
}
if(se->ibuf == 0) {
@@ -1838,6 +1844,22 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rect, 0);
do_effect(cfra, seq, se);
+ if (input_have_to_preprocess(seq, se, cfra) &&
+ !build_proxy_run) {
+ if ((se->se1 && (se->ibuf == se->se1->ibuf)) ||
+ (se->se2 && (se->ibuf == se->se2->ibuf))) {
+ struct ImBuf * i
+ = IMB_dupImBuf(se->ibuf);
+
+ IMB_freeImBuf(se->ibuf);
+
+ se->ibuf = i;
+ }
+ use_preprocess = TRUE;
+ }
+ }
+ if (use_preprocess) {
+ input_preprocess(seq, se, cfra);
}
} else if(seq->type == SEQ_IMAGE) {
if(se->ok == STRIPELEM_OK && se->ibuf == 0) {
@@ -2946,9 +2968,8 @@ void free_imbuf_seq_except(int cfra)
END_SEQ
}
-void free_imbuf_seq()
+static void free_imbuf_seq_editing(Editing * ed)
{
- Editing *ed= G.scene->ed;
Sequence *seq;
TStripElem *se;
int a;
@@ -2990,6 +3011,15 @@ void free_imbuf_seq()
END_SEQ
}
+void free_imbuf_seq()
+{
+ Scene * sce = G.main->scene.first;
+ while(sce) {
+ free_imbuf_seq_editing(sce->ed);
+ sce= sce->id.next;
+ }
+}
+
void free_imbuf_seq_with_ipo(struct Ipo *ipo)
{
/* force update of all sequences with this ipo, on ipo changes */
@@ -3074,12 +3104,17 @@ void update_changed_seq_and_deps(Sequence *changed_seq, int len_change, int ibuf
/* bad levell call... */
void do_render_seq(RenderResult *rr, int cfra)
{
+ static int recurs_depth = 0;
ImBuf *ibuf;
G.f |= G_PLAYANIM; /* waitcursor patch */
+ recurs_depth++;
+
ibuf= give_ibuf_seq(rr->rectx, rr->recty, cfra, 0, G.scene->r.size);
+ recurs_depth--;
+
if(ibuf) {
if(ibuf->rect_float) {
if (!rr->rectf)
@@ -3115,7 +3150,7 @@ void do_render_seq(RenderResult *rr, int cfra)
on freeing _all_ buffers every time on long timelines...)
(schlaile)
*/
- {
+ if (recurs_depth == 0) { /* with nested scenes, only free on toplevel... */
uintptr_t mem_in_use;
uintptr_t mmap_in_use;
uintptr_t max;