summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/bttv-driver.c11
-rw-r--r--linux/drivers/media/video/video-buf.c3
-rw-r--r--v4l/ChangeLog15
3 files changed, 27 insertions, 2 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index 68b8c339d..2940b9016 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-driver.c,v 1.71 2005/11/18 15:35:33 nsh Exp $
+ $Id: bttv-driver.c,v 1.72 2005/11/24 09:12:53 nsh Exp $
bttv - Bt848 frame grabber driver
@@ -2317,6 +2317,15 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
retval = -EINVAL;
goto fh_unlock_and_return;
}
+ if (fmt->flags & FORMAT_FLAGS_RAW) {
+ /* VIDIOCMCAPTURE uses gbufsize, not RAW_BPL *
+ RAW_LINES * 2. F1 is stored at offset 0, F2
+ at buffer size / 2. */
+ fh->width = RAW_BPL;
+ fh->height = gbufsize / RAW_BPL;
+ btv->init.width = RAW_BPL;
+ btv->init.height = gbufsize / RAW_BPL;
+ }
fh->ovfmt = fmt;
fh->fmt = fmt;
btv->init.ovfmt = fmt;
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 6d082f3ef..27980d034 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf.c,v 1.22 2005/11/18 15:31:12 nsh Exp $
+ * $Id: video-buf.c,v 1.23 2005/11/24 09:12:53 nsh Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -823,6 +823,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
if (NULL == q->read_buf)
goto done;
q->read_buf->memory = V4L2_MEMORY_USERPTR;
+ q->read_buf->bsize = count; /* preferred size */
field = videobuf_next_field(q);
retval = q->ops->buf_prepare(q,q->read_buf,field);
if (0 != retval) {
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 74f9ff6a3..8705c9de1 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,18 @@
+2005-11-23 09:10 nshmyrev
+
+ * ../v4l/linux/drivers/media/video/bttv-driver.c:
+ * ../v4l/linux/drivers/media/video/video-buf.c:
+ bttv raw format fix to fix VIDIOCSPICT ioctl.
+
+ Signed-off-by: Michael H. Schimek <mschimek@gmx.at>
+
+2005-11-23 06:23 mkrufky
+
+ * ../v4l/compat.h:
+ - remove repeated code
+
+ Signed-off-by: Michael Krufky <mkrufky@m1k.net>
+
2005-11-23 06:23 mkrufky
* ../v4l/compat.h: