Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx()
@ 2022-07-25  3:43 Andreas Rheinhardt
  2022-07-25 13:13 ` Henrik Gramner
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2022-07-25  3:43 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

It is overridden by ff_add_bytes_l2_sse2() on any non-ancient CPU.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/x86/pngdsp.asm    | 16 ++--------------
 libavcodec/x86/pngdsp_init.c |  7 -------
 2 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
index 50e4255dec..7bc43c79a0 100644
--- a/libavcodec/x86/pngdsp.asm
+++ b/libavcodec/x86/pngdsp.asm
@@ -29,9 +29,8 @@ cextern pw_255
 
 SECTION .text
 
-; %1 = nr. of xmm registers used
-%macro ADD_BYTES_FN 1
-cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i
+INIT_XMM sse2
+cglobal add_bytes_l2, 4, 6, 2, dst, src1, src2, wa, w, i
 %if ARCH_X86_64
     movsxd             waq, wad
 %endif
@@ -53,7 +52,6 @@ cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i
     cmp                 iq, waq
     jl .loop_v
 
-%if mmsize == 16
     ; vector loop
     mov                waq, wq
     and                waq, ~7
@@ -66,7 +64,6 @@ cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i
 .end_l:
     cmp                 iq, waq
     jl .loop_l
-%endif
 
     ; scalar loop for leftover
     jmp .end_s
@@ -79,15 +76,6 @@ cglobal add_bytes_l2, 4, 6, %1, dst, src1, src2, wa, w, i
     cmp                 iq, wq
     jl .loop_s
     REP_RET
-%endmacro
-
-%if ARCH_X86_32
-INIT_MMX mmx
-ADD_BYTES_FN 0
-%endif
-
-INIT_XMM sse2
-ADD_BYTES_FN 2
 
 %macro ADD_PAETH_PRED_FN 1
 cglobal add_png_paeth_prediction, 5, 7, %1, dst, src, top, w, bpp, end, cntr
diff --git a/libavcodec/x86/pngdsp_init.c b/libavcodec/x86/pngdsp_init.c
index edbe866c22..e2cd5effe3 100644
--- a/libavcodec/x86/pngdsp_init.c
+++ b/libavcodec/x86/pngdsp_init.c
@@ -20,7 +20,6 @@
  */
 
 #include <stdint.h>
-#include "config.h"
 #include "libavutil/attributes.h"
 #include "libavutil/x86/cpu.h"
 #include "libavcodec/pngdsp.h"
@@ -29,8 +28,6 @@ void ff_add_png_paeth_prediction_mmxext(uint8_t *dst, uint8_t *src,
                                         uint8_t *top, int w, int bpp);
 void ff_add_png_paeth_prediction_ssse3(uint8_t *dst, uint8_t *src,
                                        uint8_t *top, int w, int bpp);
-void ff_add_bytes_l2_mmx (uint8_t *dst, uint8_t *src1,
-                          uint8_t *src2, int w);
 void ff_add_bytes_l2_sse2(uint8_t *dst, uint8_t *src1,
                           uint8_t *src2, int w);
 
@@ -38,10 +35,6 @@ av_cold void ff_pngdsp_init_x86(PNGDSPContext *dsp)
 {
     int cpu_flags = av_get_cpu_flags();
 
-#if ARCH_X86_32
-    if (EXTERNAL_MMX(cpu_flags))
-        dsp->add_bytes_l2         = ff_add_bytes_l2_mmx;
-#endif
     if (EXTERNAL_MMXEXT(cpu_flags))
         dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmxext;
     if (EXTERNAL_SSE2(cpu_flags))
-- 
2.34.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-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx()
  2022-07-25  3:43 [FFmpeg-devel] [PATCH] avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx() Andreas Rheinhardt
@ 2022-07-25 13:13 ` Henrik Gramner
  0 siblings, 0 replies; 2+ messages in thread
From: Henrik Gramner @ 2022-07-25 13:13 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Mon, Jul 25, 2022 at 5:43 AM Andreas Rheinhardt
<andreas.rheinhardt@outlook.com> wrote:
>
> It is overridden by ff_add_bytes_l2_sse2() on any non-ancient CPU.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

Lgtm
_______________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2022-07-25 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25  3:43 [FFmpeg-devel] [PATCH] avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx() Andreas Rheinhardt
2022-07-25 13:13 ` Henrik Gramner

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