OSDN Git Service

Camera2: switch API interface to java classes
authorYin-Chia Yeh <yinchiayeh@google.com>
Tue, 27 May 2014 16:48:07 +0000 (09:48 -0700)
committerEino-Ville Talvala <etalvala@google.com>
Wed, 28 May 2014 08:49:09 +0000 (01:49 -0700)
android.sensor.info.physicalSize: float[] -> SizeF
android.statistics.hotPixelMap: int[] -> Point[]
android.tonemap.curve[Red|Green|Blue]: float[] -> TonemapCurve

Bug: 14628001
Change-Id: I1e085f5e640a059852fcb504b6dd5f884039e653

camera/docs/docs.html
camera/docs/metadata_properties.xml
camera/include/system/camera_metadata_tags.h

index c4f8c78..8591573 100644 (file)
             <li
             ><a href="#controls_android.tonemap.curveRed">android.tonemap.curveRed</a></li>
             <li
+            ><a href="#controls_android.tonemap.curve">android.tonemap.curve</a></li>
+            <li
             ><a href="#controls_android.tonemap.mode">android.tonemap.mode</a></li>
           </ul>
         </li>
             <li
             ><a href="#dynamic_android.tonemap.curveRed">android.tonemap.curveRed</a></li>
             <li
+            ><a href="#dynamic_android.tonemap.curve">android.tonemap.curve</a></li>
+            <li
             ><a href="#dynamic_android.tonemap.mode">android.tonemap.mode</a></li>
           </ul>
         </li>
@@ -12098,9 +12102,7 @@ result.<wbr/></p></span>
                     <span class="entry_type_enum_notes"><p>TODO: This should be @hide</p>
 <ul>
 <li>Manual tonemap control<ul>
-<li><a href="#controls_android.tonemap.curveBlue">android.<wbr/>tonemap.<wbr/>curve<wbr/>Blue</a></li>
-<li><a href="#controls_android.tonemap.curveGreen">android.<wbr/>tonemap.<wbr/>curve<wbr/>Green</a></li>
-<li><a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a></li>
+<li><a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a></li>
 <li><a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a></li>
 <li><a href="#static_android.tonemap.maxCurvePoints">android.<wbr/>tonemap.<wbr/>max<wbr/>Curve<wbr/>Points</a></li>
 </ul>
@@ -15117,7 +15119,7 @@ for details about encoding this scenario.<wbr/></p>
                 <span class="entry_type_array">
                   2
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [public as sizeF]</span>
 
 
 
@@ -18883,7 +18885,7 @@ If set to OFF,<wbr/> no hotpixel map should be returned.<wbr/></p>
                 <span class="entry_type_array">
                   2 x n
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [public as point]</span>
 
 
 
@@ -19045,7 +19047,7 @@ the output result metadata.<wbr/></p>
                 <span class="entry_type_array">
                   n x 2
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [hidden]</span>
 
 
 
@@ -19098,7 +19100,7 @@ CONTRAST_<wbr/>CURVE.<wbr/></p>
                 <span class="entry_type_array">
                   n x 2
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [hidden]</span>
 
 
 
@@ -19151,7 +19153,7 @@ CONTRAST_<wbr/>CURVE.<wbr/></p>
                 <span class="entry_type_array">
                   n x 2
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [hidden]</span>
 
 
 
@@ -19242,6 +19244,103 @@ control points used as are available.<wbr/></p>
            <!-- end of entry -->
         
                 
