OSDN Git Service

camera: Add OisSamples synthetic key
authorChien-Yu Chen <cychen@google.com>
Thu, 15 Feb 2018 20:34:30 +0000 (12:34 -0800)
committerChien-Yu Chen <cychen@google.com>
Thu, 22 Feb 2018 23:29:59 +0000 (15:29 -0800)
Add a synthetic OisSamples key containing timestamps and
shifts.

Test: CTS
Bug: 64847201
Change-Id: Ic9c4f773d4ccae483f022ed68b0d3a9590af1e0c

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

index f4c60ec..9baaa54 100644 (file)
             ><a href="#dynamic_android.statistics.oisXShifts">android.statistics.oisXShifts</a></li>
             <li
             ><a href="#dynamic_android.statistics.oisYShifts">android.statistics.oisYShifts</a></li>
+            <li
+            ><a href="#dynamic_android.statistics.oisSamples">android.statistics.oisSamples</a></li>
           </ul>
         </li>
       </ul> <!-- toc_section -->
@@ -24093,7 +24095,7 @@ the output result metadata.<wbr/></p>
                 
           <tr class="entry" id="controls_android.statistics.oisDataMode">
             <td class="entry_name
-             " rowspan="3">
+             " rowspan="1">
               android.<wbr/>statistics.<wbr/>ois<wbr/>Data<wbr/>Mode
             </td>
             <td class="entry_type">
@@ -24138,16 +24140,6 @@ result metadata.<wbr/></p>
             </td>
 
           </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>When set to ON,<wbr/>
-<a href="#dynamic_android.statistics.oisTimestamps">android.<wbr/>statistics.<wbr/>ois<wbr/>Timestamps</a>,<wbr/> android.<wbr/>statistics.<wbr/>ois<wbr/>Shift<wbr/>Pixel<wbr/>X,<wbr/>
-and android.<wbr/>statistics.<wbr/>ois<wbr/>Shift<wbr/>Pixel<wbr/>Y provide OIS data in the output result metadata.<wbr/></p>
-            </td>
-          </tr>
 
 
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
@@ -25967,7 +25959,7 @@ the output result metadata.<wbr/></p>
                 
           <tr class="entry" id="dynamic_android.statistics.oisDataMode">
             <td class="entry_name
-             " rowspan="3">
+             " rowspan="1">
               android.<wbr/>statistics.<wbr/>ois<wbr/>Data<wbr/>Mode
             </td>
             <td class="entry_type">
@@ -26012,16 +26004,6 @@ result metadata.<wbr/></p>
             </td>
 
           </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>When set to ON,<wbr/>
-<a href="#dynamic_android.statistics.oisTimestamps">android.<wbr/>statistics.<wbr/>ois<wbr/>Timestamps</a>,<wbr/> android.<wbr/>statistics.<wbr/>ois<wbr/>Shift<wbr/>Pixel<wbr/>X,<wbr/>
-and android.<wbr/>statistics.<wbr/>ois<wbr/>Shift<wbr/>Pixel<wbr/>Y provide OIS data in the output result metadata.<wbr/></p>
-            </td>
-          </tr>
 
 
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
@@ -26040,7 +26022,7 @@ and android.<wbr/>statistics.<wbr/>ois<wbr/>Shift<wbr/>Pixel<wbr/>Y provide OIS
                 <span class="entry_type_array">
                   n
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [ndk_public]</span>
 
 
 
@@ -26095,7 +26077,7 @@ timebase as and comparable to <a href="#dynamic_android.sensor.timestamp">androi
                 <span class="entry_type_array">
                   n
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [ndk_public]</span>
 
 
 
@@ -26130,7 +26112,7 @@ timebase as and comparable to <a href="#dynamic_android.sensor.timestamp">androi
             <td class="entry_details" colspan="6">
               <p>The array contains the amount of shifts in x direction,<wbr/> in pixels,<wbr/> based on OIS samples.<wbr/>
 A positive value is a shift from left to right in active array coordinate system.<wbr/> For
