added automatic mode selection from naive scanline time estimation
moved calibration detector switch to own method