aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-04-10 15:10:50 -0700
committerEino-Ville Talvala <etalvala@google.com>2012-04-13 16:02:31 -0700
commit0a85154c1621b40d384b3fd7d45f3a9c0141e5a6 (patch)
tree0e5d6bfe8c2881e3cad27011f44b55b4a93a6ea3
parentaab19bbcb63eb3555291b4efd06282403b9eb002 (diff)
downloadsystem_core-0a85154c1621b40d384b3fd7d45f3a9c0141e5a6.tar.gz
system_core-0a85154c1621b40d384b3fd7d45f3a9c0141e5a6.tar.bz2
system_core-0a85154c1621b40d384b3fd7d45f3a9c0141e5a6.zip
Add new raw image sensor HAL pixel format.
This format is exposed outside of the HAL to applications. RAW_SENSOR is a single-channel 16-bit format, typically representing raw Bayer-pattern images from an image sensor, with minimal processing. The exact pixel layout of the data in the buffer is sensor-dependent, and needs to be queried from the camera device. Generally, not all 16 bits are used; more common values are 10 or 12 bits. All parameters to interpret the raw data (black and white points, color space, etc) must be queried from the camera device. This format assumes - an even width - an even height - a horizontal stride multiple of 16 pixels (32 bytes). Change-Id: I67fc72d1c2c899e258fcd53b3ab91b459e9210f0
-rw-r--r--include/system/graphics.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/system/graphics.h b/include/system/graphics.h
index 729e92c7..e206e3ed 100644
--- a/include/system/graphics.h
+++ b/include/system/graphics.h
@@ -86,7 +86,27 @@ enum {
*/
HAL_PIXEL_FORMAT_YV12 = 0x32315659, // YCrCb 4:2:0 Planar
-
+ /*
+ * Android RAW sensor format:
+ *
+ * This format is exposed outside of the HAL to applications.
+ *
+ * RAW_SENSOR is a single-channel 16-bit format, typically representing raw
+ * Bayer-pattern images from an image sensor, with minimal processing.
+ *
+ * The exact pixel layout of the data in the buffer is sensor-dependent, and
+ * needs to be queried from the camera device.
+ *
+ * Generally, not all 16 bits are used; more common values are 10 or 12
+ * bits. All parameters to interpret the raw data (black and white points,
+ * color space, etc) must be queried from the camera device.
+ *
+ * This format assumes
+ * - an even width
+ * - an even height
+ * - a horizontal stride multiple of 16 pixels (32 bytes).
+ */
+ HAL_PIXEL_FORMAT_RAW_SENSOR = 0x20,
/* Legacy formats (deprecated), used by ImageFormat.java */
HAL_PIXEL_FORMAT_YCbCr_422_SP = 0x10, // NV16