diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-05 23:23:37 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-05 23:55:31 +0400 |
commit | 24823a761cb28eff5876d5de266a7d7103075e94 (patch) | |
tree | a476ad08e498a91e05f8a2b789bf6b4f495a145d /libavutil/x86 | |
parent | 92c7ef1e30d677f29c06caf765c527c9db486861 (diff) | |
parent | bb58c43c69078c6cf29a9efee12e14469e2c21f8 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
qdm2: remove broken and disabled dump_context() debug function
x86: h264_intrapred: use newly introduced SPLAT* and PSHUFLW macros
x86inc: add SPLATB_LOAD, SPLATB_REG, PSHUFLW macros
x86inc: modify ALIGN to not generate long nops on i586
x86: h264_intrapred: port to cpuflag macros
avplay: update input filter pointer when the filtergraph is reset.
avconv: fix parsing of -force_key_frames option.
h264: use templates to avoid excessive inlining
xtea: Make the count parameter match the documentation
blowfish: Make the count parameter match the documentation
mpegvideo: Don't use ff_mspel_motion() for vc1
xtea: invert branch and loop precedence
blowfish: invert branch and loop precedence
flvdec: optionally trust the metadata
avconv: Set audio filter time base to the sample rate
vp8: Add ifdef guards around the sse2 loopfilter in the sse2slow branch too
Conflicts:
ffmpeg.c
ffplay.c
libavcodec/h264.c
libavcodec/mpegvideo_common.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/x86inc.asm | 4 | ||||
-rw-r--r-- | libavutil/x86/x86util.asm | 41 |
2 files changed, 41 insertions, 4 deletions
diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 971d210848..7d637a6353 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -604,6 +604,7 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits ; All subsequent functions (up to the next INIT_CPUFLAGS) is built for the specified cpu. ; You shouldn't need to invoke this macro directly, it's a subroutine for INIT_MMX &co. %macro INIT_CPUFLAGS 0-2 + CPU amdnop %if %0 >= 1 %xdefine cpuname %1 %assign cpuflags cpuflags_%1 @@ -625,6 +626,9 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits %elifidn %1, sse3 %define movu lddqu %endif + %if notcpuflag(mmx2) + CPU basicnop + %endif %else %xdefine SUFFIX %undef cpuname diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 34959f2c94..c5c72e3d4b 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -256,15 +256,26 @@ %define ABSB ABSB_MMX %define ABSB2 ABSB2_MMX -%macro SPLATB_MMX 3 +%macro SPLATB_LOAD 3 +%if cpuflag(ssse3) + movd %1, [%2-3] + pshufb %1, %3 +%else movd %1, [%2-3] ;to avoid crossing a cacheline punpcklbw %1, %1 SPLATW %1, %1, 3 +%endif %endmacro -%macro SPLATB_SSSE3 3 - movd %1, [%2-3] +%macro SPLATB_REG 3 +%if cpuflag(ssse3) + movd %1, %2d pshufb %1, %3 +%else + movd %1, %2d + punpcklbw %1, %1 + SPLATW %1, %1, 0 +%endif %endmacro %macro PALIGNR_MMX 4-5 ; [dst,] src1, src2, imm, tmp @@ -296,6 +307,14 @@ %endif %endmacro +%macro PSHUFLW 1+ + %if mmsize == 8 + pshufw %1 + %else + pshuflw %1 + %endif +%endmacro + %macro DEINTB 5 ; mask, reg1, mask, reg2, optional src to fill masks from %ifnum %5 pand m%3, m%5, m%4 ; src .. y6 .. y4 @@ -521,8 +540,22 @@ %if mmsize == 16 pshuflw %1, %2, (%3)*0x55 punpcklqdq %1, %1 -%else +%elif cpuflag(mmx2) pshufw %1, %2, (%3)*0x55 +%else + %ifnidn %1, %2 + mova %1, %2 + %endif + %if %3 & 2 + punpckhwd %1, %1 + %else + punpcklwd %1, %1 + %endif + %if %3 & 1 + punpckhwd %1, %1 + %else + punpcklwd %1, %1 + %endif %endif %endmacro |