OSDN Git Service

camera3: Add camera profile properties.
authorRuben Brunk <rubenbrunk@google.com>
Thu, 6 Feb 2014 21:04:38 +0000 (13:04 -0800)
committerRuben Brunk <rubenbrunk@google.com>
Sat, 8 Feb 2014 00:35:17 +0000 (16:35 -0800)
Change-Id: I39f6067bb1c05b8b00b0205bb367312112407299

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

index 3801fb3..a5e3b1b 100644 (file)
             <li><a href="#static_android.sensor.maxAnalogSensitivity">android.sensor.maxAnalogSensitivity</a></li>
             <li><a href="#static_android.sensor.noiseModelCoefficients">android.sensor.noiseModelCoefficients</a></li>
             <li><a href="#static_android.sensor.orientation">android.sensor.orientation</a></li>
+            <li><a href="#static_android.sensor.profileHueSatMapDimensions">android.sensor.profileHueSatMapDimensions</a></li>
             <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a></li>
             <li><a href="#static_android.sensor.referenceIlluminant2">android.sensor.referenceIlluminant2</a></li>
             <li><a href="#static_android.sensor.availableTestPatternModes">android.sensor.availableTestPatternModes</a></li>
             <li><a href="#dynamic_android.sensor.timestamp">android.sensor.timestamp</a></li>
             <li><a href="#dynamic_android.sensor.temperature">android.sensor.temperature</a></li>
             <li><a href="#dynamic_android.sensor.neutralColorPoint">android.sensor.neutralColorPoint</a></li>
+            <li><a href="#dynamic_android.sensor.profileHueSatMap">android.sensor.profileHueSatMap</a></li>
+            <li><a href="#dynamic_android.sensor.profileToneCurve">android.sensor.profileToneCurve</a></li>
             <li><a href="#dynamic_android.sensor.testPatternMode">android.sensor.testPatternMode</a></li>
           </ul>
         </li>
@@ -11905,6 +11908,61 @@ to bottom in the sensor's coordinate system</p>
            <!-- end of entry -->
         
                 
+          <tr class="entry" id="static_android.sensor.profileHueSatMapDimensions">
+            <td class="entry_name" rowspan="3">
+              android.<wbr/>sensor.<wbr/>profile<wbr/>Hue<wbr/>Sat<wbr/>Map<wbr/>Dimensions
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">int32</span>
+                <span class="entry_type_container">x</span>
+
+                <span class="entry_type_array">
+                  3
+                </span>
+              <span class="entry_type_visibility"> [public]</span>
+                <div class="entry_type_notes">Number of samples for hue,<wbr/> saturation,<wbr/> and value</div>
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>The number of input samples for each dimension of
+<a href="#dynamic_android.sensor.profileHueSatMap">android.<wbr/>sensor.<wbr/>profile<wbr/>Hue<wbr/>Sat<wbr/>Map</a>.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+              <p>Hue &gt;= 1,<wbr/>
+Saturation &gt;= 2,<wbr/>
+Value &gt;= 1</p>
+            </td>
+
+            <td class="entry_tags">
+              <ul class="entry_tags">
+                  <li><a href="#tag_DNG">DNG</a></li>
+              </ul>
+            </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 number of input samples for the hue,<wbr/> saturation,<wbr/> and value
+dimension of <a href="#dynamic_android.sensor.profileHueSatMap">android.<wbr/>sensor.<wbr/>profile<wbr/>Hue<wbr/>Sat<wbr/>Map</a>.<wbr/> The order of the
+dimensions given is hue,<wbr/> saturation,<wbr/> value; where hue is the 0th
+element.<wbr/></p>
+            </td>
+          </tr>
+
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
+           <!-- end of entry -->
+        
+                
           <tr class="entry" id="static_android.sensor.referenceIlluminant1">
             <td class="entry_name" rowspan="3">
               android.<wbr/>sensor.<wbr/>reference<wbr/>Illuminant1
