From f71f4089d8ad6dfb005a0259e463501c78ac9b06 Mon Sep 17 00:00:00 2001 From: Gopalakrishnan Nallasamy Date: Tue, 16 Nov 2021 18:16:42 -0800 Subject: [PATCH] MediaCodecInfo: Add constant for YUVP010 color format Bug: 206456921 Test: atest android.media.cts.ImageReaderDecoderTest Change-Id: Ia93bd25ede40b39d6b799990c01e35b90a8ad8d4 --- media/java/android/media/MediaCodecInfo.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java index 374cc7592fafd..3c152fb68c0af 100644 --- a/media/java/android/media/MediaCodecInfo.java +++ b/media/java/android/media/MediaCodecInfo.java @@ -426,6 +426,12 @@ public final class MediaCodecInfo { /** @deprecated Use {@link #COLOR_Format32bitABGR8888}. */ public static final int COLOR_Format24BitABGR6666 = 43; + /** @hide + * 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. */ + public static final int COLOR_FormatYUVP010 = 54; + /** @deprecated Use {@link #COLOR_FormatYUV420Flexible}. */ public static final int COLOR_TI_FormatYUV420PackedSemiPlanar = 0x7f000100; // COLOR_FormatSurface indicates that the data will be a GraphicBuffer metadata reference.