+          <tr class="entry" id="controls_android.tonemap.curve">
+            <td class="entry_name
+             " rowspan="5">
+              android.<wbr/>tonemap.<wbr/>curve
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">float</span>
+
+              <span class="entry_type_visibility"> [public as tonemapCurve]</span>
+
+              <span class="entry_type_synthetic">[synthetic] </span>
+
+
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>Tonemapping /<wbr/> contrast /<wbr/> gamma curve to use when <a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a>
+is CONTRAST_<wbr/>CURVE.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_tags">
+            </td>
+
+          </tr>
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>The tonemapCurve consist of three curves for each of red,<wbr/> green,<wbr/> and blue
+channels respectively.<wbr/> The following example uses the red channel as an
+example.<wbr/> The same logic applies to green and blue channel.<wbr/>
+Each channel's curve is defined by an array of control points:</p>
+<pre><code>curveRed =
+  [ P0(in,<wbr/> out),<wbr/> P1(in,<wbr/> out),<wbr/> P2(in,<wbr/> out),<wbr/> P3(in,<wbr/> out),<wbr/> ...,<wbr/> PN(in,<wbr/> out) ]
+2 &lt;= N &lt;= <a href="#static_android.tonemap.maxCurvePoints">android.<wbr/>tonemap.<wbr/>max<wbr/>Curve<wbr/>Points</a></code></pre>
+<p>These are sorted in order of increasing <code>Pin</code>; it is always
+guaranteed that input values 0.<wbr/>0 and 1.<wbr/>0 are included in the list to
+define a complete mapping.<wbr/> For input values between control points,<wbr/>
+the camera device must linearly interpolate between the control
+points.<wbr/></p>
+<p>Each curve can have an independent number of points,<wbr/> and the number
+of points can be less than max (that is,<wbr/> the request doesn't have to
+always provide a curve with number of points equivalent to
+<a href="#static_android.tonemap.maxCurvePoints">android.<wbr/>tonemap.<wbr/>max<wbr/>Curve<wbr/>Points</a>).<wbr/></p>
+<p>A few examples,<wbr/> and their corresponding graphical mappings; these
+only specify the red channel and the precision is limited to 4
+digits,<wbr/> for conciseness.<wbr/></p>
+<p>Linear mapping:</p>
+<pre><code>curveRed = [ (0,<wbr/> 0),<wbr/> (1.<wbr/>0,<wbr/> 1.<wbr/>0) ]
+</code></pre>
+<p><img alt="Linear mapping curve" src="images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png"/></p>
+<p>Invert mapping:</p>
+<pre><code>curveRed = [ (0,<wbr/> 1.<wbr/>0),<wbr/> (1.<wbr/>0,<wbr/> 0) ]
+</code></pre>
+<p><img alt="Inverting mapping curve" src="images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png"/></p>
+<p>Gamma 1/<wbr/>2.<wbr/>2 mapping,<wbr/> with 16 control points:</p>
+<pre><code>curveRed = [
+  (0.<wbr/>0000,<wbr/> 0.<wbr/>0000),<wbr/> (0.<wbr/>0667,<wbr/> 0.<wbr/>2920),<wbr/> (0.<wbr/>1333,<wbr/> 0.<wbr/>4002),<wbr/> (0.<wbr/>2000,<wbr/> 0.<wbr/>4812),<wbr/>
+  (0.<wbr/>2667,<wbr/> 0.<wbr/>5484),<wbr/> (0.<wbr/>3333,<wbr/> 0.<wbr/>6069),<wbr/> (0.<wbr/>4000,<wbr/> 0.<wbr/>6594),<wbr/> (0.<wbr/>4667,<wbr/> 0.<wbr/>7072),<wbr/>
+  (0.<wbr/>5333,<wbr/> 0.<wbr/>7515),<wbr/> (0.<wbr/>6000,<wbr/> 0.<wbr/>7928),<wbr/> (0.<wbr/>6667,<wbr/> 0.<wbr/>8317),<wbr/> (0.<wbr/>7333,<wbr/> 0.<wbr/>8685),<wbr/>
+  (0.<wbr/>8000,<wbr/> 0.<wbr/>9035),<wbr/> (0.<wbr/>8667,<wbr/> 0.<wbr/>9370),<wbr/> (0.<wbr/>9333,<wbr/> 0.<wbr/>9691),<wbr/> (1.<wbr/>0000,<wbr/> 1.<wbr/>0000) ]
+</code></pre>
+<p><img alt="Gamma = 1/2.2 tonemapping curve" src="images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png"/></p>
+<p>Standard sRGB gamma mapping,<wbr/> per IEC 61966-2-1:1999,<wbr/> with 16 control points:</p>
+<pre><code>curveRed = [
+  (0.<wbr/>0000,<wbr/> 0.<wbr/>0000),<wbr/> (0.<wbr/>0667,<wbr/> 0.<wbr/>2864),<wbr/> (0.<wbr/>1333,<wbr/> 0.<wbr/>4007),<wbr/> (0.<wbr/>2000,<wbr/> 0.<wbr/>4845),<wbr/>
+  (0.<wbr/>2667,<wbr/> 0.<wbr/>5532),<wbr/> (0.<wbr/>3333,<wbr/> 0.<wbr/>6125),<wbr/> (0.<wbr/>4000,<wbr/> 0.<wbr/>6652),<wbr/> (0.<wbr/>4667,<wbr/> 0.<wbr/>7130),<wbr/>
+  (0.<wbr/>5333,<wbr/> 0.<wbr/>7569),<wbr/> (0.<wbr/>6000,<wbr/> 0.<wbr/>7977),<wbr/> (0.<wbr/>6667,<wbr/> 0.<wbr/>8360),<wbr/> (0.<wbr/>7333,<wbr/> 0.<wbr/>8721),<wbr/>
+  (0.<wbr/>8000,<wbr/> 0.<wbr/>9063),<wbr/> (0.<wbr/>8667,<wbr/> 0.<wbr/>9389),<wbr/> (0.<wbr/>9333,<wbr/> 0.<wbr/>9701),<wbr/> (1.<wbr/>0000,<wbr/> 1.<wbr/>0000) ]
+</code></pre>
+<p><img alt="sRGB tonemapping curve" src="images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png"/></p>
+            </td>
+          </tr>
+
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">HAL Implementation Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>This entry is created by the framework from the curveRed,<wbr/> curveGreen and
+curveBlue entries.<wbr/></p>
+            </td>
+          </tr>
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
+           <!-- end of entry -->
+        
+                
           <tr class="entry" id="controls_android.tonemap.mode">
             <td class="entry_name
              " rowspan="3">
