[FFmpeg-devel] [PATCH] x86/yadif: improve usage of ABS macros

Ronald S. Bultje rsbultje at gmail.com
Tue Jul 8 12:42:34 CEST 2014


On Tue, Jul 8, 2014 at 12:42 AM, James Almer <jamrial at gmail.com> wrote:

> ABS2 might help on processors where Out Of Order execution isn't very good.
> Also remove a duplicate macro and use the x86util ones instead, which are
> optimized for mmxext/sse2.

>      psubw        m3, m0
>      psubw        m4, m1
> -    PABS         m3, m5
> -    PABS         m4, m5
> +    ABS2         m3, m4, m5, m6

>      psubd        m3, m0
>      psubd        m4, m1
> -    PABS         m3, m5
> -    PABS         m4, m5
> +    PABS2        m3, m4, m5, m6

This still smells like duplicate to me. Why doesn't ABS1/2 take a size
argument (like SBUTTERFLY), which would be w or d, and can be used to
specify the size of the operation? You can (for bw compat) even make a new
macro (call it PABS1/2) that does that, use that in both places, and change
ABS1/2 to use this macro with a hardcoded "w" size argument. Then you don't
have to change any unrelated asm (for now).


More information about the ffmpeg-devel mailing list