mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
huffyuvdsp: Enable the altivec code for PPC little-endian as well
Confirmed to work by checkasm.
This commit is contained in:
parent
1d25a86902
commit
b015872c0d
@ -32,7 +32,7 @@
|
|||||||
#include "libavutil/ppc/util_altivec.h"
|
#include "libavutil/ppc/util_altivec.h"
|
||||||
#include "libavcodec/huffyuvdsp.h"
|
#include "libavcodec/huffyuvdsp.h"
|
||||||
|
|
||||||
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
|
#if HAVE_ALTIVEC
|
||||||
static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w)
|
static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w)
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
@ -49,14 +49,14 @@ static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w)
|
|||||||
for (; i < w; i++)
|
for (; i < w; i++)
|
||||||
dst[i] = src[i];
|
dst[i] = src[i];
|
||||||
}
|
}
|
||||||
#endif /* HAVE_ALTIVEC && HAVE_BIGENDIAN */
|
#endif /* HAVE_ALTIVEC */
|
||||||
|
|
||||||
av_cold void ff_huffyuvdsp_init_ppc(HuffYUVDSPContext *c)
|
av_cold void ff_huffyuvdsp_init_ppc(HuffYUVDSPContext *c)
|
||||||
{
|
{
|
||||||
#if HAVE_ALTIVEC && HAVE_BIGENDIAN
|
#if HAVE_ALTIVEC
|
||||||
if (!PPC_ALTIVEC(av_get_cpu_flags()))
|
if (!PPC_ALTIVEC(av_get_cpu_flags()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
c->add_bytes = add_bytes_altivec;
|
c->add_bytes = add_bytes_altivec;
|
||||||
#endif /* HAVE_ALTIVEC && HAVE_BIGENDIAN */
|
#endif /* HAVE_ALTIVEC */
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user