From 81badd502932b001e12464c28ba2a52c46fb643a Mon Sep 17 00:00:00 2001 From: Younes Manton Date: Fri, 12 Mar 2010 10:43:29 -0500 Subject: [PATCH] gallium: Add common video format enums. --- src/gallium/auxiliary/util/u_format.csv | 7 +++++++ src/gallium/include/pipe/p_format.h | 25 ++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv index 96a0fa65507..9a7e4b9cb07 100644 --- a/src/gallium/auxiliary/util/u_format.csv +++ b/src/gallium/auxiliary/util/u_format.csv @@ -184,3 +184,10 @@ PIPE_FORMAT_R8_SSCALED , plain, 1, 1, s8 , , , , x001, r PIPE_FORMAT_R8G8_SSCALED , plain, 1, 1, s8 , s8 , , , xy01, rgb PIPE_FORMAT_R8G8B8_SSCALED , plain, 1, 1, s8 , s8 , s8 , , xyz1, rgb PIPE_FORMAT_R8G8B8A8_SSCALED , plain, 1, 1, s8 , s8 , s8 , s8 , xyzw, rgb +PIPE_FORMAT_YV12 , subsampled, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv +PIPE_FORMAT_YV16 , subsampled, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv +PIPE_FORMAT_IYUV , subsampled, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv +PIPE_FORMAT_NV12 , subsampled, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv +PIPE_FORMAT_NV21 , subsampled, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv +PIPE_FORMAT_IA44 , subsampled, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv +PIPE_FORMAT_AI44 , subsampled, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index cbf3273ec8d..f3534685b5a 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -58,8 +58,8 @@ enum pipe_format { PIPE_FORMAT_I8_UNORM = 11, /**< ubyte intensity */ PIPE_FORMAT_L8A8_UNORM = 12, /**< ubyte alpha, luminance */ PIPE_FORMAT_L16_UNORM = 13, /**< ushort luminance */ - PIPE_FORMAT_UYVY = 14, - PIPE_FORMAT_YUYV = 15, + PIPE_FORMAT_UYVY = 14, /**< aka Y422, UYNV, HDYC */ + PIPE_FORMAT_YUYV = 15, /**< aka YUY2, YUNV, V422 */ PIPE_FORMAT_Z16_UNORM = 16, PIPE_FORMAT_Z32_UNORM = 17, PIPE_FORMAT_Z32_FLOAT = 18, @@ -158,6 +158,16 @@ enum pipe_format { PIPE_FORMAT_A8B8G8R8_UNORM = 110, + PIPE_FORMAT_YV12 = 111, + PIPE_FORMAT_YV16 = 112, + PIPE_FORMAT_IYUV = 113, /**< aka I420 */ + PIPE_FORMAT_NV12 = 114, + PIPE_FORMAT_NV21 = 115, + PIPE_FORMAT_AYUV = PIPE_FORMAT_A8R8G8B8_UNORM, + PIPE_FORMAT_VUYA = PIPE_FORMAT_B8G8R8A8_UNORM, + PIPE_FORMAT_IA44 = 116, + PIPE_FORMAT_AI44 = 117, + PIPE_FORMAT_COUNT }; @@ -169,17 +179,6 @@ enum pipe_video_chroma_format PIPE_VIDEO_CHROMA_FORMAT_444 }; -#if 0 -enum pipe_video_surface_format -{ - PIPE_VIDEO_SURFACE_FORMAT_NV12, /**< Planar; Y plane, UV plane */ - PIPE_VIDEO_SURFACE_FORMAT_YV12, /**< Planar; Y plane, U plane, V plane */ - PIPE_VIDEO_SURFACE_FORMAT_YUYV, /**< Interleaved; Y,U,Y,V,Y,U,Y,V */ - PIPE_VIDEO_SURFACE_FORMAT_UYVY, /**< Interleaved; U,Y,V,Y,U,Y,V,Y */ - PIPE_VIDEO_SURFACE_FORMAT_VUYA /**< Packed; A31-24|Y23-16|U15-8|V7-0 */ -}; -#endif - #ifdef __cplusplus } #endif -- 2.30.2