Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Softdevice + EPIA-M / Sound resampling
Henrik Johansson wrote:
Colin Paton wrote:
Hi,
I have glued some CLE266 hardware mpeg2 decoding code into softdevice.
I've
now got this working with my Nehemiah M10000 and CVS DirectFB. Video is
working well - smooth pictures on the display.
Great news.
However, the sound is still a bit iffy and AV sync isn't perfect. I
suspect
that the sound card (I'm using ALSA) isn't quite playing back at the same
rate as the video.
I wait for the vertical blanking pulse before flipping the video
framebuffer. This works well - get smooth pictures, but causes
problems with
the sound.
I would therefore like to change the following:
- Make video the primary sync source, and match audio to video.
- Resample the audio in order to alter the frame rate slightly if
necessary.
This should hopefully avoid the gaps and clicks that I've been
experiencing.
I think that xine resamples the audio so I'll have a look at that.
I have two questions:
- Is audio resampling really necessary? I'm not an MPEG A/V sync expert -
perhaps someone more qualified could point me to a source of information?
- Is anyone already doing this? I don't want to reinvent any wheels!
I'm not an MPEG A/V sync expert either but isn't the problem even worse.
When you're waiting for the vertical blanking pulses which are not in
perfectly sync with the DVB stream clock reference (PCR) you will
eventually get dropped frames. To do this right (which probably is not
possible) I think you need to sync both the frame rate of the video mode
and the audio clock to the PCR. The latter should be possible by
resampling the audio stream before sending it to the soundcard as you
suggest. For the video I think it could be done by implementing a PLL in
software which measures the VBL frequency and compares this with the PCR
clock and use the correction signals to program the videomode timing
parameters.
You are correct. The VideoLAN people have a pretty good introduction
into this topic in their development introduction paper:
http://developers.videolan.org/vls/vls/doc/developer/vls-devel.pdf (page
12), the referenced code is accessible in their CVS:
http://cnedra.via.ecp.fr/cgi-bin/cvsweb/vlc/src/input/input_clock.c?rev=1.45&content-type=text/x-cvsweb-markup
To resolve the sync issue cleanly you need to do something similiary in
the softdevice plugin.
Holger
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index