Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Sean McGovern via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Sean McGovern <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] avcodec/svq1enc: restrict Altivec acceleration to big-endian POWER configurations (backported to release/7.1) (PR #20285)
Date: Tue, 19 Aug 2025 16:28:27 +0300 (EEST)
Message-ID: <20250819132827.B2D8468D503@ffbox0-bg.ffmpeg.org> (raw)

PR #20285 opened by Sean McGovern (sean_mcg)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20285
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20285.patch

This was disabled in da60b99a8857d5ca236f32c1799a066e0135a866 and then
accidentally re-enabled in 172b0e2e88832822632841e8e0d3794f974cbc93.

The code in question was never properly adapted for litte-endian mode.

refs: trac/10955
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4322be512b2bd6c7d8ee61a2b0230546f3107be0)


From b8dcb682b174b2f1c481d53bb86b6226489ef447 Mon Sep 17 00:00:00 2001
From: Sean McGovern <gseanmcg@gmail.com>
Date: Thu, 16 Jan 2025 16:30:52 -0500
Subject: [PATCH] avcodec/svq1enc: restrict Altivec acceleration to big-endian
 POWER configurations

This was disabled in da60b99a8857d5ca236f32c1799a066e0135a866 and then
accidentally re-enabled in 172b0e2e88832822632841e8e0d3794f974cbc93.

The code in question was never properly adapted for litte-endian mode.

refs: trac/10955
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4322be512b2bd6c7d8ee61a2b0230546f3107be0)
---
 libavcodec/ppc/svq1enc_altivec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/ppc/svq1enc_altivec.c b/libavcodec/ppc/svq1enc_altivec.c
index 5721bede34..78c79a68dc 100644
--- a/libavcodec/ppc/svq1enc_altivec.c
+++ b/libavcodec/ppc/svq1enc_altivec.c
@@ -29,7 +29,7 @@
 
 #include "libavcodec/svq1encdsp.h"
 
-#if HAVE_ALTIVEC
+#if HAVE_ALTIVEC && HAVE_BIGENDIAN
 static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
                                      intptr_t size)
 {
@@ -69,14 +69,14 @@ static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
 
     return u.score[3];
 }
-#endif /* HAVE_ALTIVEC */
+#endif /* HAVE_ALTIVEC && HAVE_BIGENDIAN */
 
 av_cold void ff_svq1enc_init_ppc(SVQ1EncDSPContext *c)
 {
-#if HAVE_ALTIVEC
+#if HAVE_ALTIVEC && HAVE_BIGENDIAN
     if (!PPC_ALTIVEC(av_get_cpu_flags()))
         return;
 
     c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec;
-#endif /* HAVE_ALTIVEC */
+#endif /* HAVE_ALTIVEC && HAVE_BIGENDIAN */
 }
-- 
2.49.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:[~2025-08-19 13:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250819132827.B2D8468D503@ffbox0-bg.ffmpeg.org \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@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