X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=unsharp_mask_effect.cpp;h=115553b49f998ba0365e556c3a86a2d81df7aa94;hp=545910f2af7519636ec91e32cfb1d586aa1694df;hb=8dedcc2fd11b00fec125212b60e144363033137d;hpb=3ebfaf958e7f2dade290fa33427c7cf1b5342978 diff --git a/unsharp_mask_effect.cpp b/unsharp_mask_effect.cpp index 545910f..115553b 100644 --- a/unsharp_mask_effect.cpp +++ b/unsharp_mask_effect.cpp @@ -1,18 +1,20 @@ -#include #include +#include -#include "unsharp_mask_effect.h" #include "blur_effect.h" -#include "mix_effect.h" #include "effect_chain.h" +#include "mix_effect.h" +#include "unsharp_mask_effect.h" #include "util.h" +using namespace std; + UnsharpMaskEffect::UnsharpMaskEffect() : blur(new BlurEffect), mix(new MixEffect) { - mix->set_float("strength_first", 1.0f); - mix->set_float("strength_second", -0.3f); + CHECK(mix->set_float("strength_first", 1.0f)); + CHECK(mix->set_float("strength_second", -0.3f)); } void UnsharpMaskEffect::rewrite_graph(EffectChain *graph, Node *self) @@ -30,7 +32,7 @@ void UnsharpMaskEffect::rewrite_graph(EffectChain *graph, Node *self) self->disabled = true; } -bool UnsharpMaskEffect::set_float(const std::string &key, float value) { +bool UnsharpMaskEffect::set_float(const string &key, float value) { if (key == "amount") { bool ok = mix->set_float("strength_first", 1.0f + value); return ok && mix->set_float("strength_second", -value);