Development: VIDEO PALETTE RAW: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
 
m (Added category: Development)
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:


The driver always captures both fields. F1 is stored in the buffer at offset 0, F2 at buffer size / 2. The default buffer size with V4L ioctl VIDIOCMCAPTURE and V4L2 ioctl VIDIOC_REQBUFS is 0x208000 bytes, determined by the gbufsize module parameter. VIDIOC_G_FMT (after VIDIOCSPICT, since VIDIOC_S_FMT does not support VIDEO_PALETTE_RAW) reports the image size as gbufsize rounded down to a multiple of 1024. read()s can request smaller images but will fail with EINVAL if the size is < 1280 KiB.
The driver always captures both fields. F1 is stored in the buffer at offset 0, F2 at buffer size / 2. The default buffer size with V4L ioctl VIDIOCMCAPTURE and V4L2 ioctl VIDIOC_REQBUFS is 0x208000 bytes, determined by the gbufsize module parameter. VIDIOC_G_FMT (after VIDIOCSPICT, since VIDIOC_S_FMT does not support VIDEO_PALETTE_RAW) reports the image size as gbufsize rounded down to a multiple of 1024. read()s can request smaller images but will fail with EINVAL if the size is < 1280 KiB.
[[Category:Development]]

Latest revision as of 00:17, 3 May 2009

VIDEO_PALETTE_RAW is a special V4L image format supported only by the bttv driver.

In PAL mode capturing starts at line 23, offset 0H 186 * 2 / 35468950 s. It continues across active picture, horizontal blanking and sync for 640 K samples (roughly 288.7 scan lines). Otherwise the format is identical to raw VBI, i.e. it consists of only luminance samples of 8 bits each.

In NTSC-M mode capturing starts at line 23, offset 0H 128 * 2 / 28636363 s and continues until the first serration pulse of the next field (some 443 K samples or 243.3 scan lines).

Note line and offset are available through V4L2 ioctl VIDIOC_CROPCAP as defrect.top / 2 and defrect.left.

The driver always captures both fields. F1 is stored in the buffer at offset 0, F2 at buffer size / 2. The default buffer size with V4L ioctl VIDIOCMCAPTURE and V4L2 ioctl VIDIOC_REQBUFS is 0x208000 bytes, determined by the gbufsize module parameter. VIDIOC_G_FMT (after VIDIOCSPICT, since VIDIOC_S_FMT does not support VIDEO_PALETTE_RAW) reports the image size as gbufsize rounded down to a multiple of 1024. read()s can request smaller images but will fail with EINVAL if the size is < 1280 KiB.