forked from bartvdbraak/blender
== 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 :)
This commit is contained in:
parent
7aeadf2baa
commit
36e96e5b6e
@ -570,7 +570,7 @@ static void seq_panel_editing()
|
|||||||
UI_EMBOSS, UI_HELV, curarea->win);
|
UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
if(uiNewPanel(curarea, block, "Edit", "Sequencer",
|
if(uiNewPanel(curarea, block, "Edit", "Sequencer",
|
||||||
10, 230, 318, 204) == 0) return;
|
0, 0, 318, 204) == 0) return;
|
||||||
|
|
||||||
uiDefBut(block, LABEL,
|
uiDefBut(block, LABEL,
|
||||||
0, give_seqname(last_seq),
|
0, give_seqname(last_seq),
|
||||||
@ -754,7 +754,7 @@ static void seq_panel_input()
|
|||||||
UI_EMBOSS, UI_HELV, curarea->win);
|
UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
if(uiNewPanel(curarea, block, "Input", "Sequencer",
|
if(uiNewPanel(curarea, block, "Input", "Sequencer",
|
||||||
10, 230, 318, 204) == 0) return;
|
320, 0, 318, 204) == 0) return;
|
||||||
|
|
||||||
if (SEQ_HAS_PATH(last_seq)) {
|
if (SEQ_HAS_PATH(last_seq)) {
|
||||||
uiDefBut(block, TEX,
|
uiDefBut(block, TEX,
|
||||||
@ -897,7 +897,7 @@ static void seq_panel_filter_video()
|
|||||||
UI_EMBOSS, UI_HELV, curarea->win);
|
UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
if(uiNewPanel(curarea, block, "Filter", "Sequencer",
|
if(uiNewPanel(curarea, block, "Filter", "Sequencer",
|
||||||
10, 230, 318, 204) == 0) return;
|
640, 0, 318, 204) == 0) return;
|
||||||
|
|
||||||
|
|
||||||
uiBlockBeginAlign(block);
|
uiBlockBeginAlign(block);
|
||||||
@ -1024,7 +1024,7 @@ static void seq_panel_filter_audio()
|
|||||||
UI_EMBOSS, UI_HELV, curarea->win);
|
UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
if(uiNewPanel(curarea, block, "Filter", "Sequencer",
|
if(uiNewPanel(curarea, block, "Filter", "Sequencer",
|
||||||
10, 230, 318, 204) == 0) return;
|
640, 0, 318, 204) == 0) return;
|
||||||
|
|
||||||
uiBlockBeginAlign(block);
|
uiBlockBeginAlign(block);
|
||||||
uiDefButF(block, NUM, B_SEQ_BUT_RELOAD, "Gain (dB):", 10,50,150,19, &last_seq->level, -96.0, 6.0, 100, 0, "");
|
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);
|
UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
if(uiNewPanel(curarea, block, "Effect", "Sequencer",
|
if(uiNewPanel(curarea, block, "Effect", "Sequencer",
|
||||||
10, 230, 318, 204) == 0) return;
|
320, 0, 318, 204) == 0) return;
|
||||||
|
|
||||||
if(last_seq->type == SEQ_PLUGIN) {
|
if(last_seq->type == SEQ_PLUGIN) {
|
||||||
PluginSeq *pis;
|
PluginSeq *pis;
|
||||||
@ -1168,7 +1168,7 @@ static void seq_panel_proxy()
|
|||||||
UI_EMBOSS, UI_HELV, curarea->win);
|
UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
if(uiNewPanel(curarea, block, "Proxy", "Sequencer",
|
if(uiNewPanel(curarea, block, "Proxy", "Sequencer",
|
||||||
10, 230, 318, 204) == 0) return;
|
960, 0, 318, 204) == 0) return;
|
||||||
|
|
||||||
uiBlockBeginAlign(block);
|
uiBlockBeginAlign(block);
|
||||||
|
|
||||||
@ -1276,7 +1276,7 @@ void sequencer_panels()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type == SEQ_PLUGIN || type >= SEQ_EFFECT) {
|
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) {
|
if (panels & SEQ_PANEL_EDITING) {
|
||||||
|
@ -1480,7 +1480,8 @@ static int input_have_to_preprocess(Sequence * seq, TStripElem* se, int cfra)
|
|||||||
|
|
||||||
mul = seq->mul;
|
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) {
|
if (seq->ipo && seq->ipo->curve.first) {
|
||||||
do_seq_ipo(seq, cfra);
|
do_seq_ipo(seq, cfra);
|
||||||
mul *= seq->facf0;
|
mul *= seq->facf0;
|
||||||
@ -1568,7 +1569,8 @@ static void input_preprocess(Sequence * seq, TStripElem* se, int cfra)
|
|||||||
|
|
||||||
mul = seq->mul;
|
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) {
|
if (seq->ipo && seq->ipo->curve.first) {
|
||||||
do_seq_ipo(seq, cfra);
|
do_seq_ipo(seq, cfra);
|
||||||
mul *= seq->facf0;
|
mul *= seq->facf0;
|
||||||
@ -1822,10 +1824,14 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
|
|||||||
input_preprocess(seq, se, cfra);
|
input_preprocess(seq, se, cfra);
|
||||||
}
|
}
|
||||||
} else if(seq->type & SEQ_EFFECT) {
|
} else if(seq->type & SEQ_EFFECT) {
|
||||||
|
int use_preprocess = FALSE;
|
||||||
/* should the effect be recalculated? */
|
/* should the effect be recalculated? */
|
||||||
|
|
||||||
if (!build_proxy_run && se->ibuf == 0) {
|
if (!build_proxy_run && se->ibuf == 0) {
|
||||||
se->ibuf = seq_proxy_fetch(seq, cfra, render_size);
|
se->ibuf = seq_proxy_fetch(seq, cfra, render_size);
|
||||||
|
if (se->ibuf) {
|
||||||
|
use_preprocess = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(se->ibuf == 0) {
|
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);
|
se->ibuf= IMB_allocImBuf((short)seqrectx, (short)seqrecty, 32, IB_rect, 0);
|
||||||
|
|
||||||
do_effect(cfra, seq, se);
|
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) {
|
} else if(seq->type == SEQ_IMAGE) {
|
||||||
if(se->ok == STRIPELEM_OK && se->ibuf == 0) {
|
if(se->ok == STRIPELEM_OK && se->ibuf == 0) {
|
||||||
@ -2946,9 +2968,8 @@ void free_imbuf_seq_except(int cfra)
|
|||||||
END_SEQ
|
END_SEQ
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_imbuf_seq()
|
static void free_imbuf_seq_editing(Editing * ed)
|
||||||
{
|
{
|
||||||
Editing *ed= G.scene->ed;
|
|
||||||
Sequence *seq;
|
Sequence *seq;
|
||||||
TStripElem *se;
|
TStripElem *se;
|
||||||
int a;
|
int a;
|
||||||
@ -2990,6 +3011,15 @@ void free_imbuf_seq()
|
|||||||
END_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)
|
void free_imbuf_seq_with_ipo(struct Ipo *ipo)
|
||||||
{
|
{
|
||||||
/* force update of all sequences with this ipo, on ipo changes */
|
/* 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... */
|
/* bad levell call... */
|
||||||
void do_render_seq(RenderResult *rr, int cfra)
|
void do_render_seq(RenderResult *rr, int cfra)
|
||||||
{
|
{
|
||||||
|
static int recurs_depth = 0;
|
||||||
ImBuf *ibuf;
|
ImBuf *ibuf;
|
||||||
|
|
||||||
G.f |= G_PLAYANIM; /* waitcursor patch */
|
G.f |= G_PLAYANIM; /* waitcursor patch */
|
||||||
|
|
||||||
|
recurs_depth++;
|
||||||
|
|
||||||
ibuf= give_ibuf_seq(rr->rectx, rr->recty, cfra, 0, G.scene->r.size);
|
ibuf= give_ibuf_seq(rr->rectx, rr->recty, cfra, 0, G.scene->r.size);
|
||||||
|
|
||||||
|
recurs_depth--;
|
||||||
|
|
||||||
if(ibuf) {
|
if(ibuf) {
|
||||||
if(ibuf->rect_float) {
|
if(ibuf->rect_float) {
|
||||||
if (!rr->rectf)
|
if (!rr->rectf)
|
||||||
@ -3115,7 +3150,7 @@ void do_render_seq(RenderResult *rr, int cfra)
|
|||||||
on freeing _all_ buffers every time on long timelines...)
|
on freeing _all_ buffers every time on long timelines...)
|
||||||
(schlaile)
|
(schlaile)
|
||||||
*/
|
*/
|
||||||
{
|
if (recurs_depth == 0) { /* with nested scenes, only free on toplevel... */
|
||||||
uintptr_t mem_in_use;
|
uintptr_t mem_in_use;
|
||||||
uintptr_t mmap_in_use;
|
uintptr_t mmap_in_use;
|
||||||
uintptr_t max;
|
uintptr_t max;
|
||||||
|
Loading…
Reference in New Issue
Block a user