* [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp
@ 2024-02-13 0:55 flow gg
2024-02-13 9:28 ` Andreas Rheinhardt
0 siblings, 1 reply; 4+ messages in thread
From: flow gg @ 2024-02-13 0:55 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 88 bytes --]
checkasm in [FFmpeg-devel] [PATCH 1/4] checkasm/rv34dsp: add
rv34_inv_transform_dc test
[-- Attachment #2: x86-Remove-MMX-assembly-rv34_inv_transform_dc-in-rv34dsp.patch --]
[-- Type: text/x-patch, Size: 1894 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp
2024-02-13 0:55 [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp flow gg
@ 2024-02-13 9:28 ` Andreas Rheinhardt
2024-02-13 9:47 ` flow gg
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Rheinhardt @ 2024-02-13 9:28 UTC (permalink / raw)
To: ffmpeg-devel
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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp
2024-02-13 9:28 ` Andreas Rheinhardt
@ 2024-02-13 9:47 ` flow gg
2024-02-13 9:48 ` flow gg
0 siblings, 1 reply; 4+ messages in thread
From: flow gg @ 2024-02-13 9:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp
2024-02-13 9:47 ` flow gg
@ 2024-02-13 9:48 ` flow gg
0 siblings, 0 replies; 4+ messages in thread
From: flow gg @ 2024-02-13 9:48 UTC (permalink / raw)
To: FFmpeg development discussions and patches
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 ...
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-13 9:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 0:55 [FFmpeg-devel] [PATCH] x86: Remove MMX assembly rv34_inv_transform_dc in rv34dsp flow gg
2024-02-13 9:28 ` Andreas Rheinhardt
2024-02-13 9:47 ` flow gg
2024-02-13 9:48 ` flow gg
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git