summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2015-07-01 20:00:08 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-01 20:00:09 +0000
commit164563fe0afbb69eb7474fc99b2852680b74f171 (patch)
treed4b778866772d9955262a0ba7d6c75467f05f4b3
parent07fba8848de01c7b811eae76b813865dac21cd36 (diff)
parent93192944359dd503c799cfbb4a9de46edfaf5eae (diff)
downloadandroid_system_media-164563fe0afbb69eb7474fc99b2852680b74f171.tar.gz
android_system_media-164563fe0afbb69eb7474fc99b2852680b74f171.tar.bz2
android_system_media-164563fe0afbb69eb7474fc99b2852680b74f171.zip
Merge "camera2: Fix ABI for new tags." into mnc-dev
-rw-r--r--camera/docs/docs.html242
-rw-r--r--camera/docs/metadata_properties.xml159
-rw-r--r--camera/include/system/camera_metadata_tags.h4
-rw-r--r--camera/src/camera_metadata_tag_info.c10
4 files changed, 207 insertions, 208 deletions
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index b319affa..4887eb6a 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -751,8 +751,6 @@
<li
><a href="#static_android.sensor.info.activeArraySize">android.sensor.info.activeArraySize</a></li>
<li
- ><a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.sensor.info.preCorrectionActiveArraySize</a></li>
- <li
><a href="#static_android.sensor.info.sensitivityRange">android.sensor.info.sensitivityRange</a></li>
<li
><a href="#static_android.sensor.info.colorFilterArrangement">android.sensor.info.colorFilterArrangement</a></li>
@@ -770,6 +768,8 @@
><a href="#static_android.sensor.info.timestampSource">android.sensor.info.timestampSource</a></li>
<li
><a href="#static_android.sensor.info.lensShadingApplied">android.sensor.info.lensShadingApplied</a></li>
+ <li
+ ><a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.sensor.info.preCorrectionActiveArraySize</a></li>
<li
><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a></li>
@@ -18312,124 +18312,6 @@ The <code>(width,<wbr/> height)</code> must be &lt;= <code><a href="#static_andr
<!-- end of entry -->
- <tr class="entry" id="static_android.sensor.info.preCorrectionActiveArraySize">
- <td class="entry_name
- " rowspan="5">
- android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size
- </td>
- <td class="entry_type">
- <span class="entry_type_name">int32</span>
- <span class="entry_type_container">x</span>
-
- <span class="entry_type_array">
- 4
- </span>
- <span class="entry_type_visibility"> [public as rectangle]</span>
-
-
- <span class="entry_type_hwlevel">[legacy] </span>
-
-
- <div class="entry_type_notes">Four ints defining the active pixel rectangle</div>
-
-
- </td> <!-- entry_type -->
-
- <td class="entry_description">
- <p>The area of the image sensor which corresponds to active pixels prior to the
-application of any geometric distortion correction.<wbr/></p>
- </td>
-
- <td class="entry_units">
- Pixel coordinates on the image sensor
- </td>
-
- <td class="entry_range">
- </td>
-
- <td class="entry_tags">
- <ul class="entry_tags">
- <li><a href="#tag_RAW">RAW</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 is the rectangle representing the size of the active region of the sensor (i.<wbr/>e.<wbr/>
-the region that actually receives light from the scene) before any geometric correction
-has been applied,<wbr/> and should be treated as the active region rectangle for any of the
-raw formats.<wbr/> All metadata associated with raw processing (e.<wbr/>g.<wbr/> the lens shading
-correction map,<wbr/> and radial distortion fields) treats the top,<wbr/> left of this rectangle as
-the origin,<wbr/> (0,<wbr/>0).<wbr/></p>
-<p>The size of this region determines the maximum field of view and the maximum number of
-pixels that an image from this sensor can contain,<wbr/> prior to the application of
-geometric distortion correction.<wbr/> The effective maximum pixel dimensions of a
-post-distortion-corrected image is given by the <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>
-field,<wbr/> and the effective maximum field of view for a post-distortion-corrected image
-can be calculated by applying the geometric distortion correction fields to this
-rectangle,<wbr/> and cropping to the rectangle given in <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p>
-<p>E.<wbr/>g.<wbr/> to calculate position of a pixel,<wbr/> (x,<wbr/>y),<wbr/> in a processed YUV output image with the
-dimensions in <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a> given the position of a pixel,<wbr/>
-(x',<wbr/> y'),<wbr/> in the raw pixel array with dimensions give in
-<a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>:</p>
-<ol>
-<li>Choose a pixel (x',<wbr/> y') within the active array region of the raw buffer given in
-<a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a>,<wbr/> otherwise this pixel is considered
-to be outside of the FOV,<wbr/> and will not be shown in the processed output image.<wbr/></li>
-<li>Apply geometric distortion correction to get the post-distortion pixel coordinate,<wbr/>
-(x_<wbr/>i,<wbr/> y_<wbr/>i).<wbr/> When applying geometric correction metadata,<wbr/> note that metadata for raw
-buffers is defined relative to the top,<wbr/> left of the
-<a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a> rectangle.<wbr/></li>
-<li>If the resulting corrected pixel coordinate is within the region given in
-<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>,<wbr/> then the position of this pixel in the
-processed output image buffer is <code>(x_<wbr/>i - activeArray.<wbr/>left,<wbr/> y_<wbr/>i - activeArray.<wbr/>top)</code>,<wbr/>
-when the top,<wbr/> left coordinate of that buffer is treated as (0,<wbr/> 0).<wbr/></li>
-</ol>
-<p>Thus,<wbr/> for pixel x',<wbr/>y' = (25,<wbr/> 25) on a sensor where <a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>
-is (100,<wbr/>100),<wbr/> <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a> is (10,<wbr/> 10,<wbr/> 100,<wbr/> 100),<wbr/>
-<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a> is (20,<wbr/> 20,<wbr/> 80,<wbr/> 80),<wbr/> and the geometric distortion
-correction doesn't change the pixel coordinate,<wbr/> the resulting pixel selected in
-pixel coordinates would be x,<wbr/>y = (25,<wbr/> 25) relative to the top,<wbr/>left of the raw buffer
-with dimensions given in <a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>,<wbr/> and would be (5,<wbr/> 5)
-relative to the top,<wbr/>left of post-processed YUV output buffer with dimensions given in
-<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p>
-<p>The currently supported fields that correct for geometric distortion are:</p>
-<ol>
-<li><a href="#dynamic_android.lens.radialDistortion">android.<wbr/>lens.<wbr/>radial<wbr/>Distortion</a>.<wbr/></li>
-</ol>
-<p>If all of the geometric distortion fields are no-ops,<wbr/> this rectangle will be the same
-as the post-distortion-corrected rectangle given in
-<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p>
-<p>This rectangle is defined relative to the full pixel array; (0,<wbr/>0) is the top-left of
-the full pixel array,<wbr/> and the size of the full pixel array is given by
-<a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>.<wbr/></p>
-<p>The pre-correction active array may be smaller than the full pixel array,<wbr/> since the
-full array may include black calibration pixels or other inactive regions.<wbr/></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 array contains <code>(xmin,<wbr/> ymin,<wbr/> width,<wbr/> height)</code>.<wbr/> The <code>(xmin,<wbr/> ymin)</code> must be
-&gt;= <code>(0,<wbr/>0)</code>.<wbr/>
-The <code>(width,<wbr/> height)</code> must be &lt;= <code><a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a></code>.<wbr/></p>
-<p>If omitted by the HAL implementation,<wbr/> the camera framework will assume that this is
-the same as the post-correction active array region given in
-<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<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.info.sensitivityRange">
<td class="entry_name
" rowspan="3">
@@ -19016,6 +18898,124 @@ Devices with RAW capability will always report this information in this key.<wbr
<tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
<!-- end of entry -->
+
+ <tr class="entry" id="static_android.sensor.info.preCorrectionActiveArraySize">
+ <td class="entry_name
+ " rowspan="5">
+ android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size
+ </td>
+ <td class="entry_type">
+ <span class="entry_type_name">int32</span>
+ <span class="entry_type_container">x</span>
+
+ <span class="entry_type_array">
+ 4
+ </span>
+ <span class="entry_type_visibility"> [public as rectangle]</span>
+
+
+ <span class="entry_type_hwlevel">[legacy] </span>
+
+
+ <div class="entry_type_notes">Four ints defining the active pixel rectangle</div>
+
+
+ </td> <!-- entry_type -->
+
+ <td class="entry_description">
+ <p>The area of the image sensor which corresponds to active pixels prior to the
+application of any geometric distortion correction.<wbr/></p>
+ </td>
+
+ <td class="entry_units">
+ Pixel coordinates on the image sensor
+ </td>
+
+ <td class="entry_range">
+ </td>
+
+ <td class="entry_tags">
+ <ul class="entry_tags">
+ <li><a href="#tag_RAW">RAW</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 is the rectangle representing the size of the active region of the sensor (i.<wbr/>e.<wbr/>
+the region that actually receives light from the scene) before any geometric correction
+has been applied,<wbr/> and should be treated as the active region rectangle for any of the
+raw formats.<wbr/> All metadata associated with raw processing (e.<wbr/>g.<wbr/> the lens shading
+correction map,<wbr/> and radial distortion fields) treats the top,<wbr/> left of this rectangle as
+the origin,<wbr/> (0,<wbr/>0).<wbr/></p>
+<p>The size of this region determines the maximum field of view and the maximum number of
+pixels that an image from this sensor can contain,<wbr/> prior to the application of
+geometric distortion correction.<wbr/> The effective maximum pixel dimensions of a
+post-distortion-corrected image is given by the <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>
+field,<wbr/> and the effective maximum field of view for a post-distortion-corrected image
+can be calculated by applying the geometric distortion correction fields to this
+rectangle,<wbr/> and cropping to the rectangle given in <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p>
+<p>E.<wbr/>g.<wbr/> to calculate position of a pixel,<wbr/> (x,<wbr/>y),<wbr/> in a processed YUV output image with the
+dimensions in <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a> given the position of a pixel,<wbr/>
+(x',<wbr/> y'),<wbr/> in the raw pixel array with dimensions give in
+<a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>:</p>
+<ol>
+<li>Choose a pixel (x',<wbr/> y') within the active array region of the raw buffer given in
+<a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a>,<wbr/> otherwise this pixel is considered
+to be outside of the FOV,<wbr/> and will not be shown in the processed output image.<wbr/></li>
+<li>Apply geometric distortion correction to get the post-distortion pixel coordinate,<wbr/>
+(x_<wbr/>i,<wbr/> y_<wbr/>i).<wbr/> When applying geometric correction metadata,<wbr/> note that metadata for raw
+buffers is defined relative to the top,<wbr/> left of the
+<a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a> rectangle.<wbr/></li>
+<li>If the resulting corrected pixel coordinate is within the region given in
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>,<wbr/> then the position of this pixel in the
+processed output image buffer is <code>(x_<wbr/>i - activeArray.<wbr/>left,<wbr/> y_<wbr/>i - activeArray.<wbr/>top)</code>,<wbr/>
+when the top,<wbr/> left coordinate of that buffer is treated as (0,<wbr/> 0).<wbr/></li>
+</ol>
+<p>Thus,<wbr/> for pixel x',<wbr/>y' = (25,<wbr/> 25) on a sensor where <a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>
+is (100,<wbr/>100),<wbr/> <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a> is (10,<wbr/> 10,<wbr/> 100,<wbr/> 100),<wbr/>
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a> is (20,<wbr/> 20,<wbr/> 80,<wbr/> 80),<wbr/> and the geometric distortion
+correction doesn't change the pixel coordinate,<wbr/> the resulting pixel selected in
+pixel coordinates would be x,<wbr/>y = (25,<wbr/> 25) relative to the top,<wbr/>left of the raw buffer
+with dimensions given in <a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>,<wbr/> and would be (5,<wbr/> 5)
+relative to the top,<wbr/>left of post-processed YUV output buffer with dimensions given in
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p>
+<p>The currently supported fields that correct for geometric distortion are:</p>
+<ol>
+<li><a href="#dynamic_android.lens.radialDistortion">android.<wbr/>lens.<wbr/>radial<wbr/>Distortion</a>.<wbr/></li>
+</ol>
+<p>If all of the geometric distortion fields are no-ops,<wbr/> this rectangle will be the same
+as the post-distortion-corrected rectangle given in
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p>
+<p>This rectangle is defined relative to the full pixel array; (0,<wbr/>0) is the top-left of
+the full pixel array,<wbr/> and the size of the full pixel array is given by
+<a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>.<wbr/></p>
+<p>The pre-correction active array may be smaller than the full pixel array,<wbr/> since the
+full array may include black calibration pixels or other inactive regions.<wbr/></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 array contains <code>(xmin,<wbr/> ymin,<wbr/> width,<wbr/> height)</code>.<wbr/> The <code>(xmin,<wbr/> ymin)</code> must be
+&gt;= <code>(0,<wbr/>0)</code>.<wbr/>
+The <code>(width,<wbr/> height)</code> must be &lt;= <code><a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a></code>.<wbr/></p>
+<p>If omitted by the HAL implementation,<wbr/> the camera framework will assume that this is
+the same as the post-correction active array region given in
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p>
+ </td>
+ </tr>
+
+ <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
+ <!-- end of entry -->
+
@@ -26362,10 +26362,10 @@ corrupted during depth measurement.<wbr/></p>
<li><a href="#controls_android.hotPixel.mode">android.hotPixel.mode</a> (controls)</li>
<li><a href="#static_android.hotPixel.availableHotPixelModes">android.hotPixel.availableHotPixelModes</a> (static)</li>
<li><a href="#static_android.sensor.info.activeArraySize">android.sensor.info.activeArraySize</a> (static)</li>
- <li><a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.sensor.info.preCorrectionActiveArraySize</a> (static)</li>
<li><a href="#static_android.sensor.info.colorFilterArrangement">android.sensor.info.colorFilterArrangement</a> (static)</li>
<li><a href="#static_android.sensor.info.pixelArraySize">android.sensor.info.pixelArraySize</a> (static)</li>
<li><a href="#static_android.sensor.info.whiteLevel">android.sensor.info.whiteLevel</a> (static)</li>
+ <li><a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.sensor.info.preCorrectionActiveArraySize</a> (static)</li>
<li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a> (static)</li>
<li><a href="#static_android.sensor.referenceIlluminant2">android.sensor.referenceIlluminant2</a> (static)</li>
<li><a href="#static_android.sensor.calibrationTransform1">android.sensor.calibrationTransform1</a> (static)</li>
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
index 84f86323..2c2c3fd7 100644
--- a/camera/docs/metadata_properties.xml
+++ b/camera/docs/metadata_properties.xml
@@ -5835,86 +5835,6 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
</hal_details>
<tag id="RAW" />
</entry>
- <entry name="preCorrectionActiveArraySize" type="int32" visibility="public"
- type_notes="Four ints defining the active pixel rectangle" container="array"
- typedef="rectangle" hwlevel="legacy">
- <array>
- <size>4</size>
- </array>
- <description>
- The area of the image sensor which corresponds to active pixels prior to the
- application of any geometric distortion correction.
- </description>
- <units>Pixel coordinates on the image sensor</units>
- <details>
- This is the rectangle representing the size of the active region of the sensor (i.e.
- the region that actually receives light from the scene) before any geometric correction
- has been applied, and should be treated as the active region rectangle for any of the
- raw formats. All metadata associated with raw processing (e.g. the lens shading
- correction map, and radial distortion fields) treats the top, left of this rectangle as
- the origin, (0,0).
-
- The size of this region determines the maximum field of view and the maximum number of
- pixels that an image from this sensor can contain, prior to the application of
- geometric distortion correction. The effective maximum pixel dimensions of a
- post-distortion-corrected image is given by the android.sensor.info.activeArraySize
- field, and the effective maximum field of view for a post-distortion-corrected image
- can be calculated by applying the geometric distortion correction fields to this
- rectangle, and cropping to the rectangle given in android.sensor.info.activeArraySize.
-
- E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
- dimensions in android.sensor.info.activeArraySize given the position of a pixel,
- (x', y'), in the raw pixel array with dimensions give in
- android.sensor.info.pixelArraySize:
-
- 1. Choose a pixel (x', y') within the active array region of the raw buffer given in
- android.sensor.info.preCorrectionActiveArraySize, otherwise this pixel is considered
- to be outside of the FOV, and will not be shown in the processed output image.
- 1. Apply geometric distortion correction to get the post-distortion pixel coordinate,
- (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
- buffers is defined relative to the top, left of the
- android.sensor.info.preCorrectionActiveArraySize rectangle.
- 1. If the resulting corrected pixel coordinate is within the region given in
- android.sensor.info.activeArraySize, then the position of this pixel in the
- processed output image buffer is `(x_i - activeArray.left, y_i - activeArray.top)`,
- when the top, left coordinate of that buffer is treated as (0, 0).
-
- Thus, for pixel x',y' = (25, 25) on a sensor where android.sensor.info.pixelArraySize
- is (100,100), android.sensor.info.preCorrectionActiveArraySize is (10, 10, 100, 100),
- android.sensor.info.activeArraySize is (20, 20, 80, 80), and the geometric distortion
- correction doesn't change the pixel coordinate, the resulting pixel selected in
- pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
- with dimensions given in android.sensor.info.pixelArraySize, and would be (5, 5)
- relative to the top,left of post-processed YUV output buffer with dimensions given in
- android.sensor.info.activeArraySize.
-
- The currently supported fields that correct for geometric distortion are:
-
- 1. android.lens.radialDistortion.
-
- If all of the geometric distortion fields are no-ops, this rectangle will be the same
- as the post-distortion-corrected rectangle given in
- android.sensor.info.activeArraySize.
-
- This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
- the full pixel array, and the size of the full pixel array is given by
- android.sensor.info.pixelArraySize.
-
- The pre-correction active array may be smaller than the full pixel array, since the
- full array may include black calibration pixels or other inactive regions.
- </details>
- <hal_details>
- This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
- &amp;gt;= `(0,0)`.
- The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySize`.
-
- If omitted by the HAL implementation, the camera framework will assume that this is
- the same as the post-correction active array region given in
- android.sensor.info.activeArraySize.
- </hal_details>
- <tag id="RAW" />
- </entry>
-
<entry name="sensitivityRange" type="int32" visibility="public"
type_notes="Range of supported sensitivities"
container="array" typedef="rangeInt"
@@ -6120,6 +6040,85 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
Devices with RAW capability will always report this information in this key.
</details>
</entry>
+ <entry name="preCorrectionActiveArraySize" type="int32" visibility="public"
+ type_notes="Four ints defining the active pixel rectangle" container="array"
+ typedef="rectangle" hwlevel="legacy">
+ <array>
+ <size>4</size>
+ </array>
+ <description>
+ The area of the image sensor which corresponds to active pixels prior to the
+ application of any geometric distortion correction.
+ </description>
+ <units>Pixel coordinates on the image sensor</units>
+ <details>
+ This is the rectangle representing the size of the active region of the sensor (i.e.
+ the region that actually receives light from the scene) before any geometric correction
+ has been applied, and should be treated as the active region rectangle for any of the
+ raw formats. All metadata associated with raw processing (e.g. the lens shading
+ correction map, and radial distortion fields) treats the top, left of this rectangle as
+ the origin, (0,0).
+
+ The size of this region determines the maximum field of view and the maximum number of
+ pixels that an image from this sensor can contain, prior to the application of
+ geometric distortion correction. The effective maximum pixel dimensions of a
+ post-distortion-corrected image is given by the android.sensor.info.activeArraySize
+ field, and the effective maximum field of view for a post-distortion-corrected image
+ can be calculated by applying the geometric distortion correction fields to this
+ rectangle, and cropping to the rectangle given in android.sensor.info.activeArraySize.
+
+ E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
+ dimensions in android.sensor.info.activeArraySize given the position of a pixel,
+ (x', y'), in the raw pixel array with dimensions give in
+ android.sensor.info.pixelArraySize:
+
+ 1. Choose a pixel (x', y') within the active array region of the raw buffer given in
+ android.sensor.info.preCorrectionActiveArraySize, otherwise this pixel is considered
+ to be outside of the FOV, and will not be shown in the processed output image.
+ 1. Apply geometric distortion correction to get the post-distortion pixel coordinate,
+ (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
+ buffers is defined relative to the top, left of the
+ android.sensor.info.preCorrectionActiveArraySize rectangle.
+ 1. If the resulting corrected pixel coordinate is within the region given in
+ android.sensor.info.activeArraySize, then the position of this pixel in the
+ processed output image buffer is `(x_i - activeArray.left, y_i - activeArray.top)`,
+ when the top, left coordinate of that buffer is treated as (0, 0).
+
+ Thus, for pixel x',y' = (25, 25) on a sensor where android.sensor.info.pixelArraySize
+ is (100,100), android.sensor.info.preCorrectionActiveArraySize is (10, 10, 100, 100),
+ android.sensor.info.activeArraySize is (20, 20, 80, 80), and the geometric distortion
+ correction doesn't change the pixel coordinate, the resulting pixel selected in
+ pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
+ with dimensions given in android.sensor.info.pixelArraySize, and would be (5, 5)
+ relative to the top,left of post-processed YUV output buffer with dimensions given in
+ android.sensor.info.activeArraySize.
+
+ The currently supported fields that correct for geometric distortion are:
+
+ 1. android.lens.radialDistortion.
+
+ If all of the geometric distortion fields are no-ops, this rectangle will be the same
+ as the post-distortion-corrected rectangle given in
+ android.sensor.info.activeArraySize.
+
+ This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
+ the full pixel array, and the size of the full pixel array is given by
+ android.sensor.info.pixelArraySize.
+
+ The pre-correction active array may be smaller than the full pixel array, since the
+ full array may include black calibration pixels or other inactive regions.
+ </details>
+ <hal_details>
+ This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
+ &amp;gt;= `(0,0)`.
+ The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySize`.
+
+ If omitted by the HAL implementation, the camera framework will assume that this is
+ the same as the post-correction active array region given in
+ android.sensor.info.activeArraySize.
+ </hal_details>
+ <tag id="RAW" />
+ </entry>
</namespace>
<entry name="referenceIlluminant1" type="byte" visibility="public"
enum="true">
diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h
index 0585701c..aa60de7a 100644
--- a/camera/include/system/camera_metadata_tags.h
+++ b/camera/include/system/camera_metadata_tags.h
@@ -311,8 +311,6 @@ typedef enum camera_metadata_tag {
ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE = // int32[] | public
ANDROID_SENSOR_INFO_START,
- ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE,
- // int32[] | public
ANDROID_SENSOR_INFO_SENSITIVITY_RANGE, // int32[] | public
ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, // enum | public
ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, // int64[] | public
@@ -322,6 +320,8 @@ typedef enum camera_metadata_tag {
ANDROID_SENSOR_INFO_WHITE_LEVEL, // int32 | public
ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE, // enum | public
ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED, // enum | public
+ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE,
+ // int32[] | public
ANDROID_SENSOR_INFO_END,
ANDROID_SHADING_MODE = // enum | public
diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c
index f8cf6177..08331c77 100644
--- a/camera/src/camera_metadata_tag_info.c
+++ b/camera/src/camera_metadata_tag_info.c
@@ -498,8 +498,6 @@ static tag_info_t android_sensor_info[ANDROID_SENSOR_INFO_END -
ANDROID_SENSOR_INFO_START] = {
[ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
{ "activeArraySize", TYPE_INT32 },
- [ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
- { "preCorrectionActiveArraySize", TYPE_INT32 },
[ ANDROID_SENSOR_INFO_SENSITIVITY_RANGE - ANDROID_SENSOR_INFO_START ] =
{ "sensitivityRange", TYPE_INT32 },
[ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT - ANDROID_SENSOR_INFO_START ] =
@@ -518,6 +516,8 @@ static tag_info_t android_sensor_info[ANDROID_SENSOR_INFO_END -
{ "timestampSource", TYPE_BYTE },
[ ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED - ANDROID_SENSOR_INFO_START ] =
{ "lensShadingApplied", TYPE_BYTE },
+ [ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
+ { "preCorrectionActiveArraySize", TYPE_INT32 },
};
static tag_info_t android_shading[ANDROID_SHADING_END -
@@ -2084,9 +2084,6 @@ int camera_metadata_enum_snprint(uint32_t tag,
case ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE: {
break;
}
- case ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE: {
- break;
- }
case ANDROID_SENSOR_INFO_SENSITIVITY_RANGE: {
break;
}
@@ -2162,6 +2159,9 @@ int camera_metadata_enum_snprint(uint32_t tag,
}
break;
}
+ case ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE: {
+ break;
+ }
case ANDROID_SHADING_MODE: {
switch (value) {