[FFmpeg-devel] [PATCH] avutil/md5: fix unaligned loads

James Almer jamrial at gmail.com
Wed Feb 24 16:47:00 CET 2016


On 2/24/2016 12:13 PM, Ronald S. Bultje wrote:
> Hi,
> 
> On Tue, Feb 23, 2016 at 8:40 PM, James Almer <jamrial at gmail.com> wrote:
> 
>> Tested on x86 and benched with no apparent speed loss
> 
> 
> That's because x86 supports unaligned loads.
> 
> How come you get unaligned loads? Shouldn't this prevent it?
> 
> -    if (HAVE_BIGENDIAN || (!HAVE_FAST_UNALIGNED && ((intptr_t)src & 3))) {
> +    if (!HAVE_FAST_UNALIGNED && ((intptr_t)src & 3)) {
>         while (src < end) {
>             memcpy(ctx->block, src, 64);
>             body(ctx->ABCD, (uint32_t *) ctx->block, 1);
> 
> Ronald

That code is never compiled/executed on x86 because HAVE_FAST_UNALIGNED is 1
there.


More information about the ffmpeg-devel mailing list