Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e0df402e695e638dfee94a6e05fca48b15404e6
Commit:     9e0df402e695e638dfee94a6e05fca48b15404e6
Parent:     59fc7f52898fb35eb053bc7b54430d81629b5966
Author:     Ian Armstrong <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 16 07:44:42 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 15:44:48 2007 -0300

    V4L/DVB (5438): Fix ivtv yuv threshold handling
    
    Modifies automatic mode selection for yuv playback. Behaviour is now that
    source video with a vertical resolution below that of the currently set
    broadcast mode will be treated as progressive. Video with a vertical
    resolution greater or equal to the current broadcast mode (up to 576 lines)
    will be treated as interlaced.
    
    Signed-off-by: Ian Armstrong <[EMAIL PROTECTED]>
    Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/ivtv/ivtv-driver.c |    2 +-
 drivers/media/video/ivtv/ivtv-driver.h |    1 -
 drivers/media/video/ivtv/ivtv-yuv.c    |    9 ++++++---
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/media/video/ivtv/ivtv-driver.c 
b/drivers/media/video/ivtv/ivtv-driver.c
index 8b5597f..45b9328 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/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;
diff --git a/drivers/media/video/ivtv/ivtv-driver.h 
b/drivers/media/video/ivtv/ivtv-driver.h
index ce28923..9a412d6 100644
--- a/drivers/media/video/ivtv/ivtv-driver.h
+++ b/drivers/media/video/ivtv/ivtv-driver.h
@@ -606,7 +606,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/drivers/media/video/ivtv/ivtv-yuv.c 
b/drivers/media/video/ivtv/ivtv-yuv.c
index 286a0d7..bcea095 100644
--- a/drivers/media/video/ivtv/ivtv-yuv.c
+++ b/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) 
||
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to