This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit b5483446d33c6a883d7eec247498a3cc067bfeba Author: Andreas Rheinhardt <[email protected]> AuthorDate: Tue Jul 21 17:57:24 2026 +0200 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Sat Aug 1 16:50:06 2026 +0200 avcodec/x86/vc1dsp_init: Avoid fpel wrappers One can just reuse the already existing SIZExSIZE fpel wrappers. Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/x86/fpel.asm | 13 +++++++++++++ libavcodec/x86/vc1dsp_init.c | 18 +----------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/libavcodec/x86/fpel.asm b/libavcodec/x86/fpel.asm index 598a57ab0d..e7d2dcc8f7 100644 --- a/libavcodec/x86/fpel.asm +++ b/libavcodec/x86/fpel.asm @@ -26,6 +26,18 @@ SECTION .text INIT_XMM sse2 + +%macro VC1_FPEL_FUNC 2 ; avg vs put, size +%if CONFIG_VC1DSP +; void ff_vc1_{avg,put}_mspel_mc00_{8,16}_sse2(uint8_t *dst, const uint8_t *src, +; ptrdiff_t stride, int rnd) +; rnd is unused for fpel functions and for all supported ABIs +; we can just reuse the SIZExSIZE functions. +cglobal vc1_%1_mspel_mc00_%2 +%endif +%endmacro + +VC1_FPEL_FUNC avg, 8 ; void ff_avg_pixels8x8_sse2(uint8_t *block, const uint8_t *pixels, ; ptrdiff_t line_size) cglobal avg_pixels8x8, 3,5,6 @@ -67,6 +79,7 @@ avg_pixels8_after_prologue: %define LOAD movu %define SAVE mova %endif +VC1_FPEL_FUNC %1, %2 cglobal %1_pixels%2x%2, 3,5+4*%3,4 mov r3d, %2 jmp %1_pixels%2_after_prologue diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c index d0705f6bfb..e5a177cb76 100644 --- a/libavcodec/x86/vc1dsp_init.c +++ b/libavcodec/x86/vc1dsp_init.c @@ -28,7 +28,6 @@ #include "libavutil/cpu.h" #include "libavutil/x86/cpu.h" #include "libavcodec/vc1dsp.h" -#include "fpel.h" #include "vc1dsp.h" #include "config.h" @@ -63,18 +62,6 @@ static void vc1_h_loop_filter16_sse4(uint8_t *src, ptrdiff_t stride, int pq) ff_vc1_h_loop_filter8_sse4(src+8*stride, stride, pq); } -#define DECLARE_FUNCTION(OP, DEPTH, INSN) \ - static void OP##vc1_mspel_mc00_##DEPTH##INSN(uint8_t *dst, \ - const uint8_t *src, ptrdiff_t stride, int rnd) \ - { \ - ff_ ## OP ## pixels ## DEPTH ## INSN(dst, src, stride, DEPTH); \ - } - -DECLARE_FUNCTION(put_, 8, _sse2) -DECLARE_FUNCTION(avg_, 8, _sse2) -DECLARE_FUNCTION(put_, 16, _sse2) -DECLARE_FUNCTION(avg_, 16, _sse2) - void ff_put_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y); void ff_avg_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, const uint8_t *src, @@ -132,10 +119,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp) if (EXTERNAL_SSE2(cpu_flags)) { ASSIGN_LF816(sse2); - dsp->put_vc1_mspel_pixels_tab[0][0] = put_vc1_mspel_mc00_16_sse2; - dsp->put_vc1_mspel_pixels_tab[1][0] = put_vc1_mspel_mc00_8_sse2; - dsp->avg_vc1_mspel_pixels_tab[0][0] = avg_vc1_mspel_mc00_16_sse2; - dsp->avg_vc1_mspel_pixels_tab[1][0] = avg_vc1_mspel_mc00_8_sse2; + MSPEL_FUNCS(0, 0, sse2); } if (EXTERNAL_SSSE3(cpu_flags)) { ASSIGN_LF4(ssse3); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
