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

Git pushed a commit to branch master
in repository ffmpeg.

commit c8fb970a9220f79f1e659309daba3a264da78253
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Jul 30 01:31:07 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sun Aug 2 02:19:04 2026 +0200

    avcodec/x86/huffyuvdsp: Remove ff_add_hfyu_median_prediction_mmxext
    
    Superseded by SSE4. This makes the huffyuv decoders ABI compliant,
    e.g. nothing messes up the FPU state at all any more. Therefore
    the emms_c() can be removed from huffyuvdec.c.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/huffyuvdec.c          |  3 --
 libavcodec/x86/huffyuvdsp.asm    | 66 ----------------------------------------
 libavcodec/x86/huffyuvdsp_init.c |  7 -----
 tests/checkasm/huffyuvdsp.c      |  2 +-
 4 files changed, 1 insertion(+), 77 deletions(-)

diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index c98904d497..6b96788ff3 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -43,7 +43,6 @@
 #include "huffyuvdsp.h"
 #include "lossless_videodsp.h"
 #include "thread.h"
-#include "libavutil/emms.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
 #include "libavutil/pixdesc.h"
@@ -887,7 +886,6 @@ static void draw_slice(HYuvDecContext *s, AVCodecContext 
*avctx, AVFrame *frame,
     offset[2] = frame->linesize[2] * cy;
     for (i = 3; i < AV_NUM_DATA_POINTERS; i++)
         offset[i] = 0;
-    emms_c();
 
     avctx->draw_horiz_band(avctx, frame, offset, y, 3, h);
 
@@ -1305,7 +1303,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *p,
         }
 
         ret = decode_slice(avctx, p, slice_height, slice_size, y_offset, 
table_size);
-        emms_c();
         if (ret < 0)
             return ret;
     }
diff --git a/libavcodec/x86/huffyuvdsp.asm b/libavcodec/x86/huffyuvdsp.asm
index e473f75c86..f6d1450d96 100644
--- a/libavcodec/x86/huffyuvdsp.asm
+++ b/libavcodec/x86/huffyuvdsp.asm
@@ -70,72 +70,6 @@ cglobal add_hfyu_left_pred_bgr32, 4,4,3, dst, src, w, left
     movd     [leftq], m0
     RET
 
-
-; void add_hfyu_median_prediction_mmxext(uint8_t *dst, const uint8_t *top, 
const uint8_t *diff, int mask, int w, int *left, int *left_top)
-INIT_MMX mmxext
-cglobal add_hfyu_median_pred_int16, 7,7,0, dst, top, diff, mask, w, left, 
left_top
-    add      wd, wd
-    movd    mm6, maskd
-    SPLATW  mm6, mm6
-    movq    mm0, [topq]
-    movq    mm2, mm0
-    movd    mm4, [left_topq]
-    psllq   mm2, 16
-    movq    mm1, mm0
-    por     mm4, mm2
-    movd    mm3, [leftq]
-    psubw   mm0, mm4 ; t-tl
-    add    dstq, wq
-    add    topq, wq
-    add   diffq, wq
-    neg      wq
-    jmp .skip
-.loop:
-    movq    mm4, [topq+wq]
-    movq    mm0, mm4
-    psllq   mm4, 16
-    por     mm4, mm1
-    movq    mm1, mm0 ; t
-    psubw   mm0, mm4 ; t-tl
-.skip:
-    movq    mm2, [diffq+wq]
-%assign i 0
-%rep 4
-    movq    mm4, mm0
-    paddw   mm4, mm3 ; t-tl+l
-    pand    mm4, mm6
-    movq    mm5, mm3
-    pmaxsw  mm3, mm1
-    pminsw  mm5, mm1
-    pminsw  mm3, mm4
-    pmaxsw  mm3, mm5 ; median
-    paddw   mm3, mm2 ; +residual
-    pand    mm3, mm6
-%if i==0
-    movq    mm7, mm3
-    psllq   mm7, 48
-%else
-    movq    mm4, mm3
-    psrlq   mm7, 16
-    psllq   mm4, 48
-    por     mm7, mm4
-%endif
-%if i<3
-    psrlq   mm0, 16
-    psrlq   mm1, 16
-    psrlq   mm2, 16
-%endif
-%assign i i+1
-%endrep
-    movq [dstq+wq], mm7
-    add      wq, 8
-    jl .loop
-    movzx   r2d, word [dstq-2]
-    mov [leftq], r2d
-    movzx   r2d, word [topq-2]
-    mov [left_topq], r2d
-    RET
-
 ; void ff_add_hfyu_median_pred_sse4(uint16_t *dst, const uint16_t *top,
 ;                                   const uint16_t *diff, int mask,
 ;                                   int w, int *left, int *left_top)
diff --git a/libavcodec/x86/huffyuvdsp_init.c b/libavcodec/x86/huffyuvdsp_init.c
index feca6a5a95..e650232960 100644
--- a/libavcodec/x86/huffyuvdsp_init.c
+++ b/libavcodec/x86/huffyuvdsp_init.c
@@ -21,7 +21,6 @@
 #include "config.h"
 #include "libavutil/attributes.h"
 #include "libavutil/cpu.h"
-#include "libavutil/pixdesc.h"
 #include "libavutil/x86/cpu.h"
 #include "libavcodec/huffyuvdsp.h"
 
@@ -30,18 +29,12 @@ void ff_add_int16_avx2(uint16_t *dst, const uint16_t *src, 
unsigned mask, int w)
 
 void ff_add_hfyu_left_pred_bgr32_sse2(uint8_t *dst, const uint8_t *src,
                                       intptr_t w, uint8_t *left);
-void ff_add_hfyu_median_pred_int16_mmxext(uint16_t *dst, const uint16_t *top, 
const uint16_t *diff, unsigned mask, int w, int *left, int *left_top);
 void ff_add_hfyu_median_pred_int16_sse4(uint16_t *dst, const uint16_t *top, 
const uint16_t *diff,
                                         unsigned mask, int w, int *left, int 
*left_top);
 
 av_cold void ff_huffyuvdsp_init_x86(HuffYUVDSPContext *c, enum AVPixelFormat 
pix_fmt)
 {
     int cpu_flags = av_get_cpu_flags();
-    const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(pix_fmt);
-
-    if (EXTERNAL_MMXEXT(cpu_flags) && pix_desc && pix_desc->comp[0].depth<16) {
-        c->add_hfyu_median_pred_int16 = ff_add_hfyu_median_pred_int16_mmxext;
-    }
 
     if (EXTERNAL_SSE2(cpu_flags)) {
         c->add_int16 = ff_add_int16_sse2;
diff --git a/tests/checkasm/huffyuvdsp.c b/tests/checkasm/huffyuvdsp.c
index 4be043e586..2ed80a3727 100644
--- a/tests/checkasm/huffyuvdsp.c
+++ b/tests/checkasm/huffyuvdsp.c
@@ -80,7 +80,7 @@ static void check_add_int16(HuffYUVDSPContext *c, unsigned 
mask, int width, cons
 
 static void check_add_hfyu_median_pred_int16(const HuffYUVDSPContext *c, 
unsigned mask, int width)
 {
-    declare_func_emms(AV_CPU_FLAG_MMXEXT, void, uint16_t *dst, const uint16_t 
*top,
+    declare_func(void, uint16_t *dst, const uint16_t *top,
                        const uint16_t *diff, unsigned mask,
                        int w, int *left, int *left_top);
 

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

Reply via email to