camera_metadata: Update available formats and sizes
Below tag specs are updated:
- android.scaler.availableFormats
- android.scaler.availableJpegSizes
- android.scaler.availableProcessedSizes
Change-Id: Icbb25f64d0b19685db1ea024db44d54b197fab0b
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index 3afe73d..4de5b9d 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -9250,7 +9250,7 @@
<tr class="entry" id="static_android.scaler.availableFormats">
- <td class="entry_name" rowspan="1">
+ <td class="entry_name" rowspan="5">
android.<wbr/>scaler.<wbr/>available<wbr/>Formats
</td>
<td class="entry_type">
@@ -9261,27 +9261,29 @@
n
</span>
<span class="entry_type_visibility"> [public as imageFormat]</span>
- <div class="entry_type_notes">values from HAL_<wbr/>PIXEL_<wbr/>FORMAT_<wbr/>* in /<wbr/>system/<wbr/>core/<wbr/>include/<wbr/>system/<wbr/>graphics.<wbr/>h</div>
<ul class="entry_type_enum">
<li>
<span class="entry_type_enum_name">RAW_SENSOR</span>
+ <span class="entry_type_enum_optional">optional</span>
<span class="entry_type_enum_value">0x20</span>
</li>
<li>
<span class="entry_type_enum_name">YV12</span>
+ <span class="entry_type_enum_optional">optional</span>
<span class="entry_type_enum_value">0x32315659</span>
<span class="entry_type_enum_notes"><p>YCrCb 4:2:0 Planar</p></span>
</li>
<li>
<span class="entry_type_enum_name">YCrCb_420_SP</span>
+ <span class="entry_type_enum_optional">optional</span>
<span class="entry_type_enum_value">0x11</span>
<span class="entry_type_enum_notes"><p>NV21</p></span>
</li>
<li>
<span class="entry_type_enum_name">IMPLEMENTATION_DEFINED</span>
<span class="entry_type_enum_value">0x22</span>
- <span class="entry_type_enum_notes"><p>Hal Implementation Defined</p></span>
+ <span class="entry_type_enum_notes"><p>System internal format,<wbr/> not application-accessible</p></span>
</li>
<li>
<span class="entry_type_enum_name">YCbCr_420_888</span>
@@ -9291,14 +9293,15 @@
<li>
<span class="entry_type_enum_name">BLOB</span>
<span class="entry_type_enum_value">0x21</span>
- <span class="entry_type_enum_notes"><p>JPEG</p></span>
+ <span class="entry_type_enum_notes"><p>JPEG format</p></span>
</li>
</ul>
</td> <!-- entry_type -->
<td class="entry_description">
- <p>List of app-visible formats</p>
+ <p>The list of image formats that are supported by this
+camera device.<wbr/></p>
</td>
<td class="entry_units">
@@ -9314,7 +9317,33 @@
</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>All camera devices will support JPEG and YUV_<wbr/>420_<wbr/>888 formats.<wbr/></p>
+<p>When set to YUV_<wbr/>420_<wbr/>888,<wbr/> application can access the YUV420 data directly.<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>These format values are from HAL_<wbr/>PIXEL_<wbr/>FORMAT_<wbr/>* in
+system/<wbr/>core/<wbr/>include/<wbr/>system/<wbr/>graphics.<wbr/>h.<wbr/></p>
+<p>When IMPLEMENTATION_<wbr/>DEFINED is used,<wbr/> the platform
+gralloc module will select a format based on the usage flags provided
+by the camera HAL device and the other endpoint of the stream.<wbr/> It is
+usually used by preview and recording streams,<wbr/> where the application doesn't
+need access the image data.<wbr/></p>
+<p>YCb<wbr/>Cr_<wbr/>420_<wbr/>888 format must be supported by the HAL.<wbr/> When an image stream
+needs CPU/<wbr/>application direct access,<wbr/> this format will be used.<wbr/></p>
+<p>The BLOB format must be supported by the HAL.<wbr/> This is used for the JPEG stream.<wbr/></p>
+ </td>
+ </tr>
<tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
<!-- end of entry -->
@@ -9374,7 +9403,7 @@
<tr class="entry" id="static_android.scaler.availableJpegSizes">
- <td class="entry_name" rowspan="1">
+ <td class="entry_name" rowspan="5">
android.<wbr/>scaler.<wbr/>available<wbr/>Jpeg<wbr/>Sizes
</td>
<td class="entry_type">
@@ -9390,16 +9419,13 @@
</td> <!-- entry_type -->
<td class="entry_description">
- <p>The resolutions available for output from
-the JPEG block.<wbr/> Listed as width x height</p>
+ <p>The JPEG resolutions that are supported by this camera device.<wbr/></p>
</td>
<td class="entry_units">
</td>
<td class="entry_range">
- <p>Must include: - sensor maximum resolution Should
-include: - half/<wbr/>quarter max resolution</p>
</td>
<td class="entry_tags">
@@ -9409,7 +9435,26 @@
</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 resolutions are listed as <code>(width,<wbr/> height)</code> pairs.<wbr/> All camera devices will support
+sensor maximum resolution (defined by <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="entries_header">
+ <th class="th_details" colspan="5">HAL Implementation Details</th>
+ </tr>
+ <tr class="entry_cont">
+ <td class="entry_details" colspan="5">
+ <p>The HAL must include sensor maximum resolution
+(defined by <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>),<wbr/>
+and should include half/<wbr/>quarter of sensor maximum resolution.<wbr/></p>
+ </td>
+ </tr>
<tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
<!-- end of entry -->
@@ -9508,7 +9553,7 @@
<tr class="entry" id="static_android.scaler.availableProcessedSizes">
- <td class="entry_name" rowspan="3">
+ <td class="entry_name" rowspan="5">
android.<wbr/>scaler.<wbr/>available<wbr/>Processed<wbr/>Sizes
</td>
<td class="entry_type">
@@ -9527,16 +9572,13 @@
<p>The resolutions available for use with
processed output streams,<wbr/> such as YV12,<wbr/> NV12,<wbr/> and
platform opaque YUV/<wbr/>RGB streams to the GPU or video
-encoders.<wbr/> Listed as width,<wbr/> height</p>
+encoders.<wbr/></p>
</td>
<td class="entry_units">
</td>
<td class="entry_range">
- <p>Must include: - sensor maximum resolution -
-standard QCIF,<wbr/> 240p,<wbr/> 480p,<wbr/> 720p,<wbr/> and 1080p
-resolutions</p>
</td>
<td class="entry_tags">
@@ -9551,15 +9593,37 @@
</tr>
<tr class="entry_cont">
<td class="entry_details" colspan="5">
- <p>The actual supported resolution list may be limited by
-consumer end points for different use cases.<wbr/> For example,<wbr/> for
-recording use case,<wbr/> the largest supported resolution may be
-limited by max supported size from encoder,<wbr/> for preview use
-case,<wbr/> the largest supported resolution may be limited by max
-resolution SurfaceTexture/<wbr/>SurfaceView can support.<wbr/></p>
+ <p>The resolutions are listed as <code>(width,<wbr/> height)</code> pairs.<wbr/></p>
+<p>For a given use case,<wbr/> the actual maximum supported resolution
+may be lower than what is listed here,<wbr/> depending on the destination
+Surface for the image data.<wbr/> For example,<wbr/> for recording video,<wbr/>
+the video encoder chosen may have a maximum size limit (e.<wbr/>g.<wbr/> 1080p)
+smaller than what the camera (e.<wbr/>g.<wbr/> maximum resolution is 3264x2448)
+can provide.<wbr/></p>
+<p>Please reference the documentation for the image data destination to
+check if it limits the maximum size for image data.<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>For FULL capability devices (<code><a href="#static_android.info.supportedHardwareLevel">android.<wbr/>info.<wbr/>supported<wbr/>Hardware<wbr/>Level</a> == FULL</code>),<wbr/>
+the HAL must include all JPEG sizes listed in android.<wbr/>scaler.<wbr/>available<wbr/>Jpeg<wbr/>Sizes
+and each below resolution if it is smaller than or equal to the sensor
+maximum resolution (if they are not listed in JPEG sizes already):</p>
+<ul>
+<li>240p (320 x 240)</li>
+<li>480p (640 x 480)</li>
+<li>720p (1280 x 720)</li>
+<li>1080p (1920 x 1080)</li>
+</ul>
+<p>For LIMITED capability devices (<code><a href="#static_android.info.supportedHardwareLevel">android.<wbr/>info.<wbr/>supported<wbr/>Hardware<wbr/>Level</a> == LIMITED</code>),<wbr/>
+the HAL only has to list up to the maximum video size supported by the devices.<wbr/></p>
+ </td>
+ </tr>
<tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
<!-- end of entry -->
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
index 724df98..bacf3fc 100644
--- a/camera/docs/metadata_properties.xml
+++ b/camera/docs/metadata_properties.xml
@@ -2216,23 +2216,22 @@
<static>
<entry name="availableFormats" type="int32"
visibility="public" enum="true"
- type_notes="values from HAL_PIXEL_FORMAT_* in /system/core/include/system/graphics.h"
container="array" typedef="imageFormat">
<array>
<size>n</size>
</array>
<enum>
- <value id="0x20">RAW_SENSOR
+ <value optional="true" id="0x20">RAW_SENSOR
</value>
- <value id="0x32315659">YV12
+ <value optional="true" id="0x32315659">YV12
<notes>YCrCb 4:2:0 Planar</notes>
</value>
- <value id="0x11">YCrCb_420_SP
+ <value optional="true" id="0x11">YCrCb_420_SP
<notes>NV21</notes>
</value>
<value id="0x22">IMPLEMENTATION_DEFINED
- <notes>Hal Implementation Defined</notes>
+ <notes>System internal format, not application-accessible</notes>
</value>
<value id="0x23">YCbCr_420_888
@@ -2240,10 +2239,32 @@
</value>
<value id="0x21">BLOB
- <notes>JPEG</notes>
+ <notes>JPEG format</notes>
</value>
</enum>
- <description>List of app-visible formats</description>
+ <description>The list of image formats that are supported by this
+ camera device.</description>
+ <details>
+ All camera devices will support JPEG and YUV_420_888 formats.
+
+ When set to YUV_420_888, application can access the YUV420 data directly.
+ </details>
+ <hal_details>
+ These format values are from HAL_PIXEL_FORMAT_* in
+ system/core/include/system/graphics.h.
+
+ When IMPLEMENTATION_DEFINED is used, the platform
+ gralloc module will select a format based on the usage flags provided
+ by the camera HAL device and the other endpoint of the stream. It is
+ usually used by preview and recording streams, where the application doesn't
+ need access the image data.
+
+ YCbCr_420_888 format must be supported by the HAL. When an image stream
+ needs CPU/application direct access, this format will be used.
+
+ The BLOB format must be supported by the HAL. This is used for the JPEG stream.
+
+ </hal_details>
<tag id="BC" />
</entry>
<entry name="availableJpegMinDurations" type="int64" visibility="public"
@@ -2267,10 +2288,16 @@
<size>n</size>
<size>2</size>
</array>
- <description>The resolutions available for output from
- the JPEG block. Listed as width x height</description>
- <range>Must include: - sensor maximum resolution Should
- include: - half/quarter max resolution</range>
+ <description>The JPEG resolutions that are supported by this camera device.</description>
+ <details>
+ The resolutions are listed as `(width, height)` pairs. All camera devices will support
+ sensor maximum resolution (defined by android.sensor.info.activeArraySize).
+ </details>
+ <hal_details>
+ The HAL must include sensor maximum resolution
+ (defined by android.sensor.info.activeArraySize),
+ and should include half/quarter of sensor maximum resolution.
+ </hal_details>
<tag id="BC" />
</entry>
<entry name="availableMaxDigitalZoom" type="float" visibility="public">
@@ -2305,17 +2332,34 @@
<description>The resolutions available for use with
processed output streams, such as YV12, NV12, and
platform opaque YUV/RGB streams to the GPU or video
- encoders. Listed as width, height</description>
- <range>Must include: - sensor maximum resolution -
- standard QCIF, 240p, 480p, 720p, and 1080p
- resolutions</range>
- <details>The actual supported resolution list may be limited by
- consumer end points for different use cases. For example, for
- recording use case, the largest supported resolution may be
- limited by max supported size from encoder, for preview use
- case, the largest supported resolution may be limited by max
- resolution SurfaceTexture/SurfaceView can support.
+ encoders.</description>
+ <details>
+ The resolutions are listed as `(width, height)` pairs.
+
+ For a given use case, the actual maximum supported resolution
+ may be lower than what is listed here, depending on the destination
+ Surface for the image data. For example, for recording video,
+ the video encoder chosen may have a maximum size limit (e.g. 1080p)
+ smaller than what the camera (e.g. maximum resolution is 3264x2448)
+ can provide.
+
+ Please reference the documentation for the image data destination to
+ check if it limits the maximum size for image data.
</details>
+ <hal_details>
+ For FULL capability devices (`android.info.supportedHardwareLevel == FULL`),
+ the HAL must include all JPEG sizes listed in android.scaler.availableJpegSizes
+ and each below resolution if it is smaller than or equal to the sensor
+ maximum resolution (if they are not listed in JPEG sizes already):
+
+ * 240p (320 x 240)
+ * 480p (640 x 480)
+ * 720p (1280 x 720)
+ * 1080p (1920 x 1080)
+
+ For LIMITED capability devices (`android.info.supportedHardwareLevel == LIMITED`),
+ the HAL only has to list up to the maximum video size supported by the devices.
+ </hal_details>
<tag id="BC" />
</entry>
<entry name="availableRawMinDurations" type="int64"