@@ -19259,11 +19358,10 @@ control points used as are available.<wbr/></p>
                   <li>
                     <span class="entry_type_enum_name">CONTRAST_CURVE</span>
                     <span class="entry_type_enum_notes"><p>Use the tone mapping curve specified in
-the android.<wbr/>tonemap.<wbr/>curve* entries.<wbr/></p>
+the <a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a>* entries.<wbr/></p>
 <p>All color enhancement and tonemapping must be disabled,<wbr/> except
 for applying the tonemapping curve specified by
-<a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a>,<wbr/> <a href="#controls_android.tonemap.curveBlue">android.<wbr/>tonemap.<wbr/>curve<wbr/>Blue</a>,<wbr/> or
-<a href="#controls_android.tonemap.curveGreen">android.<wbr/>tonemap.<wbr/>curve<wbr/>Green</a>.<wbr/></p>
+<a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a>.<wbr/></p>
 <p>Must not slow down frame rate relative to raw
 sensor output.<wbr/></p></span>
                   </li>
@@ -19314,8 +19412,7 @@ CONTRAST_<wbr/>CURVE.<wbr/></p>
 <p>This must be set to a valid mode in
 <a href="#static_android.tonemap.availableToneMapModes">android.<wbr/>tonemap.<wbr/>available<wbr/>Tone<wbr/>Map<wbr/>Modes</a>.<wbr/></p>
 <p>When using either FAST or HIGH_<wbr/>QUALITY,<wbr/> the camera device will
-emit its own tonemap curve in <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a>,<wbr/>
-<a href="#controls_android.tonemap.curveGreen">android.<wbr/>tonemap.<wbr/>curve<wbr/>Green</a>,<wbr/> and <a href="#controls_android.tonemap.curveBlue">android.<wbr/>tonemap.<wbr/>curve<wbr/>Blue</a>.<wbr/>
+emit its own tonemap curve in <a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a>.<wbr/>
 These values are always available,<wbr/> and as close as possible to the
 actually used nonlinear/<wbr/>nonglobal transforms.<wbr/></p>
 <p>If a request is sent with CONTRAST_<wbr/>CURVE with the camera device's
@@ -19374,8 +19471,7 @@ roughly the same.<wbr/></p>
 
             <td class="entry_description">
               <p>Maximum number of supported points in the
-tonemap curve that can be used for <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a>,<wbr/> or
-<a href="#controls_android.tonemap.curveGreen">android.<wbr/>tonemap.<wbr/>curve<wbr/>Green</a>,<wbr/> or <a href="#controls_android.tonemap.curveBlue">android.<wbr/>tonemap.<wbr/>curve<wbr/>Blue</a>.<wbr/></p>
+tonemap curve that can be used for <a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a>.<wbr/></p>
             </td>
 
             <td class="entry_units">
