From bbc077f52897d36867a431f6301f753a106a1666 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Tue, 3 Sep 2024 07:04:34 +0000 Subject: [PATCH] af: if it improves on its own, likely scene or AE changed, and time to restart --- src/process_pipeline.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/process_pipeline.c b/src/process_pipeline.c index fab6d04..46d54a2 100644 --- a/src/process_pipeline.c +++ b/src/process_pipeline.c @@ -398,6 +398,11 @@ static void auto_focus_step(const struct focus_stats *stats) if (debug) printf("Phase %d, sharp %d best %d ", focus_phase, (int)(stats->sharp / 10000), (int)(best_sharp/ 10000)); if (focus_phase >= PH_DONE) { focus_phase++; + if (stats->sharp > (best_sharp * 2)) { + if (debug) printf("Improved on its own.\n"); + auto_focus_start(); + return; + } if (stats->sharp < (best_sharp * 6) / 10) { if (debug) printf("Lost, restart.\n"); auto_focus_start();