summaryrefslogtreecommitdiffstats
path: root/include/system
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-04-23 16:17:32 -0700
committerLajos Molnar <lajos@google.com>2015-04-24 23:43:57 +0000
commite632c1bf0c26011c3929d62e99d1fdc07465002c (patch)
treebf7ec2b9882b8706bd3534a8c5ae3aaf7ff2a0bd /include/system
parent7076796cab1ae275d9e9336f19e068abf28f946b (diff)
downloadsystem_core-e632c1bf0c26011c3929d62e99d1fdc07465002c.zip
system_core-e632c1bf0c26011c3929d62e99d1fdc07465002c.tar.gz
system_core-e632c1bf0c26011c3929d62e99d1fdc07465002c.tar.bz2
media: reserve color formats used by flex-YUV422/444 and RGB/A888
These are used by Image when MediaCodec produces a non-surface higher-resolution YUV image, or codec-specific ordered RGB/A image Change-Id: Ie5cd8236586b375cbc707d45584bd35415c274fc
Diffstat (limited to 'include/system')
-rw-r--r--include/system/graphics.h64
1 files changed, 60 insertions, 4 deletions
diff --git a/include/system/graphics.h b/include/system/graphics.h
index c0f03fa..da24fb8 100644
--- a/include/system/graphics.h
+++ b/include/system/graphics.h
@@ -358,11 +358,11 @@ enum {
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED = 0x22,
/*
- * Android flexible YCbCr formats
+ * Android flexible YCbCr 4:2:0 formats
*
- * This format allows platforms to use an efficient YCbCr/YCrCb buffer
- * layout, while still describing the buffer layout in a way accessible to
- * the CPU in a device-independent manner. While called YCbCr, it can be
+ * This format allows platforms to use an efficient YCbCr/YCrCb 4:2:0
+ * buffer layout, while still describing the general format in a
+ * layout-independent manner. While called YCbCr, it can be
* used to describe formats with either chromatic ordering, as well as
* whole planar or semiplanar layouts.
*
@@ -379,6 +379,62 @@ enum {
*/
HAL_PIXEL_FORMAT_YCbCr_420_888 = 0x23,
+ /*
+ * Android flexible YCbCr 4:2:2 formats
+ *
+ * This format allows platforms to use an efficient YCbCr/YCrCb 4:2:2
+ * buffer layout, while still describing the general format in a
+ * layout-independent manner. While called YCbCr, it can be
+ * used to describe formats with either chromatic ordering, as well as
+ * whole planar or semiplanar layouts.
+ *
+ * This format is currently only used by SW readable buffers
+ * produced by MediaCodecs, so the gralloc module can ignore this format.
+ */
+ HAL_PIXEL_FORMAT_YCbCr_422_888 = 0x27,
+
+ /*
+ * Android flexible YCbCr 4:4:4 formats
+ *
+ * This format allows platforms to use an efficient YCbCr/YCrCb 4:4:4
+ * buffer layout, while still describing the general format in a
+ * layout-independent manner. While called YCbCr, it can be
+ * used to describe formats with either chromatic ordering, as well as
+ * whole planar or semiplanar layouts.
+ *
+ * This format is currently only used by SW readable buffers
+ * produced by MediaCodecs, so the gralloc module can ignore this format.
+ */
+ HAL_PIXEL_FORMAT_YCbCr_444_888 = 0x28,
+
+ /*
+ * Android flexible RGB 888 formats
+ *
+ * This format allows platforms to use an efficient RGB/BGR/RGBX/BGRX
+ * buffer layout, while still describing the general format in a
+ * layout-independent manner. While called RGB, it can be
+ * used to describe formats with either color ordering and optional
+ * padding, as well as whole planar layout.
+ *
+ * This format is currently only used by SW readable buffers
+ * produced by MediaCodecs, so the gralloc module can ignore this format.
+ */
+ HAL_PIXEL_FORMAT_FLEX_RGB_888 = 0x29,
+
+ /*
+ * Android flexible RGBA 8888 formats
+ *
+ * This format allows platforms to use an efficient RGBA/BGRA/ARGB/ABGR
+ * buffer layout, while still describing the general format in a
+ * layout-independent manner. While called RGBA, it can be
+ * used to describe formats with any of the component orderings, as
+ * well as whole planar layout.
+ *
+ * This format is currently only used by SW readable buffers
+ * produced by MediaCodecs, so the gralloc module can ignore this format.
+ */
+ HAL_PIXEL_FORMAT_FLEX_RGBA_8888 = 0x2A,
+
/* Legacy formats (deprecated), used by ImageFormat.java */
HAL_PIXEL_FORMAT_YCbCr_422_SP = 0x10, // NV16
HAL_PIXEL_FORMAT_YCrCb_420_SP = 0x11, // NV21