[MPlayer-dev-eng] RE: MPlayer-dev-eng Digest, Vol 43, Issue 72
Bas Hulsken
bhulsken at hotmail.com
Mon Jul 17 10:54:49 CEST 2006
>Date: Sat, 15 Jul 2006 17:53:05 +0200
>From: "Emanuele Giaquinta" <emanuele.giaquinta at gmail.com>
>On 7/15/06, Romain Dolbeau <romain at dolbeau.org> wrote:
>
> > 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".
>
>They are if the system has a working memalign, which should be the
>case on glibc.
>
>--
>Emanuele Giaquinta
ok, this memalign stuff might be the problem, I'll test it as soon as I can
find some time (might take a few days). Anyway, parse.c from liba52
dynamically tests if it could get a memaligned malloc, if using SSE with
these lines (at lines 77 to 80):
if(((int)state->samples%16) && (mm_accel&MM_ACCEL_X86_SSE)){
mm_accel &=~MM_ACCEL_X86_SSE;
fprintf(stderr, "liba52: unable to get 16 byte aligned memory disabling
usage of SSE instructions\n");
}
I guess we should at least add the same for PPCs altivec:
if(((int)state->samples%16) && (mm_accel&MM_ACCEL_PPC_ALTIVEC)){
mm_accel &=~MM_ACCEL_PPC_ALTIVEC;
fprintf(stderr, "liba52: unable to get 16 byte aligned memory disabling
usage of ALTIVEC instructions\n");
}
btw. mplayer configure detects a working memalign for the mini on linux, but
I guess memalign can always go wrong.. do you agree Emanuele?
Romain, Emanuele, I see in another mail ( do not define MEMALIGN_HACK on
OSX) some problems with memalign on OSX? Is it possible that the altivec
resampler works on OSX, but not on linux because of some side effect of
this? Just a thought....
thanks& best regards,
Bas Hulsken
More information about the MPlayer-dev-eng
mailing list