@@ -19395,7 +19491,7 @@ tonemap curve that can be used for <a href="#controls_android.tonemap.curveRed">
           <tr class="entry_cont">
             <td class="entry_details" colspan="5">
               <p>If the actual number of points provided by the application (in
-android.<wbr/>tonemap.<wbr/>curve*)  is less than max,<wbr/> the camera device will
+<a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a>*)  is less than max,<wbr/> the camera device will
 resample the curve to its internal representation,<wbr/> using linear
 interpolation.<wbr/></p>
 <p>The output curves in the result metadata may have a different number
@@ -19507,7 +19603,7 @@ FAST.<wbr/></p>
                 <span class="entry_type_array">
                   n x 2
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [hidden]</span>
 
 
 
@@ -19560,7 +19656,7 @@ CONTRAST_<wbr/>CURVE.<wbr/></p>
                 <span class="entry_type_array">
                   n x 2
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [hidden]</span>
 
 
 
@@ -19613,7 +19709,7 @@ CONTRAST_<wbr/>CURVE.<wbr/></p>
                 <span class="entry_type_array">
                   n x 2
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [hidden]</span>
 
 
 
@@ -19704,6 +19800,103 @@ control points used as are available.<wbr/></p>
            <!-- end of entry -->
         
                 
+          <tr class="entry" id="dynamic_android.tonemap.curve">
+            <td class="entry_name
+             " rowspan="5">
+              android.<wbr/>tonemap.<wbr/>curve
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">float</span>
+
+              <span class="entry_type_visibility"> [public as tonemapCurve]</span>
+
+              <span class="entry_type_synthetic">[synthetic] </span>
+
+
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>Tonemapping /<wbr/> contrast /<wbr/> gamma curve to use when <a href="#controls_android.tonemap.mode">android.<wbr/>tonemap.<wbr/>mode</a>
+is CONTRAST_<wbr/>CURVE.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_tags">
+            </td>
+
+          </tr>
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>The tonemapCurve consist of three curves for each of red,<wbr/> green,<wbr/> and blue
+channels respectively.<wbr/> The following example uses the red channel as an
+example.<wbr/> The same logic applies to green and blue channel.<wbr/>
+Each channel's curve is defined by an array of control points:</p>
+<pre><code>curveRed =
+  [ P0(in,<wbr/> out),<wbr/> P1(in,<wbr/> out),<wbr/> P2(in,<wbr/> out),<wbr/> P3(in,<wbr/> out),<wbr/> ...,<wbr/> PN(in,<wbr/> out) ]
+2 &lt;= N &lt;= <a href="#static_android.tonemap.maxCurvePoints">android.<wbr/>tonemap.<wbr/>max<wbr/>Curve<wbr/>Points</a></code></pre>
+<p>These are sorted in order of increasing <code>Pin</code>; it is always
+guaranteed that input values 0.<wbr/>0 and 1.<wbr/>0 are included in the list to
+define a complete mapping.<wbr/> For input values between control points,<wbr/>
+the camera device must linearly interpolate between the control
+points.<wbr/></p>
+<p>Each curve can have an independent number of points,<wbr/> and the number
+of points can be less than max (that is,<wbr/> the request doesn't have to
+always provide a curve with number of points equivalent to
+<a href="#static_android.tonemap.maxCurvePoints">android.<wbr/>tonemap.<wbr/>max<wbr/>Curve<wbr/>Points</a>).<wbr/></p>
+<p>A few examples,<wbr/> and their corresponding graphical mappings; these
+only specify the red channel and the precision is limited to 4
+digits,<wbr/> for conciseness.<wbr/></p>
+<p>Linear mapping:</p>
+<pre><code>curveRed = [ (0,<wbr/> 0),<wbr/> (1.<wbr/>0,<wbr/> 1.<wbr/>0) ]
+</code></pre>
+<p><img alt="Linear mapping curve" src="images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png"/></p>
+<p>Invert mapping:</p>
+<pre><code>curveRed = [ (0,<wbr/> 1.<wbr/>0),<wbr/> (1.<wbr/>0,<wbr/> 0) ]
+</code></pre>
+<p><img alt="Inverting mapping curve" src="images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png"/></p>
+<p>Gamma 1/<wbr/>2.<wbr/>2 mapping,<wbr/> with 16 control points:</p>
+<pre><code>curveRed = [
+  (0.<wbr/>0000,<wbr/> 0.<wbr/>0000),<wbr/> (0.<wbr/>0667,<wbr/> 0.<wbr/>2920),<wbr/> (0.<wbr/>1333,<wbr/> 0.<wbr/>4002),<wbr/> (0.<wbr/>2000,<wbr/> 0.<wbr/>4812),<wbr/>
+  (0.<wbr/>2667,<wbr/> 0.<wbr/>5484),<wbr/> (0.<wbr/>3333,<wbr/> 0.<wbr/>6069),<wbr/> (0.<wbr/>4000,<wbr/> 0.<wbr/>6594),<wbr/> (0.<wbr/>4667,<wbr/> 0.<wbr/>7072),<wbr/>
+  (0.<wbr/>5333,<wbr/> 0.<wbr/>7515),<wbr/> (0.<wbr/>6000,<wbr/> 0.<wbr/>7928),<wbr/> (0.<wbr/>6667,<wbr/> 0.<wbr/>8317),<wbr/> (0.<wbr/>7333,<wbr/> 0.<wbr/>8685),<wbr/>
+  (0.<wbr/>8000,<wbr/> 0.<wbr/>9035),<wbr/> (0.<wbr/>8667,<wbr/> 0.<wbr/>9370),<wbr/> (0.<wbr/>9333,<wbr/> 0.<wbr/>9691),<wbr/> (1.<wbr/>0000,<wbr/> 1.<wbr/>0000) ]
+</code></pre>
+<p><img alt="Gamma = 1/2.2 tonemapping curve" src="images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png"/></p>
+<p>Standard sRGB gamma mapping,<wbr/> per IEC 61966-2-1:1999,<wbr/> with 16 control points:</p>
+<pre><code>curveRed = [
+  (0.<wbr/>0000,<wbr/> 0.<wbr/>0000),<wbr/> (0.<wbr/>0667,<wbr/> 0.<wbr/>2864),<wbr/> (0.<wbr/>1333,<wbr/> 0.<wbr/>4007),<wbr/> (0.<wbr/>2000,<wbr/> 0.<wbr/>4845),<wbr/>
+  (0.<wbr/>2667,<wbr/> 0.<wbr/>5532),<wbr/> (0.<wbr/>3333,<wbr/> 0.<wbr/>6125),<wbr/> (0.<wbr/>4000,<wbr/> 0.<wbr/>6652),<wbr/> (0.<wbr/>4667,<wbr/> 0.<wbr/>7130),<wbr/>
+  (0.<wbr/>5333,<wbr/> 0.<wbr/>7569),<wbr/> (0.<wbr/>6000,<wbr/> 0.<wbr/>7977),<wbr/> (0.<wbr/>6667,<wbr/> 0.<wbr/>8360),<wbr/> (0.<wbr/>7333,<wbr/> 0.<wbr/>8721),<wbr/>
+  (0.<wbr/>8000,<wbr/> 0.<wbr/>9063),<wbr/> (0.<wbr/>8667,<wbr/> 0.<wbr/>9389),<wbr/> (0.<wbr/>9333,<wbr/> 0.<wbr/>9701),<wbr/> (1.<wbr/>0000,<wbr/> 1.<wbr/>0000) ]
+</code></pre>
+<p><img alt="sRGB tonemapping curve" src="images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png"/></p>
+            </td>
+          </tr>
+
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">HAL Implementation Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>This entry is created by the framework from the curveRed,<wbr/> curveGreen and
+curveBlue entries.<wbr/></p>
+            </td>
+          </tr>
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
+           <!-- end of entry -->
+        
+                
           <tr class="entry" id="dynamic_android.tonemap.mode">
             <td class="entry_name
              " rowspan="3">
