Make effect_id phase-local instead of global.
[movit] / unsharp_mask_effect.cpp
index db8ccd2..7c28925 100644 (file)
@@ -1,18 +1,18 @@
-#include <math.h>
 #include <assert.h>
+#include <vector>
 
-#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"
 
 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)
@@ -31,7 +31,6 @@ void UnsharpMaskEffect::rewrite_graph(EffectChain *graph, Node *self)
 }
 
 bool UnsharpMaskEffect::set_float(const std::string &key, float value) {
-       printf("%s = %f\n", key.c_str(), value);
        if (key == "amount") {
                bool ok = mix->set_float("strength_first", 1.0f + value);
                return ok && mix->set_float("strength_second", -value);