From 0db381ca5a9038a4dbd25a7192c81ca94bef067b Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Mon, 31 Mar 2025 19:49:32 +0200
Subject: [PATCH 08/12] avcodec/x86/h26x/h265dsp: Remove unused functions

The ff_h2656_put_{uni_,}8tap_hv{32,64,128}_8_avx2
and ff_h2656_put_{uni_,}4tap_hv{64,128}_8_avx2
functions were unused and have been removed.
This saved 3712B of .text here.

(ff_h2656_put_{uni_,}4tap_hv32_8_avx2 are now only
called from exactly one callsite (in
ff_hevc_put_{uni_,}epel_hv32_8_avx2) and could be inlined.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/x86/h26x/h2656_inter.asm |  1 -
 libavcodec/x86/h26x/h2656dsp.c      | 13 ++++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/libavcodec/x86/h26x/h2656_inter.asm b/libavcodec/x86/h26x/h2656_inter.asm
index cbba0c1ea5..49a95d58fb 100644
--- a/libavcodec/x86/h26x/h2656_inter.asm
+++ b/libavcodec/x86/h26x/h2656_inter.asm
@@ -1126,7 +1126,6 @@ H2656PUT_8TAP 32,  8
 H2656PUT_8TAP 16, 10
 H2656PUT_8TAP 16, 12
 
-H2656PUT_8TAP_HV 32, 8
 H2656PUT_8TAP_HV 16, 10
 H2656PUT_8TAP_HV 16, 12
 
diff --git a/libavcodec/x86/h26x/h2656dsp.c b/libavcodec/x86/h26x/h2656dsp.c
index c402f9e21c..1d8ec1898d 100644
--- a/libavcodec/x86/h26x/h2656dsp.c
+++ b/libavcodec/x86/h26x/h2656dsp.c
@@ -80,9 +80,7 @@ mc_rep_funcs(8tap_hv, 8, 8, 16, sse4)
 
 #if HAVE_AVX2_EXTERNAL
 
-#define MC_REP_FUNCS_AVX2(fname)               \
-    mc_rep_funcs(fname, 8, 32, 64, avx2)       \
-    mc_rep_funcs(fname, 8, 32,128, avx2)       \
+#define MC_REP_FUNCS_AVX2_NO8(fname)           \
     mc_rep_funcs(fname,10, 16, 32, avx2)       \
     mc_rep_funcs(fname,10, 16, 64, avx2)       \
     mc_rep_funcs(fname,10, 16,128, avx2)       \
@@ -90,12 +88,17 @@ mc_rep_funcs(8tap_hv, 8, 8, 16, sse4)
     mc_rep_funcs(fname,12, 16, 64, avx2)       \
     mc_rep_funcs(fname,12, 16,128, avx2)       \
 
+#define MC_REP_FUNCS_AVX2(fname)               \
+    mc_rep_funcs(fname, 8, 32, 64, avx2)       \
+    mc_rep_funcs(fname, 8, 32,128, avx2)       \
+    MC_REP_FUNCS_AVX2_NO8(fname)
+
 MC_REP_FUNCS_AVX2(pixels)
 MC_REP_FUNCS_AVX2(8tap_h)
 MC_REP_FUNCS_AVX2(8tap_v)
-MC_REP_FUNCS_AVX2(8tap_hv)
+MC_REP_FUNCS_AVX2_NO8(8tap_hv)
 MC_REP_FUNCS_AVX2(4tap_h)
 MC_REP_FUNCS_AVX2(4tap_v)
-MC_REP_FUNCS_AVX2(4tap_hv)
+MC_REP_FUNCS_AVX2_NO8(4tap_hv)
 #endif
 #endif
-- 
2.45.2