diff options
Diffstat (limited to 'filter-ewma2')
-rw-r--r-- | filter-ewma2/ftnoir_filter_ewma2.cpp | 8 | ||||
-rw-r--r-- | filter-ewma2/ftnoir_filter_ewma2.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/filter-ewma2/ftnoir_filter_ewma2.cpp b/filter-ewma2/ftnoir_filter_ewma2.cpp index c79596ef..b29746a0 100644 --- a/filter-ewma2/ftnoir_filter_ewma2.cpp +++ b/filter-ewma2/ftnoir_filter_ewma2.cpp @@ -22,7 +22,7 @@ // to minSmooth at a rate controlled by the powCurve setting. -ewma::ewma() : first_run(true) +ewma::ewma() { } @@ -48,10 +48,10 @@ void ewma::filter(const double *input, double *output) double noise_alpha = dt/(dt + noise_RC); // scale curve .01->1 where 1.0 is sqrt(norm_noise). - const double smoothing_scale_curve = static_cast<slider_value>(s.kSmoothingScaleCurve); + const double smoothing_scale_curve = *s.kSmoothingScaleCurve; // min/max smoothing .01->1 - const double min_smoothing = static_cast<slider_value>(s.kMinSmoothing); - const double max_smoothing = std::fmax(min_smoothing, static_cast<slider_value>(s.kMaxSmoothing)); + const double min_smoothing = *s.kMinSmoothing; + const double max_smoothing = std::fmax(min_smoothing, *s.kMaxSmoothing); // Calculate the new camera position. for (int i=0;i<6;i++) diff --git a/filter-ewma2/ftnoir_filter_ewma2.h b/filter-ewma2/ftnoir_filter_ewma2.h index fd7047e1..1cd30a6b 100644 --- a/filter-ewma2/ftnoir_filter_ewma2.h +++ b/filter-ewma2/ftnoir_filter_ewma2.h @@ -36,7 +36,7 @@ private: double last_output[6]; Timer timer; settings s; - bool first_run; + bool first_run = true; }; class dialog_ewma: public IFilterDialog |