@@ -12493,6 +12551,121 @@ The order of the values is R,<wbr/> G,<wbr/> B; where R is in the lowest index.<
            <!-- end of entry -->
         
                 
+          <tr class="entry" id="dynamic_android.sensor.profileHueSatMap">
+            <td class="entry_name" rowspan="3">
+              android.<wbr/>sensor.<wbr/>profile<wbr/>Hue<wbr/>Sat<wbr/>Map
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">float</span>
+                <span class="entry_type_container">x</span>
+
+                <span class="entry_type_array">
+                  hue_samples x saturation_samples x value_samples x 3
+                </span>
+              <span class="entry_type_visibility"> [public]</span>
+                <div class="entry_type_notes">Mapping for hue,<wbr/> saturation,<wbr/> and value</div>
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>A mapping containing a hue shift,<wbr/> saturation scale,<wbr/> and value scale
+for each pixel.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+              
+          Hue shift is given in degrees; saturation and value scale factors are
+          unitless.<wbr/>
+          
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_tags">
+              <ul class="entry_tags">
+                  <li><a href="#tag_DNG">DNG</a></li>
+              </ul>
+            </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>hue_<wbr/>samples,<wbr/> saturation_<wbr/>samples,<wbr/> and value_<wbr/>samples are given in
+<a href="#static_android.sensor.profileHueSatMapDimensions">android.<wbr/>sensor.<wbr/>profile<wbr/>Hue<wbr/>Sat<wbr/>Map<wbr/>Dimensions</a>.<wbr/></p>
+<p>Each entry of this map contains three floats corresponding to the
+hue shift,<wbr/> saturation scale,<wbr/> and value scale,<wbr/> respectively; where the
+hue shift has the lowest index.<wbr/> The map entries are stored in the tag
+in nested loop order,<wbr/> with the value divisions in the outer loop,<wbr/> the
+hue divisions in the middle loop,<wbr/> and the saturation divisions in the
+inner loop.<wbr/> All zero input saturation entries are required to have a
+value scale factor of 1.<wbr/>0.<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.sensor.profileToneCurve">
+            <td class="entry_name" rowspan="3">
+              android.<wbr/>sensor.<wbr/>profile<wbr/>Tone<wbr/>Curve
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">float</span>
+                <span class="entry_type_container">x</span>
+
+                <span class="entry_type_array">
+                  samples x 2
+                </span>
+              <span class="entry_type_visibility"> [public]</span>
+                <div class="entry_type_notes">Samples defining a spline for a tone-mapping curve</div>
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>A list of x,<wbr/>y samples defining a tone-mapping curve for gamma adjustment.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+              <p>Each sample has an input range of <code>[0,<wbr/> 1]</code> and an output range of
+<code>[0,<wbr/> 1]</code>.<wbr/>  The first sample is required to be <code>(0,<wbr/> 0)</code>,<wbr/> and the last
+sample is required to be <code>(1,<wbr/> 1)</code>.<wbr/></p>
+            </td>
+
+            <td class="entry_tags">
+              <ul class="entry_tags">
+                  <li><a href="#tag_DNG">DNG</a></li>
+              </ul>
+            </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>This tag contains a default tone curve that can be applied while
+processing the image as a starting point for user adjustments.<wbr/>
+The curve is specified as a list of value pairs in linear gamma.<wbr/>
+The curve is interpolated using a cubic spline.<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.sensor.testPatternMode">
             <td class="entry_name" rowspan="5">
               android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Mode
@@ -15815,8 +15988,11 @@ to know when sensor settings have been applied.<wbr/></p>
           <li><a href="#static_android.sensor.colorTransform2">android.sensor.colorTransform2</a> (static)</li>
           <li><a href="#static_android.sensor.forwardMatrix1">android.sensor.forwardMatrix1</a> (static)</li>
           <li><a href="#static_android.sensor.forwardMatrix2">android.sensor.forwardMatrix2</a> (static)</li>
