[MPlayer-dev-eng] liba52 resample_altivec.c broken (severe glitches in audio) on ppc mac-mini

Romain Dolbeau romain at dolbeau.org
Sat Jul 15 17:02:45 CEST 2006


Bas Hulsken <bhulsken at hotmail.com> wrote:

> this is the problem:
> I run mplayer (svn, current) on a mac mini g4 with fedora core 5 (also
> tried 4). All is well, but playing a movie with an ac3 soundtrack causes
> severe glitches in the sound if played back over alsa. On oss
> (emulation) there are no glitches, but then the sound quality is
> horrible (sounds like poor quality resampling).
> 
> all other sound is ok. The problem is in the altivec resampling routine of
> liba52. this file: resample_altivec.c. Disabling the use of this routine
> (with --disable-altivec, or with the patch I've attached) solves the 
> problem, sound is perfectly smooth again.

It's perfectly possible the code isn't working in linux. It works in
MacOSX, I just tried again.

There's an assumption not mentioned  in the code : that both parameters
to the function a52_resample_STEREO_to_2_altivec are akligned on a
16-bytes boundary. You might want to check that dynamically, I'm not
sure if it's really guaranteed or if it happens to "just work".

If both pointer are properly aligned, then it's probably a case where
FSF gcc miscompile the intrinsics. Try posting the disassembled code.

-- 
Romain Dolbeau
<romain at dolbeau.org>



More information about the MPlayer-dev-eng mailing list