-example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordinates,<wbr/> an shift of
+example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordinates,<wbr/> a shift of
 (3,<wbr/> 0) puts the new optical center at (1003,<wbr/> 500).<wbr/></p>
 <p>The number of shifts must match the number of timestamps in
 <a href="#dynamic_android.statistics.oisTimestamps">android.<wbr/>statistics.<wbr/>ois<wbr/>Timestamps</a>.<wbr/></p>
@@ -26154,7 +26136,7 @@ example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordi
                 <span class="entry_type_array">
                   n
                 </span>
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [ndk_public]</span>
 
 
 
@@ -26189,7 +26171,7 @@ example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordi
             <td class="entry_details" colspan="6">
               <p>The array contains the amount of shifts in y direction,<wbr/> in pixels,<wbr/> based on OIS samples.<wbr/>
 A positive value is a shift from top to bottom in active array coordinate system.<wbr/> For
-example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordinates,<wbr/> an shift of
+example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordinates,<wbr/> a shift of
 (0,<wbr/> 5) puts the new optical center at (1000,<wbr/> 505).<wbr/></p>
 <p>The number of shifts must match the number of timestamps in
 <a href="#dynamic_android.statistics.oisTimestamps">android.<wbr/>statistics.<wbr/>ois<wbr/>Timestamps</a>.<wbr/></p>
@@ -26200,6 +26182,67 @@ example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array coordi
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
+                
+          <tr class="entry" id="dynamic_android.statistics.oisSamples">
+            <td class="entry_name
+             " rowspan="3">
+              android.<wbr/>statistics.<wbr/>ois<wbr/>Samples
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">float</span>
+                <span class="entry_type_container">x</span>
+
+                <span class="entry_type_array">
+                  n
+                </span>
+              <span class="entry_type_visibility"> [java_public as oisSample]</span>
+
+              <span class="entry_type_synthetic">[synthetic] </span>
+
+
+
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>An array of OIS samples.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_hal_version">
+              <p>3.<wbr/>3</p>
+            </td>
+
+            <td class="entry_tags">
+            </td>
+
+          </tr>
+          <tr class="entries_header">
+            <th class="th_details" colspan="6">Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="6">
+              <p>Each OIS sample contains the timestamp and the amount of shifts in x and y direction,<wbr/>
+in pixels,<wbr/> of the OIS sample.<wbr/></p>
+<p>A positive value for a shift in x direction is a shift from left to right in active array
+coordinate system.<wbr/> For example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array
+coordinates,<wbr/> a shift of (3,<wbr/> 0) puts the new optical center at (1003,<wbr/> 500).<wbr/></p>
+<p>A positive value for a shift in y direction is a shift from top to bottom in active array
+coordinate system.<wbr/> For example,<wbr/> if the optical center is (1000,<wbr/> 500) in active array
+coordinates,<wbr/> a shift of (0,<wbr/> 5) puts the new optical center at (1000,<wbr/> 505).<wbr/></p>
+            </td>
+          </tr>
+
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
+           <!-- end of entry -->
+        
         
 
       <!-- end of kind -->
index 1130411..9c5e069 100644 (file)
@@ -127,6 +127,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
     <typedef name="reprocessFormatsMap">
       <language name="java">android.hardware.camera2.params.ReprocessFormatsMap</language>
     </typedef>
+    <typedef name="oisSample">
+      <language name="java">android.hardware.camera2.params.OisSample</language>
+    </typedef>
   </types>
 
   <namespace name="android">
@@ -8307,21 +8310,24 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             <value>OFF
             <notes>Do not include OIS data in the capture result.</notes></value>
             <value>ON
-            <notes>Include OIS data in the capture result.</notes></value>
+            <notes>Include OIS data in the capture result.</notes>
+            <sdk_notes>android.statistics.oisSamples provides OIS sample data in the
+            output result metadata.
+            </sdk_notes>
+            <ndk_notes>android.statistics.oisTimestamps, android.statistics.oisXShifts,
+            and android.statistics.oisYShifts provide OIS data in the output result metadata.
+            </ndk_notes>
+            </value>
           </enum>
           <description>A control for selecting whether OIS position information is included in output
           result metadata.</description>
           <range>android.Statistics.info.availableOisDataModes</range>
