From 663b1021ca3f4b1310e5178d56c402eab71a27b3 Mon Sep 17 00:00:00 2001 From: Vitaly Mayatskikh Date: Tue, 4 Aug 2009 20:13:02 +0200 Subject: [PATCH] More V4L2_PIX_FMT formats --- grovel.lisp | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 133 insertions(+), 4 deletions(-) diff --git a/grovel.lisp b/grovel.lisp index 7912304..0e58e4b 100644 --- a/grovel.lisp +++ b/grovel.lisp @@ -70,9 +70,138 @@ :documentation "streaming I/O ioctls") ;; Pixel formats -(constant (pix-fmt-sbggr8 "V4L2_PIX_FMT_SBGGR8")) -(constant (pix-fmt-sgbrg8 "V4L2_PIX_FMT_SGBRG8")) -(constant (pix-fmt-spca561 "V4L2_PIX_FMT_SPCA561")) + +(constant (pix-fmt-rgb332 "V4L2_PIX_FMT_RGB332") + :documentation "RGB1 8 RGB-3-3-2") +(constant (pix-fmt-rgb444 "V4L2_PIX_FMT_RGB444") + :documentation "R444 16 xxxxrrrr ggggbbbb") +(constant (pix-fmt-rgb555 "V4L2_PIX_FMT_RGB555") + :documentation "RGBO 16 RGB-5-5-5") +(constant (pix-fmt-rgb565 "V4L2_PIX_FMT_RGB565") + :documentation "RGBP 16 RGB-5-6-5") +(constant (pix-fmt-rgb555x "V4L2_PIX_FMT_RGB555X") + :documentation "RGBQ 16 RGB-5-5-5 BE") +(constant (pix-fmt-rgb565x "V4L2_PIX_FMT_RGB565X") + :documentation "RGBR 16 RGB-5-6-5 BE") +(constant (pix-fmt-bgr24 "V4L2_PIX_FMT_BGR24") + :documentation "BGR3 24 BGR-8-8-8") +(constant (pix-fmt-rgb24 "V4L2_PIX_FMT_RGB24") + :documentation "RGB3 24 RGB-8-8-8") +(constant (pix-fmt-bgr32 "V4L2_PIX_FMT_BGR32") + :documentation "BGR4 32 BGR-8-8-8-8") +(constant (pix-fmt-rgb32 "V4L2_PIX_FMT_RGB32") + :documentation "RGB4 32 RGB-8-8-8-8") +(constant (pix-fmt-grey "V4L2_PIX_FMT_GREY") + :documentation "GREY 8 Greyscale") +(constant (pix-fmt-y16 "V4L2_PIX_FMT_Y16") + :documentation "Y16 16 Greyscale") +(constant (pix-fmt-pal8 "V4L2_PIX_FMT_PAL8") + :documentation "PAL8 8 8-bit palette") +(constant (pix-fmt-yvu410 "V4L2_PIX_FMT_YVU410") + :documentation "YVU9 9 YVU 4:1:0") +(constant (pix-fmt-yvu420 "V4L2_PIX_FMT_YVU420") + :documentation "YV12 12 YVU 4:2:0") +(constant (pix-fmt-yuyv "V4L2_PIX_FMT_YUYV") + :documentation "YUYV 16 YUV 4:2:2") +(constant (pix-fmt-uyvy "V4L2_PIX_FMT_UYVY") + :documentation "UYVY 16 YUV 4:2:2") +(constant (pix-fmt-vyuy "V4L2_PIX_FMT_VYUY") + :documentation "VYUY 16 YUV 4:2:2") +(constant (pix-fmt-yuv422p "V4L2_PIX_FMT_YUV422P") + :documentation "422P 16 YVU422 planar") +(constant (pix-fmt-yuv411p "V4L2_PIX_FMT_YUV411P") + :documentation "411P 16 YVU411 planar") +(constant (pix-fmt-y41p "V4L2_PIX_FMT_Y41P") + :documentation "Y41P 12 YUV 4:1:1") +(constant (pix-fmt-yuv444 "V4L2_PIX_FMT_YUV444") + :documentation "Y444 16 xxxxyyyy uuuuvvvv") +(constant (pix-fmt-yuv555 "V4L2_PIX_FMT_YUV555") + :documentation "YUVO 16 YUV-5-5-5") +(constant (pix-fmt-yuv565 "V4L2_PIX_FMT_YUV565") + :documentation "YUVP 16 YUV-5-6-5") +(constant (pix-fmt-yuv32 "V4L2_PIX_FMT_YUV32") + :documentation "YUV4 32 YUV-8-8-8-8") + +;; two planes -- one Y, one Cr + Cb interleaved +(constant (pix-fmt-nv12 "V4L2_PIX_FMT_NV12") + :documentation "NV12 12 Y/CbCr 4:2:0") +(constant (pix-fmt-nv21 "V4L2_PIX_FMT_NV21") + :documentation "NV21 12 Y/CrCb 4:2:0") +(constant (pix-fmt-nv16 "V4L2_PIX_FMT_NV16") + :documentation "NV16 16 Y/CbCr 4:2:2") +(constant (pix-fmt-nv61 "V4L2_PIX_FMT_NV61") + :documentation "NV61 16 Y/CrCb 4:2:2") + +;; The following formats are not defined in the V4L2 specification +(constant (pix-fmt-yuv410 "V4L2_PIX_FMT_YUV410") + :documentation "YUV9 9 YUV 4:1:0") +(constant (pix-fmt-yuv420 "V4L2_PIX_FMT_YUV420") + :documentation "YU12 12 YUV 4:2:0") +(constant (pix-fmt-yyuv "V4L2_PIX_FMT_YYUV") + :documentation "YYUV 16 YUV 4:2:2") +(constant (pix-fmt-hi240 "V4L2_PIX_FMT_HI240") + :documentation "HI24 8 8-bit color") +(constant (pix-fmt-hm12 "V4L2_PIX_FMT_HM12") + :documentation "HM12 8 YUV 4:2:0 16x16 macroblocks") + +;; see http://www.siliconimaging.com/RGB%20Bayer.htm +(constant (pix-fmt-sbggr8 "V4L2_PIX_FMT_SBGGR8") + :documentation "BA81 8 BGBG.. GRGR") +(constant (pix-fmt-sgbrg8 "V4L2_PIX_FMT_SGBRG8") + :documentation "GBRG 8 GBGB.. RGRG") +;; +;; 10bit raw bayer, expanded to 16 bits +;; xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... +;; +(constant (pix-fmt-sgrbg10 "V4L2_PIX_FMT_SGRBG10") + :documentation "BA10") + +;; 10bit raw bayer DPCM compressed to 8 bits */ +(constant (pix-fmt-sgrbg10dpcm8 "V4L2_PIX_FMT_SGRBG10DPCM8") + :documentation "BD10") +(constant (pix-fmt-sbggr16 "V4L2_PIX_FMT_SBGGR16") + :documentation "BYR2 16 BGBG.. GRGR..") + +;; compressed formats +(constant (pix-fmt-mjpeg "V4L2_PIX_FMT_MJPEG") + :documentation "MJPG Motion-JPEG") +(constant (pix-fmt-jpeg "V4L2_PIX_FMT_JPEG") + :documentation "JPEG JFIF JPEG") +(constant (pix-fmt-dv "V4L2_PIX_FMT_DV") + :documentation "dvsd 1394") +(constant (pix-fmt-mpeg "V4L2_PIX_FMT_MPEG") + :documentation "MPEG MPEG-1/2/4") + +;; Vendor-specific formats + +(constant (pix-fmt-wnva "V4L2_PIX_FMT_WNVA") + :documentation "WNVA Winnov hw compress") +(constant (pix-fmt-sn9c10x "V4L2_PIX_FMT_SN9C10X") + :documentation "S910 SN9C10x compression") +(constant (pix-fmt-pwc1 "V4L2_PIX_FMT_PWC1") + :documentation "PWC1 pwc older webcam") +(constant (pix-fmt-pwc2 "V4L2_PIX_FMT_PWC2") + :documentation "PWC2 pwc newer webcam") +(constant (pix-fmt-et61x251 "V4L2_PIX_FMT_ET61X251") + :documentation "E625 ET61X251 compression") +(constant (pix-fmt-spca501 "V4L2_PIX_FMT_SPCA501") + :documentation "S501 YUYV per line") +(constant (pix-fmt-spca505 "V4L2_PIX_FMT_SPCA505") + :documentation "S505 YYUV per line") +(constant (pix-fmt-spca508 "V4L2_PIX_FMT_SPCA508") + :documentation "S508 YUVY per line") +(constant (pix-fmt-spca561 "V4L2_PIX_FMT_SPCA561") + :documentation "S561 compressed GBRG bayer") +(constant (pix-fmt-pac207 "V4L2_PIX_FMT_PAC207") + :documentation "P207 compressed BGGR bayer") +(constant (pix-fmt-mr97310a "V4L2_PIX_FMT_MR97310A") + :documentation "M310 compressed BGGR bayer") +(constant (pix-fmt-sq905c "V4L2_PIX_FMT_SQ905C") + :documentation "905C compressed RGGB bayer") +(constant (pix-fmt-pjpg "V4L2_PIX_FMT_PJPG") + :documentation "PJPG Pixart 73xx JPEG") +(constant (pix-fmt-yvyu "V4L2_PIX_FMT_YVYU") + :documentation "YVYU 16 YVU 4:2:2") ;; Flags for v4l2-buffer 'flags' field (constant (buf-flag-mapped "V4L2_BUF_FLAG_MAPPED") @@ -82,7 +211,7 @@ :documentation "Buffer is queued for processing") (constant (buf-flag-done "V4L2_BUF_FLAG_DONE") - :documentation "Buffer is ready") + :documentation "Buffer is ready") (constant (buf-flag-keyframe "V4L2_BUF_FLAG_KEYFRAME") :documentation "Image is a keyframe (I-frame)") -- 2.11.4.GIT