af: if it improves on its own, likely scene or AE changed, and time to restart
This commit is contained in:
@@ -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 (debug) printf("Phase %d, sharp %d best %d ", focus_phase, (int)(stats->sharp / 10000), (int)(best_sharp/ 10000));
|
||||||
if (focus_phase >= PH_DONE) {
|
if (focus_phase >= PH_DONE) {
|
||||||
focus_phase++;
|
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 (stats->sharp < (best_sharp * 6) / 10) {
|
||||||
if (debug) printf("Lost, restart.\n");
|
if (debug) printf("Lost, restart.\n");
|
||||||
auto_focus_start();
|
auto_focus_start();
|
||||||
|
Reference in New Issue
Block a user