[FFmpeg-devel] [PATCH] Fix unaligned access in lcl decoder

Jeff Downs heydowns
Wed May 27 23:24:35 CEST 2009

On Wed, 27 May 2009, M?ns Rullg?rd wrote:

> The shifts are the last fallback after arch-specific code and compiler
> tricks, and then only when fast_unaligned is off.

Absolutely. I mentioned it because it will likely be slower on systems 
where that is the case, in case someone does care.

> > but if I force that implementation it is slower than memcpy (2% with
> > the test sample on sparc).
> I thought it was crashing on Sparc.  Please explain.

It was. The original code was int-casting blind addresses. Unaligned 
accesses on Sparc/Solaris cause bus errors.

The comparison quoted is that of using memcpy versus an unoptimized 
AV_R/WN32 (forced by editing intreadwrite.h for the purposes of this 
benchmark, since I have no system where the use of that implementation 
is naturally true).


More information about the ffmpeg-devel mailing list