OSDN Git Service

Some tweaks to the median filter
[android-x86/hardware-intel-libsensors.git] / filtering.h
index 78f890f..6543a7d 100644 (file)
@@ -1,25 +1,9 @@
 #ifndef FILTERING_H
 #define FILTERING_H
 
-#define SAMPLE_SIZE 7
-
-struct circ_buff
-{
-       float* buff;
-       unsigned int idx;
-       unsigned int count;
-       unsigned int size;
-};
-
-struct filter
-{
-       struct circ_buff* x_buff;
-       struct circ_buff* y_buff;
-       struct circ_buff* z_buff;
-};
-
-void add_to_buff(struct circ_buff* circ_buff, float val);
-float median(float* queue, unsigned int size);
-void denoise_median(struct sensors_event_t* event, struct sensor_info_t* info);
-
+void denoise_median(struct sensor_info_t* info, struct sensors_event_t* event,
+       unsigned int num_fields);
+void denoise_median_init(int s, unsigned int sample_size,
+       unsigned int num_fields);
+void denoise_median_release(int s);
 #endif