auto: cleanups

This commit is contained in:
Pavel Machek
2024-09-03 22:04:07 +02:00
parent 5fd1e09059
commit eeca8fe4cc

View File

@@ -385,7 +385,8 @@ update_control(controlstate *control)
static int focus; static int focus;
static int focus_phase; static int focus_phase;
static void auto_focus_start(void) static void
auto_focus_start(void)
{ {
focus_phase = 0; focus_phase = 0;
focus = 0; focus = 0;
@@ -398,7 +399,8 @@ struct focus_stats {
#define PH_SWEEP 5 #define PH_SWEEP 5
#define PH_DONE 6 #define PH_DONE 6
static void auto_focus_step(const struct focus_stats *stats) static void
auto_focus_step(const struct focus_stats *stats)
{ {
static uint64_t best_sharp, best_focus; static uint64_t best_sharp, best_focus;
static const int debug = 1; static const int debug = 1;
@@ -475,8 +477,9 @@ focus_stats(struct focus_stats *stats, const unsigned int *frame, const int widt
stats->sharp = sharp; stats->sharp = sharp;
} }
/* This does approximately 1.3 EV steps */ /* This does approximately 0.3 EV steps */
static void update_exp(controlstate *control, int direction) static void
update_exp(controlstate *control, int direction)
{ {
int step = 0; int step = 0;
int min_step = 4; int min_step = 4;