ptolemy.actor.lib.video
Class IDCT4x4dc
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.lib.video.IDCT4x4dc
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class IDCT4x4dc
- extends TypedAtomicActor
Calculate the sum of absolute difference(SAD) between two blocks.
Each input block should have two dimensions by rectangle block(16 by 16, 8 by 8, etc.).
The output port will have the result of SAD.
- Since:
- Ptolemy II 8.0
- Version:
- $Id: DCT4x4dc.java,v 0.2
- Author:
- Hwayong Oh
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
IDCT4x4dc(CompositeEntity container,
java.lang.String name)
Construct an actor in the specified container with the specified
name. |
Method Summary |
java.lang.Object |
clone(Workspace workspace)
Override the base class to set type constraints on the ports. |
void |
fire()
. |
void |
initialize()
Initialize this actor. |
Methods inherited from class ptolemy.actor.AtomicActor |
_actorFiring, _actorFiring, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup |
Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
input
public TypedIOPort input
- Input for tokens to be a part of previous frame. This is a single port, and its
type is 2D array.
output
public TypedIOPort output
- Output port. This is a result for calculating sum of absolute differences between
ImgBlockA and ImgBlockB.
The type is inferred form the connections.
_output
private IntMatrixToken[] _output
IDCT4x4dc
public IDCT4x4dc(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Construct an actor in the specified container with the specified
name.
- Parameters:
container
- The container.name
- The name of this adder within the container.
- Throws:
IllegalActionException
- If the actor cannot be contained
by the proposed container.
NameDuplicationException
- If the name coincides with
an actor already in the container.
clone
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
- Override the base class to set type constraints on the ports.
- Overrides:
clone
in class AtomicActor
- Parameters:
workspace
- The workspace into which to clone.
- Returns:
- A new instance of AddSubtract.
- Throws:
java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.- See Also:
NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
initialize
public void initialize()
throws IllegalActionException
- Description copied from class:
AtomicActor
- Initialize this actor. Derived classes override this method
to perform actions that should occur once at the beginning of
an execution, but after type resolution. Derived classes can
produce output data and schedule events.
- Specified by:
initialize
in interface Initializable
- Overrides:
initialize
in class AtomicActor
- Throws:
IllegalActionException
- If a derived class throws it.
fire
public void fire()
throws IllegalActionException
- .
- Specified by:
fire
in interface Executable
- Overrides:
fire
in class AtomicActor
- Throws:
IllegalActionException
- If there is no director,
or if addition and subtraction are not supported by the
available tokens.