[FFmpeg-devel] [PATCH] lavfi/vf_deshake: fix segfaults #2443

João Bernardo jbvsmo at gmail.com
Mon Apr 15 17:08:42 CEST 2013


2013/4/15 Carl Eugen Hoyos <cehoyos at ag.or.at>

> João Bernardo <jbvsmo <at> gmail.com> writes:
>
> > For already aligned data, the above change will likely
> > not affect performance, but it will not crash for
> > misaligned data. So SSE2 should be disabled for
> > deshake filter (bad idea) or you can add a
> > "sad16_sse2_misaligned" version of the function or you
> > can also try to measure the performance of both cases.
>
> I suspect that is your duty (since you claim
> there is no difference).
>

I don't have my compute now, but the principle is:
x86 CPUs are post RISC, so it wil break the PSADBW instruction to copy
into a draft register before the calculation anyway.

I just did the copying myself because the opcode is meant to be used only
when memory is aligned.

BTW, I believe the solution of copying the data every time to a new buffer
is worse.


More information about the ffmpeg-devel mailing list