Camera: Add BURST_CAPTURE capability flag
This capability (a subset of FULL) indicates that a camera device can
capture high-rate (>= 20fps) bursts of images at full device
resolution, in at least the YUV_420_888 format.
It also guarantees that the synchronization latency for a device is
relatively small, so that fixed-setting bursts can be captured quickly.
Bug: 18281970
Change-Id: Ib774e1cef8b1924326f505c3595f947ac725e27e
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index c6d1898..50059f8 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -3244,8 +3244,7 @@
image while recording video) use case.<wbr/></p>
<p>The camera device should take the highest-quality image
possible (given the other settings) without disrupting the
-frame rate of video recording.<wbr/><br/>
-</p></span>
+frame rate of video recording.<wbr/> </p></span>
</li>
<li>
<span class="entry_type_enum_name">ZERO_SHUTTER_LAG</span>
@@ -7141,8 +7140,7 @@
image while recording video) use case.<wbr/></p>
<p>The camera device should take the highest-quality image
possible (given the other settings) without disrupting the
-frame rate of video recording.<wbr/><br/>
-</p></span>
+frame rate of video recording.<wbr/> </p></span>
</li>
<li>
<span class="entry_type_enum_name">ZERO_SHUTTER_LAG</span>
@@ -13807,6 +13805,22 @@
<p>This capability is a subset of the MANUAL_<wbr/>SENSOR control capability,<wbr/> and will
always be included if the MANUAL_<wbr/>SENSOR capability is available.<wbr/></p></span>
</li>
+ <li>
+ <span class="entry_type_enum_name">BURST_CAPTURE</span>
+ <span class="entry_type_enum_optional">[optional]</span>
+ <span class="entry_type_enum_notes"><p>The camera device supports capturing maximum-resolution
+images at >= 20 frames per second,<wbr/> in at least the
+uncompressed YUV format,<wbr/> when post-processing settings
+are set to FAST.<wbr/></p>
+<p>More specifically,<wbr/> this means that a size matching the
+camera device's active array size is listed as a
+supported size for the YUV_<wbr/>420_<wbr/>888 format in
+<a href="#static_android.scaler.streamConfigurationMap">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map</a>,<wbr/> and the
+minimum frame duration for that format and size is <=
+1/<wbr/>20 s.<wbr/></p>
+<p>In addition,<wbr/> the <a href="#static_android.sync.maxLatency">android.<wbr/>sync.<wbr/>max<wbr/>Latency</a> field is
+guaranted to have a value between 0 and 4,<wbr/> inclusive.<wbr/></p></span>
+ </li>
</ul>
</td> <!-- entry_type -->
@@ -22650,12 +22664,16 @@
<p>Camera devices will come in three flavors: LEGACY,<wbr/> LIMITED and FULL.<wbr/></p>
<p>A FULL device will support below capabilities:</p>
<ul>
-<li>30fps at maximum resolution (== sensor resolution) is preferred,<wbr/> more than 20fps is required.<wbr/></li>
+<li>30fps operation at maximum resolution (== sensor resolution) is preferred,<wbr/> more than
+ 20fps is required,<wbr/> for at least uncompressed YUV
+ output.<wbr/> (<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> contains BURST_<wbr/>CAPTURE)</li>
<li>Per frame control (<a href="#static_android.sync.maxLatency">android.<wbr/>sync.<wbr/>max<wbr/>Latency</a> <code>==</code> PER_<wbr/>FRAME_<wbr/>CONTROL)</li>
<li>Manual sensor control (<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> contains MANUAL_<wbr/>SENSOR)</li>
-<li>Manual post-processing control (<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> contains MANUAL_<wbr/>POST_<wbr/>PROCESSING)</li>
+<li>Manual post-processing control (<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> contains
+ MANUAL_<wbr/>POST_<wbr/>PROCESSING)</li>
<li>Arbitrary cropping region (<a href="#static_android.scaler.croppingType">android.<wbr/>scaler.<wbr/>cropping<wbr/>Type</a> <code>==</code> FREEFORM)</li>
-<li>At least 3 processed (but not stalling) format output streams (<a href="#static_android.request.maxNumOutputProc">android.<wbr/>request.<wbr/>max<wbr/>Num<wbr/>Output<wbr/>Proc</a> <code>>=</code> 3)</li>
+<li>At least 3 processed (but not stalling) format output streams
+ (<a href="#static_android.request.maxNumOutputProc">android.<wbr/>request.<wbr/>max<wbr/>Num<wbr/>Output<wbr/>Proc</a> <code>>=</code> 3)</li>
<li>The required stream configuration defined in <a href="#static_android.scaler.availableStreamConfigurations">android.<wbr/>scaler.<wbr/>available<wbr/>Stream<wbr/>Configurations</a></li>
<li>The required exposure time range defined in <a href="#static_android.sensor.info.exposureTimeRange">android.<wbr/>sensor.<wbr/>info.<wbr/>exposure<wbr/>Time<wbr/>Range</a></li>
<li>The required maxFrameDuration defined in <a href="#static_android.sensor.info.maxFrameDuration">android.<wbr/>sensor.<wbr/>info.<wbr/>max<wbr/>Frame<wbr/>Duration</a></li>
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
index 0076af0..14f1ae6 100644
--- a/camera/docs/metadata_properties.xml
+++ b/camera/docs/metadata_properties.xml
@@ -3977,6 +3977,24 @@
always be included if the MANUAL_SENSOR capability is available.
</notes>
</value>
+ <value optional="true">BURST_CAPTURE
+ <notes>
+ The camera device supports capturing maximum-resolution
+ images at >= 20 frames per second, in at least the
+ uncompressed YUV format, when post-processing settings
+ are set to FAST.
+
+ More specifically, this means that a size matching the
+ camera device's active array size is listed as a
+ supported size for the YUV_420_888 format in
+ android.scaler.streamConfigurationMap, and the
+ minimum frame duration for that format and size is <=
+ 1/20 s.
+
+ In addition, the android.sync.maxLatency field is
+ guaranted to have a value between 0 and 4, inclusive.
+ </notes>
+ </value>
</enum>
<description>List of capabilities that this camera device
advertises as fully supporting.</description>
@@ -6913,12 +6931,16 @@
A FULL device will support below capabilities:
- * 30fps at maximum resolution (== sensor resolution) is preferred, more than 20fps is required.
+ * 30fps operation at maximum resolution (== sensor resolution) is preferred, more than
+ 20fps is required, for at least uncompressed YUV
+ output. (android.request.availableCapabilities contains BURST_CAPTURE)
* Per frame control (android.sync.maxLatency `==` PER_FRAME_CONTROL)
* Manual sensor control (android.request.availableCapabilities contains MANUAL_SENSOR)
- * Manual post-processing control (android.request.availableCapabilities contains MANUAL_POST_PROCESSING)
+ * Manual post-processing control (android.request.availableCapabilities contains
+ MANUAL_POST_PROCESSING)
* Arbitrary cropping region (android.scaler.croppingType `==` FREEFORM)
- * At least 3 processed (but not stalling) format output streams (android.request.maxNumOutputProc `>=` 3)
+ * At least 3 processed (but not stalling) format output streams
+ (android.request.maxNumOutputProc `>=` 3)
* The required stream configuration defined in android.scaler.availableStreamConfigurations
* The required exposure time range defined in android.sensor.info.exposureTimeRange
* The required maxFrameDuration defined in android.sensor.info.maxFrameDuration
diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h
index ffdf676..e6349c2 100644
--- a/camera/include/system/camera_metadata_tags.h
+++ b/camera/include/system/camera_metadata_tags.h
@@ -663,6 +663,7 @@
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ZSL,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS,
+ ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE,
} camera_metadata_enum_android_request_available_capabilities_t;
diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c
index e9f7625..14174c3 100644
--- a/camera/src/camera_metadata_tag_info.c
+++ b/camera/src/camera_metadata_tag_info.c
@@ -1652,6 +1652,10 @@
msg = "READ_SENSOR_SETTINGS";
ret = 0;
break;
+ case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE:
+ msg = "BURST_CAPTURE";
+ ret = 0;
+ break;
default:
msg = "error: enum value out of range";
}