summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-30 19:35:26 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-30 19:35:26 +0200
commit3dd0ce91bed63c39722b53dee45c1ddbc306e289 (patch)
tree2e93a4a5d9151d4dbb3f6d1d8f37f5d39c20992d
parent1bcd8d3369dac81d538ed926a596ed5b43b31682 (diff)
filter/accela: reduce microstutter
Discussed-with: @mrsanchos
-rw-r--r--filter-accela/accela-settings.hpp19
-rw-r--r--filter-accela/ftnoir_accela_filtercontrols.ui2
-rw-r--r--filter-accela/ftnoir_filter_accela.cpp4
3 files changed, 11 insertions, 14 deletions
diff --git a/filter-accela/accela-settings.hpp b/filter-accela/accela-settings.hpp
index c8357144..e23efdfe 100644
--- a/filter-accela/accela-settings.hpp
+++ b/filter-accela/accela-settings.hpp
@@ -8,15 +8,14 @@ struct settings_accela : opts
{
static constexpr double rot_gains[16][2] =
{
- { 12, 500 },
- { 11, 450 },
- { 10, 400 },
- { 9, 350 },
- { 8, 300 },
- { 7, 250 },
- { 6, 200 },
- { 2.66, 50 },
- { 1.66, 17 },
+ { 8, 700 },
+ { 7, 300 },
+ { 6, 160 },
+ { 5, 95 },
+
+ { 4, 55 },
+ { 3, 25 },
+ { 1.66, 10 },
{ 1, 4 },
{ .5, .53 },
{ 0, 0 },
@@ -51,7 +50,7 @@ struct settings_accela : opts
pos_sensitivity(b, "translation-sensitivity", slider_value(1., .05, 1.5)),
rot_deadzone(b, "rotation-deadzone", slider_value(.03, 0, .1)),
pos_deadzone(b, "translation-deadzone", slider_value(.1, 0, 1)),
- ewma(b, "ewma", slider_value(0, 0, 300)),
+ ewma(b, "ewma", slider_value(0, 0, 200)),
rot_nonlinearity(b, "rotation-nonlinearity", slider_value(1.2, 1, 1.3))
{}
};
diff --git a/filter-accela/ftnoir_accela_filtercontrols.ui b/filter-accela/ftnoir_accela_filtercontrols.ui
index a7720f44..9d4de296 100644
--- a/filter-accela/ftnoir_accela_filtercontrols.ui
+++ b/filter-accela/ftnoir_accela_filtercontrols.ui
@@ -80,7 +80,7 @@
<number>0</number>
</property>
<property name="maximum">
- <number>6</number>
+ <number>8</number>
</property>
<property name="pageStep">
<number>5</number>
diff --git a/filter-accela/ftnoir_filter_accela.cpp b/filter-accela/ftnoir_filter_accela.cpp
index 8d14361d..3f78c7a6 100644
--- a/filter-accela/ftnoir_filter_accela.cpp
+++ b/filter-accela/ftnoir_filter_accela.cpp
@@ -43,9 +43,7 @@ static void do_deltas(const double* deltas, double* output, double alpha, double
return sqrt(ret);
);
- const double dist = fmin(dist_, alpha*dist_ + (1-alpha)*smoothed);
- smoothed = dist;
-
+ const double dist = smoothed = fmin(dist_, alpha*dist_ + (1-alpha)*smoothed);
const double value = double(fun(dist));
for (unsigned k = 0; k < N; k++)