Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit e9678e3

Browse files
authored
Merge pull request #178 from phreer/yanfeng
egl/android: Add 3 more video format for Android
2 parents a9a5aaf + 08a3cec commit e9678e3

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/util/u_gralloc/u_gralloc_internal.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ struct droid_yuv_format {
2424
int fourcc; /* DRM_FORMAT_ */
2525
};
2626

27+
/* This enumeration can be deleted if Android defined it in
28+
* system/core/include/system/graphics.h
29+
*/
30+
enum {
31+
HAL_PIXEL_FORMAT_NV12_Y_TILED_INTEL = 0x100,
32+
HAL_PIXEL_FORMAT_NV12 = 0x10F,
33+
HAL_PIXEL_FORMAT_P010_INTEL = 0x110
34+
};
35+
2736
/* The following table is used to look up a DRI image FourCC based
2837
* on native format and information contained in android_ycbcr struct. */
2938
static const struct droid_yuv_format droid_yuv_formats[] = {
@@ -32,6 +41,9 @@ static const struct droid_yuv_format droid_yuv_formats[] = {
3241
{HAL_PIXEL_FORMAT_YCbCr_420_888, YCbCr, 1, DRM_FORMAT_YUV420},
3342
{HAL_PIXEL_FORMAT_YCbCr_420_888, YCrCb, 1, DRM_FORMAT_YVU420},
3443
{HAL_PIXEL_FORMAT_YV12, YCrCb, 1, DRM_FORMAT_YVU420},
44+
{HAL_PIXEL_FORMAT_NV12, YCbCr, 2, DRM_FORMAT_NV12},
45+
{HAL_PIXEL_FORMAT_NV12_Y_TILED_INTEL, YCbCr, 2, DRM_FORMAT_NV12},
46+
{HAL_PIXEL_FORMAT_P010_INTEL, YCbCr, 4, DRM_FORMAT_P010},
3547
/* HACK: See droid_create_image_from_prime_fds() and
3648
* https://issuetracker.google.com/32077885. */
3749
{HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, YCbCr, 2, DRM_FORMAT_NV12},

0 commit comments

Comments
 (0)