summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/gain-control.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-26 23:56:50 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-27 00:12:57 +0200
commitd20dde371d1ddac288267d7d051735b685a24697 (patch)
tree3044dc4f901df3421b59cd8304963481621e02c9 /facetracknoir/gain-control.hpp
parent0b839d6faf8bcf5ceff41dc1f5bfcb588e83a85e (diff)
gain: stupido
Diffstat (limited to 'facetracknoir/gain-control.hpp')
-rw-r--r--facetracknoir/gain-control.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/facetracknoir/gain-control.hpp b/facetracknoir/gain-control.hpp
index 98d45711..73155cd8 100644
--- a/facetracknoir/gain-control.hpp
+++ b/facetracknoir/gain-control.hpp
@@ -47,7 +47,7 @@ private:
static constexpr bool use_box_filter = true;
static constexpr int box_size = 16 / 640.;
static constexpr double control_upper_bound = 1.0; // XXX FIXME implement for logitech crapola
- static constexpr int GAIN_HISTORY_COUNT = 90, GAIN_HISTORY_EVERY_MS = 85;
+ static constexpr int GAIN_HISTORY_COUNT = 50, GAIN_HISTORY_EVERY_MS = 998;
int control;
double step, eps;
@@ -179,6 +179,7 @@ public:
if (GAIN_HISTORY_COUNT > means_history.size() && history_timer.elapsed_ms() > GAIN_HISTORY_EVERY_MS)
{
+ history_timer.start();
means_history.push_front(frame.clone());
if (GAIN_HISTORY_COUNT == means_history.size())