Bug 36415 - [bktr] [patch] driver incorrectly handles the setting of frame rates
Summary: [bktr] [patch] driver incorrectly handles the setting of frame rates
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Josh Paetzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-28 09:30 UTC by brandt
Modified: 2017-06-27 03:46 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.91 KB, patch)
2002-03-28 09:30 UTC, brandt
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description brandt 2002-03-28 09:30:01 UTC
In the case when the driver captures both fields of a frame the temporal
decimation register is incorrectly set. This leads to a wrong resulting
frame rate. The register is set to drop frames not fields (by setting bit
7 to zero). Therefor the number of dropped items need not to be multiplied by
2 for the case when both fields are captured for a frame. The chip itself takes
care for dropping both fields of the dropped frame.

As a sidenote:

(2) Bktr fails to compile if BT848_DUMP is defined.

Fix: Apply the following patch. This corrects both problems:

How-To-Repeat: 
Use an application that captures full size PAL and request a frame
of 12 fps from the driver. Observe the frame rate dropping to 1 fps.

This is due the computation in bktr_core.c:set_fps(). When both WANT
flags are 1 (capturing both fields) the difference between the maximum frame
rate (25 for PAL) and the requested frame rate (12) is multiplied by two
falsely assuming, that the register must contain the number of fields to drop.
This yields a value of 24 and the chip drops 24 out of 25 frames resulting
in a frame rate of 1.

(2) Define BT848_DUMP and observe the compile to fail.
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2002-08-20 22:18:42 UTC
Responsible Changed
From-To: freebsd-bugs->roger

Over to bktr maintainer.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2004-11-04 08:15:53 UTC
Responsible Changed
From-To: roger->freebsd-bugs

Assignee is currently away from doing FreeBSD work at the moment, so 
at his request, return this one to the pool.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-06-27 03:46:07 UTC
A commit references this bug:

Author: jpaetzel
Date: Tue Jun 27 03:45:09 UTC 2017
New revision: 320393
URL: https://svnweb.freebsd.org/changeset/base/320393

Log:
  driver incorrectly handles the setting of frame rates

  PR:	36415
  Submitted by:	brandt@fokus.gmd.de

Changes:
  head/sys/dev/bktr/bktr_core.c
Comment 4 Josh Paetzel freebsd_committer freebsd_triage 2017-06-27 03:46:54 UTC
15 years later....