OSDN Git Service

camera: Modify AF scene change
authorChien-Yu Chen <cychen@google.com>
Fri, 19 Jan 2018 18:50:17 +0000 (10:50 -0800)
committerChien-Yu Chen <cychen@google.com>
Sat, 20 Jan 2018 02:54:42 +0000 (18:54 -0800)
Change type to byte because int32 and enum cause type mismatch.
Allow DETECT in all AF modes.

Test: CTS
Bug: 64847201
Change-Id: I61e4b37fda8b29a67026cd567d4fa414afe90231

camera/docs/docs.html
camera/docs/metadata_definitions.xml
camera/src/camera_metadata_tag_info.c

index 5b07e4d..1cb8955 100644 (file)
@@ -9418,7 +9418,7 @@ capture intent.<wbr/></p>
               android.<wbr/>control.<wbr/>af<wbr/>Scene<wbr/>Change
             </td>
             <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">int32</span>
+                <span class="entry_type_name entry_type_name_enum">byte</span>
 
               <span class="entry_type_visibility"> [public]</span>
 
@@ -9468,8 +9468,6 @@ such as a large shift in camera viewpoint,<wbr/> significant motion in the scene
 significant illumination change,<wbr/> this value will be set to DETECTED for a single capture
 result.<wbr/> Otherwise the value will be NOT_<wbr/>DETECTED.<wbr/> The threshold for detection is similar
 to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.<wbr/></p>
-<p>afSceneChange may be DETECTED only if afMode is AF_<wbr/>MODE_<wbr/>CONTINUOUS_<wbr/>VIDEO or
-AF_<wbr/>MODE_<wbr/>CONTINUOUS_<wbr/>PICTURE.<wbr/> In other AF modes,<wbr/> afSceneChange must be NOT_<wbr/>DETECTED.<wbr/></p>
 <p>This key will be available if the camera device advertises this key via <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableCaptureResultKeys">CameraCharacteristics#getAvailableCaptureResultKeys</a>.<wbr/></p>
             </td>
           </tr>
index 877b5fb..38f6366 100644 (file)
@@ -2894,7 +2894,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
       <dynamic>
         <clone entry="android.control.enableZsl" kind="controls">
         </clone>
-        <entry name="afSceneChange" type="int32" visibility="public" enum="true" hal_version="3.3">
+        <entry name="afSceneChange" type="byte" visibility="public" enum="true" hal_version="3.3">
           <enum>
             <value>NOT_DETECTED
             <notes>Scene change is not detected within the AF region(s).</notes></value>
@@ -2909,9 +2909,6 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
           to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.
 
-          afSceneChange may be DETECTED only if afMode is AF_MODE_CONTINUOUS_VIDEO or
-          AF_MODE_CONTINUOUS_PICTURE. In other AF modes, afSceneChange must be NOT_DETECTED.
-
           This key will be available if the camera device advertises this key via {@link
           android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.
           </details>
index fe60b98..4c57d86 100644 (file)
@@ -219,7 +219,7 @@ static tag_info_t android_control[ANDROID_CONTROL_END -
     [ ANDROID_CONTROL_ENABLE_ZSL - ANDROID_CONTROL_START ] =
     { "enableZsl",                     TYPE_BYTE   },
     [ ANDROID_CONTROL_AF_SCENE_CHANGE - ANDROID_CONTROL_START ] =
-    { "afSceneChange",                 TYPE_INT32  },
+    { "afSceneChange",                 TYPE_BYTE   },
 };
 
 static tag_info_t android_demosaic[ANDROID_DEMOSAIC_END -