Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH] avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx()
Date: Mon, 25 Jul 2022 05:43:13 +0200
Message-ID: <DB6PR0101MB2214C196C060ED65E9EFCF958F959@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> (raw)

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".

             reply	other threads:[~2022-07-25  3:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25  3:43 Andreas Rheinhardt [this message]
2022-07-25 13:13 ` Henrik Gramner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB6PR0101MB2214C196C060ED65E9EFCF958F959@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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