aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/x86/intreadwrite.h
Commit message (Collapse)AuthorAgeFilesLines
* x86/intreadwrite: add SSE2 optimized AV_COPY128UJames Almer2024-07-291-0/+7
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* x86/intreadwrite: add missing casts to pointer argumentsJames Almer2024-07-111-11/+4
| | | | | | | | | | | Should make strict compilers happy. Also, make AV_COPY128 use integer operations while at it. Removing the inclusion of immintrin.h ensures a lot less intrinsic related headers are included as well, which fixes a clash of defines with some Clang versions. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: James Almer <jamrial@gmail.com>
* x86/intreadwrite: fix include of config.hJames Almer2024-07-101-1/+1
| | | | | | Should fix make checkheaders. Signed-off-by: James Almer <jamrial@gmail.com>
* x86/intreadwrite.h: add missing preprocessor checksJames Almer2024-07-101-6/+6
| | | | | | | | Removed by accident in the previous commits. This makes the code only run when compiled with GCC and Clang like before. Support for other compilers like msvc can be added later. Signed-off-by: James Almer <jamrial@gmail.com>
* x86/intreadwrite: use intrinsics instead of inline asm for AV_COPY128James Almer2024-07-101-13/+7
| | | | | | | This has the benefit of removing any SSE -> AVX penalty that may happen when the compiler emits VEX encoded instructions. Signed-off-by: James Almer <jamrial@gmail.com>
* x86/intreadwrite: use intrinsics instead of inline asm for AV_ZERO128James Almer2024-07-101-8/+7
| | | | | | | | | | | | | When called inside a loop, the inline asm version results in one pxor unnecessarely emitted per iteration, as the contents of the __asm__() block are opaque to the compiler's instruction scheduler. This is not the case with intrinsics, where pxor will be emitted once with any half decent compiler. This also has the benefit of removing any SSE -> AVX penalty that may happen when the compiler emits VEX encoded instructions. Signed-off-by: James Almer <jamrial@gmail.com>
* x86: Remove inline MMX assembly that clobbers the FPU stateMartin Storsjö2024-02-091-36/+0
| | | | | | | | | | | | | | | | | | | | | | These inline implementations of AV_COPY64, AV_SWAP64 and AV_ZERO64 are known to clobber the FPU state - which has to be restored with the 'emms' instruction afterwards. This was known and signaled with the FF_COPY_SWAP_ZERO_USES_MMX define, which calling code seems to have been supposed to check, in order to call emms_c() after using them. See 0b1972d4096df5879038f0af776f87f41e90ebd4, 29c4c0886d143790fcbeddbe40a23dfc6f56345c and df215e575850e41b19aeb1fd99e53372a6b3d537 for history on earlier fixes in the same area. However, new code can use these AV_*64() macros without knowing about the need to call emms_c(). Just get rid of these dangerous inline assembly snippets; this doesn't make any difference for 64 bit architectures anyway. Signed-off-by: Martin Storsjö <martin@martin.st>
* avutil/x86/intreadwrite: Add ability to detect whether MMX code is usedAndreas Rheinhardt2022-09-111-0/+2
| | | | | | It can be used to call emms_c() only when needed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Replace many includes of libavutil/common.h with what is actually neededMåns Rullgård2010-03-091-1/+1
| | | | | | | This reduces the number of false dependencies on header files and speeds up compilation. Originally committed as revision 22407 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add lots of missing includesMåns Rullgård2010-03-081-0/+1
| | | | Originally committed as revision 22337 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add macros for 64- and 128-bit write-combining optimization to intreadwrite.h.Alexander Strange2010-01-181-0/+96
Add x86 implementation using MMX/SSE. Originally committed as revision 21281 to svn://svn.ffmpeg.org/ffmpeg/trunk