[FFmpeg-devel] [PATCH 32/41] avcodec/x86/h264_qpel: Make functions only used here static

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri Jun 10 02:55:14 EEST 2022


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/x86/h264_qpel.c | 44 ++++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 23 deletions(-)

diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
index dda50ded89..fd1070247b 100644
--- a/libavcodec/x86/h264_qpel.c
+++ b/libavcodec/x86/h264_qpel.c
@@ -409,13 +409,11 @@ H264_MC_816(H264_MC_HV, ssse3)
 void ff_ ## OP ## _h264_qpel ## NUM ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT \
     (uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
 
-#define LUMA_MC_ALL(DEPTH, TYPE, OPT) \
+#define LUMA_MC_48(DEPTH, TYPE, OPT) \
     LUMA_MC_OP(put,  4, DEPTH, TYPE, OPT) \
     LUMA_MC_OP(avg,  4, DEPTH, TYPE, OPT) \
     LUMA_MC_OP(put,  8, DEPTH, TYPE, OPT) \
-    LUMA_MC_OP(avg,  8, DEPTH, TYPE, OPT) \
-    LUMA_MC_OP(put, 16, DEPTH, TYPE, OPT) \
-    LUMA_MC_OP(avg, 16, DEPTH, TYPE, OPT)
+    LUMA_MC_OP(avg,  8, DEPTH, TYPE, OPT)
 
 #define LUMA_MC_816(DEPTH, TYPE, OPT) \
     LUMA_MC_OP(put,  8, DEPTH, TYPE, OPT) \
@@ -423,22 +421,22 @@ void ff_ ## OP ## _h264_qpel ## NUM ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT \
     LUMA_MC_OP(put, 16, DEPTH, TYPE, OPT) \
     LUMA_MC_OP(avg, 16, DEPTH, TYPE, OPT)
 
-LUMA_MC_ALL(10, mc00, mmxext)
-LUMA_MC_ALL(10, mc10, mmxext)
-LUMA_MC_ALL(10, mc20, mmxext)
-LUMA_MC_ALL(10, mc30, mmxext)
-LUMA_MC_ALL(10, mc01, mmxext)
-LUMA_MC_ALL(10, mc11, mmxext)
-LUMA_MC_ALL(10, mc21, mmxext)
-LUMA_MC_ALL(10, mc31, mmxext)
-LUMA_MC_ALL(10, mc02, mmxext)
-LUMA_MC_ALL(10, mc12, mmxext)
-LUMA_MC_ALL(10, mc22, mmxext)
-LUMA_MC_ALL(10, mc32, mmxext)
-LUMA_MC_ALL(10, mc03, mmxext)
-LUMA_MC_ALL(10, mc13, mmxext)
-LUMA_MC_ALL(10, mc23, mmxext)
-LUMA_MC_ALL(10, mc33, mmxext)
+LUMA_MC_48(10, mc00, mmxext)
+LUMA_MC_48(10, mc10, mmxext)
+LUMA_MC_48(10, mc20, mmxext)
+LUMA_MC_48(10, mc30, mmxext)
+LUMA_MC_48(10, mc01, mmxext)
+LUMA_MC_48(10, mc11, mmxext)
+LUMA_MC_48(10, mc21, mmxext)
+LUMA_MC_48(10, mc31, mmxext)
+LUMA_MC_48(10, mc02, mmxext)
+LUMA_MC_48(10, mc12, mmxext)
+LUMA_MC_48(10, mc22, mmxext)
+LUMA_MC_48(10, mc32, mmxext)
+LUMA_MC_48(10, mc03, mmxext)
+LUMA_MC_48(10, mc13, mmxext)
+LUMA_MC_48(10, mc23, mmxext)
+LUMA_MC_48(10, mc33, mmxext)
 
 LUMA_MC_816(10, mc00, sse2)
 LUMA_MC_816(10, mc10, sse2)
@@ -464,7 +462,7 @@ LUMA_MC_816(10, mc23, sse2)
 LUMA_MC_816(10, mc33, sse2)
 
 #define QPEL16_OPMC(OP, MC, MMX)\
-void ff_ ## OP ## _h264_qpel16_ ## MC ## _10_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){\
+static void OP ## _h264_qpel16_ ## MC ## _10_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){\
     ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst   , src   , stride);\
     ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst+16, src+16, stride);\
     src += 8*stride;\
@@ -553,8 +551,8 @@ av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth)
             SET_QPEL_FUNCS(avg_h264_qpel, 2,  4, mmxext, );
         } else if (bit_depth == 10) {
 #if ARCH_X86_32
-            SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_mmxext, ff_);
-            SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_mmxext, ff_);
+            SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_mmxext, );
+            SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_mmxext, );
             SET_QPEL_FUNCS(put_h264_qpel, 1,  8, 10_mmxext, ff_);
             SET_QPEL_FUNCS(avg_h264_qpel, 1,  8, 10_mmxext, ff_);
 #endif
-- 
2.34.1



More information about the ffmpeg-devel mailing list