[FFmpeg-cvslog] Revert "Merge commit 'ed1a11ed52bbd1f15bb9b0416d69b7924bee3191'"

Clément Bœsch git at videolan.org
Fri Nov 1 14:40:33 CET 2013


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Fri Nov  1 14:28:08 2013 +0100| [969329fe119a86556766ee0665dfcfb903221408] | committer: Clément Bœsch

Revert "Merge commit 'ed1a11ed52bbd1f15bb9b0416d69b7924bee3191'"

This reverts commit fc5fe4804fd2ee9a29de502e9431b12d027c0c89, reversing
changes made to ffe33500983983946048def3a6047920d97d957b.

The factoring is broken; it's not calling the ssse3 code anymore, and
calling the mmx2 code with bad alignment. It also broke some FATE
instances.

Conflicts:
	libavfilter/x86/vf_gradfun_init.c

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

 libavfilter/x86/vf_gradfun_init.c |   31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/libavfilter/x86/vf_gradfun_init.c b/libavfilter/x86/vf_gradfun_init.c
index 9987cfb..c638a05 100644
--- a/libavfilter/x86/vf_gradfun_init.c
+++ b/libavfilter/x86/vf_gradfun_init.c
@@ -41,13 +41,14 @@ void ff_gradfun_blur_line_movdqu_sse2(intptr_t x, uint16_t *buf,
                                       const uint8_t *src1, const uint8_t *src2);
 
 #if HAVE_YASM
-static void gradfun_filter_line(uint8_t *dst, const uint8_t *src, const uint16_t *dc,
-                                int width, int thresh, const uint16_t *dithers,
-                                int alignment)
+static void gradfun_filter_line_mmxext(uint8_t *dst, const uint8_t *src,
+                                       const uint16_t *dc,
+                                       int width, int thresh,
+                                       const uint16_t *dithers)
 {
     intptr_t x;
-    if (width & alignment) {
-        x = width & ~alignment;
+    if (width & 3) {
+        x = width & ~3;
         ff_gradfun_filter_line_c(dst + x, src + x, dc + x / 2,
                                  width - x, thresh, dithers);
         width = x;
@@ -57,19 +58,21 @@ static void gradfun_filter_line(uint8_t *dst, const uint8_t *src, const uint16_t
                                   thresh, dithers);
 }
 
-static void gradfun_filter_line_mmxext(uint8_t *dst, const uint8_t *src,
-                                       const uint16_t *dc,
-                                       int width, int thresh,
-                                       const uint16_t *dithers)
-{
-    gradfun_filter_line(dst, src, dc, width, thresh, dithers, 3);
-}
-
 static void gradfun_filter_line_ssse3(uint8_t *dst, const uint8_t *src, const uint16_t *dc,
                                       int width, int thresh,
                                       const uint16_t *dithers)
 {
-    gradfun_filter_line(dst, src, dc, width, thresh, dithers, 7);
+    intptr_t x;
+    if (width & 7) {
+        // could be 10% faster if I somehow eliminated this
+        x = width & ~7;
+        ff_gradfun_filter_line_c(dst + x, src + x, dc + x / 2,
+                                 width - x, thresh, dithers);
+        width = x;
+    }
+    x = -width;
+    ff_gradfun_filter_line_ssse3(x, dst + width, src + width, dc + width / 2,
+                                 thresh, dithers);
 }
 
 static void gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, const uint16_t *buf1,



More information about the ffmpeg-cvslog mailing list