@@ -19721,11 +19914,10 @@ control points used as are available.<wbr/></p>
                   <li>
                     <span class="entry_type_enum_name">CONTRAST_CURVE</span>
                     <span class="entry_type_enum_notes"><p>Use the tone mapping curve specified in
-the android.<wbr/>tonemap.<wbr/>curve* entries.<wbr/></p>
+the <a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a>* entries.<wbr/></p>
 <p>All color enhancement and tonemapping must be disabled,<wbr/> except
 for applying the tonemapping curve specified by
-<a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a>,<wbr/> <a href="#controls_android.tonemap.curveBlue">android.<wbr/>tonemap.<wbr/>curve<wbr/>Blue</a>,<wbr/> or
-<a href="#controls_android.tonemap.curveGreen">android.<wbr/>tonemap.<wbr/>curve<wbr/>Green</a>.<wbr/></p>
+<a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a>.<wbr/></p>
 <p>Must not slow down frame rate relative to raw
 sensor output.<wbr/></p></span>
                   </li>
@@ -19776,8 +19968,7 @@ CONTRAST_<wbr/>CURVE.<wbr/></p>
 <p>This must be set to a valid mode in
 <a href="#static_android.tonemap.availableToneMapModes">android.<wbr/>tonemap.<wbr/>available<wbr/>Tone<wbr/>Map<wbr/>Modes</a>.<wbr/></p>
 <p>When using either FAST or HIGH_<wbr/>QUALITY,<wbr/> the camera device will
