diff options
| author | 2022-01-26 05:16:08 +0000 | |
|---|---|---|
| committer | 2022-01-26 05:16:08 +0000 | |
| commit | 2e270a6a54dbacaec6b11e132c6a288ea05f2aad (patch) | |
| tree | c4015b7b37c714209f136938ed40c42a71526b24 | |
| parent | d88011fe9e97f1e737a1bc6965f544af4d294354 (diff) | |
| parent | eb9ed7ff5dd7da2fc0acc2162e64f7a5c03b6dcd (diff) | |
Merge "media: MediaCodecInfo: Unhide COLOR_FormatYUVP010" am: 32c80f0b44 am: eb9ed7ff5d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1960659
Change-Id: I9aa3cfe442af156b8112c94c48536baae4e83184
| -rw-r--r-- | core/api/current.txt | 1 | ||||
| -rw-r--r-- | media/java/android/media/MediaCodecInfo.java | 28 |
2 files changed, 25 insertions, 4 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 8684cf5e0fd6..50bd03d18b04 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -21986,6 +21986,7 @@ package android.media { field @Deprecated public static final int COLOR_FormatYUV422SemiPlanar = 24; // 0x18 field public static final int COLOR_FormatYUV444Flexible = 2135181448; // 0x7f444888 field @Deprecated public static final int COLOR_FormatYUV444Interleaved = 29; // 0x1d + field public static final int COLOR_FormatYUVP010 = 54; // 0x36 field @Deprecated public static final int COLOR_QCOM_FormatYUV420SemiPlanar = 2141391872; // 0x7fa30c00 field @Deprecated public static final int COLOR_TI_FormatYUV420PackedSemiPlanar = 2130706688; // 0x7f000100 field public static final String FEATURE_AdaptivePlayback = "adaptive-playback"; diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java index e75df1d9b691..3b1579f70262 100644 --- a/media/java/android/media/MediaCodecInfo.java +++ b/media/java/android/media/MediaCodecInfo.java @@ -426,10 +426,30 @@ 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. */ + /** + * P010 is 10-bit-per component 4:2:0 YCbCr semiplanar format. + * <p> + * This format uses 24 allocated bits per pixel with 15 bits of + * data per pixel. Chroma planes are subsampled by 2 both + * horizontally and vertically. Each chroma and luma component + * has 16 allocated bits in little-endian configuration with 10 + * MSB of actual data. + * + * <pre> + * byte byte + * <--------- i --------> | <------ i + 1 ------> + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | UNUSED | Y/Cb/Cr | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * 0 5 6 7 0 7 + * bit + * </pre> + * + * Use this format with {@link Image}. This format corresponds + * to {@link android.graphics.ImageFormat#YCBCR_P010}. + * <p> + */ + @SuppressLint("AllUpper") public static final int COLOR_FormatYUVP010 = 54; /** @deprecated Use {@link #COLOR_FormatYUV420Flexible}. */ |