[FFmpeg-devel] [PATCH 05/15] vp9/x86: simplify ABSSUM_CMP by inverting the comparison meaning.

Clément Bœsch u at pkh.me
Sat Dec 27 17:48:27 CET 2014


On Sat, Dec 27, 2014 at 11:02:40AM -0500, Ronald S. Bultje wrote:
> ---
>  libavcodec/x86/vp9lpf.asm | 103 +++++++++++++++++++++++-----------------------
>  1 file changed, 52 insertions(+), 51 deletions(-)
> 
> diff --git a/libavcodec/x86/vp9lpf.asm b/libavcodec/x86/vp9lpf.asm
> index 44db472..613a104 100644
> --- a/libavcodec/x86/vp9lpf.asm
> +++ b/libavcodec/x86/vp9lpf.asm
> @@ -35,6 +35,7 @@ pb_40:  times 16 db 0x40
>  pb_81:  times 16 db 0x81
>  pb_f8:  times 16 db 0xf8
>  pb_fe:  times 16 db 0xfe
> +pb_ff:  times 16 db 0xff
>  
>  cextern pw_4
>  cextern pw_8
> @@ -58,20 +59,18 @@ SECTION .text
>      por                 %1, %4
>  %endmacro
>  
> -; %1 = %1<=%2
> -%macro CMP_LTE 3-4 ; src/dst, cmp, tmp, pb_80
> -%if %0 == 4
> -    pxor                %1, %4
> +; %1 = %1>%2
> +%macro CMP_GT 2-3 ; src/dst, cmp, pb_80
> +%if %0 == 3
> +    pxor                %1, %3
>  %endif
> -    pcmpgtb             %3, %2, %1          ; cmp > src?
> -    pcmpeqb             %1, %2              ; cmp == src? XXX: avoid this with a -1/+1 well placed?
> -    por                 %1, %3              ; cmp >= src?
> +    pcmpgtb             %1, %2
>  %endmacro
>  

Cool :)

LGTM

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141227/afd02f1c/attachment.asc>


More information about the ffmpeg-devel mailing list