aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.h
diff options
context:
space:
mode:
authorIan Armstrong <ian@iarmst.demon.co.uk>2007-08-03 09:01:39 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:04:29 -0400
commitbfd7beacff2b5c811badb587a74c3dfbf7f98721 (patch)
tree47628dfa13bc221e2a5466934830ca54a6f46bc0 /drivers/media/video/ivtv/ivtv-driver.h
parent943e8910db31e36d945f2bf7d4c273ca5fa01f6e (diff)
V4L/DVB (5973): ivtv: attach yuv field order to each frame
In the current driver, the field order is global. As soon as it's changed it takes immediate effect. This is a problem when the video changes order mid stream. Although it mostly works okay, the video may judder / flicker. This patch attaches the field order to the frame, so that any buffered frames will not be displayed until the correct field. In the event that the field order is changed mid stream, the driver will ensure that the previous frame is displayed for a minimum of 3 fields. These are the two original fields the frame should have occupied, plus the one extra since the new frame still has to wait for the correct field. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.h')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h
index 6e53a1f04f7..6c7c9a57a1a 100644
--- a/drivers/media/video/ivtv/ivtv-driver.h
+++ b/drivers/media/video/ivtv/ivtv-driver.h
@@ -531,6 +531,7 @@ struct yuv_frame_info
531 u32 tru_w; 531 u32 tru_w;
532 u32 tru_h; 532 u32 tru_h;
533 u32 offset_y; 533 u32 offset_y;
534 int lace_mode;
534}; 535};
535 536
536#define IVTV_YUV_MODE_INTERLACED 0x00 537#define IVTV_YUV_MODE_INTERLACED 0x00
@@ -603,7 +604,6 @@ struct yuv_playback_info
603 int decode_height; 604 int decode_height;
604 605
605 int frame_interlaced; 606 int frame_interlaced;
606 int frame_interlaced_last;
607 607
608 int lace_mode; 608 int lace_mode;
609 int lace_threshold; 609 int lace_threshold;
@@ -614,6 +614,11 @@ struct yuv_playback_info
614 614
615 u32 yuv_forced_update; 615 u32 yuv_forced_update;
616 int update_frame; 616 int update_frame;
617
618 int sync_field[4]; /* Field to sync on */
619 int field_delay[4]; /* Flag to extend duration of previous frame */
620 u8 fields_lapsed; /* Counter used when delaying a frame */
621
617 struct yuv_frame_info new_frame_info[4]; 622 struct yuv_frame_info new_frame_info[4];
618 struct yuv_frame_info old_frame_info; 623 struct yuv_frame_info old_frame_info;
619 struct yuv_frame_info old_frame_info_args; 624 struct yuv_frame_info old_frame_info_args;