TuttleOFX
1
|
Swscale plugin. More...
#include <SwscalePlugin.hpp>
Public Types | |
typedef float | Scalar |
typedef boost::gil::point2 < double > | Point2 |
Public Member Functions | |
SwscalePlugin (OfxImageEffectHandle handle) | |
SwscaleProcessParams | getProcessParams (const OfxPointD &renderScale=OFX::kNoRenderScale) const |
void | updateVisibleTools () |
void | changedParam (const OFX::InstanceChangedArgs &args, const std::string ¶mName) |
called when a param has just had its value changed | |
bool | getRegionOfDefinition (const OFX::RegionOfDefinitionArguments &args, OfxRectD &rod) |
The get RoD action. | |
bool | isIdentity (const OFX::RenderArguments &args, OFX::Clip *&identityClip, double &identityTime) |
client is identity function, returns the clip and time for the identity function | |
void | render (const OFX::RenderArguments &args) |
The overridden render function. | |
Data Fields | |
OFX::ChoiceParam * | _paramMode |
OFX::ChoiceParam * | _paramFormat |
OFX::Int2DParam * | _paramSize |
OFX::IntParam * | _paramSizeWidth |
OFX::IntParam * | _paramSizeHeight |
OFX::BooleanParam * | _paramSizeKeepRatio |
OFX::ChoiceParam * | _paramSizeOrientation |
OFX::Double2DParam * | _paramScale |
OFX::ChoiceParam * | _paramFilter |
Private Member Functions | |
bool | isIdentity () const |
Swscale plugin.
Definition at line 22 of file SwscalePlugin.hpp.
typedef boost::gil::point2<double> tuttle::plugin::swscale::SwscalePlugin::Point2 |
Definition at line 26 of file SwscalePlugin.hpp.
typedef float tuttle::plugin::swscale::SwscalePlugin::Scalar |
Definition at line 25 of file SwscalePlugin.hpp.
tuttle::plugin::swscale::SwscalePlugin::SwscalePlugin | ( | OfxImageEffectHandle | handle | ) |
Definition at line 52 of file SwscalePlugin.cpp.
References _paramFilter, _paramFormat, _paramMode, _paramScale, _paramSize, _paramSizeHeight, _paramSizeKeepRatio, _paramSizeOrientation, _paramSizeWidth, OFX::ParamSet::fetchBooleanParam(), OFX::ParamSet::fetchChoiceParam(), OFX::ParamSet::fetchDouble2DParam(), OFX::ParamSet::fetchInt2DParam(), OFX::ParamSet::fetchIntParam(), tuttle::plugin::swscale::kParamFilter, tuttle::plugin::swscale::kParamFormat, tuttle::plugin::swscale::kParamMode, tuttle::plugin::swscale::kParamModeScale, tuttle::plugin::swscale::kParamSize, tuttle::plugin::swscale::kParamSizeHeight, tuttle::plugin::swscale::kParamSizeKeepRatio, tuttle::plugin::swscale::kParamSizeOrientation, tuttle::plugin::swscale::kParamSizeWidth, and updateVisibleTools().
void tuttle::plugin::swscale::SwscalePlugin::changedParam | ( | const OFX::InstanceChangedArgs & | args, |
const std::string & | paramName | ||
) | [virtual] |
called when a param has just had its value changed
Reimplemented from OFX::ImageEffect.
Definition at line 92 of file SwscalePlugin.cpp.
References _paramFormat, _paramMode, _paramScale, _paramSize, _paramSizeHeight, _paramSizeKeepRatio, _paramSizeOrientation, _paramSizeWidth, OFX::eChangeUserEdit, tuttle::plugin::swscale::eParamModeFormat, tuttle::plugin::swscale::eParamModeScale, tuttle::plugin::swscale::eParamModeSize, tuttle::plugin::swscale::eParamSizeOrientationX, tuttle::plugin::swscale::eParamSizeOrientationY, tuttle::plugin::getFormatResolution(), OFX::IntParam::getValue(), OFX::Int2DParam::getValue(), OFX::ChoiceParam::getValue(), OFX::BooleanParam::getValue(), height, tuttle::plugin::swscale::kParamFormat, tuttle::plugin::swscale::kParamMode, tuttle::plugin::swscale::kParamScale, tuttle::plugin::swscale::kParamSize, tuttle::plugin::swscale::kParamSizeHeight, tuttle::plugin::swscale::kParamSizeKeepRatio, tuttle::plugin::swscale::kParamSizeOrientation, tuttle::plugin::swscale::kParamSizeWidth, OFX::InstanceChangedArgs::reason, OFX::ChoiceParam::setValue(), width, OfxPointI::x, and OfxPointI::y.
Referenced by updateVisibleTools().
SwscaleProcessParams tuttle::plugin::swscale::SwscalePlugin::getProcessParams | ( | const OfxPointD & | renderScale = OFX::kNoRenderScale | ) | const |
Definition at line 82 of file SwscalePlugin.cpp.
References tuttle::plugin::swscale::SwscaleProcessParams::_filter, _paramFilter, tuttle::plugin::swscale::SwscaleProcessParams::_sws_filter, and tuttle::plugin::swscale::filterParamToSwscaleFlag().
Referenced by tuttle::plugin::swscale::SwscaleProcess::setup().
bool tuttle::plugin::swscale::SwscalePlugin::getRegionOfDefinition | ( | const OFX::RegionOfDefinitionArguments & | args, |
OfxRectD & | rod | ||
) | [virtual] |
The get RoD action.
If the effect wants change the rod from the default value (which is the union of RoD's of all input clips) it should set the rod argument and return true.
This is all in cannonical coordinates.
Reimplemented from OFX::ImageEffect.
Definition at line 201 of file SwscalePlugin.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, _paramFormat, _paramMode, _paramScale, _paramSize, _paramSizeHeight, _paramSizeKeepRatio, _paramSizeOrientation, _paramSizeWidth, tuttle::plugin::swscale::eParamModeFormat, tuttle::plugin::swscale::eParamModeScale, tuttle::plugin::swscale::eParamModeSize, tuttle::plugin::swscale::eParamSizeOrientationX, OFX::Clip::getCanonicalRod(), tuttle::plugin::getFormatResolution(), OFX::IntParam::getValue(), OFX::Int2DParam::getValue(), OFX::Double2DParam::getValue(), OFX::ChoiceParam::getValue(), OFX::BooleanParam::getValue(), height, tuttle::plugin::ofxToGil(), tuttle::plugin::viewer::scale, OFX::RegionOfDefinitionArguments::time, width, OfxPointI::x, OfxRectD::x1, OfxRectD::x2, OfxPointI::y, OfxRectD::y1, and OfxRectD::y2.
bool tuttle::plugin::swscale::SwscalePlugin::isIdentity | ( | const OFX::RenderArguments & | args, |
OFX::Clip *& | identityClip, | ||
double & | identityTime | ||
) | [virtual] |
client is identity function, returns the clip and time for the identity function
If the effect would do no processing for the given param set and render arguments, then this function should return true and set the identityClip pointer to point to the clip that is the identity and identityTime to be the time at which to access the clip for the identity operation.
Reimplemented from OFX::ImageEffect.
Definition at line 301 of file SwscalePlugin.cpp.
References tuttle::plugin::ImageEffectGilPlugin::_clipSrc, isIdentity(), and OFX::RenderArguments::time.
bool tuttle::plugin::swscale::SwscalePlugin::isIdentity | ( | ) | const [private] |
Definition at line 276 of file SwscalePlugin.cpp.
References _paramMode, _paramScale, tuttle::plugin::swscale::eParamModeFormat, tuttle::plugin::swscale::eParamModeScale, tuttle::plugin::swscale::eParamModeSize, OFX::Double2DParam::getValue(), OFX::ChoiceParam::getValue(), tuttle::plugin::ofxToGil(), and tuttle::plugin::viewer::scale.
Referenced by isIdentity().
void tuttle::plugin::swscale::SwscalePlugin::render | ( | const OFX::RenderArguments & | args | ) | [virtual] |
The overridden render function.
[in] | args | Rendering parameters |
Implements OFX::ImageEffect.
Definition at line 316 of file SwscalePlugin.cpp.
References OFX::ImageEffectHostDescription::_supportedPixelDepths, OFX::eBitDepthFloat, OFX::getImageEffectHostDescription(), and tuttle::plugin::ImageProcessor::setupAndProcess().
void tuttle::plugin::swscale::SwscalePlugin::updateVisibleTools | ( | ) |
Definition at line 72 of file SwscalePlugin.cpp.
References changedParam(), tuttle::plugin::swscale::kParamFilter, tuttle::plugin::swscale::kParamMode, tuttle::plugin::swscale::kParamSizeKeepRatio, tuttle::plugin::swscale::kParamSizeOrientation, and OFX::ImageEffect::timeLineGetTime().
Referenced by SwscalePlugin().
Definition at line 60 of file SwscalePlugin.hpp.
Referenced by getProcessParams(), and SwscalePlugin().
Definition at line 50 of file SwscalePlugin.hpp.
Referenced by changedParam(), getRegionOfDefinition(), and SwscalePlugin().
Definition at line 48 of file SwscalePlugin.hpp.
Referenced by changedParam(), getRegionOfDefinition(), isIdentity(), and SwscalePlugin().
Definition at line 58 of file SwscalePlugin.hpp.
Referenced by changedParam(), getRegionOfDefinition(), isIdentity(), and SwscalePlugin().
Definition at line 52 of file SwscalePlugin.hpp.
Referenced by changedParam(), getRegionOfDefinition(), and SwscalePlugin().
Definition at line 54 of file SwscalePlugin.hpp.
Referenced by changedParam(), getRegionOfDefinition(), and SwscalePlugin().
Definition at line 55 of file SwscalePlugin.hpp.
Referenced by changedParam(), getRegionOfDefinition(), and SwscalePlugin().
Definition at line 56 of file SwscalePlugin.hpp.
Referenced by changedParam(), getRegionOfDefinition(), and SwscalePlugin().
Definition at line 53 of file SwscalePlugin.hpp.
Referenced by changedParam(), getRegionOfDefinition(), and SwscalePlugin().