Message ID | CAEa-L+smiauN0L8FvKsNhnmygfRO0hcEBJGHahJxXzRnPaBVog@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | fail | Make fate failed |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | fail | Make fate failed |
flow gg: > Subject: [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp > > This asm will cause checkasm to fail. > --- > libavcodec/x86/rv34dsp.asm | 12 ------------ > libavcodec/x86/rv34dsp_init.c | 2 -- Of course your checkasm test will fail: You used declare_func and not declare_func_emms for this. Using the latter means "the tested function is expected to clobber the mmx state"; otherwise clobbering MMX is considered an error. - Andreas
Thank you for your guidance. Do you mean that it should be modified test like this? - declare_func(void, uint8_t *dst, ptrdiff_t stride, int dc); + declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, ptrdiff_t, int); I tried to do it this way, but the test still failed. not sure why ...
I made a mistake. It can be fixed your way. Please ignore this reply. flow gg <hlefthleft@gmail.com> 于2024年2月13日周二 17:47写道: > Thank you for your guidance. Do you mean that it should be modified test > like this? > > - declare_func(void, uint8_t *dst, ptrdiff_t stride, int dc); > + declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *, ptrdiff_t, int); > > I tried to do it this way, but the test still failed. not sure why ... >
From 1aa51d60def8d4313c1b11a50528662ec832530e Mon Sep 17 00:00:00 2001 From: sunyuechi <sunyuechi@iscas.ac.cn> Date: Tue, 13 Feb 2024 08:41:20 +0800 Subject: [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp This asm will cause checkasm to fail. --- libavcodec/x86/rv34dsp.asm | 12 ------------ libavcodec/x86/rv34dsp_init.c | 2 -- 2 files changed, 14 deletions(-) diff --git a/libavcodec/x86/rv34dsp.asm b/libavcodec/x86/rv34dsp.asm index f29bfd715c..82704843e6 100644 --- a/libavcodec/x86/rv34dsp.asm +++ b/libavcodec/x86/rv34dsp.asm @@ -44,18 +44,6 @@ SECTION .text sar %1, 10 %endmacro -INIT_MMX mmxext -cglobal rv34_idct_dc_noround, 1, 2, 0 - movsx r1, word [r0] - IDCT_DC_NOROUND r1 - movd m0, r1d - pshufw m0, m0, 0 - movq [r0+ 0], m0 - movq [r0+ 8], m0 - movq [r0+16], m0 - movq [r0+24], m0 - RET - ; Load coeffs and perform row transform ; Output: coeffs in mm[0467], rounder in mm5 %macro ROW_TRANSFORM 1 diff --git a/libavcodec/x86/rv34dsp_init.c b/libavcodec/x86/rv34dsp_init.c index caa5c2d653..b865201cd2 100644 --- a/libavcodec/x86/rv34dsp_init.c +++ b/libavcodec/x86/rv34dsp_init.c @@ -25,7 +25,6 @@ #include "libavcodec/rv34dsp.h" void ff_rv34_idct_dc_mmxext(int16_t *block); -void ff_rv34_idct_dc_noround_mmxext(int16_t *block); void ff_rv34_idct_dc_add_sse2(uint8_t *dst, ptrdiff_t stride, int dc); void ff_rv34_idct_dc_add_sse4(uint8_t *dst, ptrdiff_t stride, int dc); void ff_rv34_idct_add_mmxext(uint8_t *dst, ptrdiff_t stride, int16_t *block); @@ -35,7 +34,6 @@ av_cold void ff_rv34dsp_init_x86(RV34DSPContext* c) int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_MMXEXT(cpu_flags)) { - c->rv34_inv_transform_dc = ff_rv34_idct_dc_noround_mmxext; c->rv34_idct_add = ff_rv34_idct_add_mmxext; } if (EXTERNAL_SSE2(cpu_flags)) -- 2.43.1