[vlc-commits] [Git][videolan/vlc][master] gradfun: purge MMXEXT

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Wed Jul 14 08:49:30 UTC 2021



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
b2dc6a56 by Lyndon Brown at 2021-07-13T20:24:17+00:00
gradfun: purge MMXEXT

- - - - -


2 changed files:

- modules/video_filter/gradfun.c
- modules/video_filter/gradfun.h


Changes:

=====================================
modules/video_filter/gradfun.c
=====================================
@@ -71,11 +71,6 @@ vlc_module_end()
  * Local prototypes
  *****************************************************************************/
 #define FFMAX(a,b) __MAX(a,b)
-#ifdef CAN_COMPILE_MMXEXT
-#   define HAVE_MMX2 1
-#else
-#   define HAVE_MMX2 0
-#endif
 #ifdef CAN_COMPILE_SSE2
 #   define HAVE_SSE2 1
 #else
@@ -145,11 +140,6 @@ static int Open(filter_t *filter)
     if (vlc_CPU_SSSE3())
         cfg->filter_line = filter_line_ssse3;
     else
-#endif
-#if HAVE_MMX2
-    if (vlc_CPU_MMXEXT())
-        cfg->filter_line = filter_line_mmx2;
-    else
 #endif
         cfg->filter_line = filter_line_c;
 


=====================================
modules/video_filter/gradfun.h
=====================================
@@ -77,56 +77,6 @@ static void blur_line_c(uint16_t *dc, uint16_t *buf, uint16_t *buf1,
     }
 }
 
-#if HAVE_MMX2
-VLC_MMX
-static void filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc,
-                             int width, int thresh, const uint16_t *dithers)
-{
-    intptr_t x;
-    if (width&3) {
-        x = width&~3;
-        filter_line_c(dst+x, src+x, dc+x/2, width-x, thresh, dithers);
-        width = x;
-    }
-    x = -width;
-    __asm__ volatile(
-        "movd          %4, %%mm5 \n"
-        "pxor       %%mm7, %%mm7 \n"
-        "pshufw $0, %%mm5, %%mm5 \n"
-        "movq          %6, %%mm6 \n"
-        "movq          %5, %%mm4 \n"
-        "1: \n"
-        "movd     (%2,%0), %%mm0 \n"
-        "movd     (%3,%0), %%mm1 \n"
-        "punpcklbw  %%mm7, %%mm0 \n"
-        "punpcklwd  %%mm1, %%mm1 \n"
-        "psllw         $7, %%mm0 \n"
-        "pxor       %%mm2, %%mm2 \n"
-        "psubw      %%mm0, %%mm1 \n" // delta = dc - pix
-        "psubw      %%mm1, %%mm2 \n"
-        "pmaxsw     %%mm1, %%mm2 \n"
-        "pmulhuw    %%mm5, %%mm2 \n" // m = abs(delta) * thresh >> 16
-        "psubw      %%mm6, %%mm2 \n"
-        "pminsw     %%mm7, %%mm2 \n" // m = -max(0, 127-m)
-        "pmullw     %%mm2, %%mm2 \n"
-        "paddw      %%mm4, %%mm0 \n" // pix += dither
-        "pmulhw     %%mm2, %%mm1 \n"
-        "psllw         $2, %%mm1 \n" // m = m*m*delta >> 14
-        "paddw      %%mm1, %%mm0 \n" // pix += m
-        "psraw         $7, %%mm0 \n"
-        "packuswb   %%mm0, %%mm0 \n"
-        "movd       %%mm0, (%1,%0) \n" // dst = clip(pix>>7)
-        "add           $4, %0 \n"
-        "jl 1b \n"
-        "emms \n"
-        :"+r"(x)
-        :"r"(dst+width), "r"(src+width), "r"(dc+width/2),
-         "rm"(thresh), "m"(*dithers), "m"(*pw_7f)
-        :"mm0", "mm1", "mm2", "mm4", "mm5", "mm6", "memory"
-    );
-}
-#endif
-
 #if HAVE_SSSE3
 VLC_SSE
 static void filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc,



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b2dc6a56857dd4e3e2b7486f47b2c7dd9a1c9139

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b2dc6a56857dd4e3e2b7486f47b2c7dd9a1c9139
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list