summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-12-12 13:29:45 -0800
committerEino-Ville Talvala <etalvala@google.com>2013-06-07 21:29:45 +0000
commitb2675542c2f414154125b534767ae0903fba581e (patch)
tree0687fb11a57bba077f88d653d2789f3ba0c51a63 /graphics
parent8c4a8243c77bcbd434fb30587be2feffd2835728 (diff)
downloadframeworks_base-b2675542c2f414154125b534767ae0903fba581e.zip
frameworks_base-b2675542c2f414154125b534767ae0903fba581e.tar.gz
frameworks_base-b2675542c2f414154125b534767ae0903fba581e.tar.bz2
Initial commit of new camera API, mostly just the interface.
- New core API classes in android.hardware.photography - android.media.Image and android.media.ImageReader classes for application access to direct hardware image buffers. - Additions to android.graphics.ImageFormat to describe new image types needed by new camera API. - Some documentation included; very little implementation. Bug: 9111736 Change-Id: I0680f35944d1cb8845b7dc0c67edc8c0f0864573
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/ImageFormat.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/ImageFormat.java b/graphics/java/android/graphics/ImageFormat.java
index f6b747a..972ce47 100644
--- a/graphics/java/android/graphics/ImageFormat.java
+++ b/graphics/java/android/graphics/ImageFormat.java
@@ -100,6 +100,41 @@ public class ImageFormat {
public static final int JPEG = 0x100;
/**
+ * <p>Multi-plane Android YUV format</p>
+ *
+ * <p>This format is a generic YCbCr format, capable of describing any 4:2:0
+ * chroma-subsampled planar or semiplanar buffer, with 8 bits per color
+ * sample.</p>
+ *
+ * <p>Images in this format are always represented by three separate buffers
+ * of data, one for each color plane. Additional information always
+ * accompanies the buffers, describing the row stride and the pixel stride
+ * for each plane.</p>
+ *
+ * <p>For example, the {@link android.media.Image} object can provide data
+ * in this format from a {@link android.hardware.photography.CameraDevice}
+ * through a {@link android.media.ImageReader} object.</p>
+ *
+ * @see android.media.Image
+ * @see android.media.ImageReader
+ * @see android.hardware.camera.CameraDevice
+ */
+ public static final int YUV_420_888 = 0x23;
+
+ /**
+ * <p>General raw camera sensor image format, usually representing a
+ * single-channel Bayer-mosaic image. Each pixel color sample is stored with
+ * 16 bits of precision.</p>
+ *
+ * <p>The layout of the color mosaic, the maximum and minimum encoding
+ * values of the raw pixel data, the color space of the image, and all other
+ * needed information to interpret a raw sensor image must be queried from
+ * the {@link android.hardware.photography.CameraDevice} which produced the
+ * image.</p>
+ */
+ public static final int RAW_SENSOR = 0x201;
+
+ /**
* Raw bayer format used for images, which is 10 bit precision samples
* stored in 16 bit words. The filter pattern is RGGB. Whether this format
* is supported by the camera hardware can be determined by
@@ -129,6 +164,10 @@ public class ImageFormat {
return 12;
case NV21:
return 12;
+ case YUV_420_888:
+ return 12;
+ case RAW_SENSOR:
+ return 16;
case BAYER_RGGB:
return 16;
}