diff options
author | Igor Murashkin <iam@google.com> | 2013-02-11 11:20:53 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-02-11 11:20:53 -0800 |
commit | fbb4a5ac1b771b2df0786bb5587c7ed0d5f82089 (patch) | |
tree | e1ed85106f9dc5831c18f390a566cd215f52a42c | |
parent | 4b9bdd333362c1f58260c37306f1902fb215f7bf (diff) | |
parent | fba6c12a3e6ac5fabe91270293b1115f72fd48a1 (diff) | |
download | system_core-fbb4a5ac1b771b2df0786bb5587c7ed0d5f82089.zip system_core-fbb4a5ac1b771b2df0786bb5587c7ed0d5f82089.tar.gz system_core-fbb4a5ac1b771b2df0786bb5587c7ed0d5f82089.tar.bz2 |
am fba6c12a: Merge "graphics.h: add new Y8, Y16 formats" into jb-mr1-aah-dev
# Via Android (Google) Code Review (1) and Igor Murashkin (1)
* commit 'fba6c12a3e6ac5fabe91270293b1115f72fd48a1':
graphics.h: add new Y8, Y16 formats
-rw-r--r-- | include/system/graphics.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/system/graphics.h b/include/system/graphics.h index 82b5fcc..c8b9d40 100644 --- a/include/system/graphics.h +++ b/include/system/graphics.h @@ -87,6 +87,64 @@ enum { */ HAL_PIXEL_FORMAT_YV12 = 0x32315659, // YCrCb 4:2:0 Planar + + /* + * Android Y8 format: + * + * This format is exposed outside of the HAL to the framework. + * The expected gralloc usage flags are SW_* and HW_CAMERA_*, + * and no other HW_ flags will be used. + * + * Y8 is a YUV planar format comprised of a WxH Y plane, + * with each pixel being represented by 8 bits. + * + * It is equivalent to just the Y plane from YV12. + * + * This format assumes + * - an even width + * - an even height + * - a horizontal stride multiple of 16 pixels + * - a vertical stride equal to the height + * + * y_size = stride * height + * c_stride = ALIGN(stride/2, 16) + * c_size = c_stride * height/2 + * size = y_size + c_size * 2 + * cr_offset = y_size + * cb_offset = y_size + c_size + * + */ + HAL_PIXEL_FORMAT_Y8 = 0x20203859, + + /* + * Android Y16 format: + * + * This format is exposed outside of the HAL to the framework. + * The expected gralloc usage flags are SW_* and HW_CAMERA_*, + * and no other HW_ flags will be used. + * + * Y16 is a YUV planar format comprised of a WxH Y plane, + * with each pixel being represented by 16 bits. + * + * It is just like Y8, but has double the bits per pixel (little endian). + * + * This format assumes + * - an even width + * - an even height + * - a horizontal stride multiple of 16 pixels + * - a vertical stride equal to the height + * - strides are specified in pixels, not in bytes + * + * y_size = stride * height + * c_stride = ALIGN(stride/2, 16) + * c_size = c_stride * height/2 + * size = y_size + c_size * 2 + * cr_offset = y_size + * cb_offset = y_size + c_size + * + */ + HAL_PIXEL_FORMAT_Y16 = 0x20363159, + /* * Android RAW sensor format: * |