From dae1d507af94261bafd3b11549884e5d1eca590e Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 27 Jul 2012 14:26:09 +0200 Subject: x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags --- libavutil/x86/x86util.asm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libavutil') diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 2f818fe61e..551c40a4b5 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -301,6 +301,14 @@ %endif %endmacro +%macro PAVGB 2 +%if cpuflag(mmxext) + pavgb %1, %2 +%elif cpuflag(3dnow) + pavgusb %1, %2 +%endif +%endmacro + %macro PSHUFLW 1+ %if mmsize == 8 pshufw %1 -- cgit v1.2.3