From 5715eb1274a99ae272fa8c6c2acf4ed4d9f776f6 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 9 Oct 2025 03:57:33 +0200 Subject: [PATCH] avcodec/x86/{h264_qpel,qpeldsp_init}: Move shared decls into header Signed-off-by: Andreas Rheinhardt --- libavcodec/x86/h264_qpel.c | 9 +-------- libavcodec/x86/qpel.h | 38 +++++++++++++++++++++++++++++++++++ libavcodec/x86/qpeldsp_init.c | 14 +------------ 3 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 libavcodec/x86/qpel.h diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c index 5d1445a8bb..30851e266e 100644 --- a/libavcodec/x86/h264_qpel.c +++ b/libavcodec/x86/h264_qpel.c @@ -28,6 +28,7 @@ #include "libavutil/x86/cpu.h" #include "libavcodec/h264qpel.h" #include "fpel.h" +#include "qpel.h" #if HAVE_X86ASM void ff_avg_pixels4_mmxext(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); @@ -35,14 +36,6 @@ void ff_put_pixels4_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t * ptrdiff_t stride); void ff_avg_pixels4_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, ptrdiff_t stride); -void ff_put_pixels8_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, - ptrdiff_t dstStride, ptrdiff_t src1Stride, int h); -void ff_avg_pixels8_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, - ptrdiff_t dstStride, ptrdiff_t src1Stride); -void ff_put_pixels16_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, - ptrdiff_t dstStride, ptrdiff_t src1Stride, int h); -void ff_avg_pixels16_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, - ptrdiff_t dstStride, ptrdiff_t src1Stride); #define ff_put_pixels4_l2_mmxext(dst, src1, src2, dststride, src1stride, h) \ ff_put_pixels4_l2_mmxext((dst), (src1), (src2), (dststride)) #define ff_avg_pixels4_l2_mmxext(dst, src1, src2, dststride, src1stride, h) \ diff --git a/libavcodec/x86/qpel.h b/libavcodec/x86/qpel.h new file mode 100644 index 0000000000..b30d5e23dc --- /dev/null +++ b/libavcodec/x86/qpel.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_QPEL_H +#define AVCODEC_X86_QPEL_H + +#include +#include + +void ff_put_pixels8_l2_mmxext(uint8_t *dst, + const uint8_t *src1, const uint8_t *src2, + ptrdiff_t dstStride, ptrdiff_t src1Stride, int h); +void ff_avg_pixels8_l2_mmxext(uint8_t *dst, + const uint8_t *src1, const uint8_t *src2, + ptrdiff_t dstStride, ptrdiff_t src1Stride); +void ff_put_pixels16_l2_mmxext(uint8_t *dst, + const uint8_t *src1, const uint8_t *src2, + ptrdiff_t dstStride, ptrdiff_t src1Stride, int h); +void ff_avg_pixels16_l2_mmxext(uint8_t *dst, + const uint8_t *src1, const uint8_t *src2, + ptrdiff_t dstStride, ptrdiff_t src1Stride); + +#endif /* AVCODEC_X86_QPEL_H */ diff --git a/libavcodec/x86/qpeldsp_init.c b/libavcodec/x86/qpeldsp_init.c index a1d1eb80b3..f88c804a48 100644 --- a/libavcodec/x86/qpeldsp_init.c +++ b/libavcodec/x86/qpeldsp_init.c @@ -27,25 +27,13 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/x86/cpu.h" -#include "libavcodec/pixels.h" #include "libavcodec/qpeldsp.h" #include "fpel.h" +#include "qpel.h" -void ff_put_pixels8_l2_mmxext(uint8_t *dst, - const uint8_t *src1, const uint8_t *src2, - ptrdiff_t dstStride, ptrdiff_t src1Stride, int h); void ff_put_no_rnd_pixels8_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, ptrdiff_t dstStride, ptrdiff_t src1Stride, int h); -void ff_avg_pixels8_l2_mmxext(uint8_t *dst, - const uint8_t *src1, const uint8_t *src2, - ptrdiff_t dstStride, ptrdiff_t src1Stride); -void ff_put_pixels16_l2_mmxext(uint8_t *dst, - const uint8_t *src1, const uint8_t *src2, - ptrdiff_t dstStride, ptrdiff_t src1Stride, int h); -void ff_avg_pixels16_l2_mmxext(uint8_t *dst, - const uint8_t *src1, const uint8_t *src2, - ptrdiff_t dstStride, ptrdiff_t src1Stride); void ff_put_no_rnd_pixels16_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, ptrdiff_t dstStride, ptrdiff_t src1Stride, int h);