From 0a85154c1621b40d384b3fd7d45f3a9c0141e5a6 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Tue, 10 Apr 2012 15:10:50 -0700 Subject: 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 --- include/system/graphics.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'include/system') 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 -- cgit v1.2.3