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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new e91727e7ef avcodec/x86/mpeg4videodsp: Fix build failure without x86asm
e91727e7ef is described below

commit e91727e7ef2888d186b4553f90873db42574842c
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Fri Mar 27 18:40:31 2026 +0100
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sat Mar 28 22:39:05 2026 +0100

    avcodec/x86/mpeg4videodsp: Fix build failure without x86asm
    
    Since ba793127c413ba27386cea4c23db021b1eaa8d56,
    the x86 mpeg4videodsp code uses ff_emulated_edge_mc_sse2()
    instead of ff_emulated_edge_mc_8. This leads to linker errors
    when x86asm is disabled. Fix this by also falling back to ff_gmc_c()
    in case edge emulation is needed with external SSE2 being unavailable.
    
    An alternative is to go back to ff_emulated_edge_mc_8(), but this
    would readd the uglyness to videodsp for a niche case.
    
    Reported-by: James Almer <[email protected]>
    Reviewed-by: Hendrik Leppkes <[email protected]>
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/x86/mpeg4videodsp.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/x86/mpeg4videodsp.c b/libavcodec/x86/mpeg4videodsp.c
index 47fd413da7..ea28bb1d3b 100644
--- a/libavcodec/x86/mpeg4videodsp.c
+++ b/libavcodec/x86/mpeg4videodsp.c
@@ -59,7 +59,6 @@ static void gmc_ssse3(uint8_t *dst, const uint8_t *src,
     const int dxys = dxy >> 4;
     const int dyxs = dyx >> 4;
     const int dyys = dyy2 >> 4;
-    uint8_t edge_buf[(MAX_H + 1) * EDGE_EMU_STRIDE];
 
     const int dxw = dxx2 * (w - 1);
     const int dyh = dyy2 * (h - 1);
@@ -73,7 +72,8 @@ static void gmc_ssse3(uint8_t *dst, const uint8_t *src,
         ((ox2 + dxw) | (ox2 + dxh) | (ox2 + dxw + dxh) |
          (oy2 + dyw) | (oy2 + dyh) | (oy2 + dyw + dyh)) >> (16 + shift) ||
         // uses more than 16 bits of subpel mv (only at huge resolution)
-        (dxx | dxy | dyx | dyy) & 15) {
+        (dxx | dxy | dyx | dyy) & 15 ||
+        (!HAVE_SSE2_EXTERNAL && need_emu)) {
         ff_gmc_c(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy,
                  shift, r, width, height);
         return;
@@ -82,12 +82,15 @@ static void gmc_ssse3(uint8_t *dst, const uint8_t *src,
     src += ix + iy * stride;
     const ptrdiff_t dst_stride = stride;
     ptrdiff_t src_stride = stride;
+#if HAVE_SSE2_EXTERNAL
+    uint8_t edge_buf[(MAX_H + 1) * EDGE_EMU_STRIDE];
     if (need_emu) {
         ff_emulated_edge_mc_sse2(edge_buf, src, EDGE_EMU_STRIDE, src_stride,
                                  w + 1, h + 1, ix, iy, width, height);
         src        = edge_buf;
         src_stride = EDGE_EMU_STRIDE;
     }
+#endif
 
 #if ARCH_X86_32
     xmm_u16 dxy8, dyy8, r8;

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

Reply via email to