summaryrefslogtreecommitdiffstats
path: root/include/system
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2014-02-04 18:13:34 -0800
committerRuben Brunk <rubenbrunk@google.com>2014-02-06 11:32:23 -0800
commit535253eabe96c9de993205c39ee32174fe05be7a (patch)
treefab1a33d332dc271a2c5eeee145c1dd98dd428b5 /include/system
parent5a23144aa5c6f4a7b93bcc5a218ca9ce8f4d7f3b (diff)
downloadsystem_core-535253eabe96c9de993205c39ee32174fe05be7a.zip
system_core-535253eabe96c9de993205c39ee32174fe05be7a.tar.gz
system_core-535253eabe96c9de993205c39ee32174fe05be7a.tar.bz2
camera3: Add opaque raw format.
Change-Id: I7abf0e63a0f74ede46e0fe4dd1285283355624b1
Diffstat (limited to 'include/system')
-rw-r--r--include/system/graphics.h42
1 files changed, 36 insertions, 6 deletions
diff --git a/include/system/graphics.h b/include/system/graphics.h
index be86ae4..6cef3b2 100644
--- a/include/system/graphics.h
+++ b/include/system/graphics.h
@@ -165,24 +165,54 @@ enum {
/*
* Android RAW sensor format:
*
- * This format is exposed outside of the HAL to applications.
+ * This format is exposed outside of the camera 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.
+ * RAW_SENSOR is a single-channel, 16-bit, little endian 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,
+ * bits. If not all bits are used, the lower-order bits are filled first.
+ * 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).
+ * - a horizontal stride multiple of 16 pixels
+ * - a vertical stride equal to the height
+ * - strides are specified in pixels, not in bytes
+ *
+ * size = stride * height * 2
+ *
+ * This format must be accepted by the gralloc module when used with the
+ * following usage flags:
+ * - GRALLOC_USAGE_HW_CAMERA_*
+ * - GRALLOC_USAGE_SW_*
+ * - GRALLOC_USAGE_RENDERSCRIPT
+ */
+ HAL_PIXEL_FORMAT_RAW16 = 0x20,
+ HAL_PIXEL_FORMAT_RAW_SENSOR = 0x20, // TODO(rubenbrunk): Remove RAW_SENSOR.
+
+ /*
+ * Android opaque RAW format:
+ *
+ * This format is exposed outside of the camera HAL to applications.
+ *
+ * RAW_OPAQUE is a format for unprocessed raw image buffers coming from an
+ * image sensor. The actual structure of buffers of this format is
+ * implementation-dependent.
+ *
+ * This format must be accepted by the gralloc module when used with the
+ * following usage flags:
+ * - GRALLOC_USAGE_HW_CAMERA_*
+ * - GRALLOC_USAGE_SW_*
+ * - GRALLOC_USAGE_RENDERSCRIPT
*/
- HAL_PIXEL_FORMAT_RAW_SENSOR = 0x20,
+ HAL_PIXEL_FORMAT_RAW_OPAQUE = 0x24,
/*
* Android binary blob graphics buffer format: