[FFmpeg-devel] [PATCH] pixblockdsp, avdct: Add get_pixels_unaligned

Martin Storsjö martin at martin.st
Tue May 12 22:04:13 EEST 2020


On Tue, 12 May 2020, Michael Niedermayer wrote:

> On Tue, May 12, 2020 at 11:25:34AM +0300, Martin Storsjö wrote:
>> Use this in vf_spp.c, where the get_pixels operation is done on
>> unaligned source addresses.
>>
>> This fixes fate-filter-spp on armv7.
>
> LGTM
>
>
>> ---
>> People more familiar with the other assembly implementations of
>> get_pixels (in particular, x86) can hook them up to
>> get_pixels_unaligned if unaligned use explicitly is ok; as far as I
>> can read at least ff_get_pixels_mmx, it looks like it expects the source
>> to be aligned, but in practice it does seem to run fine even if
>> ff_get_pixels_sse2 is disabled.
>> ---
>
> id suggest that code that has been tested with unaligned data and works
> is enabled

Well ff_get_pixels_mmx uses "mova", which I'd presume is "aligned", but it 
still doesn't seem to crash when used with vf_spp today, even if that one 
uses it on unaligned addresses. So I'm not sure if I'm just being lucky, 
or is it guaranteed that this "mova" always will work on unaligned 
addresses?

As someone who doesn't do much x86 asm, I wouldn't base such an assignment 
just on "it seems to work for me".

// Martin


More information about the ffmpeg-devel mailing list