On Sun, 30 Nov 2003, Nicolas Boos wrote: > Hey, mine is 2.2.5 (Debian Woody) !
Oops. I misremembered it then - but the symptom/bug looks to be the same one. > For the moment, I'm using "#undef HAVE_POSIX_MEMALIGN" instead of > "#define HAVE_POSIX_MEMALIGN 1" in configure as workaround. I still believe the problem is alignment related. The compatibility function posix_memalign() has to rely on the underlying malloc() to perform alignment. Systems which use a power-of-two allocation scheme (basically all the BSD systems) can force alignment to a specified boundary by adjusting the allocation size. However, if the malloc() function does not perform alignment (and I am beginning to suspect that glibc's does not - at least prior to 2.3.x)) then the buffers will not be aligned on a 16 byte boundary. SSE instructions apparently fault if their operands are not correctly aligned in memory. As a temporary measure you can try editing the compat function posix_memalign to return an aligned address. NOTE: this will result in a pointer that can NOT be passed to 'free()' - which makes this an unacceptable solution in the long term (but as an experiment it would be worth trying). > Yes, It's probably SSE related (mpeg2enc runs fine on my old Celeron), > but don't know exactly for the glibc case. Ah, ok - I am becoming convinced that the issue is buffer alignment. Finding the correct place to disable use of SSE and forcing that capability off would be one experiment to try, the other way would be to adjust the return value of posix_memalign(). The long term fix is to upgrade glibc of course ;) Cheers, Steven Schultz ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Mjpeg-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mjpeg-users