+          <li><a href="#static_android.sensor.profileHueSatMapDimensions">android.sensor.profileHueSatMapDimensions</a> (static)</li>
           <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a> (static)</li>
           <li><a href="#dynamic_android.sensor.neutralColorPoint">android.sensor.neutralColorPoint</a> (dynamic)</li>
+          <li><a href="#dynamic_android.sensor.profileHueSatMap">android.sensor.profileHueSatMap</a> (dynamic)</li>
+          <li><a href="#dynamic_android.sensor.profileToneCurve">android.sensor.profileToneCurve</a> (dynamic)</li>
           <li><a href="#controls_android.tonemap.curveRed">android.tonemap.curveRed</a> (controls)</li>
         </ul>
       </li> <!-- tag_DNG -->
index 942cf0b..1254986 100644 (file)
@@ -3343,6 +3343,30 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <range>0,90,180,270</range>
           <tag id="BC" />
         </entry>
+        <entry name="profileHueSatMapDimensions" type="int32"
+        visibility="public" optional="true"
+        type_notes="Number of samples for hue, saturation, and value"
+        container="array">
+          <array>
+            <size>3</size>
+          </array>
+          <description>
+          The number of input samples for each dimension of
+          android.sensor.profileHueSatMap.
+          </description>
+          <range>
+          Hue &amp;gt;= 1,
+          Saturation &amp;gt;= 2,
+          Value &amp;gt;= 1
+          </range>
+          <details>
+          The number of input samples for the hue, saturation, and value
+          dimension of android.sensor.profileHueSatMap. The order of the
+          dimensions given is hue, saturation, value; where hue is the 0th
+          element.
+          </details>
+          <tag id="DNG" />
+        </entry>
         <entry name="referenceIlluminant1" type="byte" enum="true">
           <enum>
             <value id="1">DAYLIGHT</value>
@@ -3427,6 +3451,62 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           </details>
           <tag id="DNG" />
         </entry>
+        <entry name="profileHueSatMap" type="float"
+        visibility="public" optional="true"
+        type_notes="Mapping for hue, saturation, and value"
+        container="array">
+          <array>
+            <size>hue_samples</size>
+            <size>saturation_samples</size>
+            <size>value_samples</size>
+            <size>3</size>
+          </array>
+          <description>
+          A mapping containing a hue shift, saturation scale, and value scale
+          for each pixel.
+          </description>
+          <units>
+          Hue shift is given in degrees; saturation and value scale factors are
+          unitless.
+          </units>
+          <details>
+          hue_samples, saturation_samples, and value_samples are given in
+          android.sensor.profileHueSatMapDimensions.
+
+          Each entry of this map contains three floats corresponding to the
+          hue shift, saturation scale, and value scale, respectively; where the
+          hue shift has the lowest index. The map entries are stored in the tag
+          in nested loop order, with the value divisions in the outer loop, the
+          hue divisions in the middle loop, and the saturation divisions in the
+          inner loop. All zero input saturation entries are required to have a
+          value scale factor of 1.0.
+          </details>
+          <tag id="DNG" />
+        </entry>
+        <entry name="profileToneCurve" type="float"
+        visibility="public" optional="true"
+        type_notes="Samples defining a spline for a tone-mapping curve"
+        container="array">
+          <array>
+            <size>samples</size>
+            <size>2</size>
+          </array>
+          <description>
+          A list of x,y samples defining a tone-mapping curve for gamma adjustment.
+          </description>
+          <range>
+          Each sample has an input range of `[0, 1]` and an output range of
+          `[0, 1]`.  The first sample is required to be `(0, 0)`, and the last
+          sample is required to be `(1, 1)`.
+          </range>
+          <details>
+          This tag contains a default tone curve that can be applied while
+          processing the image as a starting point for user adjustments.
+          The curve is specified as a list of value pairs in linear gamma.
+          The curve is interpolated using a cubic spline.
+          </details>
+          <tag id="DNG" />
+        </entry>
       </dynamic>
       <controls>
         <entry name="testPatternData" type="int32" visibility="public" optional="true" container="array">
