diff options
| author | Ruben Brunk <rubenbrunk@google.com> | 2014-02-07 01:56:08 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-02-07 01:56:08 +0000 |
| commit | 84a95225d66c11ffabe7e55145d220e98a38774f (patch) | |
| tree | 999f37611a546ef6997d89668cb5bd377e5a442f | |
| parent | b3e2d02588a2dbed3ec50385625f4b4e4ad9b870 (diff) | |
| parent | 535253eabe96c9de993205c39ee32174fe05be7a (diff) | |
| download | system_core-84a95225d66c11ffabe7e55145d220e98a38774f.zip system_core-84a95225d66c11ffabe7e55145d220e98a38774f.tar.gz system_core-84a95225d66c11ffabe7e55145d220e98a38774f.tar.bz2 | |
Merge "camera3: Add opaque raw format."
| -rw-r--r-- | include/system/graphics.h | 42 |
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: |
