From 16092880d0a0af8137f3eb13ac8567dd509f262f Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Tue, 3 Sep 2024 22:45:24 +0200 Subject: [PATCH] auto: display values in known units --- src/process_pipeline.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/process_pipeline.c b/src/process_pipeline.c index 0b5cf13..8dc51c8 100644 --- a/src/process_pipeline.c +++ b/src/process_pipeline.c @@ -489,6 +489,31 @@ update_exp(controlstate *control, int direction) control->value_req = control->value + (step * direction); } +static void +summarize() +{ + double time, gain; + + /* FIXME: may be approximate -- width/height should include blank areas */ + double PCK = state_proc.mode->width * state_proc.mode->height * 30; + double per_line = state_proc.mode->width / PCK; + time = state_proc.exposure.value * per_line; + + //Then the exposure time = (exposure line) * (time per line ). + + /* Frame time in seconds */ + //time = state_proc.exposure.value * state_proc.mode->height; + + /* */ + gain = state_proc.gain.value / 32.; /* FIXME: .min */ + if (0) /* dgain */ + gain *= state_proc.dgain.value / 256.; + + printf("1/%.0f sec, ISO %.0f, t=%f, g=%f %d %d\n", + (float) (1.0/time), (float) (gain*100), + (float) time, (float) gain, state_proc.gain.value, state_proc.dgain.value); +} + static void process_aaa() { @@ -562,6 +587,7 @@ process_aaa() update_control(&state_proc.gain); update_control(&state_proc.dgain); update_control(&state_proc.exposure); + summarize(); } if (auto_balance) {