From b8317e2bbbf1a23d4fcd0c4b0e29e37254badc49 Mon Sep 17 00:00:00 2001
From: Zhijun He
Date: Thu, 16 Jan 2014 09:47:07 -0800
Subject: [PATCH] camera_metadata: Update available formats and sizes
Below tag specs are updated:
- android.scaler.availableFormats
- android.scaler.availableJpegSizes
- android.scaler.availableProcessedSizes
Change-Id: Icbb25f64d0b19685db1ea024db44d54b197fab0b
---
camera/docs/docs.html | 106 +++++++++++++++++++++++++++++-------
camera/docs/metadata_properties.xml | 86 ++++++++++++++++++++++-------
2 files changed, 150 insertions(+), 42 deletions(-)
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index 3afe73d0..4de5b9dc 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -9250,7 +9250,7 @@ respectively.
-
+ |
android.scaler.availableFormats
|
@@ -9261,27 +9261,29 @@ respectively.
n
[public as imageFormat]
- values from HAL_PIXEL_FORMAT_* in /system/core/include/system/graphics.h
-
RAW_SENSOR
+ optional
0x20
-
YV12
+ optional
0x32315659
YCrCb 4:2:0 Planar
-
YCrCb_420_SP
+ optional
0x11
NV21
-
IMPLEMENTATION_DEFINED
0x22
-
Hal Implementation Defined
+ System internal format, not application-accessible
-
YCbCr_420_888
@@ -9291,14 +9293,15 @@ respectively.
-
BLOB
0x21
-
JPEG
+ JPEG format
|
- List of app-visible formats
+ The list of image formats that are supported by this
+camera device.
|
@@ -9314,7 +9317,33 @@ respectively.
|
+
+
+
+ All camera devices will support JPEG and YUV_420_888 formats.
+When set to YUV_420_888, application can access the YUV420 data directly.
+ |
+
+
+
+
+ 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.
+ |
+
|
@@ -9374,7 +9403,7 @@ durations)
-
+ |
android.scaler.availableJpegSizes
|
@@ -9390,16 +9419,13 @@ durations)
|
- The resolutions available for output from
-the JPEG block. Listed as width x height
+ The JPEG resolutions that are supported by this camera device.
|
|
- Must include: - sensor maximum resolution Should
-include: - half/quarter max resolution
|
@@ -9409,7 +9435,26 @@ include: - half/quarter max resolution
|
+
+
+
+ The resolutions are listed as (width, height) pairs. All camera devices will support
+sensor maximum resolution (defined by android.sensor.info.activeArraySize).
+ |
+
+
+
+
+ The HAL must include sensor maximum resolution
+(defined by android.sensor.info.activeArraySize),
+and should include half/quarter of sensor maximum resolution.
+ |
+
|
@@ -9508,7 +9553,7 @@ durations)
-
+ |
android.scaler.availableProcessedSizes
|
@@ -9527,16 +9572,13 @@ durations)
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
+encoders.
|
|
- Must include: - sensor maximum resolution -
-standard QCIF, 240p, 480p, 720p, and 1080p
-resolutions
|
@@ -9551,15 +9593,37 @@ resolutions
|
- 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.
+ 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.
|
+
+
+
+ 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.
+ |
+
|
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
index 724df989..bacf3fcb 100644
--- a/camera/docs/metadata_properties.xml
+++ b/camera/docs/metadata_properties.xml
@@ -2216,23 +2216,22 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
n
- RAW_SENSOR
+ RAW_SENSOR
- YV12
+ YV12
YCrCb 4:2:0 Planar
- YCrCb_420_SP
+ YCrCb_420_SP
NV21
IMPLEMENTATION_DEFINED
- Hal Implementation Defined
+ System internal format, not application-accessible
YCbCr_420_888
@@ -2240,10 +2239,32 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
BLOB
- JPEG
+ JPEG format
- List of app-visible formats
+ The list of image formats that are supported by this
+ camera device.
+
+ All camera devices will support JPEG and YUV_420_888 formats.
+
+ When set to YUV_420_888, application can access the YUV420 data directly.
+
+
+ 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.
+
+
@@ -2305,17 +2332,34 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
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
- Must include: - sensor maximum resolution -
- standard QCIF, 240p, 480p, 720p, and 1080p
- resolutions
- 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.
+
+ 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.
+
+ 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.
+