On Mittwoch 24 Januar 2007 22:45, Torgeir Veimo wrote:
>
> On 24 Jan 2007, at 20:01, Stefan Lucke wrote:
>
> > On Dienstag 23 Januar 2007 01:25, Torgeir Veimo wrote:
> >> On 22 Jan 2007, at 20:26, Stefan Lucke wrote:
> >
> >>> So my system skips around 9 to 10 frames per minute.
> >>> 60 * 25 = 1500 frames.
> >>> So the TV frame rate is 25 * 1490 / 1500 = 24.833 Hz .
> >>>
> >>> I guess I've to ask Ville if there is a way to increase the dot
> >>> clock
> >>> of my card in some way.
> >>
> >> This assumes your soundcard is perfectly clocked to the incoming DVB
> >> stream? I'd assume that eventually if the soundcard is a bit faster
> >> than the DVB stream, you'd get an xrun. Maybe it's an idea to add
> >> xrun counts as well.
> >
> > Yes, there are e few assumptions which may slightly influence
> > calculation.
> > These numbers are from recording playback. During live view, they are
> > a bit different, but the direction is the same.
> >
> > The other way, we have to issue additional delays, because of some
> > errors we lost about 9 frames is bad too. Let's look at the code:
> >
> > 1. calculate current audio / video offset:
> > if ( aPTS )
> > offset = aPTS - pts ;
> > else offset = 0;
> > if ( abs(offset) > 100000)
> > offset=0;
> >
> > To my opinion thats ok.
>
> Maybe use the term delay instead of offset. Eg. choosing the term "A/
> V Offset" in the setup was a bad choice of me.
>
> [...]
>
> >> Another thing which would be good to get statistics about: the
> >> average number of "hurryup"s after a channel change.
> >
> > After a channel change, I think we issue delays instead of hurryups.
>
> Are you sure? Where's the code for that?
So after above code I inserted the following conditional fprintf.
traceCounter is reset in constructor of cVideoStreamDecoder, needs to be
defined in mpeg2decoder.h too.
offset=0;
if (traceCounter < 100) {
fprintf (stderr, "%d offset = %d\n", traceCounter, offset);
++traceCounter;
}
// this few lines does the whole syncing
0 offset = 0
1 offset = -400
2 offset = -400
3 offset = -400
4 offset = -400
5 offset = -5519
6 offset = -5492
7 offset = -5465
..
75 offset = -239
76 offset = -425
77 offset = -185
78 offset = -159
79 offset = -132
80 offset = -105
81 offset = -292
82 offset = -52
83 offset = -25
84 offset = 1
First positive number is after 85 frames. Thats a short test from xv-out.
positive numbers -> frame drop.
negative numbers -> frame repeat.
>
> I think it would be interesting to gather audio clock to DVB signal
> clock drift over time and reprogram the audio output, if it has the
> capability to do so. I think AC '97 compatible hardware has a
> software programmable clock, but I'm not sure if it can be set using
> an ioctl.
If sound cards would have the possibility to adjust the pll clock would
be really nice, but I've never found a hint to do this.
Resampling for stereo could do a similar thing, but AC3 pass through ?
Decode -> Resample -> Encode :-( .
>
> Additionally, why don't we try to make use of the available vsync
> interrupt on the matroxfb in SyncTimer.c, when we don't use
> DSFLIP_WAITFORSYNC?.
>
> For reference, here's five minutes of log from my system. Maybe my
> modeline is not properly adjusted to the DVB clock.
The tv-out feature of matrox tv-out is not based on modelines :-) .
--
Stefan Lucke
_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel