Re: V4L2 to-do list, No.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



>  Uploaded new bttv releases: 0.7.77 (nice release number, isn't it?) +
>  0.8.25.  Also updated the v4l2 patches, they are available from
>  http://bytesex.org/v4l2/ now.

Moved patches, new URL:  http://bytesex.org/patches/
There are also other, not v4l-related kernel patches.

New is the v4l2api patch, which adds the new NV* formats (NV == nvidia?)
and the multiple tuner support (see below).


I came across another video format issue these days due to a bug report:
Which order have the color planes for planar yuv formats?  Is it Y-Cb-Cr
or Y-Cr-Cb?

Nearly everybody seems to use Y-Cb-Cr.  Both bttv 0.7.x / 0.8.x write Cb
first.  Libjpeg expects the planes in Y-Cb-Cr order, and looks like the
same is true for pretty much all software which uses planar yuv.

But http://www.thedirks.org/v4l2/v4l2fmt.htm lists the planes for all
planar yuv formats in Y-Cr-Cb order.  I've noticed because Justin's
bttv2 seems to have that implemented strictly to the spec with Cr and Cb
ordered the other way around (bt848 can do that with no extra cost) and
thus people get movies with wrong colors if they try to capture with
xawtv ...

Is the Y-Cr-Cb order in v4l2fmt.htm just a mistake or was this done
intentionally?  To me it looks like a mistake, because it also
contradicts the code in v4l1-compat.c which simply maps the v4l1 names
to the v4l2 ones.  And the v4l1 formats have Y-Cb-Cr order, at least all
bttv versions I know of do it this way.  So I'd suggest to fix the
specs.  Comments?

  Gerd

-------------------------- cut here --------------------------
--- linux-2.4.10-pre4pci64/include/linux/videodev2.h	Tue Sep  4 08:40:00 2001
+++ linux/include/linux/videodev2.h	Tue Sep  4 08:40:00 2001
@@ -110,6 +110,10 @@
 #define V4L2_PIX_FMT_YVU411P v4l2_fourcc('4','1','1','P') /* 16  YVU411 planar */
 #define V4L2_PIX_FMT_Y41P    v4l2_fourcc('Y','4','1','P') /* 12  YUV 4:1:1     */
 
+/* two planes -- one Y, one Cr + Cb interleaved  */
+#define V4L2_PIX_FMT_NV12    v4l2_fourcc('N','V','1','2') /* 12  Y/CbCr 4:2:0  */
+#define V4L2_PIX_FMT_NV21    v4l2_fourcc('N','V','2','1') /* 12  Y/CrCb 4:2:0  */
+
 /*  The following formats are not defined in the V4L2 specification */
 #define V4L2_PIX_FMT_YUV410  v4l2_fourcc('Y','U','V','9') /*  9  YUV 4:1:0     */
 #define V4L2_PIX_FMT_YUV420  v4l2_fourcc('Y','U','1','2') /* 12  YUV 4:2:0     */
@@ -659,7 +663,7 @@
 
 struct v4l2_frequency
 {
-	int	port;
+	int	input;
 	__u32	frequency;
 	__u32	reserved[2];
 };
@@ -812,6 +816,8 @@
 #define VIDIOC_S_EFFECT		_IOWR ('V', 53, int)
 #define VIDIOC_G_MODULATOR	_IOWR ('V', 54, struct v4l2_modulator)
 #define VIDIOC_S_MODULATOR	_IOW  ('V', 55, struct v4l2_modulator)
+#define VIDIOC_G_FREQ2		_IOWR ('V', 56, struct v4l2_frequency)
+#define VIDIOC_S_FREQ2		_IOW  ('V', 57, struct v4l2_frequency)
 
 #define VIDIOC_ENUM_CAPFMT	VIDIOC_ENUM_PIXFMT
 #define VIDIOC_ENUM_OUTFMT	VIDIOC_ENUM_PIXFMT





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux