本文整理汇总了C++中ofx::Clip::getPixelComponents方法的典型用法代码示例。如果您正苦于以下问题:C++ Clip::getPixelComponents方法的具体用法?C++ Clip::getPixelComponents怎么用?C++ Clip::getPixelComponents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofx::Clip
的用法示例。
在下文中一共展示了Clip::getPixelComponents方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
// the overridden render function
void
NoisePlugin::render(const OFX::RenderArguments &args)
{
// instantiate the render code based on the pixel depth of the dst clip
OFX::BitDepthEnum dstBitDepth = dstClip_->getPixelDepth();
OFX::PixelComponentEnum dstComponents = dstClip_->getPixelComponents();
// do the rendering
if(dstComponents == OFX::ePixelComponentRGBA) {
switch(dstBitDepth)
{
case OFX::eBitDepthUByte : {
NoiseGenerator<unsigned char, 4, 255> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthUShort :
{
NoiseGenerator<unsigned short, 4, 65535> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthFloat :
{
NoiseGenerator<float, 4, 1> fred(*this);
setupAndProcess(fred, args);
}
break;
}
}
else {
switch(dstBitDepth)
{
case OFX::eBitDepthUByte :
{
NoiseGenerator<unsigned char, 1, 255> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthUShort :
{
NoiseGenerator<unsigned short, 1, 65536> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthFloat :
{
NoiseGenerator<float, 1, 1> fred(*this);
setupAndProcess(fred, args);
}
break;
}
}
}
示例2: switch
// the overridden render function
void
BasicPlugin::render(const OFX::RenderArguments &args)
{
// instantiate the render code based on the pixel depth of the dst clip
OFX::BitDepthEnum dstBitDepth = dstClip_->getPixelDepth();
OFX::PixelComponentEnum dstComponents = dstClip_->getPixelComponents();
// do the rendering
if(dstComponents == OFX::ePixelComponentRGBA) {
switch(dstBitDepth) {
case OFX::eBitDepthUByte : {
ImageScaler<unsigned char, 4, 255> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthUShort : {
ImageScaler<unsigned short, 4, 65535> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthFloat : {
ImageScaler<float, 4, 1> fred(*this);
setupAndProcess(fred, args);
}
break;
default :
OFX::throwSuiteStatusException(kOfxStatErrUnsupported);
}
}
else {
switch(dstBitDepth) {
case OFX::eBitDepthUByte : {
ImageScaler<unsigned char, 1, 255> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthUShort : {
ImageScaler<unsigned short, 1, 65535> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthFloat : {
ImageScaler<float, 1, 1> fred(*this);
setupAndProcess(fred, args);
}
break;
default :
OFX::throwSuiteStatusException(kOfxStatErrUnsupported);
}
}
}
示例3:
// set the enabledness of the individual component scales
void
BasicPlugin::setEnabledness(void)
{
// the componet enabledness depends on the clip being RGBA and the param being true
bool v = componentScalesEnabled_->getValue() && srcClip_->getPixelComponents() == OFX::ePixelComponentRGBA;
// enable them
rScale_->setEnabled(v);
gScale_->setEnabled(v);
bScale_->setEnabled(v);
aScale_->setEnabled(v);
}
示例4: assert
// the overridden render function
void
AnaglyphPlugin::render(const OFX::RenderArguments &args)
{
if (!OFX::fetchSuite(kOfxVegasStereoscopicImageEffectSuite, 1, true)) {
OFX::throwHostMissingSuiteException(kOfxVegasStereoscopicImageEffectSuite);
}
// instantiate the render code based on the pixel depth of the dst clip
OFX::BitDepthEnum dstBitDepth = dstClip_->getPixelDepth();
OFX::PixelComponentEnum dstComponents = dstClip_->getPixelComponents();
// do the rendering
assert(dstComponents == OFX::ePixelComponentRGBA);
switch (dstBitDepth) {
case OFX::eBitDepthUByte : {
ImageAnaglypher<unsigned char, 255> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthUShort : {
ImageAnaglypher<unsigned short, 65535> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthFloat : {
ImageAnaglypher<float, 1> fred(*this);
setupAndProcess(fred, args);
}
break;
default :
OFX::throwSuiteStatusException(kOfxStatErrUnsupported);
}
}
示例5: render
void GenericTestPlugin::render(const OFX::RenderArguments &args)
{
OFX::BitDepthEnum dstBitDepth = dstClip_->getPixelDepth();
OFX::PixelComponentEnum dstComponents = dstClip_->getPixelComponents();
if(dstComponents == OFX::ePixelComponentRGBA)
{
switch(dstBitDepth)
{
case OFX::eBitDepthUByte :
{
ImageGenericTester<unsigned char, 4, 255> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthUShort :
{
ImageGenericTester<unsigned short, 4, 65535> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthFloat :
{
ImageGenericTester<float, 4, 1> fred(*this);
setupAndProcess(fred, args);
}
break;
default :
OFX::throwSuiteStatusException(kOfxStatErrUnsupported);
}
}
else {
switch(dstBitDepth)
{
case OFX::eBitDepthUByte :
{
ImageGenericTester<unsigned char, 1, 255> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthUShort :
{
ImageGenericTester<unsigned short, 1, 65535> fred(*this);
setupAndProcess(fred, args);
}
break;
case OFX::eBitDepthFloat :
{
ImageGenericTester<float, 1, 1> fred(*this);
setupAndProcess(fred, args);
}
break;
default :
OFX::throwSuiteStatusException(kOfxStatErrUnsupported);
}
}
}
示例6: changedParam
void changedParam(const OFX::InstanceChangedArgs &args, const std::string ¶mName)
{
if(paramName=="enableTest")
{
OFX::ChoiceParam* choice = fetchChoiceParam("enableTest");
OFX::DoubleParam* dbl = fetchDoubleParam("enableDbl");
int value = 0;
choice->getValueAtTime(args.time, value);
dbl->setEnabled(value ==0 );
}
else if(paramName=="pbButton")
{
sendMessage(OFX::Message::eMessageMessage, "", "Push Button Pressed - TestPassed!");
}
else if(paramName=="widgetPos")
{
redrawOverlays();
}
else if(paramName == "analyseButton")
{
OFX::BitDepthEnum dstBitDepth = srcClip_->getPixelDepth();
OFX::PixelComponentEnum dstComponents = srcClip_->getPixelComponents();
OFX::DoubleParam* dbl = fetchDoubleParam("analysisParam");
if(dstComponents == OFX::ePixelComponentRGBA)
{
switch(dstBitDepth)
{
case OFX::eBitDepthUByte :
{
Analyser<unsigned char, 4, 255> analyse(srcClip_, dbl);
break;
}
case OFX::eBitDepthUShort :
{
Analyser<unsigned short, 4, 65535> analyse(srcClip_, dbl);
break;
}
case OFX::eBitDepthFloat :
{
Analyser<float, 4, 1> analyse(srcClip_, dbl);
break;
}
default :
OFX::throwSuiteStatusException(kOfxStatErrUnsupported);
}
}
else
{
switch(dstBitDepth)
{
case OFX::eBitDepthUByte :
{
Analyser<unsigned char, 1, 255> analyse(srcClip_, dbl);
break;
}
case OFX::eBitDepthUShort :
{
Analyser<unsigned short, 1, 65535> analyse(srcClip_, dbl);
break;
}
case OFX::eBitDepthFloat :
{
Analyser<float, 1, 1> analyse(srcClip_, dbl);
break;
}
default :
OFX::throwSuiteStatusException(kOfxStatErrUnsupported);
}
}
}
}