OSDN Git Service

Camera: Fix ordering of boolean enums, types for curves.
authorEino-Ville Talvala <etalvala@google.com>
Fri, 11 Jan 2013 21:57:19 +0000 (13:57 -0800)
committerEino-Ville Talvala <etalvala@google.com>
Fri, 11 Jan 2013 23:18:19 +0000 (15:18 -0800)
- Flipping boolean enumeration definition confused some HAL
implementations.

- Tonemap curves should all be type float.

Bug: 7974125

Change-Id: I533888af5fc7f1fa709d758f1f9de1c2c3b475a3

camera/docs/docs.html
camera/docs/metadata_properties.xml
camera/include/system/camera_metadata_tags.h
camera/src/camera_metadata_tag_info.c

index 94834d1..9f5ad50 100644 (file)
 
                 <ul class="entry_type_enum">
                   <li>
+                    <span class="entry_type_enum_name">OFF</span>
+                    <span class="entry_type_enum_notes">Autoexposure lock is disabled; the AE algorithm
+            is free to update its parameters.<wbr></span>
+                  </li>
+                  <li>
                     <span class="entry_type_enum_name">ON</span>
                     <span class="entry_type_enum_notes">Autoexposure lock is enabled; the AE algorithm
             must not update the exposure and sensitivity parameters
             while the lock is active</span>
                   </li>
-                  <li>
-                    <span class="entry_type_enum_name">OFF</span>
-                    <span class="entry_type_enum_notes">Autoexposure lock is disabled; the AE algorithm
-            is free to update its parameters.<wbr></span>
-                  </li>
                 </ul>
 
             </td> <!-- entry_type -->
 
                 <ul class="entry_type_enum">
                   <li>
-                    <span class="entry_type_enum_name">ON</span>
-                    <span class="entry_type_enum_notes">Auto-whitebalance lock is enabled; the AWB
-            algorithm must not update the exposure and sensitivity
-            parameters while the lock is active</span>
-                  </li>
-                  <li>
                     <span class="entry_type_enum_name">OFF</span>
                     <span class="entry_type_enum_notes">Auto-whitebalance lock is disabled; the AWB
             algorithm is free to update its parameters if in AUTO
             mode.<wbr></span>
                   </li>
+                  <li>
+                    <span class="entry_type_enum_name">ON</span>
+                    <span class="entry_type_enum_notes">Auto-whitebalance lock is enabled; the AWB
+            algorithm must not update the exposure and sensitivity
+            parameters while the lock is active</span>
+                  </li>
                 </ul>
 
             </td> <!-- entry_type -->
           <tr class="entry" id="controls_android.tonemap.curveBlue">
             <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Blue</td>
             <td class="entry_type">
-                <span class="entry_type_name">byte</span>
+                <span class="entry_type_name">float</span>
 
 
 
           <tr class="entry" id="controls_android.tonemap.curveGreen">
             <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Green</td>
             <td class="entry_type">
-                <span class="entry_type_name">byte</span>
+                <span class="entry_type_name">float</span>
 
 
 
           <tr class="entry" id="dynamic_android.tonemap.curveBlue">
             <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Blue</td>
             <td class="entry_type">
-                <span class="entry_type_name">byte</span>
+                <span class="entry_type_name">float</span>
 
 
 
           <tr class="entry" id="dynamic_android.tonemap.curveGreen">
             <td class="entry_name">android.<wbr>tonemap.<wbr>curve<wbr>Green</td>
             <td class="entry_type">
-                <span class="entry_type_name">byte</span>
+                <span class="entry_type_name">float</span>
 
 
 
index 99f5844..d0a1d33 100644 (file)
@@ -105,13 +105,13 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         </entry>
         <entry name="aeLock" type="byte" enum="true">
           <enum>
+            <value>OFF
+            <notes>Autoexposure lock is disabled; the AE algorithm
+            is free to update its parameters.</notes></value>
             <value>ON
             <notes>Autoexposure lock is enabled; the AE algorithm
             must not update the exposure and sensitivity parameters
             while the lock is active</notes></value>
-            <value>OFF
-            <notes>Autoexposure lock is disabled; the AE algorithm
-            is free to update its parameters.</notes></value>
           </enum>
           <description>Whether AE is currently locked to its latest
           calculated values</description>
@@ -279,14 +279,14 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         </entry>
         <entry name="awbLock" type="byte" enum="true">
           <enum>
