WIP trying to translate some of the planned pull() process into code...

This commit is contained in:
Fischlurch 2008-06-14 04:19:58 +02:00
parent e8378485cc
commit eeb2d04dee
26 changed files with 155 additions and 660 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -1,34 +0,0 @@
/*
AFrame - buffer holding a Audio samples for the render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/engine/aframe.hpp"
namespace engine
{
/** */
} // namespace engine

View file

@ -1,41 +0,0 @@
/*
AFRAME.hpp - buffer holding a Audio samples for the render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ENGINE_AFRAME_H
#define ENGINE_AFRAME_H
#include "proc/frame.hpp"
namespace engine
{
class AFrame : public proc_interface::Frame
{};
} // namespace engine
#endif

View file

@ -1,34 +0,0 @@
/*
ARender - Representation of a Audio Render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/engine/arender.hpp"
namespace engine
{
/** */
} // namespace engine

View file

@ -1,44 +0,0 @@
/*
ARENDER.hpp - Representation of a Audio Render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ENGINE_ARENDER_H
#define ENGINE_ARENDER_H
#include "proc/stateproxy.hpp"
namespace engine
{
/**
* Representation of a Audio render process
*/
class ARender : public proc_interface::StateProxy
{};
} // namespace engine
#endif

View file

@ -1,33 +0,0 @@
/*
ExitNode - special Processing Node providing "pullable" output
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/engine/exitnode.hpp"
namespace engine
{
/** */
} // namespace engine

View file

@ -1,45 +0,0 @@
/*
EXITNODE.hpp - special Processing Node providing "pullable" output
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ENGINE_EXITNODE_H
#define ENGINE_EXITNODE_H
#include "proc/engine/procnode.hpp"
namespace engine
{
/**
* The output end of each render pipeline.
* Pulling from such exit nodes actually ivokes the render process
*/
class ExitNode : public ProcNode
{};
} // namespace engine
#endif

View file

@ -1,34 +0,0 @@
/*
GLBuf - a buffer and render process holding a Video frame for OpenGL rendering
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/engine/glbuf.hpp"
namespace engine
{
/** */
} // namespace engine

View file

@ -1,39 +0,0 @@
/*
GLBUF.hpp - a buffer and render process holding a Video frame for OpenGL rendering
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ENGINE_GLBUF_H
#define ENGINE_GLBUF_H
#include "proc/frame.hpp"
namespace engine
{
class GLBuf : public proc_interface::Frame
{};
} // namespace engine
#endif

View file

@ -1,33 +0,0 @@
/*
GLRender - Representation of a OpenGL accellerated Video render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/engine/glrender.hpp"
namespace engine
{
/** */
} // namespace engine

View file

@ -1,42 +0,0 @@
/*
GLRENDER.hpp - Representation of a OpenGL accellerated Video render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ENGINE_GLRENDER_H
#define ENGINE_GLRENDER_H
#include "proc/stateproxy.hpp"
namespace engine
{
/**
* Representation of a OpenGL accelerated Video render process
*/
class GLRender : public proc_interface::StateProxy
{};
} // namespace engine
#endif

View file

