You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-10-06 05:47:18 +02:00
avcodec/svq1enc: restrict Altivec acceleration to big-endian POWER configurations
This was disabled inda60b99a88
and then accidentally re-enabled in172b0e2e88
. 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 commit4322be512b
)
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "libavcodec/svq1encdsp.h"
|
#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,
|
static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
|
||||||
intptr_t size)
|
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];
|
return u.score[3];
|
||||||
}
|
}
|
||||||
#endif /* HAVE_ALTIVEC */
|
#endif /* HAVE_ALTIVEC && HAVE_BIGENDIAN */
|
||||||
|
|
||||||
av_cold void ff_svq1enc_init_ppc(SVQ1EncDSPContext *c)
|
av_cold void ff_svq1enc_init_ppc(SVQ1EncDSPContext *c)
|
||||||
{
|
{
|
||||||
#if HAVE_ALTIVEC
|
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
|
||||||
if (!PPC_ALTIVEC(av_get_cpu_flags()))
|
if (!PPC_ALTIVEC(av_get_cpu_flags()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec;
|
c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec;
|
||||||
#endif /* HAVE_ALTIVEC */
|
#endif /* HAVE_ALTIVEC && HAVE_BIGENDIAN */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user