title: Auto exposure implementation
body: <p>I'm working on custom AE implementation using android Camera2 API. Current idea is hold the mean brightness of image at some gray level (128 for example). So algorithm could be described as this:</p>
  
  <pre><code>calculate currentEV (using current shutterSpeed, currentISO and aperture);
  calculate meanBrightness (using image data);
  calculate desiredEV (using currentEV, currentMeanBrightness and desiredMeanBrightness);
  calculate desiredShutterSpeed and desiredISO (using desiredEV)
  </code></pre>
  
  <p>This iterative algorithm is working. But if compare it with built-in, it looks pretty slow and clumsy.
  I searched for information about 3A routines in Camera2 API on the internet and in android source code, but can't find something specific. Some presentations mention about 3A-library. I'd like to know, is it open-sourced and standart for all android devices? Or where I can get info about Auto Exposure implementation in mobile devices?</p>