[FFmpeg-cvslog] pixelutils: Comment on (lack of) sad_8x8_sse2

Peter Cordes git at videolan.org
Wed Mar 4 22:13:27 CET 2015


ffmpeg | branch: master | Peter Cordes <peter at cordes.ca> | Thu Jan 29 17:20:27 2015 -0400| [9e5687adf20aff27cd4922d0f68f54c9622418bd] | committer: Michael Niedermayer

pixelutils: Comment on (lack of) sad_8x8_sse2

Signed-off-by: Peter Cordes <peter at cordes.ca>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e5687adf20aff27cd4922d0f68f54c9622418bd
---

 libavutil/x86/pixelutils_init.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavutil/x86/pixelutils_init.c b/libavutil/x86/pixelutils_init.c
index d600510..c24a533 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;



More information about the ffmpeg-cvslog mailing list