@ -22,8 +22,7 @@
#include "proc/engine/processor.hpp"
#include "proc/engine/exitnode.hpp"
#include "proc/stateproxy.hpp"
#include "proc/state.hpp"
namespace engine
{

View file

@ -25,7 +25,7 @@
#define ENGINE_PROCESSOR_H
#include "proc/lumiera.hpp"
#include "proc/stateproxy.hpp"
#include "proc/state.hpp"

View file

@ -26,6 +26,7 @@
#include <vector>
#include "proc/state.hpp"
#include "proc/mobject/parameter.hpp"
@ -34,25 +35,63 @@
namespace engine {
using std::vector;
using proc_interface::State;
class ProcNode;
class NodeFactory;
typedef ProcNode* PNode; ///< @todo handle ProcNode by pointer or by shared-ptr??
typedef ProcNode* PNode;
/**
* Description of the input and output ports and the
* predecessor nodes for a given ProcNode.
*/
struct WiringDescriptor
{
};
/**
* Adapter to shield the ProcNode from the actual buffer management,
* allowing the processing function within ProcNode to use logical
* buffer IDs. StateAdapter is created on the stack for each pull()
* call, using setup/wiring data preconfigured by the builder.
* Its job is to provide the actual implementation of the Cache
* push / fetch and recursive downcall to render the source frames.
*/
class StateAdapter
: public State
{
State& parent_;
State& current_;
protected:
StateAdapter (State& callingProcess, WiringDescriptor const&)
: parent_ (callingProcess),
current_(callingProcess.getCurrentImplementation())
{ }
friend class ProcNode; // both are sharing implementation details...
virtual State& getCurrentImplementation () { return current_; }
/** contains the details of Cache query and recursive calls
* to the predecessor node(s), eventually followed by the
* ProcNode::process() callback
*/
void retrieve();
};
/**
* Key abstraction of the Render Engine: A Data processing Node
*/
class ProcNode
{
typedef mobject::Parameter<double> Param;
/** The predecessor in a processing pipeline.
* I.e. a source to get data to be processed
*/
PNode datasrc;
typedef mobject::Parameter<double> Param; //////TODO: just a placeholder for automation as of 6/2008
vector<Param> params;
protected:
@ -62,20 +101,35 @@ namespace engine {
friend class NodeFactory;
/** do the actual calculations.
/** Callback doing the actual calculations
* after input / output buffers are ready
* @internal dispatch to implementation.
* Client code should use #render()
* @todo obviously we need a parameter!!!
* Client code should use #pull()
*/
virtual void process() = 0;
virtual void process(State&) = 0;
friend void StateAdapter::retrieve(); // to issue the process() callback if necessary
/** Extension point for subclasses to modify the input sources
* according to automation data and other state dependent properties.
*/
virtual WiringDescriptor const& getWiring (State&);
public:
static NodeFactory create;
/** render and pull output from this node.
* @todo define the parameter!!!
/** Engine Core operation: render and pull output from this node.
* On return, currentProcess will hold onto output buffer(s)
* containing the calculated result frames.
*/
void render() { this->process(); }
void
pull (State& currentProcess)
{
StateAdapter thisStep (currentProcess, getWiring (currentProcess));
thisStep.retrieve(); // fetch or calculate results
}
};

View file

@ -1,5 +1,5 @@
/*
StateProxy - Key Interface representing a render process and encapsulating state
StateProxy - Encapsulation of the state corresponding to a render calculation
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
@ -21,14 +21,12 @@
* *****************************************************/
#include "proc/stateproxy.hpp"
#include "proc/frame.hpp"
#include "proc/engine/stateproxy.hpp"
namespace proc_interface
{
namespace engine {
/** */
} // namespace proc_interface
} // namespace engine

View file

@ -1,5 +1,5 @@
/*
STATEPROXY.hpp - Key Interface representing a render process and encapsulating state
STATEPROXY.hpp - Encapsulation of the state corresponding to a render calculation
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
@ -21,25 +21,26 @@
*/
#ifndef PROC_INTERFACE_STATEPROXY_H
#define PROC_INTERFACE_STATEPROXY_H
#include "proc/frame.hpp"
#ifndef ENGINE_STATEPROXY_H
#define ENGINE_STATEPROXY_H
#include "proc/state.hpp"
namespace engine {
namespace proc_interface
{
class StateProxy
: public proc_interface::State
{
protected:
Frame * currFrame;
virtual State& getCurrentImplementation () { return *this; }
};
} // namespace proc_interface
} // namespace engine
#endif

View file

@ -1,33 +0,0 @@
/*
VFrame - a buffer holding a Video frame for the render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/engine/vframe.hpp"
namespace engine
{
/** */
} // namespace engine

View file

@ -1,41 +0,0 @@
/*
VFRAME.hpp - a buffer holding a Video frame for the render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ENGINE_VFRAME_H
#define ENGINE_VFRAME_H
#include "proc/frame.hpp"
namespace engine
{
class VFrame : public proc_interface::Frame
{
///////////////////////
};
} // namespace engine
#endif

View file

@ -1,33 +0,0 @@
/*
VRender - Representation of a Video render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/engine/vrender.hpp"
namespace engine
{
/** */
} // namespace engine

View file

@ -1,47 +0,0 @@
/*
VRENDER.hpp - Representation of a Video render process
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ENGINE_VRENDER_H
#define ENGINE_VRENDER_H
#include "proc/stateproxy.hpp"
namespace engine
{
/**
* Representation of a Video render process.
* (Encapsulates the video buffers for the actual calculations)
*/
class VRender : public proc_interface::StateProxy
{
/////////////
};
} // namespace engine
#endif

