From 78a61a42fd3ed228198231367183861d8add3f52 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Thu, 3 Apr 2025 21:07:43 +0200
Subject: [PATCH 15/23] avcodec/x86/hevcdsp: Move macro to dsp_init.c

It belongs to the [EQ]PEL_LINKS macros.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/x86/hevc/dsp_init.c | 7 +++++++
 libavcodec/x86/hevcdsp.h       | 9 ---------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/libavcodec/x86/hevc/dsp_init.c b/libavcodec/x86/hevc/dsp_init.c
index ad7b80d46e..16ea62dd00 100644
--- a/libavcodec/x86/hevc/dsp_init.c
+++ b/libavcodec/x86/hevc/dsp_init.c
@@ -783,6 +783,13 @@ SAO_EDGE_FILTER_FUNCS(12, avx2)
     c->sao_edge_filter[4]      = ff_hevc_sao_edge_filter_64_##bitd##_##opt; \
 } while (0)
 
+#define PEL_LINK(dst, idx1, idx2, idx3, name, D, opt) \
+dst          [idx1][idx2][idx3] = hevc_put_       ## name ## _ ## D ## _##opt; \
+dst ## _bi   [idx1][idx2][idx3] = ff_hevc_put_bi_ ## name ## _ ## D ## _##opt; \
+dst ## _uni  [idx1][idx2][idx3] = hevc_put_uni_   ## name ## _ ## D ## _##opt; \
+dst ## _uni_w[idx1][idx2][idx3] = hevc_put_uni_w_ ## name ## _ ## D ## _##opt; \
+dst ## _bi_w [idx1][idx2][idx3] = hevc_put_bi_w_  ## name ## _ ## D ## _##opt
+
 #define EPEL_LINKS(pointer, my, mx, fname, bitd, opt )           \
         PEL_LINK(pointer, 1, my , mx , fname##4 ,  bitd, opt ); \
         PEL_LINK(pointer, 2, my , mx , fname##6 ,  bitd, opt ); \
diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h
index b18d9449d7..f8352750e4 100644
--- a/libavcodec/x86/hevcdsp.h
+++ b/libavcodec/x86/hevcdsp.h
@@ -28,15 +28,6 @@
 #include <stddef.h>
 #include <stdint.h>
 
-
-#define PEL_LINK(dst, idx1, idx2, idx3, name, D, opt) \
-dst[idx1][idx2][idx3] = hevc_put_ ## name ## _ ## D ## _##opt;      \
-dst ## _bi[idx1][idx2][idx3] = ff_hevc_put_bi_ ## name ## _ ## D ## _##opt;      \
-dst ## _uni[idx1][idx2][idx3] = hevc_put_uni_ ## name ## _ ## D ## _##opt;      \
-dst ## _uni_w[idx1][idx2][idx3] = hevc_put_uni_w_ ## name ## _ ## D ## _##opt;      \
-dst ## _bi_w[idx1][idx2][idx3] = hevc_put_bi_w_ ## name ## _ ## D ## _##opt
-
-
 typedef void bi_pel_func(uint8_t *_dst, ptrdiff_t _dststride,
                          const uint8_t *_src, ptrdiff_t _srcstride, const int16_t *src2,
                          int height, intptr_t mx, intptr_t my, int width);
-- 
2.45.2