[MPlayer-dev-eng] RE: MPlayer-dev-eng Digest, Vol 43, Issue 72
Rich Felker
dalias at aerifal.cx
Mon Jul 17 20:52:45 CEST 2006
On Mon, Jul 17, 2006 at 08:54:49AM +0000, Bas Hulsken wrote:
> 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)){
Whoever wrote this code needs to drink 100l, because it (in principle)
performs a DIVIDE instruction rather than an AND instruction due to
the signed cast. If the cast were to unsigned or if they just wrote
&15 like they mean, it would work correctly. gcc _may_ be able to tell
that you only care if it's zero/nonzero and optimize away the divide,
but I wouldn't count on it. Why can't people just write what they
mean??
> I guess we should at least add the same for PPCs altivec:
Absolutely not; this code is disgusting.
Rich
More information about the MPlayer-dev-eng
mailing list