View file

@ -1,44 +0,0 @@
/*
RenderState - renderengine state manager
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "proc/mobject/controller/renderstate.hpp"
namespace mobject
{
namespace controller
{
StateProxy&
RenderState::getStateProxy ()
{
//////////////TODO
}
} // namespace mobject::controller
} // namespace mobject

View file

@ -24,7 +24,7 @@
#ifndef MOBJECT_CONTROLLER_RENDERSTATE_H
#define MOBJECT_CONTROLLER_RENDERSTATE_H
#include "proc/stateproxy.hpp"
#include "proc/state.hpp"
@ -33,7 +33,7 @@ namespace mobject
namespace controller
{
typedef proc_interface::StateProxy StateProxy;
typedef proc_interface::State State;
/**
@ -42,11 +42,12 @@ namespace mobject
* The provided StateProxy serves to hold any mutalbe state used
* in the render process, so the rest of the render engine
* can be stateless.
* @todo probably the state management will work different (6/08)
*/
class RenderState
{
public:
StateProxy& getStateProxy () ;
State& getRenderProcess () ;
};

View file

@ -1,5 +1,5 @@
/*
Frame - Key Abstraction: render process and buffer holding frame data.
State - Key Interface representing a render process and encapsulating state
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
@ -21,11 +21,12 @@
* *****************************************************/
#include "proc/frame.hpp"
#include "proc/state.hpp"
namespace proc_interface
{
////////////////////////////////TODO: State is a high -level interface, so can we get rid of this implementation file?
/** */

View file

@ -1,5 +1,5 @@
/*
FRAME.hpp - Key Abstraction: render process and buffer holding frame data.
STATE.hpp - Key Interface representing a render process and encapsulating state
Copyright (C) Lumiera.org
2008, Hermann Vosseler <Ichthyostega@web.de>
@ -21,23 +21,34 @@
*/
#ifndef PROC_INTERFACE_FRAME_H
#define PROC_INTERFACE_FRAME_H
#ifndef PROC_INTERFACE_STATE_H
#define PROC_INTERFACE_STATE_H
namespace engine { class StateAdapter; }
namespace proc_interface
{
/**
* TODO: how to relate to Cehteh's Frame entity in the Backend?
* The latter is the fundamental Frame entity, wheras this Object
* rather represents a buffer set containing frame date.
*/
class Frame
class State
{
/////////////////
protected:
virtual ~State() {};
/** resolves to the State object currently "in charge".
* Intended as a performance shortcut to avoid calling
* up through a chain of virtual functions when deep down
* in chained ProcNode::pull() calls. This allows derived
* classes to proxy the state inteface.
*/
virtual State& getCurrentImplementation () =0;
friend class engine::StateAdapter;
public:
};

View file

@ -2,58 +2,58 @@ format 40
classcanvas 128005 class_ref 131717 // ProcNode
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default
xyz 106 313 2004
xyz 103 405 2004
end
classcanvas 128517 class_ref 132741 // State
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default
xyz 79 -16 2000
xyz 77 18 2000
end
classcanvas 129669 class_ref 133253 // Frame
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default
xyz 267 221 3005
xyz 264 313 3005
end
classcanvas 131845 class_ref 142469 // StateProxy
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default
xyz 149 135 2000
xyz 146 227 2000
end
classcanvas 131973 class_ref 142597 // StateAdapter
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default
xyz 43 225 3010
xyz 40 317 3010
end
classcanvas 132357 class_ref 142725 // InputDescriptor
draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_infonote default shadow default
xyz 233 434 2000
xyz 230 526 2000
end
relationcanvas 129797 relation_ref 134533 // <unidirectional association>
from ref 128517 z 1999 stereotype "<<vector>>" xyz 282 103 3000 to point 303 129
from ref 128517 z 1999 stereotype "<<vector>>" xyz 277 115 3000 to point 300 136
line 130053 z 1999 to ref 129669
role_a_pos 315 196 3000 no_role_b
no_multiplicity_a multiplicity_b_pos 175 84 3000
role_a_pos 312 288 3000 no_role_b
no_multiplicity_a multiplicity_b_pos 173 109 3000
relationcanvas 132101 relation_ref 148869 // <generalisation>
geometry VHV unfixed
from ref 131973 z 1999 to point 81 108
line 134021 z 1999 to point 120 108
from ref 131973 z 1999 to point 78 189
line 134021 z 1999 to point 118 189
line 134149 z 1999 to ref 128517
no_role_a no_role_b
no_multiplicity_a no_multiplicity_b
relationcanvas 132229 relation_ref 148997 // <generalisation>
geometry VHV
from ref 131845 z 1999 to point 201 126
line 134277 z 1999 to point 120 126
from ref 131845 z 1999 to point 198 189
line 134277 z 1999 to point 118 189
line 134405 z 1999 to ref 128517
no_role_a no_role_b
no_multiplicity_a no_multiplicity_b
relationcanvas 132485 relation_ref 149125 // <directional aggregation by value>
geometry HV
from ref 128005 z 1999 stereotype "<<vector>>" xyz 220 359 3000 to point 278 360
from ref 128005 z 1999 stereotype "<<vector>>" xyz 217 451 3000 to point 275 452
line 133381 z 1999 to ref 132357
role_a_pos 290 409 3000 no_role_b
multiplicity_a_pos 266 409 3000 no_multiplicity_b
role_a_pos 287 501 3000 no_role_b
multiplicity_a_pos 263 501 3000 no_multiplicity_b
relationcanvas 133509 relation_ref 149253 // <unidirectional association>
from ref 131973 z 1999 to point 200 215
from ref 131973 z 1999 to point 197 307
line 133637 z 1999 to ref 131845
role_a_pos 180 222 3000 no_role_b
multiplicity_a_pos 185 199 3000 no_multiplicity_b
role_a_pos 177 314 3000 no_role_b
multiplicity_a_pos 182 291 3000 no_multiplicity_b
relationcanvas 134533 relation_ref 149381 // <unidirectional association>
from ref 131973 z 3004 to ref 129669
no_role_a no_role_b
@ -61,7 +61,7 @@ relationcanvas 134533 relation_ref 149381 // <unidirectional association>
line 134661 -_-_
from ref 131973 z 2003 to ref 128005
line 134789 -_-_
from ref 131973 z 2003 to point 137 322
from ref 131973 z 2003 to point 134 414
line 134917 z 2003 to ref 128005
preferred_whz 414 544 1
end

View file

@ -1839,14 +1839,16 @@ So, when creating a clip out of such a compound media asset, the clip has to be
<div title="NodeCreaterTool" modifier="Ichthyostega" created="200712100626" tags="def" changecount="1">
<pre>NodeCreaterTool is a [[visiting tool|VisitorUse]] used as second step in the [[Builder]]. Starting out from a [[Fixture]], the builder first [[divides the Timeline into segments|SegmentationTool]] and then processes each segment with the NodeCreaterTool to build a render nodes network (Render Engine) for this part of the timeline. While visiting individual Objects and Placements, the NodeCreaterTool creates and wires the necessary [[nodes|ProcNode]]</pre>
</div>
<div title="NodeOperationProtocol" modifier="Ichthyostega" modified="200806030420" created="200806010251" tags="Rendering dynamic" changecount="9">
<div title="NodeOperationProtocol" modifier="Ichthyostega" modified="200806140024" created="200806010251" tags="Rendering dynamic" changecount="10">
<pre>The [[nodes|ProcNode]] are wired to form a &quot;Directed Acyclic Graph&quot;; each node knows its predecessor(s), but not its successor(s). The RenderProcess is organized according to the ''pull principle'', thus we find an operation {{{pull()}}} at the core of this process. There is no such thing as an &quot;engine object&quot; calling nodes iteratively or table driven, rather, the nodes themselves issue recursive calls to their predecessor(s). For this to work, we need the nodes to adhere to a specific protocol:
# Node is pulled, with a StateProxy object as parameter (encapsulating the access to the frames or buffers)
# Node may now access current parameter values, using the state accessible via the StateProxy
# Node calles back into the StateProxy for getting the input buffer(s), providing it's //input descriptor//
# StateProxy tries to get the input frames from the Cache in the Backend. In case of failure, the call is forwarded according to the input descriptor
# after this call returns, the Node is allowed to dereference the frame pointers and do its calculations
# finally, when the {{{pull()}}} call returns, the StateProxy may push down the result frames to the cache
# using it's //input-output descriptor,// the Node creates a StateAdapter wrapping the StateProxy for accessing the output to pull and probably the input needed to calculate this output
# StateAdapter first tries to get the output frames from the Cache in the Backend. In case of failure, a {{{process()}}} call is prepared by generating {{{pull()}}} call(s) for the input
# as late as possible, typically on return, these recursive pull-calls have allocated a buffer containing the input data.
# after all input is ready and prior to the {{{process()}}} call, the output buffers will be allocated, either from the cache, or alternatively (if not caching) from the &quot;parent&quot; StateAdapter up the callstack.
# after all buffers are available, the StateAdapter issues the {{{process()}}} call back to the originating node, which now may dereference the frame pointers and do its calculations
# finally, when the {{{pull()}}} call returns, &quot;parent&quot; state originating the pull holds onto the buffers containing the calculated output result.
some points to note:
* the input descriptor is {{{const}}} and precalculated while building (remember another thread may call in parallel)
* when a node is &quot;inplace-capable&quot;, input and output buffer may actually point to the same location
@ -3035,7 +3037,7 @@ At first sight the link between asset and clip-MO is a simple logical relation b
[img[Entities comprising the Render Engine|uml/fig128389.png]]
</pre>
</div>
<div title="RenderMechanics" modifier="Ichthyostega" modified="200806110318" created="200806030230" tags="Rendering impl dynamic" changecount="20">
<div title="RenderMechanics" modifier="Ichthyostega" modified="200806130010" created="200806030230" tags="Rendering impl dynamic" changecount="22">
<pre>While the render process, with respect to the dependencies, the builder and the processing function is sufficiently characterized by referring to the ''pull principle'' and by defining a [[protocol|NodeOperationProtocol]] each node has to adhere to &amp;mdash; for actually get it coded we have to care for some important details, especially //how to manage the buffers.// It may well be that the length of the code path necessary to invoke the individual processing functions is finally not so important, compared with the time spent at the inner pixel loop within these functions. But my guess is (as of 5/08), that the overall number of data moving and copying operations //will be//&amp;nbsp; of importance.
!reguirements
@ -3054,15 +3056,8 @@ Besides the StateProxy representing the actual render process and holding a coup
The usage patern of the buffers can be stack-like when processing nodes requiring multiple input buffers. In the standard case, which also is the simplest case, a pair of buffers (or a single buffer for &quot;in-place&quot; capable nodes) suffices to calculate a whole chain of nodes. But &amp;mdash; as the recursive descent means depth-first processing &amp;mdash; in case multiple input buffers are needed, we may encounter a situation where some of these input buffers already contain processed data, while we have to descend into yet another predecessor node chain to pull the data for the remaining buffers. Care has to be taken //to allocate the buffers as late as possible,// otherwise we could end up holding onto a buffer almost for each node in the network. Effectively this translates into the rule to allocate output buffers only after all input buffers are ready and filled with data; thus we shouldn't allocate buffers when //entering// the recursive call to the predecessor(s), rather we have to wait until we are about to return from the downcall chain.
Besides, these considerations also show we need a means of passing on the current buffer usage pattern while calling down. This usage pattern not only includes a record of what buffers are occupied, but also the intended use of these occupied buffers, especially if they can be modified in-place, and at which point they may be released and reused.
@@clear(right):display(block):@@
</pre>
</div>
<div title="RenderProcess" modifier="Ichthyostega" modified="200806110341" created="200706190705" tags="Rendering dynamic" changecount="26">
<pre>For each segment (of the effective timeline), there is a Processor holding the exit node(s) of a processing network, which is a &quot;Directed Acyclic Graph&quot; of small, preconfigured, stateless [[processing nodes|ProcNode]]. This network is operated according to the ''pull principle'', meaning that the rendering is just initiated by &quot;pulling&quot; output from the exit node, causing a cascade of recursive downcalls. Each node knows its predecessor(s) an can pull the necessary input from there. Consequently, there is no centralized &quot;engine object&quot; which may invoke nodes iteratively or table driven &amp;mdash; rather, the rendering can be seen as a passive service provided for the backend, which may pull from the exit nodes at any time, in any order (?), and possibly multithreaded.
All State necessary for a given calculation process is encapsulated and accessible by a StateProxy object, which can be seen as the representation of &quot;the process&quot;. At the same time, this proxy provides the buffers holding data to be processed and acts as a gateway to the backend to handle the communication with the Cache. In addition to this //top-level State,// each calculation step includes a small [[state adapter object|StateAdapter]] (stack allocated), which is pre-configured by the builder and serves the purpose to isolate the processing function from the detals of buffer management.
!!Example: calculating a 3 node chain
[img[uml/fig132229.png]]
# Caller invokes calculation by pulling from exit node, providing the top-level StateProxy
# node1 (exit node) builds StateAdapter and calls retrieve() on it to get the desired output result
# this StateAdapter (ad1) knows he could get the result from Cache, so he tries, but it's a miss
@ -3083,6 +3078,18 @@ All State necessary for a given calculation process is encapsulated and accessib
# thus it can be marked as ready for the Cache, which may now provide it to other processes (but isn't allowed to overwrite it)
# finally, when the caller is done with the data, it signalles this to the top-level State object
# which forwards this information to the cache, which in turn may now do with the released Buffer as he sees fit.
[img[uml/fig132229.png]]
@@clear(right):display(block):@@
__see also__
&amp;rarr; the [[Entities involved in Rendering|RenderEntities]]
&amp;rarr; [[Memory management for render nodes|ManagementRenderNodes]]
&amp;rarr; the protocol [[how to operate the nodes|NodeOperationProtocol]]
</pre>
</div>
<div title="RenderProcess" modifier="Ichthyostega" modified="200806130009" created="200706190705" tags="Rendering dynamic" changecount="27">
<pre>For each segment (of the effective timeline), there is a Processor holding the exit node(s) of a processing network, which is a &quot;Directed Acyclic Graph&quot; of small, preconfigured, stateless [[processing nodes|ProcNode]]. This network is operated according to the ''pull principle'', meaning that the rendering is just initiated by &quot;pulling&quot; output from the exit node, causing a cascade of recursive downcalls. Each node knows its predecessor(s) an can pull the necessary input from there. Consequently, there is no centralized &quot;engine object&quot; which may invoke nodes iteratively or table driven &amp;mdash; rather, the rendering can be seen as a passive service provided for the backend, which may pull from the exit nodes at any time, in any order (?), and possibly multithreaded.
All State necessary for a given calculation process is encapsulated and accessible by a StateProxy object, which can be seen as the representation of &quot;the process&quot;. At the same time, this proxy provides the buffers holding data to be processed and acts as a gateway to the backend to handle the communication with the Cache. In addition to this //top-level State,// each calculation step includes a small [[state adapter object|StateAdapter]] (stack allocated), which is pre-configured by the builder and serves the purpose to isolate the processing function from the detals of buffer management.
__see also__