v4l2_pix_format定义
/*
* V I D E O I M A G E F O R M A T
*/
struct v4l2_pix_format {
__u32 width;
__u32 height;
__u32 pixelformat;
enum v4l2_field field;
__u32 bytesperline; /* for padding, zero if unused */
__u32 sizeimage;
enum v4l2_colorspace colorspace;
__u32 priv; /* private data, depends on pixelformat */
} ;
具体Pixel Format定义
#define v4l2_fourcc(a, b, c, d)\
((__u32)(a) | ((__u32)(b) << 8 ) | ((__u32)(c) << 16 ) | ((__u32)(d) << 24 ))
#define V 4L2_PIX_FMT_RGB332 v4l2_fourcc('R' , 'G' , 'B' , '1' )
#define V 4L2_PIX_FMT_RGB444 v4l2_fourcc('R' , '4' , '4' , '4' )
#define V 4L2_PIX_FMT_RGB555 v4l2_fourcc('R' , 'G' , 'B' , 'O' )
#define V 4L2_PIX_FMT_RGB565 v4l2_fourcc('R' , 'G' , 'B' , 'P' )
#define V 4L2_PIX_FMT_RGB555X v4l2_fourcc('R' , 'G' , 'B' , 'Q' )
#define V 4L2_PIX_FMT_RGB565X v4l2_fourcc('R' , 'G' , 'B' , 'R' )
#define V 4L2_PIX_FMT_BGR666 v4l2_fourcc('B' , 'G' , 'R' , 'H' )
#define V 4L2_PIX_FMT_BGR24 v4l2_fourcc('B' , 'G' , 'R' , '3' )
#define V 4L2_PIX_FMT_RGB24 v4l2_fourcc('R' , 'G' , 'B' , '3' )
#define V 4L2_PIX_FMT_BGR32 v4l2_fourcc('B' , 'G' , 'R' , '4' )
#define V 4L2_PIX_FMT_RGB32 v4l2_fourcc('R' , 'G' , 'B' , '4' )
#define V 4L2_PIX_FMT_GREY v4l2_fourcc('G' , 'R' , 'E' , 'Y' )
#define V 4L2_PIX_FMT_Y4 v4l2_fourcc('Y' , '0' , '4' , ' ' )
#define V 4L2_PIX_FMT_Y6 v4l2_fourcc('Y' , '0' , '6' , ' ' )
#define V 4L2_PIX_FMT_Y10 v4l2_fourcc('Y' , '1' , '0' , ' ' )
#define V 4L2_PIX_FMT_Y12 v4l2_fourcc('Y' , '1' , '2' , ' ' )
#define V 4L2_PIX_FMT_Y16 v4l2_fourcc('Y' , '1' , '6' , ' ' )
#define V 4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y' , '1' , '0' , 'B' )
#define V 4L2_PIX_FMT_PAL8 v4l2_fourcc('P' , 'A' , 'L' , '8' )
#define V 4L2_PIX_FMT_YVU410 v4l2_fourcc('Y' , 'V' , 'U' , '9' )
#define V 4L2_PIX_FMT_YVU420 v4l2_fourcc('Y' , 'V' , '1' , '2' )
#define V 4L2_PIX_FMT_YUYV v4l2_fourcc('Y' , 'U' , 'Y' , 'V' )
#define V 4L2_PIX_FMT_YYUV v4l2_fourcc('Y' , 'Y' , 'U' , 'V' )
#define V 4L2_PIX_FMT_YVYU v4l2_fourcc('Y' , 'V' , 'Y' , 'U' )
#define V 4L2_PIX_FMT_UYVY v4l2_fourcc('U' , 'Y' , 'V' , 'Y' )
#define V 4L2_PIX_FMT_VYUY v4l2_fourcc('V' , 'Y' , 'U' , 'Y' )
#define V 4L2_PIX_FMT_YUV422P v4l2_fourcc('4' , '2' , '2' , 'P' )
#define V 4L2_PIX_FMT_YUV411P v4l2_fourcc('4' , '1' , '1' , 'P' )
#define V 4L2_PIX_FMT_Y41P v4l2_fourcc('Y' , '4' , '1' , 'P' )
#define V 4L2_PIX_FMT_YUV444 v4l2_fourcc('Y' , '4' , '4' , '4' )
#define V 4L2_PIX_FMT_YUV555 v4l2_fourcc('Y' , 'U' , 'V' , 'O' )
#define V 4L2_PIX_FMT_YUV565 v4l2_fourcc('Y' , 'U' , 'V' , 'P' )
#define V 4L2_PIX_FMT_YUV32 v4l2_fourcc('Y' , 'U' , 'V' , '4' )
#define V 4L2_PIX_FMT_YUV410 v4l2_fourcc('Y' , 'U' , 'V' , '9' )
#define V 4L2_PIX_FMT_YUV420 v4l2_fourcc('Y' , 'U' , '1' , '2' )
#define V 4L2_PIX_FMT_HI240 v4l2_fourcc('H' , 'I' , '2' , '4' )
#define V 4L2_PIX_FMT_HM12 v4l2_fourcc('H' , 'M' , '1' , '2' )
#define V 4L2_PIX_FMT_M420 v4l2_fourcc('M' , '4' , '2' , '0' )
#define V 4L2_PIX_FMT_NV12 v4l2_fourcc('N' , 'V' , '1' , '2' )
#define V 4L2_PIX_FMT_NV21 v4l2_fourcc('N' , 'V' , '2' , '1' )
#define V 4L2_PIX_FMT_NV16 v4l2_fourcc('N' , 'V' , '1' , '6' )
#define V 4L2_PIX_FMT_NV61 v4l2_fourcc('N' , 'V' , '6' , '1' )
#define V 4L2_PIX_FMT_NV12M v4l2_fourcc('N' , 'M' , '1' , '2' )
#define V 4L2_PIX_FMT_NV12MT v4l2_fourcc('T' , 'M' , '1' , '2' )
#define V 4L2_PIX_FMT_YUV420M v4l2_fourcc('Y' , 'M' , '1' , '2' )
#define V 4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B' , 'A' , '8' , '1' )
#define V 4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G' , 'B' , 'R' , 'G' )
#define V 4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G' , 'R' , 'B' , 'G' )
#define V 4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R' , 'G' , 'G' , 'B' )
#define V 4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B' , 'G' , '1' , '0' )
#define V 4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G' , 'B' , '1' , '0' )
#define V 4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B' , 'A' , '1' , '0' )
#define V 4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R' , 'G' , '1' , '0' )
#define V 4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B' , 'G' , '1' , '2' )
#define V 4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G' , 'B' , '1' , '2' )
#define V 4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B' , 'A' , '1' , '2' )
#define V 4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R' , 'G' , '1' , '2' )
#define V 4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B' , 'D' , '1' , '0' )
#define V 4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B' , 'Y' , 'R' , '2' )
#define V 4L2_PIX_FMT_MJPEG v4l2_fourcc('M' , 'J' , 'P' , 'G' )
#define V 4L2_PIX_FMT_JPEG v4l2_fourcc('J' , 'P' , 'E' , 'G' )
#define V 4L2_PIX_FMT_DV v4l2_fourcc('d' , 'v' , 's' , 'd' )
#define V 4L2_PIX_FMT_MPEG v4l2_fourcc('M' , 'P' , 'E' , 'G' )
#define V 4L2_PIX_FMT_CPIA1 v4l2_fourcc('C' , 'P' , 'I' , 'A' )
#define V 4L2_PIX_FMT_WNVA v4l2_fourcc('W' , 'N' , 'V' , 'A' )
#define V 4L2_PIX_FMT_SN9C10X v4l2_fourcc('S' , '9' , '1' , '0' )
#define V 4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S' , '9' , '2' , '0' )
#define V 4L2_PIX_FMT_PWC1 v4l2_fourcc('P' , 'W' , 'C' , '1' )
#define V 4L2_PIX_FMT_PWC2 v4l2_fourcc('P' , 'W' , 'C' , '2' )
#define V 4L2_PIX_FMT_ET61X251 v4l2_fourcc('E' , '6' , '2' , '5' )
#define V 4L2_PIX_FMT_SPCA501 v4l2_fourcc('S' , '5' , '0' , '1' )
#define V 4L2_PIX_FMT_SPCA505 v4l2_fourcc('S' , '5' , '0' , '5' )
#define V 4L2_PIX_FMT_SPCA508 v4l2_fourcc('S' , '5' , '0' , '8' )
#define V 4L2_PIX_FMT_SPCA561 v4l2_fourcc('S' , '5' , '6' , '1' )
#define V 4L2_PIX_FMT_PAC207 v4l2_fourcc('P' , '2' , '0' , '7' )
#define V 4L2_PIX_FMT_MR97310A v4l2_fourcc('M' , '3' , '1' , '0' )
#define V 4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S' , 'O' , 'N' , 'X' )
#define V 4L2_PIX_FMT_SQ905C v4l2_fourcc('9' , '0' , '5' , 'C' )
#define V 4L2_PIX_FMT_PJPG v4l2_fourcc('P' , 'J' , 'P' , 'G' )
#define V 4L2_PIX_FMT_OV511 v4l2_fourcc('O' , '5' , '1' , '1' )
#define V 4L2_PIX_FMT_OV518 v4l2_fourcc('O' , '5' , '1' , '8' )
#define V 4L2_PIX_FMT_STV0680 v4l2_fourcc('S' , '6' , '8' , '0' )
#define V 4L2_PIX_FMT_TM6000 v4l2_fourcc('T' , 'M' , '6' , '0' )
#define V 4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C' , 'I' , 'T' , 'V' )
#define V 4L2_PIX_FMT_KONICA420 v4l2_fourcc('K' , 'O' , 'N' , 'I' )
#define V 4L2_PIX_FMT_JPGL v4l2_fourcc('J' , 'P' , 'G' , 'L' )