index 7fe6baf..672007d 100644 (file)
@@ -282,11 +282,14 @@ typedef enum camera_metadata_tag {
     ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY,            // int32        | public
     ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS,          // float[]      | system
     ANDROID_SENSOR_ORIENTATION,                       // int32        | public
+    ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS,    // int32[]      | public
     ANDROID_SENSOR_REFERENCE_ILLUMINANT1,             // enum         | system
     ANDROID_SENSOR_REFERENCE_ILLUMINANT2,             // byte         | system
     ANDROID_SENSOR_TIMESTAMP,                         // int64        | public
     ANDROID_SENSOR_TEMPERATURE,                       // float        | public
     ANDROID_SENSOR_NEUTRAL_COLOR_POINT,               // rational[]   | public
+    ANDROID_SENSOR_PROFILE_HUE_SAT_MAP,               // float[]      | public
+    ANDROID_SENSOR_PROFILE_TONE_CURVE,                // float[]      | public
     ANDROID_SENSOR_TEST_PATTERN_DATA,                 // int32[]      | public
     ANDROID_SENSOR_TEST_PATTERN_MODE,                 // enum         | public
     ANDROID_SENSOR_AVAILABLE_TEST_PATTERN_MODES,      // byte         | public
index dd215b4..bd1921e 100644 (file)
@@ -441,6 +441,8 @@ static tag_info_t android_sensor[ANDROID_SENSOR_END -
     { "noiseModelCoefficients",        TYPE_FLOAT  },
     [ ANDROID_SENSOR_ORIENTATION - ANDROID_SENSOR_START ] =
     { "orientation",                   TYPE_INT32  },
+    [ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS - ANDROID_SENSOR_START ] =
+    { "profileHueSatMapDimensions",    TYPE_INT32  },
     [ ANDROID_SENSOR_REFERENCE_ILLUMINANT1 - ANDROID_SENSOR_START ] =
     { "referenceIlluminant1",          TYPE_BYTE   },
     [ ANDROID_SENSOR_REFERENCE_ILLUMINANT2 - ANDROID_SENSOR_START ] =
@@ -452,6 +454,10 @@ static tag_info_t android_sensor[ANDROID_SENSOR_END -
     [ ANDROID_SENSOR_NEUTRAL_COLOR_POINT - ANDROID_SENSOR_START ] =
     { "neutralColorPoint",             TYPE_RATIONAL
                 },
+    [ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP - ANDROID_SENSOR_START ] =
+    { "profileHueSatMap",              TYPE_FLOAT  },
+    [ ANDROID_SENSOR_PROFILE_TONE_CURVE - ANDROID_SENSOR_START ] =
+    { "profileToneCurve",              TYPE_FLOAT  },
     [ ANDROID_SENSOR_TEST_PATTERN_DATA - ANDROID_SENSOR_START ] =
     { "testPatternData",               TYPE_INT32  },
     [ ANDROID_SENSOR_TEST_PATTERN_MODE - ANDROID_SENSOR_START ] =
@@ -1676,6 +1682,9 @@ int camera_metadata_enum_snprint(uint32_t tag,
         case ANDROID_SENSOR_ORIENTATION: {
             break;
         }
+        case ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS: {
+            break;
+        }
         case ANDROID_SENSOR_REFERENCE_ILLUMINANT1: {
             switch (value) {
                 case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT:
@@ -1771,6 +1780,12 @@ int camera_metadata_enum_snprint(uint32_t tag,
         case ANDROID_SENSOR_NEUTRAL_COLOR_POINT: {
             break;
         }
+        case ANDROID_SENSOR_PROFILE_HUE_SAT_MAP: {
+            break;
+        }
+        case ANDROID_SENSOR_PROFILE_TONE_CURVE: {
+            break;
+        }
         case ANDROID_SENSOR_TEST_PATTERN_DATA: {
             break;
         }