This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit d345e902d2ea8c013e8bcd31ffe4fa65d33910c9
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Feb 26 02:44:37 2026 +0100
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sun Mar 1 12:04:14 2026 +0100

    avcodec/x86/huffyuvencdsp: Remove MMX sub_hfyu_median_pred_int16
    
    Superseded by SSE2 and AVX2.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/huffyuvenc.c             |  2 --
 libavcodec/x86/huffyuvencdsp.asm    | 40 -------------------------------------
 libavcodec/x86/huffyuvencdsp_init.c |  6 ------
 tests/checkasm/huffyuvencdsp.c      |  4 ++--
 4 files changed, 2 insertions(+), 50 deletions(-)

diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index cd31e8f068..dd3ed9a996 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -39,7 +39,6 @@
 #include "huffyuvencdsp.h"
 #include "lossless_videoencdsp.h"
 #include "put_bits.h"
-#include "libavutil/emms.h"
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "libavutil/pixdesc.h"
@@ -940,7 +939,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
     } else {
         av_log(avctx, AV_LOG_ERROR, "Format not supported!\n");
     }
-    emms_c();
 
     size += (put_bits_count(&s->pb) + 31) / 8;
     put_bits(&s->pb, 16, 0);
diff --git a/libavcodec/x86/huffyuvencdsp.asm b/libavcodec/x86/huffyuvencdsp.asm
index 11f4b8c01f..e8e7a6469d 100644
--- a/libavcodec/x86/huffyuvencdsp.asm
+++ b/libavcodec/x86/huffyuvencdsp.asm
@@ -55,46 +55,6 @@ INIT_YMM avx2
 DIFF_INT16
 %endif
 
-INIT_MMX mmxext
-cglobal sub_hfyu_median_pred_int16, 7,7,0, dst, src1, src2, mask, w, left, 
left_top
-    add      wd, wd
-    movd    mm7, maskd
-    SPLATW  mm7, mm7
-    movq    mm0, [src1q]
-    movq    mm2, [src2q]
-    psllq   mm0, 16
-    psllq   mm2, 16
-    movd    mm6, [left_topq]
-    por     mm0, mm6
-    movd    mm6, [leftq]
-    por     mm2, mm6
-    xor     maskq, maskq
-.loop:
-    movq    mm1, [src1q + maskq]
-    movq    mm3, [src2q + maskq]
-    movq    mm4, mm2
-    psubw   mm2, mm0
-    paddw   mm2, mm1
-    pand    mm2, mm7
-    movq    mm5, mm4
-    pmaxsw  mm4, mm1
-    pminsw  mm1, mm5
-    pminsw  mm4, mm2
-    pmaxsw  mm4, mm1
-    psubw   mm3, mm4
-    pand    mm3, mm7
-    movq    [dstq + maskq], mm3
-    add     maskq, 8
-    movq    mm0, [src1q + maskq - 2]
-    movq    mm2, [src2q + maskq - 2]
-    cmp     maskq, wq
-        jb .loop
-    movzx maskd, word [src1q + wq - 2]
-    mov [left_topq], maskd
-    movzx maskd, word [src2q + wq - 2]
-    mov [leftq], maskd
-    RET
-
 %macro SUB_HFYU_MEDIAN_PRED_INT16 1 ; u,s for pmaxuw vs pmaxsw
 cglobal sub_hfyu_median_pred_int16, 7,7,6, dst, src1, src2, mask, w, left, 
left_top
     movd        xm5, maskd
diff --git a/libavcodec/x86/huffyuvencdsp_init.c 
b/libavcodec/x86/huffyuvencdsp_init.c
index 7289e94bc7..c46be95cb9 100644
--- a/libavcodec/x86/huffyuvencdsp_init.c
+++ b/libavcodec/x86/huffyuvencdsp_init.c
@@ -31,8 +31,6 @@ void ff_diff_int16_sse2(uint16_t *dst, const uint16_t *src1, 
const uint16_t *src
                         unsigned mask, int w);
 void ff_diff_int16_avx2(uint16_t *dst, const uint16_t *src1, const uint16_t 
*src2,
                         unsigned mask, int w);
-void ff_sub_hfyu_median_pred_int16_mmxext(uint16_t *dst, const uint16_t *src1, 
const uint16_t *src2,
-                                          unsigned mask, int w, int *left, int 
*left_top);
 void ff_sub_hfyu_median_pred_int16_sse2(uint16_t *dst, const uint16_t *src1, 
const uint16_t *src2,
                                         unsigned mask, int w, int *left, int 
*left_top);
 void ff_sub_hfyu_median_pred_int16_avx2(uint16_t *dst, const uint16_t *src1, 
const uint16_t *src2,
@@ -42,10 +40,6 @@ av_cold void ff_huffyuvencdsp_init_x86(HuffYUVEncDSPContext 
*c, int bpp, int wid
 {
     av_unused int cpu_flags = av_get_cpu_flags();
 
-    if (EXTERNAL_MMXEXT(cpu_flags) && bpp < 16) {
-        c->sub_hfyu_median_pred_int16 = ff_sub_hfyu_median_pred_int16_mmxext;
-    }
-
     if (EXTERNAL_SSE2(cpu_flags)) {
         c->diff_int16 = ff_diff_int16_sse2;
         if (bpp < 16 && width >= 8)
diff --git a/tests/checkasm/huffyuvencdsp.c b/tests/checkasm/huffyuvencdsp.c
index a74b4295d6..b5d02cda6d 100644
--- a/tests/checkasm/huffyuvencdsp.c
+++ b/tests/checkasm/huffyuvencdsp.c
@@ -42,8 +42,8 @@ static void check_sub_hfyu_median_pred_int16(const char 
*aligned, unsigned width
     static const int bpps[] = { 9, 16, };
     HuffYUVEncDSPContext c;
 
-    declare_func_emms(AV_CPU_FLAG_MMXEXT, void, uint16_t *dst, const uint16_t 
*src1,
-                      const uint16_t *src2, unsigned mask, int w, int *left, 
int *left_top);
+    declare_func(void, uint16_t *dst, const uint16_t *src1,
+                 const uint16_t *src2, unsigned mask, int w, int *left, int 
*left_top);
 
     for (size_t i = 0; i < FF_ARRAY_ELEMS(bpps); ++i) {
         const int bpp = bpps[i];

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to