OSDN Git Service

GMINL-7944: Introduce internal sensor types for ALS
[android-x86/hardware-intel-libsensors.git] / filtering.h
index 78f890f..f577598 100644 (file)
@@ -1,25 +1,13 @@
+/*
+ * Copyright (C) 2014-2015 Intel Corporation.
+ */
+
 #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 setup_noise_filtering             (int s);
+void release_noise_filtering_data      (int s);
+void denoise                           (int s, sensors_event_t* event);
+void record_sample                     (int s, const sensors_event_t* data);
 
 #endif