diff options
author | Mathias Agopian <mathias@google.com> | 2011-03-01 14:05:22 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-03-02 13:51:21 -0800 |
commit | 58a7775d3e12efdc5aaaf19d0ac5e487d622cf36 (patch) | |
tree | 01da0277b44c18963dba500dae641b4f6526fc64 /graphics/java | |
parent | 525af5d5b0fcd4de9bac2f4be016cdd2f3534a40 (diff) | |
download | frameworks_base-58a7775d3e12efdc5aaaf19d0ac5e487d622cf36.zip frameworks_base-58a7775d3e12efdc5aaaf19d0ac5e487d622cf36.tar.gz frameworks_base-58a7775d3e12efdc5aaaf19d0ac5e487d622cf36.tar.bz2 |
fix YV12 documentation
Change-Id: I9a2022101930721a3b3bacc95b02ca21d05f21bb
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/ImageFormat.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/graphics/java/android/graphics/ImageFormat.java b/graphics/java/android/graphics/ImageFormat.java index 39a3b05..b8e9384 100644 --- a/graphics/java/android/graphics/ImageFormat.java +++ b/graphics/java/android/graphics/ImageFormat.java @@ -31,15 +31,25 @@ public class ImageFormat { public static final int RGB_565 = 4; /** - * Planar 4:2:0 YCrCb format. This format assumes an horizontal stride of 16 - * pixels for all planes and an implicit vertical stride of the image - * height's next multiple of two. - * y_size = stride * ALIGN(height, 2) - * c_size = ALIGN(stride/2, 16) * height + * Android YUV format: + * + * This format is exposed to software decoders and applications. + * + * YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y plane followed + * by (W/2) x (H/2) Cr and Cb planes. + * + * 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_size = ALIGN(stride/2, 16) * height/2 * size = y_size + c_size * 2 * cr_offset = y_size * cb_offset = y_size + c_size - * + * * Whether this format is supported by the camera hardware can be determined * by * {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}. |