aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/x86/pixelutils_init.c
diff options
context:
space:
mode:
authorPeter Cordes <peter@cordes.ca>2015-01-29 17:20:27 -0400
committerMichael Niedermayer <michaelni@gmx.at>2015-03-04 21:58:53 +0100
commit9e5687adf20aff27cd4922d0f68f54c9622418bd (patch)
tree2c9ee22abb6200397dc834cc12613e4875fb40f4 /libavutil/x86/pixelutils_init.c
parent4da3a14f3ca4428ac4606b971d990202b7dce1a9 (diff)
downloadffmpeg-9e5687adf20aff27cd4922d0f68f54c9622418bd.tar.gz
pixelutils: Comment on (lack of) sad_8x8_sse2
Signed-off-by: Peter Cordes <peter@cordes.ca>
Diffstat (limited to 'libavutil/x86/pixelutils_init.c')
-rw-r--r--libavutil/x86/pixelutils_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/x86/pixelutils_init.c b/libavutil/x86/pixelutils_init.c
index d60051067a..c24a533aea 100644
--- a/libavutil/x86/pixelutils_init.c
+++ b/libavutil/x86/pixelutils_init.c
@@ -43,6 +43,12 @@ void ff_pixelutils_sad_init_x86(av_pixelutils_sad_fn *sad, int aligned)
sad[2] = ff_pixelutils_sad_8x8_mmx;
}
+ // The best way to use SSE2 would be to do 2 SADs in parallel,
+ // but we'd have to modify the pixelutils API to return SIMD functions.
+
+ // It's probably not faster to shuffle data around
+ // to get two lines of 8 pixels into a single 16byte register,
+ // so just use the MMX 8x8 version even when SSE2 is available.
if (EXTERNAL_MMXEXT(cpu_flags)) {
sad[2] = ff_pixelutils_sad_8x8_mmxext;
sad[3] = ff_pixelutils_sad_16x16_mmxext;