[FFmpeg-devel] [PATCH] motion_est_mmx: prefer xmm registers below xmm6 when they are available

Ramiro Polla ramiro.polla
Sun Oct 31 22:20:34 CET 2010


On Sun, Oct 31, 2010 at 7:04 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Oct 31, 2010 at 01:19:09PM -0200, Ramiro Polla wrote:
>> On Sun, Oct 31, 2010 at 9:59 AM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>> > On Sat, Oct 30, 2010 at 3:41 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
>> >> $subj
>> > [..]
>> > --- a/libavcodec/x86/motion_est_mmx.c
>> > +++ b/libavcodec/x86/motion_est_mmx.c
>> >> @@ -111,9 +111,9 @@ static int sad16_sse2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h)
>> >> ? ? ? ? ?: "r" ((x86_reg)stride)
>> >> ? ? ?);
>> >> ? ? ?__asm__ volatile(
>> >> - ? ? ? ?"movhlps %%xmm6, %%xmm0 ? ? ? ? \n\t"
>> >> - ? ? ? ?"paddw ? %%xmm0, %%xmm6 ? ? ? ? \n\t"
>> >> - ? ? ? ?"movd ? ?%%xmm6, %0 ? ? ? ? ? ? \n\t"
>> >> + ? ? ? ?"movhlps %%xmm2, %%xmm0 ? ? ? ? \n\t"
>> >> + ? ? ? ?"paddw ? %%xmm0, %%xmm2 ? ? ? ? \n\t"
>> >> + ? ? ? ?"movd ? ?%%xmm2, %0 ? ? ? ? ? ? \n\t"
>> >> ? ? ? ? ?: "=r"(ret)
>> >> ? ? ?);
>> >> ? ? ?return ret;
>> >
>> > The blocks should probably be merged.
>>
>> attached
>
>> ?motion_est_mmx.c | ? 17 +++++++----------
>> ?1 file changed, 7 insertions(+), 10 deletions(-)
>> 442848221a8ab3bea40dbed045a8eb61f5bddb70 ?merge_sad16_sse2.diff
>
> should be ok if tested

Applied.



More information about the ffmpeg-devel mailing list