summaryrefslogtreecommitdiff
path: root/libavutil/x86
Commit message (Collapse)AuthorAge
* avutil/x86inc: fix warnings when assembling with Nasm 2.15Henrik Gramner2020-07-12
| | | | | | | | | Some new warnings regarding use of empty macro parameters has been added, so adjust some x86inc code to silence those. Fixes part of ticket #8771 Signed-off-by: James Almer <jamrial@gmail.com>
* libavutil: x86: Include stdlib.h before using _byteswap_ulongMartin Storsjö2020-01-23
| | | | | | | When clang works in MSVC mode, it does have the _byteswap_ulong builtin, but one has to include stdlib.h before using it. Signed-off-by: Martin Storsjö <martin@martin.st>
* x86/float_dsp: add ff_vector_dmul_{sse2,avx}James Almer2018-09-14
| | | | | | ~3x to 5x faster. Signed-off-by: James Almer <jamrial@gmail.com>
* x86/pixelutils: don't use the AVX2 functions on CPUs known to be slow with themJames Almer2018-07-31
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* x86/pixelutils: add missing preprocessor wrapper to the AVX2 functionsJames Almer2018-07-31
| | | | | | Should fix compilation with old yasm/nasm Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixelutils: sad_32x32 sse2/avx2 optimizations.Jun Zhao2018-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | add ff_pixelutils_sad_32x32_sse2, ff_pixelutils_sad_{a,u}_32x32_sse2, ff_pixelutils_sad_32x32_avx22, ff_pixelutils_sad_{a,u}_32x32_avx2 use perf record/report profiling, get instructions:u for avx2 sad_32x32: 72.05% pixelutils pixelutils [.] block_sad_32x32_c 18.50% pixelutils pixelutils [.] block_sad_16x16_c 4.78% pixelutils pixelutils [.] block_sad_8x8_c 2.69% pixelutils pixelutils [.] block_sad_4x4_c 0.89% pixelutils pixelutils [.] block_sad_2x2_c 0.16% pixelutils pixelutils [.] ff_pixelutils_sad_32x32_avx2 0.16% pixelutils pixelutils [.] ff_pixelutils_sad_u_32x32_avx2 0.12% pixelutils pixelutils [.] ff_pixelutils_sad_a_32x32_avx2 sse2 sad_32x32 instructions:u like: 71.86% pixelutils pixelutils [.] block_sad_32x32_c 18.42% pixelutils pixelutils [.] block_sad_16x16_c 4.81% pixelutils pixelutils [.] block_sad_8x8_c 2.68% pixelutils pixelutils [.] block_sad_4x4_c 0.88% pixelutils pixelutils [.] block_sad_2x2_c 0.29% pixelutils pixelutils [.] ff_pixelutils_sad_32x32_sse2 0.26% pixelutils pixelutils [.] ff_pixelutils_sad_u_32x32_sse2 0.23% pixelutils pixelutils [.] ff_pixelutils_sad_a_32x32_sse2 Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavu/x86/cpu: Fix aesni detectionalexander schmid2018-07-19
|
* avutil/pixelutils: correct the function name in commentsJun Zhao2018-07-11
| | | | Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* Merge commit '4cf84e254ae75b524e1cacae499a97d7cc9e5906'James Almer2018-02-11
|\ | | | | | | | | | | | | * commit '4cf84e254ae75b524e1cacae499a97d7cc9e5906': Drop some unnecessary config.h #includes Merged-by: James Almer <jamrial@gmail.com>
| * Drop some unnecessary config.h #includesDiego Biurrun2018-02-06
| |
| * cpu: split flag checks per arch in av_cpu_max_align()James Almer2017-10-09
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | x86inc: Drop cpuflags_slowctzHenrik Gramner2018-01-20
| |
* | x86inc: Correctly set mmreg variablesHenrik Gramner2018-01-20
| |
* | x86inc: Support creating global symbols from local labelsHenrik Gramner2018-01-20
| | | | | | | | | | On ELF platforms such symbols needs to be flagged as functions with the correct visibility to please certain linkers in some scenarios.
* | x86inc: Use .rdata instead of .rodata on WindowsHenrik Gramner2018-01-20
| | | | | | | | | | The standard section for read-only data on Windows is .rdata. Nasm will flag non-standard sections as executable by default which isn't ideal.
* | x86inc: Enable AVX emulation for floating-point pseudo-instructionsHenrik Gramner2018-01-20
| | | | | | | | | | | | | | There are 32 pseudo-instructions for each floating-point comparison instruction, but only 8 of them are actually valid in legacy-encoded mode. The remaining 24 requires the use of VEX-encoded (v-prefixed) instructions and can therefore be disregarded for this purpose.
* | x86inc: set the correct amount of simd regs in x86_64 when avx512 is enabled ↵James Almer2017-12-24
| | | | | | | | | | | | | | | | | | but not used Fixes compilation of libavresample/x86/audio_mix.asm Reviewed-by: Gramner Signed-off-by: James Almer <jamrial@gmail.com>
* | x86inc: AVX-512 supportHenrik Gramner2017-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AVX-512 consists of a plethora of different extensions, but in order to keep things a bit more manageable we group together the following extensions under a single baseline cpu flag which should cover SKL-X and future CPUs: * AVX-512 Foundation (F) * AVX-512 Conflict Detection Instructions (CD) * AVX-512 Byte and Word Instructions (BW) * AVX-512 Doubleword and Quadword Instructions (DQ) * AVX-512 Vector Length Extensions (VL) On x86-64 AVX-512 provides 16 additional vector registers, prefer using those over existing ones since it allows us to avoid using `vzeroupper` unless more than 16 vector registers are required. They also happen to be volatile on Windows which means that we don't need to save and restore existing xmm register contents unless more than 22 vector registers are required. Big thanks to Intel for their support.
* | avutil: add alignment needed for AVX-512James Darnley2017-12-24
| |
* | avutil: detect when AVX-512 is availableJames Darnley2017-12-24
| |
* | avutil: add AVX-512 flagsJames Darnley2017-12-24
| |
* | avutil/x86util : add macro for loading a 128 bits constants in an xmm or in ↵Martin Vignali2017-12-02
| | | | | | | | each part of an ymm in order to simplify avx2 asm func
* | Don't use _tzcnt instrinics with clang for windows w/o BMI.Dale Curtis2017-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Technically _tzcnt* intrinsics are only available when the BMI instruction set is present. However the instruction encoding degrades to "rep bsf" on older processors. Clang for Windows debatably restricts the _tzcnt* instrinics behind the __BMI__ architecture define, so check for its presence or exclude the usage of these intrinics when clang is present. See also: https://ffmpeg.org/pipermail/ffmpeg-devel/2015-November/183404.html https://bugs.llvm.org/show_bug.cgi?id=30506 http://lists.llvm.org/pipermail/cfe-dev/2016-October/051034.html Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Matt Oliver <protogonoi@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '994c4bc10751e39c7ed9f67ffd0c0dea5223daf2'James Almer2017-10-21
|\| | | | | | | | | | | | | | | | | * commit '994c4bc10751e39c7ed9f67ffd0c0dea5223daf2': x86util: Port all macros to cpuflags See d5f8a642f6eb1c6e305c41dabddd0fd36ffb3f77 Merged-by: James Almer <jamrial@gmail.com>
| * x86util: Port all macros to cpuflagsDiego Biurrun2017-03-14
| | | | | | | | | | | | Also do some small cosmetic changes: Drop pointless _MMX suffix from ABSD2 macro name, drop pointless check for MMX support, we always assume MMX is available in our SIMD code, fix spelling.
| * build: Generalize yasm/nasm-related variable namesDiego Biurrun2017-03-01
| | | | | | | | None of them are specific to the YASM assembler.
* | avutil/cpu: split flag checks per arch in av_cpu_max_align()James Almer2017-09-27
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '7abdd026df6a9a52d07d8174505b33cc89db7bf6'James Almer2017-09-26
|\| | | | | | | | | | | | | * commit '7abdd026df6a9a52d07d8174505b33cc89db7bf6': asm: Consistently uppercase SECTION markers Merged-by: James Almer <jamrial@gmail.com>
| * asm: Consistently uppercase SECTION markersDiego Biurrun2017-02-03
| |
| * x86inc: Avoid using eax/rax for storing the stack pointerHenrik Gramner2017-01-09
| | | | | | | | | | | | | | | | | | | | | | When allocating stack space with an alignment requirement that is larger than the current stack alignment we need to store a copy of the original stack pointer in order to be able to restore it later. If we chose to use another register for this purpose we should not pick eax/rax since it can be overwritten as a return value. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Add macros to x86util.asm .Ivan Kalvachev2017-08-18
| | | | | | | | | | | | | | | | | | Improved version of VBROADCASTSS that works like the avx2 instruction. Emulation of vpbroadcastd. Horizontal sum HSUMPS that places the result in all elements. Emulation of blendvps and pblendvb. Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
* | x86inc: don't use read-only data sections on COFF targetsJames Almer2017-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Yasm: src/libavfilter/x86/af_volume.asm:24: warning: Standard COFF does not support read-only data sections src/libavfilter/x86/af_volume.asm:24: warning: Unrecognized qualifier `align' Nasm: src/libavfilter/x86/af_volume.asm:24: error: standard COFF does not support section alignment specification src/libavutil/x86/x86inc.asm:92: ... from macro `SECTION_RODATA' defined here Tested-by: Clément Bœsch <u@pkh.me> Signed-off-by: James Almer <jamrial@gmail.com>
* | build: Generalize yasm/nasm-related variable namesDiego Biurrun2017-06-21
| | | | | | | | | | | | | | | | None of them are specific to the YASM assembler. (Cherry-picked from libav commit 39e208f4d4756367c7cd2d581847e0c1b8a429c1) Signed-off-by: James Almer <jamrial@gmail.com>
* | x86/aacpsdsp: add ff_ps_hybrid_synthesis_deint_{sse,sse4}James Almer2017-06-18
| | | | | | | | About 2x faster than the c version.
* | x86inc: Add some additional cpuflag relationsHenrik Gramner2017-06-12
| | | | | | | | | | | | | | | | Simplifies writing assembly code that depends on available instructions. LZCNT implies SSE2 BMI1 implies AVX+LZCNT AVX2 implies BMI2
* | x86inc: Remove argument from WIN64_RESTORE_XMMAnton Mitrofanov2017-06-09
| | | | | | | | | | The use of rsp was pretty much hardcoded there and probably didn't work otherwise with stack_size > 0.
* | x86inc: Prefer r14/r15 over r12/r13 on x86-64Henrik Gramner2017-06-09
| | | | | | | | | | | | | | Due to a peculiarity in the ModR/M addressing encoding, the r12 and r13 registers sometimes requires an additional byte when used as a base register. r14 and r15 doesn't have that issue, so prefer using them.
* | x86inc: Make REP_RET identical to RET in SSSE3+ functionsHenrik Gramner2017-06-09
| | | | | | | | There's no point in emitting a rep prefix before ret on modern CPUs.
* | x86inc: Fix call with memory operandsHenrik Gramner2017-06-09
| | | | | | | | | | | | We overload the `call` instruction with a macro, but it would misbehave when the macro argument wasn't a valid identifier. Fix it by explicitly checking if the argument is an identifier.
* | x86/float_dsp: remove usage of integer instructionsJames Almer2017-05-12
| |
* | x86/float_dsp: add ff_vector_fmul_reverse_avx2James Almer2017-04-11
| | | | | | | | | | | | ~20% faster than AVX. Signed-off-by: James Almer <jamrial@gmail.com>
* | x86/float_dsp: add ff_vector_dmac_scalar_{sse2,avx,fma3}James Almer2017-04-10
| |
* | Merge commit '99434f4df81b6801b2b535d5b9143305595784f6'Clément Bœsch2017-03-30
|\| | | | | | | | | | | | | * commit '99434f4df81b6801b2b535d5b9143305595784f6': float_dsp: Have implementation match function pointer prototype Merged-by: Clément Bœsch <cboesch@gopro.com>
| * float_dsp: Have implementation match function pointer prototypeDiego Biurrun2016-11-03
| | | | | | | | | | libavutil/x86/float_dsp_init.c(144) : warning C4028: formal parameter 1 different from declaration libavutil/x86/float_dsp_init.c(144) : warning C4028: formal parameter 2 different from declaration
* | Merge commit '7911186ed616ae81dd8617d6d0e8b08c818db9d8'James Almer2017-03-23
|\| | | | | | | | | | | | | * commit '7911186ed616ae81dd8617d6d0e8b08c818db9d8': emms: Give apriv_emms_yasm() a more general name Merged-by: James Almer <jamrial@gmail.com>
| * emms: Give apriv_emms_yasm() a more general nameDiego Biurrun2016-10-18
| |
* | Merge commit '6be7944ee2ec2f045e6eb9a93237e992c8b20ac4'James Almer2017-03-23
|\| | | | | | | | | | | | | * commit '6be7944ee2ec2f045e6eb9a93237e992c8b20ac4': x86: Add missing colons after assembly labels Merged-by: James Almer <jamrial@gmail.com>
| * x86: Add missing colons after assembly labelsDiego Biurrun2016-10-17
| | | | | | | | | | This fixes many warnings of the sort warning: label alone on a line without a colon might be in error
* | avutil/x86util: don't use movss in VBROADCASTSS macro when src and dst args ↵James Almer2017-03-21
| | | | | | | | | | | | | | are the same Reviewed-by: Henrik Gramner <henrik@gramner.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '07e1f99a1bb41d1a615676140eefc85cf69fa793'Clément Bœsch2017-03-20
|\| | | | | | | | | | | | | * commit '07e1f99a1bb41d1a615676140eefc85cf69fa793': x86util: Document SBUTTERFLY macro Merged-by: Clément Bœsch <u@pkh.me>