From ac404c12d51b607bdfcac0d94928ed9120bd8e4f Mon Sep 17 00:00:00 2001
From: Jayant Chowdhary
* Concurrent stream guaranteed configurations
* Target 1 Target 2 Sample use case(s)
- * Type Max size Type Max size
- * {@code YUV} {@code MAXIMUM} In-app video / image processing.
- * {@code PRIV} {@code MAXIMUM} In-app viewfinder analysis.
- * {@code YUV} {@code MAXIMUM} {@code YUV } {@code MAXIMUM} In-app video / processing with preview.
- * {@code YUV} {@code MAXIMUM} {@code PRIV } {@code MAXIMUM} In-app video / processing with preview.
+ * {@code PRIV} {@code MAXIMUM} {@code PRIV } {@code MAXIMUM} Standard Recording.
+ * {@code YUV} {@code s1440p} In-app video / image processing.
+ * {@code PRIV} {@code s1440p} In-app viewfinder analysis.
+ * {@code JPEG} {@code s1440p} No viewfinder still image capture.
+ * {@code YUV / PRIV} {@code s720p} {@code JPEG} {@code s1440p} Standard still imaging.
* {@code YUV / PRIV} {@code s720p} {@code YUV / PRIV } {@code s1440p} In-app video / processing with preview.
*
For guaranteed concurrent stream configurations, MAXIMUM refers to the camera device's - * resolution for that format from {@link StreamConfigurationMap#getOutputSizes} or + *
For guaranteed concurrent stream configurations:
+ *s720p refers to the camera device's resolution for that format from {@link StreamConfigurationMap#getOutputSizes} or * 720p(1280X720) whichever is lower.
+ *s1440p refers to the camera device's resolution for that format from {@link StreamConfigurationMap#getOutputSizes} or + * 1440p(1920X1440) whichever is lower.
*MONOCHROME-capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES}
* includes {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}) devices
* supporting {@link android.graphics.ImageFormat#Y8 Y8} support substituting {@code YUV}
diff --git a/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java b/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java
index 41e1443d68665..f0fab6a99d146 100644
--- a/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java
+++ b/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java
@@ -267,7 +267,7 @@ public final class MandatoryStreamCombination {
mStreamsInformation.hashCode());
}
- private static enum SizeThreshold { VGA, PREVIEW, RECORD, MAXIMUM, s720p }
+ private static enum SizeThreshold { VGA, PREVIEW, RECORD, MAXIMUM, s720p, s1440p }
private static enum ReprocessType { NONE, PRIVATE, YUV }
private static final class StreamTemplate {
public int mFormat;
@@ -651,23 +651,38 @@ public final class MandatoryStreamCombination {
private static StreamCombinationTemplate sConcurrentStreamCombinations[] = {
new StreamCombinationTemplate(new StreamTemplate [] {
- new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p) },
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p) },
"In-app video / image processing"),
new StreamCombinationTemplate(new StreamTemplate [] {
- new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p) },
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p) },
"preview / preview to GPU"),
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.JPEG, SizeThreshold.s1440p) },
+ "No view-finder still image capture"),
new StreamCombinationTemplate(new StreamTemplate [] {
new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p),
- new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p)},
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p)},
+ "Two-input in app video / image processing"),
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p),
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p)},
+ "High resolution video recording with preview"),
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p),
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p)},
+ "In-app video / image processing with preview"),
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p),
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p)},
"In-app video / image processing with preview"),
new StreamCombinationTemplate(new StreamTemplate [] {
new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p),
- new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p)},
- "In-app video / image processing with preview"),
+ new StreamTemplate(ImageFormat.JPEG, SizeThreshold.s1440p)},
+ "Standard stil image capture"),
new StreamCombinationTemplate(new StreamTemplate [] {
- new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p),
- new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p)},
- "Standard Recording"),
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p),
+ new StreamTemplate(ImageFormat.JPEG, SizeThreshold.s1440p)},
+ "Standard still image capture"),
};
/**
@@ -720,6 +735,7 @@ public final class MandatoryStreamCombination {
+ " cannot have mandatory concurrent streams");
}
Size size720p = new Size(1280, 720);
+ Size size1440p = new Size(1920, 1440);
ArrayList