From 5f278189200f2383e0446a72b3e137b506de4e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= Date: Tue, 10 May 2016 14:24:55 +0200 Subject: [PATCH] uncrustify --- Keyer/Keyer.cpp | 2 +- Shadertoy/Shadertoy.cpp | 1 - TrackerPM/TrackerPM.cpp | 57 +++++++++++++++++++---------------------- 3 files changed, 28 insertions(+), 32 deletions(-) diff --git a/Keyer/Keyer.cpp b/Keyer/Keyer.cpp index e950fa82d..594720fdf 100644 --- a/Keyer/Keyer.cpp +++ b/Keyer/Keyer.cpp @@ -279,7 +279,7 @@ class KeyerProcessorBase return ( Kfg - (_center + _toleranceLower + _softnessLower) ) / -_softnessLower; } else if (Kfg <= _center + _toleranceUpper) { return 1.; - } else if ( ( 1. <= (_center + _toleranceUpper) ) && (1. <= Kfg) ) { // special case: everything above 1 is 1. if center+toleranceUpper>=1 + } else if ( ( 1. <= (_center + _toleranceUpper) ) && (1. <= Kfg) ) { // special case: everything above 1 is 1. if center+toleranceUpper>=1 return 1.; } else if ( ( Kfg < (_center + _toleranceUpper + _softnessUpper) ) && (_softnessUpper > 0.) ) { return ( (_center + _toleranceUpper + _softnessUpper) - Kfg ) / _softnessUpper; diff --git a/Shadertoy/Shadertoy.cpp b/Shadertoy/Shadertoy.cpp index 0ee90ecf9..419a44666 100644 --- a/Shadertoy/Shadertoy.cpp +++ b/Shadertoy/Shadertoy.cpp @@ -915,7 +915,6 @@ ShadertoyPluginFactory::describe(OFX::ImageEffectDescriptor &desc) #ifdef OFX_EXTENSIONS_NATRON desc.setChannelSelector(ePixelComponentNone); #endif - } // ShadertoyPluginFactory::describe void diff --git a/TrackerPM/TrackerPM.cpp b/TrackerPM/TrackerPM.cpp index 4ddf62afe..324d152c6 100644 --- a/TrackerPM/TrackerPM.cpp +++ b/TrackerPM/TrackerPM.cpp @@ -83,17 +83,17 @@ class TrackerPMPlugin public: /** @brief ctor */ TrackerPMPlugin(OfxImageEffectHandle handle) - : GenericTrackerPlugin(handle) - , _score(0) - , _center(0) - , _offset(0) - , _referenceFrame(0) - , _enableReferenceFrame(0) - , _correlationScore(0) - , _innerBtmLeft(0) - , _innerTopRight(0) - , _outerBtmLeft(0) - , _outerTopRight(0) + : GenericTrackerPlugin(handle) + , _score(0) + , _center(0) + , _offset(0) + , _referenceFrame(0) + , _enableReferenceFrame(0) + , _correlationScore(0) + , _innerBtmLeft(0) + , _innerTopRight(0) + , _outerBtmLeft(0) + , _outerTopRight(0) { _maskClip = fetchClip(getContext() == OFX::eContextPaint ? "Brush" : "Mask"); assert(!_maskClip || _maskClip->getPixelComponents() == ePixelComponentAlpha); @@ -557,17 +557,15 @@ TrackerPMPlugin::trackRange(const OFX::TrackArguments& args) } bool enableRefFrame = _enableReferenceFrame->getValue(); - + while ( args.forward ? (t <= args.last) : (t >= args.last) ) { - - OfxTime refFrame; if (enableRefFrame) { refFrame = (OfxTime)_referenceFrame->getValueAtTime(t); } else { refFrame = args.forward ? (t - 1) : (t + 1); } - + OFX::PixelComponentEnum srcComponents = _srcClip->getPixelComponents(); assert(srcComponents == OFX::ePixelComponentRGB || srcComponents == OFX::ePixelComponentRGBA || @@ -763,9 +761,8 @@ TrackerPMPlugin::setupAndProcess(TrackerPMProcessorBase &processor, _center->setValueAtTime(refTime, refCenter.x, refCenter.y); // create a keyframe at end point _center->setValueAtTime(otherTime, newCenter.x - otherOffset.x, newCenter.y - otherOffset.y); - _correlationScore->setValueAtTime(otherTime, processor.getBestScore()); - // endEditBlock(); - + _correlationScore->setValueAtTime( otherTime, processor.getBestScore() ); + // endEditBlock(); } } } // TrackerPMPlugin::setupAndProcess @@ -831,17 +828,17 @@ TrackerPMPlugin::trackInternal(OfxTime refTime, OfxPointD refCenterWithOffset; refCenterWithOffset.x = refCenter.x + offset.x; refCenterWithOffset.y = refCenter.y + offset.y; - + // The search window should be centered around the last keyframe we set to the center OfxPointD prevTimeCenterWithOffset; _center->getValueAtTime(otherTime, prevTimeCenterWithOffset.x, prevTimeCenterWithOffset.y); - + OfxPointD offsetPrevTime; _offset->getValueAtTime(otherTime, offsetPrevTime.x, offsetPrevTime.y); - + prevTimeCenterWithOffset.x += offsetPrevTime.x; prevTimeCenterWithOffset.y += offsetPrevTime.y; - + OfxRectD refBounds; getRefBounds(refRect, refCenterWithOffset, &refBounds); @@ -940,12 +937,12 @@ TrackerPMPluginFactory::describe(OFX::ImageEffectDescriptor &desc) desc.setRenderTwiceAlways(true); desc.setRenderThreadSafety(kRenderThreadSafety); desc.setOverlayInteractDescriptor(new TrackerRegionOverlayDescriptor); - + #ifdef OFX_EXTENSIONS_NATRON // This plug-in is deprecated since Natron has its new tracker implementation - if (OFX::getImageEffectHostDescription()->isNatron && - OFX::getImageEffectHostDescription()->versionMajor >= 2 && - OFX::getImageEffectHostDescription()->versionMinor >= 1) { + if ( OFX::getImageEffectHostDescription()->isNatron && + ( OFX::getImageEffectHostDescription()->versionMajor >= 2) && + ( OFX::getImageEffectHostDescription()->versionMinor >= 1) ) { desc.setIsDeprecated(true); } #endif @@ -998,7 +995,7 @@ TrackerPMPluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, page->addChild(*param); } } - + // ref { OFX::IntParamDescriptor* param = desc.defineIntParam(kParamTrackingReferenceFrame); @@ -1010,7 +1007,7 @@ TrackerPMPluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, page->addChild(*param); } } - + // enable ref { OFX::BooleanParamDescriptor* param = desc.defineBooleanParam(kParamTrackingEnableReferenceFrame); @@ -1022,7 +1019,7 @@ TrackerPMPluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, page->addChild(*param); } } - + // correlation score { OFX::DoubleParamDescriptor* param = desc.defineDoubleParam(kParamTrackingCorrelationScore); @@ -1034,7 +1031,7 @@ TrackerPMPluginFactory::describeInContext(OFX::ImageEffectDescriptor &desc, page->addChild(*param); } } - + // innerBtmLeft {