aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ts_filter_median.h
blob: b13f361bb6ac8130fccb37fef650ae297ac12da8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef __TS_FILTER_MEDIAN_H__
#define __TS_FILTER_MEDIAN_H__

#include "ts_filter.h"

/*
 * Touchscreen filter.
 *
 * median
 *
 * (c) 2008 Andy Green <andy@warmcat.com>
 */

struct ts_filter_median_configuration {
	/* Size of the filter. */
	int extent;
	/* Precomputed midpoint. */
	int midpoint;
	/* A reference value for us to check if we are going fast or slow. */
	int decimation_threshold;
	/* How many points to replace if we're going fast. */
	int decimation_above;
	/* How many points to replace if we're going slow. */
	int decimation_below;

	/* Generic configuration. */
	struct ts_filter_configuration config;
};

extern const struct ts_filter_api ts_filter_median_api;

#endif