-            <value>ON
-            <notes>Auto-whitebalance lock is enabled; the AWB
-            algorithm must not update the exposure and sensitivity
-            parameters while the lock is active</notes></value>
             <value>OFF
             <notes>Auto-whitebalance lock is disabled; the AWB
             algorithm is free to update its parameters if in AUTO
             mode.</notes></value>
+            <value>ON
+            <notes>Auto-whitebalance lock is enabled; the AWB
+            algorithm must not update the exposure and sensitivity
+            parameters while the lock is active</notes></value>
           </enum>
           <description>Whether AWB is currently locked to its
           latest calculated values</description>
@@ -2092,13 +2092,13 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
     </section>
     <section name="tonemap">
       <controls>
-        <entry name="curveBlue" type="byte">
+        <entry name="curveBlue" type="float">
           <description>Table mapping blue input values to output
           values</description>
           <units>same as android.tonemap.curveRed</units>
           <range>same as android.tonemap.curveRed</range>
         </entry>
-        <entry name="curveGreen" type="byte">
+        <entry name="curveGreen" type="float">
           <description>Table mapping green input values to output
           values</description>
           <units>same as android.tonemap.curveRed</units>
index 2cd5b31..8d20ae8 100644 (file)
@@ -323,8 +323,8 @@ typedef enum camera_metadata_enum_android_control_ae_antibanding_mode {
 
 // ANDROID_CONTROL_AE_LOCK
 typedef enum camera_metadata_enum_android_control_ae_lock {
-    ANDROID_CONTROL_AE_LOCK_ON,
     ANDROID_CONTROL_AE_LOCK_OFF,
+    ANDROID_CONTROL_AE_LOCK_ON,
 } camera_metadata_enum_android_control_ae_lock_t;
 
 // ANDROID_CONTROL_AE_MODE
@@ -348,8 +348,8 @@ typedef enum camera_metadata_enum_android_control_af_mode {
 
 // ANDROID_CONTROL_AWB_LOCK
 typedef enum camera_metadata_enum_android_control_awb_lock {
-    ANDROID_CONTROL_AWB_LOCK_ON,
     ANDROID_CONTROL_AWB_LOCK_OFF,
+    ANDROID_CONTROL_AWB_LOCK_ON,
 } camera_metadata_enum_android_control_awb_lock_t;
 
 // ANDROID_CONTROL_AWB_MODE
index c9161cf..e8d340a 100644 (file)
@@ -489,9 +489,9 @@ static tag_info_t android_statistics_info[ANDROID_STATISTICS_INFO_END -
 static tag_info_t android_tonemap[ANDROID_TONEMAP_END -
         ANDROID_TONEMAP_START] = {
     [ ANDROID_TONEMAP_CURVE_BLUE - ANDROID_TONEMAP_START ] =
-    { "curveBlue",                     TYPE_BYTE   },
+    { "curveBlue",                     TYPE_FLOAT  },
     [ ANDROID_TONEMAP_CURVE_GREEN - ANDROID_TONEMAP_START ] =
-    { "curveGreen",                    TYPE_BYTE   },
+    { "curveGreen",                    TYPE_FLOAT  },
     [ ANDROID_TONEMAP_CURVE_RED - ANDROID_TONEMAP_START ] =
     { "curveRed",                      TYPE_FLOAT  },
     [ ANDROID_TONEMAP_MODE - ANDROID_TONEMAP_START ] =
@@ -585,14 +585,14 @@ int camera_metadata_enum_snprint(uint32_t tag,
         }
         case ANDROID_CONTROL_AE_LOCK: {
             switch (value) {
-                case ANDROID_CONTROL_AE_LOCK_ON:
-                    msg = "ON";
-                    ret = 0;
-                    break;
                 case ANDROID_CONTROL_AE_LOCK_OFF:
                     msg = "OFF";
                     ret = 0;
                     break;
+                case ANDROID_CONTROL_AE_LOCK_ON:
+                    msg = "ON";
+                    ret = 0;
+                    break;
                 default:
                     msg = "error: enum value out of range";
             }
@@ -667,14 +667,14 @@ int camera_metadata_enum_snprint(uint32_t tag,
         }
         case ANDROID_CONTROL_AWB_LOCK: {
             switch (value) {
-                case ANDROID_CONTROL_AWB_LOCK_ON:
-                    msg = "ON";
-                    ret = 0;
-                    break;
                 case ANDROID_CONTROL_AWB_LOCK_OFF:
                     msg = "OFF";
                     ret = 0;
                     break;
+                case ANDROID_CONTROL_AWB_LOCK_ON:
+                    msg = "ON";
+                    ret = 0;
+                    break;
                 default:
                     msg = "error: enum value out of range";
             }