Change #264922
| Category | ffmpeg |
| Changed by | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> |
| Changed at | Sat 18 Apr 2026 21:21:11 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | e1782fb0167654545b5177b6dabb7fdae7225de3 |
Comments
avutil/x86/pixelutils: Don't use mmx in 8x8 SAD This function is exported, so has to abide by the ABI and therefore issues emms since commit 5b85ca5317f28a73eadf10d604d2a7421b84bed8. Yet this is expensive and using SSE2 instead improves performance. Also avoid the initial zeroing and the last pointer increment while just at it. This removes the last usage of mmx from libavutil*. Old benchmarks: sad_8x8_0_c: 13.2 ( 1.00x) sad_8x8_0_mmxext: 27.8 ( 0.48x) sad_8x8_1_c: 13.2 ( 1.00x) sad_8x8_1_mmxext: 27.6 ( 0.48x) sad_8x8_2_c: 13.3 ( 1.00x) sad_8x8_2_mmxext: 27.6 ( 0.48x) New benchmarks: sad_8x8_0_c: 13.3 ( 1.00x) sad_8x8_0_sse2: 11.7 ( 1.13x) sad_8x8_1_c: 13.8 ( 1.00x) sad_8x8_1_sse2: 11.6 ( 1.20x) sad_8x8_2_c: 13.2 ( 1.00x) sad_8x8_2_sse2: 11.8 ( 1.12x) Hint: Using two psadbw or one psadbw and movhps made no difference in the benchmarks, so I chose the latter due to smaller codesize. *: except if lavu provides avpriv_emms for other libraries Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Changed files
- libavutil/x86/pixelutils.asm
- libavutil/x86/pixelutils.h