Re: [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp

2024-02-13 Thread flow gg
I made a mistake. It can be fixed your way. Please ignore this reply.

flow gg  于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 ...
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp

2024-02-13 Thread flow gg
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 ...
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp

2024-02-13 Thread Andreas Rheinhardt
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

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp

2024-02-12 Thread flow gg
checkasm in [FFmpeg-devel] [PATCH 1/4] checkasm/rv34dsp: add
rv34_inv_transform_dc test
From 1aa51d60def8d4313c1b11a50528662ec832530e Mon Sep 17 00:00:00 2001
From: sunyuechi 
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
-movdm0, 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

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".