Lines Matching refs:smoother
259 typedef struct smoother { struct
441 smoother_t smoother[PSM_FINGERS]; /* Motion smoothing */ member
3773 smoother_t *smoother; local
3779 smoother = &sc->smoother[0];
3787 smoother = &sc->smoother[i];
3880 queue_len = smoother->queue_len + 1;
3881 start_x = smoother->start_x;
3882 start_y = smoother->start_y;
4009 dx = abs(smoother->queue[smoother->queue_cursor].x -
4010 smoother->start_x);
4011 dy = abs(smoother->queue[smoother->queue_cursor].y -
4012 smoother->start_y);
4027 smoother->queue_len));
4031 smoother->queue_len >= sc->syninfo.tap_min_queue) {
4136 smoother_t *smoother = &sc->smoother[smoother_id]; local
4203 if (smoother->active == 0) {
4207 smoother->start_x = x0;
4208 smoother->start_y = y0;
4212 smoother->queue_cursor = SYNAPTICS_PACKETQUEUE;
4213 smoother->queue_len = 0;
4216 smoother->avg_dx = 0;
4217 smoother->avg_dy = 0;
4220 smoother->squelch_x = 0;
4221 smoother->squelch_y = 0;
4224 smoother->active = 1;
4227 cursor = smoother->queue_cursor;
4228 dx = x0 - smoother->queue[cursor].x;
4229 dy = y0 - smoother->queue[cursor].y;
4236 cursor = SYNAPTICS_QUEUE_CURSOR(smoother->queue_cursor - 1);
4237 smoother->queue[cursor].x = x0;
4238 smoother->queue[cursor].y = y0;
4239 smoother->queue_cursor = cursor;
4240 if (smoother->queue_len < SYNAPTICS_PACKETQUEUE)
4241 smoother->queue_len++;
4247 if (smoother->queue_len < gest->window_min)
4281 window = imin(smoother->queue_len, window_max);
4283 dxp = abs(x0 - smoother->queue[peer].x) + 1;
4284 dyp = abs(y0 - smoother->queue[peer].y) + 1;
4305 smoother->avg_dx =
4307 weight_prev_x * smoother->avg_dx) /
4310 smoother->avg_dy =
4312 weight_prev_y * smoother->avg_dy) /
4317 smoother->avg_dx / multiplicator,
4318 smoother->avg_dy / multiplicator));
4321 smoother->squelch_x += smoother->avg_dx;
4322 dxp = smoother->squelch_x / (div_x * multiplicator);
4323 smoother->squelch_x = smoother->squelch_x %
4326 smoother->squelch_y += smoother->avg_dy;
4327 dyp = smoother->squelch_y / (div_y * multiplicator);
4328 smoother->squelch_y = smoother->squelch_y %
4334 if (is_fuzzy == smoother->is_fuzzy) {
4364 smoother->is_fuzzy = is_fuzzy;
4372 smoother->active = 0;