summaryrefslogtreecommitdiff
blob: 223cc26c76e39899d46e0865dd8ee043dbdc7eb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- 1/avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp
+++ 1/avidemux_plugins/ADM_videoFilters6/telecide/Telecide_getFrame.cpp
@@ -240,7 +240,7 @@
                         {
                                 // The chosen frame doesn't match the prediction.
                                 if (predicted_metric == 0) mismatch = 0.0;
-                                else mismatch = (100.0*abs(predicted_metric - lowest))/predicted_metric;
+                                else mismatch = (100.0*abs(int64_t(predicted_metric) - int64_t(lowest)))/predicted_metric;
                                 if (mismatch < gthresh)
                                 {
                                         // It's close enough, so use the predicted one.
@@ -283,7 +283,7 @@
                                         {
                                                 // The chosen frame doesn't match the prediction.
                                                 if (predicted_metric == 0) mismatch = 0.0;
-                                                else mismatch = (100.0*abs(predicted_metric - lowest))/predicted_metric;
+                                                else mismatch = (100.0*abs(int64_t(predicted_metric) - int64_t(lowest)))/predicted_metric;
                                                 if ((int) mismatch <= gthresh)
                                                 {
                                                         // It's close enough, so use the predicted one.