From fbf294e32d41ad9813afbbd35b536b6e0382b532 Mon Sep 17 00:00:00 2001 From: Mr-Dave Date: Sun, 1 May 2022 09:25:36 -0600 Subject: [PATCH] Revise olddiffs --- src/alg.cpp | 3 +-- src/motion_loop.cpp | 4 ++-- src/motionplus.hpp | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/alg.cpp b/src/alg.cpp index 25953c96..aba2b5a6 100644 --- a/src/alg.cpp +++ b/src/alg.cpp @@ -523,7 +523,6 @@ static void alg_despeckle(ctx_cam *cam) common_buffer = cam->imgs.common_buffer; cam->current_image->total_labels = 0; cam->imgs.largest_label = 0; - cam->olddiffs = cam->current_image->diffs; for (i = 0; i < len; i++) { switch (cam->conf->despeckle_filter[i]) { @@ -568,7 +567,7 @@ static void alg_despeckle(ctx_cam *cam) } else { cam->imgs.labelsize_max = 0; // Disable Labeling } - cam->current_image->diffs = cam->olddiffs; + return; } diff --git a/src/motion_loop.cpp b/src/motion_loop.cpp index 671ccd20..bc779512 100644 --- a/src/motion_loop.cpp +++ b/src/motion_loop.cpp @@ -1443,8 +1443,8 @@ static void mlp_setupmode(struct ctx_cam *cam) char part[100]; if (cam->conf->despeckle_filter != "") { - snprintf(part, 99, _("Raw changes: %5d - changes after '%s': %5d"), - cam->olddiffs, cam->conf->despeckle_filter.c_str(), cam->current_image->diffs); + snprintf(part, 99, _("changes after '%s': %5d") + , cam->conf->despeckle_filter.c_str(), cam->current_image->diffs); strcat(msg, part); if (cam->conf->despeckle_filter.find('l') != std::string::npos) { snprintf(part, 99,_(" - labels: %3d"), cam->current_image->total_labels); diff --git a/src/motionplus.hpp b/src/motionplus.hpp index c15c7d4a..58635653 100644 --- a/src/motionplus.hpp +++ b/src/motionplus.hpp @@ -374,7 +374,6 @@ struct ctx_cam { int minimum_frame_time_downcounter; unsigned int get_image; /* Flag used to signal that we capture new image when we run the loop */ - int olddiffs; //only need this in here for a printf later...do we need that printf? int smartmask_ratio; int smartmask_count; unsigned int smartmask_lastrate;