From: Edgar Toernig <froese@gmx.de>
To: matthieu castet <castet.matthieu@free.fr>
Cc: Linux and Kernel Video <video4linux-list@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: bttv 2.6.16: wrong VBI_OFFSET?
Date: Mon, 24 Apr 2006 23:55:22 +0200 [thread overview]
Message-ID: <20060424235522.1fd87f6a.froese@gmx.de> (raw)
In-Reply-To: <444D2268.1030802@free.fr>
matthieu castet wrote:
>
> > in 2.6.16 the code in driver/media/video/bttv-vbi.c was changed
> > a little bit. Beside other things, the constant 244 for the vbi
> > offset was replaced by a #define VBI_OFFSET 128.
> >
> > Afaics, the old value 244 was correct - was the change to 128
> > intentionally?
>
> You can have some comments about that in the git log :
> http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=67f1570a0659abba5efbf55cc986187af61bdd52;hp=7e57819169d4f9a1d7af55fb645ece3fb981e2e3
Hmmm... regarding VBI_OFFSET there's this:
| - V4L2_(G|S|TRY)_FMT returned incorrect VBI start lines for PAL-M,
| NTSC-JP, and PAL-60. They also returned an inaccurate VBI offset.
I remember that I tried to figure out how to calculate the VBI offset
from the Bt8xx specs a couple years ago but resigned - somehow the
specs are wrong. But given a teletext signal and the teletext specs
you can measure its value[1] and 244 is pretty accurate for PAL.
Regarding the 64 bit arithmetic there's this:
| - V4L2_(S|TRY)_FMT did not expect very large or small VBI start or
| count values, returning wrong (but safe) counts due to an overflow.
Wow, previously the driver produced (safe) garbage when given garbage
and now it produces more accurate (safe) garbage??? I don't get it.
[My suspicion is that it was only inserted to shut up warnings...]
Ciao, ET.
[1] You know that the 7th peak of the teletext clock run-in is at
12us (+0.4us/-1.0us) from the falling hsync. You look at which
sample the 7th peak is at its max. The difference between this
number and 12e-6 * Fs (426 for Fs=35468950) is the VBI_OFFSET.
Btw, hsync ends at 166 (PAL/Fs=35468950) respectively 134 (NTSC/
Fs=28636363). So any VBI_OFFSET lower than that would show the
hsync in the samples...
prev parent reply other threads:[~2006-04-24 21:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-24 17:02 bttv 2.6.16: wrong VBI_OFFSET? Edgar Toernig
2006-04-24 19:09 ` matthieu castet
2006-04-24 21:55 ` Edgar Toernig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060424235522.1fd87f6a.froese@gmx.de \
--to=froese@gmx.de \
--cc=castet.matthieu@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox