From 9327599598e6bb9e43b931ac45140d39cc5e1b77 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 18 Jan 2009 15:34:58 +0100 Subject: v4l2-spec: add pixformats and bump spec version number From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- v4l2-spec/Makefile | 11 ++- v4l2-spec/README | 4 +- v4l2-spec/compat.sgml | 33 ++++++++ v4l2-spec/pixfmt-nv16.sgml | 174 ++++++++++++++++++++++++++++++++++++++++++ v4l2-spec/pixfmt-sbggr16.sgml | 2 +- v4l2-spec/pixfmt-sgbrg8.sgml | 75 ++++++++++++++++++ v4l2-spec/pixfmt-vyuy.sgml | 128 +++++++++++++++++++++++++++++++ v4l2-spec/pixfmt-yvyu.sgml | 128 +++++++++++++++++++++++++++++++ v4l2-spec/pixfmt.sgml | 44 +++++++++++ v4l2-spec/v4l2.sgml | 12 ++- 10 files changed, 604 insertions(+), 7 deletions(-) create mode 100644 v4l2-spec/pixfmt-nv16.sgml create mode 100644 v4l2-spec/pixfmt-sgbrg8.sgml create mode 100644 v4l2-spec/pixfmt-vyuy.sgml create mode 100644 v4l2-spec/pixfmt-yvyu.sgml diff --git a/v4l2-spec/Makefile b/v4l2-spec/Makefile index a3041105d..e7936ade8 100644 --- a/v4l2-spec/Makefile +++ b/v4l2-spec/Makefile @@ -1,5 +1,5 @@ # Also update in v4l2.sgml! -VERSION = 0.24 +VERSION = 0.25 SGMLS = \ biblio.sgml \ @@ -34,11 +34,14 @@ SGMLS = \ io.sgml \ pixfmt-grey.sgml \ pixfmt-nv12.sgml \ + pixfmt-nv16.sgml \ pixfmt-packed-rgb.sgml \ pixfmt-packed-yuv.sgml \ pixfmt-sbggr16.sgml \ pixfmt-sbggr8.sgml \ + pixfmt-sgbrg8.sgml \ pixfmt-uyvy.sgml \ + pixfmt-vyuy.sgml \ pixfmt-y16.sgml \ pixfmt-y41p.sgml \ pixfmt-yuv410.sgml \ @@ -46,6 +49,7 @@ SGMLS = \ pixfmt-yuv420.sgml \ pixfmt-yuv422p.sgml \ pixfmt-yuyv.sgml \ + pixfmt-yvyu.sgml \ pixfmt.sgml \ v4l2.sgml \ videodev2.h.sgml \ @@ -114,7 +118,7 @@ WARN = CUSTOM_HTML = --dsl custom.dsl\#html CUSTOM_PRINT = --dsl custom.dsl\#print -all: capture html-single pdf html +all: capture html-single html: html-build.stamp @@ -122,6 +126,8 @@ html-single: html-single-build.stamp pdf: pdf-build.stamp +coffeebreak: all html pdf + FUNCS = \ close \ ioctl \ @@ -500,3 +506,4 @@ clean: rm -f capture.c.sgml rm -f capture rm -f indices.sgml entities.sgml + rm -rf v4l2 v4l2-single v4l2.pdf diff --git a/v4l2-spec/README b/v4l2-spec/README index 1d651cf62..6b0a3d0f1 100644 --- a/v4l2-spec/README +++ b/v4l2-spec/README @@ -11,7 +11,7 @@ linux-media mailing list. Information on how to join is here: The Makefile supports the following targets: -html Tree of HTML files (default) -html-single A single HTML file +html-single A single HTML file (default) +html Tree of HTML files pdf A PDF file coffeebreak All of the above diff --git a/v4l2-spec/compat.sgml b/v4l2-spec/compat.sgml index ae480d5b2..851ab19fb 100644 --- a/v4l2-spec/compat.sgml +++ b/v4l2-spec/compat.sgml @@ -2203,6 +2203,17 @@ interface in Linux 2.6.18, where finally removed from the +
+ V4L2 in Linux 2.6.26 + + + The pixel formats +V4L2_PIX_FMT_Y16 and +V4L2_PIX_FMT_SBGGR16 were added. + + +
+
V4L2 in Linux 2.6.27 @@ -2210,6 +2221,17 @@ interface in Linux 2.6.18, where finally removed from the The &VIDIOC-S-HW-FREQ-SEEK; ioctl and the V4L2_CAP_HW_FREQ_SEEK capability were added. + + The pixel formats +V4L2_PIX_FMT_YVYU, +V4L2_PIX_FMT_PCA501, +V4L2_PIX_FMT_PCA505, +V4L2_PIX_FMT_PCA508, +V4L2_PIX_FMT_PCA561, +V4L2_PIX_FMT_SGBRG8, +V4L2_PIX_FMT_PAC207 and +V4L2_PIX_FMT_PJPGwere added. +
@@ -2220,6 +2242,11 @@ interface in Linux 2.6.18, where finally removed from the Added V4L2_MPEG_AUDIO_ENCODING_AAC and V4L2_MPEG_AUDIO_ENCODING_AC3 MPEG audio encodings. + + The pixel formats +V4L2_PIX_FMT_SGRBG10 and +V4L2_PIX_FMT_SGRBG10DPCM8were added. + @@ -2231,6 +2258,12 @@ interface in Linux 2.6.18, where finally removed from the to VIDIOC_G_CHIP_IDENT_OLD and &VIDIOC-DBG-G-CHIP-IDENT; was introduced in its place. + + The pixel formats +V4L2_PIX_FMT_VYUY, +V4L2_PIX_FMT_NV16 and +V4L2_PIX_FMT_NV61were added. + diff --git a/v4l2-spec/pixfmt-nv16.sgml b/v4l2-spec/pixfmt-nv16.sgml new file mode 100644 index 000000000..c67ba2ebe --- /dev/null +++ b/v4l2-spec/pixfmt-nv16.sgml @@ -0,0 +1,174 @@ + + + V4L2_PIX_FMT_NV16 ('NV16'), V4L2_PIX_FMT_NV61 ('NV61') + &manvol; + + + V4L2_PIX_FMT_NV16 + V4L2_PIX_FMT_NV61 + Formats with ½ horizontal +chroma resolution, also known as YUV 4:2:2. One luminance and one +chrominance plane with alternating chroma samples as opposed to +V4L2_PIX_FMT_YVU420 + + + Description + + These are two-plane versions of the YUV 4:2:2 format. +The three components are separated into two sub-images or planes. The +Y plane is first. The Y plane has one byte per pixel. For +V4L2_PIX_FMT_NV16, a combined CbCr plane +immediately follows the Y plane in memory. The CbCr plane is the same +width and height, in bytes, as the Y plane (and of the image). +Each CbCr pair belongs to two pixels. For example, +Cb0/Cr0 belongs to +Y'00, Y'01. +V4L2_PIX_FMT_NV61 is the same except the Cb and +Cr bytes are swapped, the CrCb plane starts with a Cr byte. + + If the Y plane has pad bytes after each row, then the +CbCr plane has as many pad bytes after its rows. + + + <constant>V4L2_PIX_FMT_NV16</constant> 4 × 4 +pixel image + + + Byte Order. + Each cell is one byte. + + + + + + start + 0: + Y'00 + Y'01 + Y'02 + Y'03 + + + start + 4: + Y'10 + Y'11 + Y'12 + Y'13 + + + start + 8: + Y'20 + Y'21 + Y'22 + Y'23 + + + start + 12: + Y'30 + Y'31 + Y'32 + Y'33 + + + start + 16: + Cb00 + Cr00 + Cb01 + Cr01 + + + start + 20: + Cb10 + Cr10 + Cb11 + Cr11 + + + start + 24: + Cb20 + Cr20 + Cb21 + Cr21 + + + start + 28: + Cb30 + Cr30 + Cb31 + Cr31 + + + + + + + + + Color Sample Location. + + + + + + + 01 + 23 + + + 0 + YY + YY + + + + C + C + + + 1 + YY + YY + + + + C + C + + + + + + 2 + YY + YY + + + + C + C + + + 3 + YY + YY + + + + C + C + + + + + + + + + + + diff --git a/v4l2-spec/pixfmt-sbggr16.sgml b/v4l2-spec/pixfmt-sbggr16.sgml index 262a20c12..275489596 100644 --- a/v4l2-spec/pixfmt-sbggr16.sgml +++ b/v4l2-spec/pixfmt-sbggr16.sgml @@ -1,6 +1,6 @@ - V4L2_PIX_FMT_SBGGR16 ('BA82') + V4L2_PIX_FMT_SBGGR16 ('BYR2') &manvol; diff --git a/v4l2-spec/pixfmt-sgbrg8.sgml b/v4l2-spec/pixfmt-sgbrg8.sgml new file mode 100644 index 000000000..7b148b636 --- /dev/null +++ b/v4l2-spec/pixfmt-sgbrg8.sgml @@ -0,0 +1,75 @@ + + + V4L2_PIX_FMT_SGBRG8 ('GBRG') + &manvol; + + + V4L2_PIX_FMT_SGBRG8 + Bayer RGB format + + + Description + + This is commonly the native format of digital cameras, +reflecting the arrangement of sensors on the CCD device. Only one red, +green or blue value is given for each pixel. Missing components must +be interpolated from neighbouring pixels. From left to right the first +row consists of a green and blue value, the second row of a red and +green value. This scheme repeats to the right and down for every two +columns and rows. + + + <constant>V4L2_PIX_FMT_SGBRG8</constant> 4 × 4 +pixel image + + + Byte Order. + Each cell is one byte. + + + + + + start + 0: + G00 + B01 + G02 + B03 + + + start + 4: + R10 + G11 + R12 + G13 + + + start + 8: + G20 + B21 + G22 + B23 + + + start + 12: + R30 + G31 + R32 + G33 + + + + + + + + + + + diff --git a/v4l2-spec/pixfmt-vyuy.sgml b/v4l2-spec/pixfmt-vyuy.sgml new file mode 100644 index 000000000..61a789fcf --- /dev/null +++ b/v4l2-spec/pixfmt-vyuy.sgml @@ -0,0 +1,128 @@ + + + V4L2_PIX_FMT_VYUY ('VYUY') + &manvol; + + + V4L2_PIX_FMT_VYUY + Variation of +V4L2_PIX_FMT_YUYV with different order of samples +in memory + + + Description + + In this format each four bytes is two pixels. Each four +bytes is two Y's, a Cb and a Cr. Each Y goes to one of the pixels, and +the Cb and Cr belong to both pixels. As you can see, the Cr and Cb +components have half the horizontal resolution of the Y +component. + + + <constant>V4L2_PIX_FMT_VYUY</constant> 4 × 4 +pixel image + + + Byte Order. + Each cell is one byte. + + + + + + start + 0: + Cr00 + Y'00 + Cb00 + Y'01 + Cr01 + Y'02 + Cb01 + Y'03 + + + start + 8: + Cr10 + Y'10 + Cb10 + Y'11 + Cr11 + Y'12 + Cb11 + Y'13 + + + start + 16: + Cr20 + Y'20 + Cb20 + Y'21 + Cr21 + Y'22 + Cb21 + Y'23 + + + start + 24: + Cr30 + Y'30 + Cb30 + Y'31 + Cr31 + Y'32 + Cb31 + Y'33 + + + + + + + + + Color Sample Location. + + + + + + + 01 + 23 + + + 0 + YCY + YCY + + + 1 + YCY + YCY + + + 2 + YCY + YCY + + + 3 + YCY + YCY + + + + + + + + + + + diff --git a/v4l2-spec/pixfmt-yvyu.sgml b/v4l2-spec/pixfmt-yvyu.sgml new file mode 100644 index 000000000..734688fef --- /dev/null +++ b/v4l2-spec/pixfmt-yvyu.sgml @@ -0,0 +1,128 @@ + + + V4L2_PIX_FMT_YVYU ('YVYU') + &manvol; + + + V4L2_PIX_FMT_YVYU + Variation of +V4L2_PIX_FMT_YUYV with different order of samples +in memory + + + Description + + In this format each four bytes is two pixels. Each four +bytes is two Y's, a Cb and a Cr. Each Y goes to one of the pixels, and +the Cb and Cr belong to both pixels. As you can see, the Cr and Cb +components have half the horizontal resolution of the Y +component. + + + <constant>V4L2_PIX_FMT_YVYU</constant> 4 × 4 +pixel image + + + Byte Order. + Each cell is one byte. + + + + + start + 0: + Y'00 + Cr00 + Y'01 + Cb00 + Y'02 + Cr01 + Y'03 + Cb01 + + + start + 8: + Y'10 + Cr10 + Y'11 + Cb10 + Y'12 + Cr11 + Y'13 + Cb11 + + + start + 16: + Y'20 + Cr20 + Y'21 + Cb20 + Y'22 + Cr21 + Y'23 + Cb21 + + + start + 24: + Y'30 + Cr30 + Y'31 + Cb30 + Y'32 + Cr31 + Y'33 + Cb31 + + + + + + + + + Color Sample Location. + + + + + + + 01 + 23 + + + 0 + YCY + YCY + + + 1 + YCY + YCY + + + 2 + YCY + YCY + + + 3 + YCY + YCY + + + + + + + + + + + diff --git a/v4l2-spec/pixfmt.sgml b/v4l2-spec/pixfmt.sgml index 10bf435e0..584d57194 100644 --- a/v4l2-spec/pixfmt.sgml +++ b/v4l2-spec/pixfmt.sgml @@ -564,6 +564,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.< &sub-packed-rgb; &sub-sbggr8; + &sub-sgbrg8; &sub-sbggr16; @@ -590,12 +591,15 @@ information. &sub-y16; &sub-yuyv; &sub-uyvy; + &sub-yvyu; + &sub-vyuy; &sub-y41p; &sub-yuv420; &sub-yuv410; &sub-yuv422p; &sub-yuv411p; &sub-nv12; + &sub-nv16;
@@ -682,6 +686,46 @@ http://www.ivtvdriver.org/The format is documented in the kernel sources in the file Documentation/video4linux/cx2341x/README.hm12 + + V4L2_PIX_FMT_SPCA501 + 'S501' + YUYV per line used by the gspca driver. + + + V4L2_PIX_FMT_SPCA505 + 'S505' + YYUV per line used by the gspca driver. + + + V4L2_PIX_FMT_SPCA508 + 'S508' + YUVY per line used by the gspca driver. + + + V4L2_PIX_FMT_SPCA561 + 'S561' + Compressed GBRG Bayer format used by the gspca driver. + + + V4L2_PIX_FMT_SGRBG10 + 'DA10' + 10 bit raw Bayer, expanded to 16 bits. + + + V4L2_PIX_FMT_SGRBG10DPCM8 + 'DB10' + 10 bit raw Bayer DPCM compressed to 8 bits. + + + V4L2_PIX_FMT_PAC207 + 'P207' + Compressed BGGR Bayer format used by the gspca driver. + + + V4L2_PIX_FMT_PJPG + 'PJPG' + Pixart 73xx JPEG format used by the gspca driver. + V4L2_PIX_FMT_MJPEG 'MJPG' diff --git a/v4l2-spec/v4l2.sgml b/v4l2-spec/v4l2.sgml index e487f2d80..c4c2bf322 100644 --- a/v4l2-spec/v4l2.sgml +++ b/v4l2-spec/v4l2.sgml @@ -25,7 +25,7 @@ Video for Linux Two API Specification - Revision 0.24 + Revision 0.25 @@ -117,11 +117,19 @@ structs, ioctls) must be noted in more detail in the history chapter (compat.sgml), along with the possible impact on existing drivers and applications. --> + + 0.25 + 2009-01-18 + hv + Added pixel formats VYUY, NV16 and NV61, and changed +the debug ioctls VIDIOC_DBG_G/S_REGISTER and VIDIOC_DBG_G_CHIP_IDENT. + + 0.24 2008-03-04 mhs - Added pixel format Y16 and SBGGR16, new controls + Added pixel formats Y16 and SBGGR16, new controls and a camera controls class. Removed VIDIOC_G/S_MPEGCOMP. -- cgit v1.2.3