Add jerk thresholded pruning.
This will change MotionPredictor::predict() outputs once
enable_prediction_pruning_via_jerk_thresholding is enabled.
Test: atest libinput_tests --host with local flag override to enable
enable_prediction_pruning_via_jerk_thresholding.
Test: atest CtsInputTestCases
Test: atest MotionPredictorBenchmark MotionPredictorTest
Bug: 266747654
Change-Id: I11eb1972246468a1f3824656f5ac57e01e0359cd
diff --git a/libs/input/TfLiteMotionPredictor.cpp b/libs/input/TfLiteMotionPredictor.cpp
index d17476e..b843a4b 100644
--- a/libs/input/TfLiteMotionPredictor.cpp
+++ b/libs/input/TfLiteMotionPredictor.cpp
@@ -281,6 +281,8 @@
Config config{
.predictionInterval = parseXMLInt64(*configRoot, "prediction-interval"),
.distanceNoiseFloor = parseXMLFloat(*configRoot, "distance-noise-floor"),
+ .lowJerk = parseXMLFloat(*configRoot, "low-jerk"),
+ .highJerk = parseXMLFloat(*configRoot, "high-jerk"),
};
return std::unique_ptr<TfLiteMotionPredictorModel>(