[MPlayer-dev-eng] [PATCH] Fix for libmad audio/video sync problems (on variable bitrate audio)

Siarhei Siamashka siarhei.siamashka at gmail.com
Thu Jan 3 01:52:30 CET 2008


Hello,

It is a fix for audio/video sync problems when using '-ao mad' for videos with
mp3 soundtrack encoded with variable bitrate.

The problem was investigated earlier:
http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-August/045241.html

A similar fix has been successfully used for a long time in a fake mp3
pass-through decoder which passed MP3 data to DSP through quite a nasty
gstreamer hack on Nokia 770 to free the resources of main CPU core when
playing video. This pass-through decoder initially suffered from the 
same a/v sync problem, so it had to be fixed.

Now with the release of new firmware for Nokia N800 (IT OS2008), the 
situation has changed. Because of the new power management code and frequency 
scaling, ARM core can be clocked up to 400MHz (it was limited to 330MHz
before). Unfortunately, ARM core still needs to go down to 330MHz when DSP
core is active. I don't know if this problem will be fixed or not later, 
but right now it is more favourable to do MP3 decoding entirely on ARM core
without touching DSP at all (this 70MHz bonus is more than enough to do MP3
decoding and there are still plenty of extra cpu cycles left for video).

So fixed point MP3 decoders and libmad in particular became interesting 
again (*) and it would be very nice to get them working properly in upstream
MPlayer SVN tree as well. 

Unfortunately, you could not confirm the audio/video sync problem with the
sample I submitted earlier:
http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2007-September/053923.html

I can try to reencode and upload a different sample to show the problem if
you provide me with any video clip for which you are able to notice
audio/video sync issues.

(*) Actually, Nokia N800 has hardware floating point support, so with proper
optimizations, other audio decoders might become better than fixed point
decoders. But that's another story.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libmad_av_sync_fix.diff
Type: text/x-diff
Size: 2070 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080103/5b5c017d/attachment.diff>


More information about the MPlayer-dev-eng mailing list