-emit its own tonemap curve in <a href="#controls_android.tonemap.curveRed">android.<wbr/>tonemap.<wbr/>curve<wbr/>Red</a>,<wbr/>
-<a href="#controls_android.tonemap.curveGreen">android.<wbr/>tonemap.<wbr/>curve<wbr/>Green</a>,<wbr/> and <a href="#controls_android.tonemap.curveBlue">android.<wbr/>tonemap.<wbr/>curve<wbr/>Blue</a>.<wbr/>
+emit its own tonemap curve in <a href="#controls_android.tonemap.curve">android.<wbr/>tonemap.<wbr/>curve</a>.<wbr/>
 These values are always available,<wbr/> and as close as possible to the
 actually used nonlinear/<wbr/>nonglobal transforms.<wbr/></p>
 <p>If a request is sent with CONTRAST_<wbr/>CURVE with the camera device's
index 458f9c5..62dfe3b 100644 (file)
@@ -89,6 +89,15 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
     <typedef name="enumList">
       <language name="java">int</language>
     </typedef>
+    <typedef name="sizeF">
+      <language name="java">android.util.SizeF</language>
+    </typedef>
+    <typedef name="point">
+      <language name="java">android.graphics.Point</language>
+    </typedef>
+    <typedef name="tonemapCurve">
+      <language name="java">android.hardware.camera2.params.TonemapCurve</language>
+    </typedef>
   </types>
 
   <namespace name="android">
@@ -3098,9 +3107,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
               TODO: This should be @hide
 
               * Manual tonemap control
-                    * android.tonemap.curveBlue
-                    * android.tonemap.curveGreen
-                    * android.tonemap.curveRed
+                    * android.tonemap.curve
                     * android.tonemap.mode
                     * android.tonemap.maxCurvePoints
               * Manual white balance control
@@ -4213,7 +4220,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           </entry>
           <entry name="physicalSize" type="float" visibility="public"
           type_notes="width x height in millimeters"
-          container="array">
+          container="array" typedef="sizeF">
             <array>
               <size>2</size>
             </array>
@@ -5372,7 +5379,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         </clone>
         <entry name="hotPixelMap" type="int32" visibility="public"
         type_notes="list of coordinates based on android.sensor.pixelArraySize"
-        container="array">
+        container="array" typedef="point">
           <array>
             <size>2</size>
             <size>n</size>
@@ -5427,7 +5434,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
     </section>
     <section name="tonemap">
       <controls>
-        <entry name="curveBlue" type="float" visibility="public"
+        <entry name="curveBlue" type="float" visibility="hidden"
         type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
         container="array">
           <array>
@@ -5441,7 +5448,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <range>same as android.tonemap.curveRed</range>
           <details>See android.tonemap.curveRed for more details.</details>
         </entry>
-        <entry name="curveGreen" type="float" visibility="public"
+        <entry name="curveGreen" type="float" visibility="hidden"
         type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
         container="array">
           <array>
@@ -5455,7 +5462,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <range>same as android.tonemap.curveRed</range>
           <details>See android.tonemap.curveRed for more details.</details>
         </entry>
-        <entry name="curveRed" type="float" visibility="public"
+        <entry name="curveRed" type="float" visibility="hidden"
         type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
         container="array">
           <array>
@@ -5530,6 +5537,71 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           control points used as are available.
         </hal_details>
         </entry>