-          <details>When set to ON,
-          android.statistics.oisTimestamps, android.statistics.oisShiftPixelX,
-          and android.statistics.oisShiftPixelY provide OIS data in the output result metadata.
-          </details>
         </entry>
       </controls>
       <dynamic>
         <clone entry="android.statistics.oisDataMode" kind="controls">
         </clone>
-        <entry name="oisTimestamps" type="int64" visibility="public" container="array" hal_version="3.3">
+        <entry name="oisTimestamps" type="int64" visibility="ndk_public" container="array" hal_version="3.3">
           <array>
             <size>n</size>
           </array>
@@ -8334,7 +8340,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           timebase as and comparable to android.sensor.timestamp.
           </details>
         </entry>
-        <entry name="oisXShifts" type="float" visibility="public" container="array" hal_version="3.3">
+        <entry name="oisXShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3">
           <array>
             <size>n</size>
           </array>
@@ -8345,14 +8351,14 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <details>
           The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
           A positive value is a shift from left to right in active array coordinate system. For
-          example, if the optical center is (1000, 500) in active array coordinates, an shift of
+          example, if the optical center is (1000, 500) in active array coordinates, a shift of
           (3, 0) puts the new optical center at (1003, 500).
 
           The number of shifts must match the number of timestamps in
           android.statistics.oisTimestamps.
           </details>
         </entry>
-        <entry name="oisYShifts" type="float" visibility="public" container="array" hal_version="3.3">
+        <entry name="oisYShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3">
           <array>
             <size>n</size>
           </array>
@@ -8363,13 +8369,34 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <details>
           The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
           A positive value is a shift from top to bottom in active array coordinate system. For
-          example, if the optical center is (1000, 500) in active array coordinates, an shift of
+          example, if the optical center is (1000, 500) in active array coordinates, a shift of
           (0, 5) puts the new optical center at (1000, 505).
 
           The number of shifts must match the number of timestamps in
           android.statistics.oisTimestamps.
           </details>
         </entry>
+        <entry name="oisSamples" type="float" visibility="java_public" synthetic="true"
+               container="array" typedef="oisSample" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>
+          An array of OIS samples.
+          </description>
+          <details>
+          Each OIS sample contains the timestamp and the amount of shifts in x and y direction,
+          in pixels, of the OIS sample.
+
+          A positive value for a shift in x direction is a shift from left to right in active array
+          coordinate system. For example, if the optical center is (1000, 500) in active array
+          coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).
+
+          A positive value for a shift in y direction is a shift from top to bottom in active array
+          coordinate system. For example, if the optical center is (1000, 500) in active array
+          coordinates, a shift of (0, 5) puts the new optical center at (1000, 505).
+          </details>
+        </entry>
       </dynamic>
     </section>
     <section name="tonemap">
index ebf741c..3b57902 100644 (file)
@@ -365,9 +365,9 @@ typedef enum camera_metadata_tag {
     ANDROID_STATISTICS_HOT_PIXEL_MAP,                 // int32[]      | public       | HIDL v3.2
     ANDROID_STATISTICS_LENS_SHADING_MAP_MODE,         // enum         | public       | HIDL v3.2
     ANDROID_STATISTICS_OIS_DATA_MODE,                 // enum         | public       | HIDL v3.3
-    ANDROID_STATISTICS_OIS_TIMESTAMPS,                // int64[]      | public       | HIDL v3.3
-    ANDROID_STATISTICS_OIS_X_SHIFTS,                  // float[]      | public       | HIDL v3.3
-    ANDROID_STATISTICS_OIS_Y_SHIFTS,                  // float[]      | public       | HIDL v3.3
+    ANDROID_STATISTICS_OIS_TIMESTAMPS,                // int64[]      | ndk_public   | HIDL v3.3
+    ANDROID_STATISTICS_OIS_X_SHIFTS,                  // float[]      | ndk_public   | HIDL v3.3
+    ANDROID_STATISTICS_OIS_Y_SHIFTS,                  // float[]      | ndk_public   | HIDL v3.3
     ANDROID_STATISTICS_END,
 
     ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =