Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168388
b: refs/heads/master
c: 66349b4
h: refs/heads/master
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Nov 7, 2009
1 parent c696661 commit ccb443d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0a7e8a621666f9ce1373270bae061f92a2a2b87
refs/heads/master: 66349b4e7ab3825dbfc167a5f0309792a587adb7
31 changes: 27 additions & 4 deletions trunk/drivers/media/video/bt8xx/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3800,11 +3800,34 @@ bttv_irq_next_video(struct bttv *btv, struct bttv_buffer_set *set)
if (!V4L2_FIELD_HAS_BOTH(item->vb.field) &&
(item->vb.queue.next != &btv->capture)) {
item = list_entry(item->vb.queue.next, struct bttv_buffer, vb.queue);
/* Mike Isely <isely@pobox.com> - Only check
* and set up the bottom field in the logic
* below. Don't ever do the top field. This
* of course means that if we set up the
* bottom field in the above code that we'll
* actually skip a field. But that's OK.
* Having processed only a single buffer this
* time, then the next time around the first
* available buffer should be for a top field.
* That will then cause us here to set up a
* top then a bottom field in the normal way.
* The alternative to this understanding is
* that we set up the second available buffer
* as a top field, but that's out of order
* since this driver always processes the top
* field first - the effect will be the two
* buffers being returned in the wrong order,
* with the second buffer also being delayed
* by one field time (owing to the fifo nature
* of videobuf). Worse still, we'll be stuck
* doing fields out of order now every time
* until something else causes a field to be
* dropped. By effectively forcing a field to
* drop this way then we always get back into
* sync within a single frame time. (Out of
* order fields can screw up deinterlacing
* algorithms.) */
if (!V4L2_FIELD_HAS_BOTH(item->vb.field)) {
if (NULL == set->top &&
V4L2_FIELD_TOP == item->vb.field) {
set->top = item;
}
if (NULL == set->bottom &&
V4L2_FIELD_BOTTOM == item->vb.field) {
set->bottom = item;
Expand Down

0 comments on commit ccb443d

Please sign in to comment.