+        <entry name="curve" type="float" visibility="public" synthetic="true" typedef="tonemapCurve">
+          <description>Tonemapping / contrast / gamma curve to use when android.tonemap.mode
+          is CONTRAST_CURVE.</description>
+          <details>
+          The tonemapCurve consist of three curves for each of red, green, and blue
+          channels respectively. The following example uses the red channel as an
+          example. The same logic applies to green and blue channel.
+          Each channel's curve is defined by an array of control points:
+
+              curveRed =
+                [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
+              2 &lt;= N &lt;= android.tonemap.maxCurvePoints
+
+          These are sorted in order of increasing `Pin`; it is always
+          guaranteed that input values 0.0 and 1.0 are included in the list to
+          define a complete mapping. For input values between control points,
+          the camera device must linearly interpolate between the control
+          points.
+
+          Each curve can have an independent number of points, and the number
+          of points can be less than max (that is, the request doesn't have to
+          always provide a curve with number of points equivalent to
+          android.tonemap.maxCurvePoints).
+
+          A few examples, and their corresponding graphical mappings; these
+          only specify the red channel and the precision is limited to 4
+          digits, for conciseness.
+
+          Linear mapping:
+
+              curveRed = [ (0, 0), (1.0, 1.0) ]
+
+          ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png)
+
+          Invert mapping:
+
+              curveRed = [ (0, 1.0), (1.0, 0) ]
+
+          ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png)
+
+          Gamma 1/2.2 mapping, with 16 control points:
+
+              curveRed = [
+                (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
+                (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
+                (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
+                (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
+
+          ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png)
+
+          Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:
+
+              curveRed = [
+                (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
+                (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
+                (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
+                (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
+
+          ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png)
+        </details>
+        <hal_details>
+            This entry is created by the framework from the curveRed, curveGreen and
+            curveBlue entries.
+        </hal_details>
+        </entry>
         <entry name="mode" type="byte" visibility="public" enum="true">
           <enum>
             <value>CONTRAST_CURVE
@@ -5538,8 +5610,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
 
               All color enhancement and tonemapping must be disabled, except
               for applying the tonemapping curve specified by
-              android.tonemap.curveRed, android.tonemap.curveBlue, or
-              android.tonemap.curveGreen.
+              android.tonemap.curve.
 
               Must not slow down frame rate relative to raw
               sensor output.
@@ -5580,8 +5651,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           android.tonemap.availableToneMapModes.
 
           When using either FAST or HIGH_QUALITY, the camera device will
-          emit its own tonemap curve in android.tonemap.curveRed,
-          android.tonemap.curveGreen, and android.tonemap.curveBlue.
+          emit its own tonemap curve in android.tonemap.curve.
           These values are always available, and as close as possible to the
           actually used nonlinear/nonglobal transforms.
 
@@ -5593,8 +5663,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
       <static>
         <entry name="maxCurvePoints" type="int32" visibility="public" >
           <description>Maximum number of supported points in the
-            tonemap curve that can be used for android.tonemap.curveRed, or
-            android.tonemap.curveGreen, or android.tonemap.curveBlue.
+            tonemap curve that can be used for android.tonemap.curve.
           </description>
           <range>&amp;gt;= 64</range>
           <details>
@@ -5634,6 +5703,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         </clone>
         <clone entry="android.tonemap.curveRed" kind="controls">
         </clone>
+        <clone entry="android.tonemap.curve" kind="controls">
+        </clone>
         <clone entry="android.tonemap.mode" kind="controls">
         </clone>
       </dynamic>
index 63ccef3..e168e4b 100644 (file)
@@ -340,10 +340,10 @@ typedef enum camera_metadata_tag {
                                                       // byte[]       | public
     ANDROID_STATISTICS_INFO_END,
 
-    ANDROID_TONEMAP_CURVE_BLUE =                      // float[]      | public
+    ANDROID_TONEMAP_CURVE_BLUE =                      // float[]      | hidden
             ANDROID_TONEMAP_START,
-    ANDROID_TONEMAP_CURVE_GREEN,                      // float[]      | public
-    ANDROID_TONEMAP_CURVE_RED,                        // float[]      | public
+    ANDROID_TONEMAP_CURVE_GREEN,                      // float[]      | hidden
+    ANDROID_TONEMAP_CURVE_RED,                        // float[]      | hidden
     ANDROID_TONEMAP_MODE,                             // enum         | public
     ANDROID_TONEMAP_MAX_CURVE_POINTS,                 // int32        | public
     ANDROID_TONEMAP_AVAILABLE_TONE_MAP_MODES,         // byte[]       | public