summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-05-03 13:49:57 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-03 13:49:57 -0700
commit163a3ae770c290f87347e5b413ec8ff9f128a311 (patch)
tree3606afa74cc0e3db7bb752c0559981392ee0cfec /graphics/java
parente06747c727c9edc05c1d32f389a2347a11f653d5 (diff)
parent951516358e2841d2425f610bcd0175d9960135d2 (diff)
downloadframeworks_base-163a3ae770c290f87347e5b413ec8ff9f128a311.zip
frameworks_base-163a3ae770c290f87347e5b413ec8ff9f128a311.tar.gz
frameworks_base-163a3ae770c290f87347e5b413ec8ff9f128a311.tar.bz2
Merge "Update docs for YV12 format and camera preview callbacks." into jb-dev
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/ImageFormat.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/ImageFormat.java b/graphics/java/android/graphics/ImageFormat.java
index b3a8fd7..f6b747a 100644
--- a/graphics/java/android/graphics/ImageFormat.java
+++ b/graphics/java/android/graphics/ImageFormat.java
@@ -48,14 +48,26 @@ public class ImageFormat {
* </p>
*
* <pre> y_size = stride * height
- * c_size = ALIGN(stride/2, 16) * height/2
+ * 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</pre>
*
- * This format is guaranteed to be supported for camera preview images since
+ * <p>This format is guaranteed to be supported for camera preview images since
* API level 12; for earlier API versions, check
* {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.
+ *
+ * <p>Note that for camera preview callback use (see
+ * {@link android.hardware.Camera#setPreviewCallback}), the
+ * <var>stride</var> value is the smallest possible; that is, it is equal
+ * to:
+ *
+ * <pre>stride = ALIGN(width, 16)</pre>
+ *
+ * @see android.hardware.Camera.Parameters#setPreviewCallback
+ * @see android.hardware.Camera.Parameters#setPreviewFormat
+ * @see android.hardware.Camera.Parameters#getSupportedPreviewFormats
* </p>
*/
public static final int YV12 = 0x32315659;