summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-driver.c4
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-driver.h1
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-yuv.c9
3 files changed, 8 insertions, 6 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c
index 2fcf3e7c3..4031df6db 100644
--- a/linux/drivers/media/video/ivtv/ivtv-driver.c
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.c
@@ -116,7 +116,7 @@ static int dec_yuv_buffers = IVTV_DEFAULT_DEC_YUV_BUFFERS;
static int dec_vbi_buffers = IVTV_DEFAULT_DEC_VBI_BUFFERS;
static int ivtv_yuv_mode = 0;
-static int ivtv_yuv_threshold=480;
+static int ivtv_yuv_threshold=-1;
static int ivtv_pci_latency = 1;
int ivtv_debug = 0;
@@ -1174,7 +1174,6 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
in one place. */
itv->std++; /* Force full standard initialization */
itv->std_out = itv->std;
- ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_STD, &itv->tuner_std);
ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_FREQUENCY, &vf);
retval = ivtv_streams_setup(itv);
@@ -1186,6 +1185,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
if (itv->card->v4l2_capabilities & V4L2_CAP_VIDEO_OUTPUT) {
ivtv_init_mpeg_decoder(itv);
}
+ ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_STD, &itv->tuner_std);
IVTV_DEBUG_IRQ("Masking interrupts\n");
/* clear interrupt mask, effectively disabling interrupts */
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.h b/linux/drivers/media/video/ivtv/ivtv-driver.h
index e84caa59b..39e1d7e46 100644
--- a/linux/drivers/media/video/ivtv/ivtv-driver.h
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.h
@@ -613,7 +613,6 @@ struct yuv_playback_info
int lace_mode;
int lace_threshold;
- int lace_threshold_last;
int lace_sync_field;
atomic_t next_dma_frame;
diff --git a/linux/drivers/media/video/ivtv/ivtv-yuv.c b/linux/drivers/media/video/ivtv/ivtv-yuv.c
index 286a0d7e7..bcea09542 100644
--- a/linux/drivers/media/video/ivtv/ivtv-yuv.c
+++ b/linux/drivers/media/video/ivtv/ivtv-yuv.c
@@ -613,16 +613,19 @@ static void ivtv_yuv_handle_vertical(struct ivtv *itv, struct yuv_frame_info *wi
}
itv->yuv_info.frame_interlaced_last = itv->yuv_info.frame_interlaced;
- itv->yuv_info.lace_threshold_last = itv->yuv_info.lace_threshold;
}
/* Modify the supplied coordinate information to fit the visible osd area */
static u32 ivtv_yuv_window_setup (struct ivtv *itv, struct yuv_frame_info *window)
{
- int osd_crop;
+ int osd_crop, lace_threshold;
u32 osd_scale;
u32 yuv_update = 0;
+ lace_threshold = itv->yuv_info.lace_threshold;
+ if (lace_threshold < 0)
+ lace_threshold = itv->yuv_info.decode_height - 1;
+
/* Work out the lace settings */
switch (itv->yuv_info.lace_mode) {
case IVTV_YUV_MODE_PROGRESSIVE: /* Progressive mode */
@@ -639,7 +642,7 @@ static u32 ivtv_yuv_window_setup (struct ivtv *itv, struct yuv_frame_info *windo
break;
case IVTV_YUV_MODE_AUTO:
- if (window->tru_h <= itv->yuv_info.lace_threshold || window->tru_h > 576 || window->tru_w > 720){
+ if (window->tru_h <= lace_threshold || window->tru_h > 576 || window->tru_w > 720){
itv->yuv_info.frame_interlaced = 0;
if ((window->tru_h < 512) ||
(window->tru_h > 576 && window->tru_h < 1021) ||