diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2015-02-26 10:57:55 -0800 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2015-03-09 16:42:25 -0700 |
commit | 805f3c9428f9ebd5080aec48d3d9d77dbf4b41a9 (patch) | |
tree | 52be74b470b30f90b5ff9a2b820a541d515f728e /graphics | |
parent | a72d6401346ba01027f5fe2f59f9c018e8a6a84a (diff) | |
download | frameworks_base-805f3c9428f9ebd5080aec48d3d9d77dbf4b41a9.zip frameworks_base-805f3c9428f9ebd5080aec48d3d9d77dbf4b41a9.tar.gz frameworks_base-805f3c9428f9ebd5080aec48d3d9d77dbf4b41a9.tar.bz2 |
Add DEPTH image formats, support in ImageReader
- Add an explicit mapping between public ImageFormat/
PixelFormat enums and internal HAL format/dataspace.
- Add DEPTH16 and DEPTH_POINT_CLOUD formats
- Wire up mapping layer to ImageReader to support depth
formats
Change-Id: I8197eccef900cc91baddcfcb934ccd4d8c972eff
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/ImageFormat.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/ImageFormat.java b/graphics/java/android/graphics/ImageFormat.java index 3efb9c0..49c4247 100644 --- a/graphics/java/android/graphics/ImageFormat.java +++ b/graphics/java/android/graphics/ImageFormat.java @@ -356,6 +356,38 @@ public class ImageFormat { public static final int RAW10 = 0x25; /** + * Android dense depth image format. + * + * Each pixel is 16 bits, representing a depth ranging measurement from + * a depth camera or similar sensor. + * + * <p>This format assumes + * <ul> + * <li>an even width</li> + * <li>an even height</li> + * <li>a horizontal stride multiple of 16 pixels</li> + * </ul> + * </p> + * + * <pre> y_size = stride * height </pre> + * + * When produced by a camera, the units are millimeters. + */ + public static final int DEPTH16 = 0x44363159; + + /** + * Android sparse depth point cloud format. + * + * <p>A variable-length list of 3D points, with each point represented + * by a triple of floats.</p> + * + * <p>The number of points is {@code (size of the buffer in bytes) / 12}. + * + * The coordinate system and units depend on the source of the point cloud data. + */ + public static final int DEPTH_POINT_CLOUD = 0x101; + + /** * Use this function to retrieve the number of bits per pixel of an * ImageFormat. * @@ -376,6 +408,7 @@ public class ImageFormat { case Y8: return 8; case Y16: + case DEPTH16: return 16; case NV21: return 12; @@ -412,6 +445,8 @@ public class ImageFormat { case YUV_420_888: case RAW_SENSOR: case RAW10: + case DEPTH16: + case DEPTH_POINT_CLOUD: return true; } |