summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2014-07-26 01:16:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-24 15:37:54 +0000
commit64567d165ac69b6656cd078856265e6c80745a75 (patch)
tree0239f9088fcaa0cb09fe899713dcbf54dce10343
parentd41f1a7ae4f45a510009926d29abbca3457c2f7f (diff)
parentc73b73a3c9b1eb008446ca4e96598dc7bc56a937 (diff)
downloadsystem_core-64567d165ac69b6656cd078856265e6c80745a75.zip
system_core-64567d165ac69b6656cd078856265e6c80745a75.tar.gz
system_core-64567d165ac69b6656cd078856265e6c80745a75.tar.bz2
Merge "graphics: update raw10 to allow padding between rows" into lmp-dev
-rw-r--r--include/system/graphics.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/include/system/graphics.h b/include/system/graphics.h
index 74d790f..c3fca97 100644
--- a/include/system/graphics.h
+++ b/include/system/graphics.h
@@ -202,15 +202,16 @@ enum {
*
* This format is exposed outside of the camera HAL to applications.
*
- * RAW10 is a single-channel, 10-bit per pixel, densely packed, unprocessed
- * format, representing raw Bayer-pattern images coming from an image sensor.
+ * RAW10 is a single-channel, 10-bit per pixel, densely packed in each row,
+ * unprocessed format, usually representing raw Bayer-pattern images coming from
+ * an image sensor.
*
- * In an image buffer with this format, starting from the first pixel, each 4
- * consecutive pixels are packed into 5 bytes (40 bits). Each one of the first
- * 4 bytes contains the top 8 bits of each pixel, The fifth byte contains the
- * 2 least significant bits of the 4 pixels, the exact layout data for each 4
- * consecutive pixels is illustrated below (Pi[j] stands for the jth bit of
- * the ith pixel):
+ * In an image buffer with this format, starting from the first pixel of each
+ * row, each 4 consecutive pixels are packed into 5 bytes (40 bits). Each one
+ * of the first 4 bytes contains the top 8 bits of each pixel, The fifth byte
+ * contains the 2 least significant bits of the 4 pixels, the exact layout data
+ * for each 4 consecutive pixels is illustrated below (Pi[j] stands for the jth
+ * bit of the ith pixel):
*
* bit 7 bit 0
* =====|=====|=====|=====|=====|=====|=====|=====|
@@ -228,11 +229,15 @@ enum {
* This format assumes
* - a width multiple of 4 pixels
* - an even height
- * - a horizontal stride equal to the width
* - a vertical stride equal to the height
- * - strides are specified in pixels, not in bytes
+ * - strides are specified in bytes, not in pixels
+ *
+ * size = stride * height
*
- * size = stride * height * 10 / 8
+ * When stride is equal to width * (10 / 8), there will be no padding bytes at
+ * the end of each row, the entire image data is densely packed. When stride is
+ * larger than width * (10 / 8), padding bytes will be present at the end of each
+ * row (including the last row).
*
* This format must be accepted by the gralloc module when used with the
* following usage flags: