From 3bd34fb8ba97062b1cc1a14bee403e40fb088631 Mon Sep 17 00:00:00 2001
From: Kieran Kunhya <kierank@obe.tv>
Date: Sat, 2 Mar 2024 21:33:57 +0000
Subject: [PATCH] libavcodec/vp9dsp: Convert vp9_vert_8x8_8bpp_mmx to sse2

---
 libavcodec/x86/vp9dsp_init.c    | 4 ++--
 libavcodec/x86/vp9intrapred.asm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/x86/vp9dsp_init.c b/libavcodec/x86/vp9dsp_init.c
index 8d11dbc..8b09f3c 100644
--- a/libavcodec/x86/vp9dsp_init.c
+++ b/libavcodec/x86/vp9dsp_init.c
@@ -149,7 +149,7 @@ lpf_funcs(88, 16, avx);
 void ff_vp9_ipred_##type##_##size##x##size##_##opt(uint8_t *dst, ptrdiff_t stride, \
                                                    const uint8_t *l, const uint8_t *a)
 
-ipred_func(8, v, mmx);
+ipred_func(8, v, sse2);
 
 #define ipred_dc_funcs(size, opt) \
 ipred_func(size, dc, opt); \
@@ -278,7 +278,6 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp, int bitexact)
             dsp->itxfm_add[4 /* lossless */][DCT_ADST] =
             dsp->itxfm_add[4 /* lossless */][ADST_ADST] = ff_vp9_iwht_iwht_4x4_add_mmx;
         }
-        init_ipred(8, mmx, v, VERT);
     }
 
     if (EXTERNAL_MMXEXT(cpu_flags)) {
@@ -332,6 +331,7 @@ av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp, int bitexact)
         init_dir_tm_h_ipred(16, sse2);
         init_dir_tm_h_ipred(32, sse2);
         init_ipred(4, sse2, h, HOR);
+        init_ipred(8, sse2, v, VERT);
     }
 
     if (EXTERNAL_SSSE3(cpu_flags)) {
diff --git a/libavcodec/x86/vp9intrapred.asm b/libavcodec/x86/vp9intrapred.asm
index 31f7d44..12f7f44 100644
--- a/libavcodec/x86/vp9intrapred.asm
+++ b/libavcodec/x86/vp9intrapred.asm
@@ -433,7 +433,7 @@ DC_1D_AVX2_FUNCS left, l
 
 ; v
 
-INIT_MMX mmx
+INIT_XMM sse2
 cglobal vp9_ipred_v_8x8, 4, 4, 0, dst, stride, l, a
     movq                    m0, [aq]
     DEFINE_ARGS dst, stride, stride3
-- 
1.9.1

