diff options
| author | 2022-11-29 22:32:12 +0000 | |
|---|---|---|
| committer | 2022-11-29 22:32:12 +0000 | |
| commit | 1e5a5567972f7e76d40b25bb48fd68b2db0d8f01 (patch) | |
| tree | baa72d2885fbce78847b77d3d57db2c7f98e8c03 | |
| parent | ea6d106b639494d61194459728d2157a0c6b9a2d (diff) | |
| parent | 17fc01943eb304adfc137caac07f8adc9ffe48a8 (diff) | |
Merge "Update documentation for Image to be clear on valid format enums." into tm-dev am: 82409626b9 am: f638686c4e am: 17fc01943e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17006063
Change-Id: I9caa5a3a0005092412414400b3faee8c1a159727
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | media/java/android/media/Image.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/media/java/android/media/Image.java b/media/java/android/media/Image.java index 8a03afb77942..d6fe68253be6 100644 --- a/media/java/android/media/Image.java +++ b/media/java/android/media/Image.java @@ -86,8 +86,10 @@ public abstract class Image implements AutoCloseable { * * <p> * The format is one of the values from - * {@link android.graphics.ImageFormat ImageFormat}. The mapping between the - * formats and the planes is as follows: + * {@link android.graphics.ImageFormat ImageFormat}, + * {@link android.graphics.PixelFormat PixelFormat}, or + * {@link android.hardware.HardwareBuffer HardwareBuffer}. The mapping between the + * formats and the planes is as follows (any formats not listed will have 1 plane): * </p> * * <table> @@ -171,15 +173,18 @@ public abstract class Image implements AutoCloseable { * </tr> * <tr> * <td>{@link android.graphics.ImageFormat#YCBCR_P010 YCBCR_P010}</td> - * <td>1</td> + * <td>3</td> * <td>P010 is a 4:2:0 YCbCr semiplanar format comprised of a WxH Y plane - * followed by a Wx(H/2) CbCr plane. Each sample is represented by a 16-bit - * little-endian value, with the lower 6 bits set to zero. + * followed by a Wx(H/2) Cb and Cr planes. Each sample is represented by a 16-bit + * little-endian value, with the lower 6 bits set to zero. Since this is guaranteed to be + * a semi-planar format, the Cb plane can also be treated as an interleaved Cb/Cr plane. * </td> * </tr> * </table> * * @see android.graphics.ImageFormat + * @see android.graphics.PixelFormat + * @see android.hardware.HardwareBuffer */ public abstract int getFormat(); |