mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 22:10:34 +00:00
ppc: Fix runtime CPU detection for apedsp, huffyuvdsp, svq1enc
This commit is contained in:
parent
f121dbd9f7
commit
205fdd4ea5
@ -24,6 +24,8 @@
|
||||
#endif
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/ppc/cpu.h"
|
||||
#include "libavutil/ppc/types_altivec.h"
|
||||
#include "libavcodec/apedsp.h"
|
||||
|
||||
@ -72,6 +74,9 @@ static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1,
|
||||
av_cold void ff_apedsp_init_ppc(APEDSPContext *c)
|
||||
{
|
||||
#if HAVE_ALTIVEC
|
||||
if (!PPC_ALTIVEC(av_get_cpu_flags()))
|
||||
return;
|
||||
|
||||
c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_altivec;
|
||||
#endif /* HAVE_ALTIVEC */
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
#endif
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/ppc/cpu.h"
|
||||
#include "libavutil/ppc/types_altivec.h"
|
||||
#include "libavutil/ppc/util_altivec.h"
|
||||
#include "libavcodec/huffyuvdsp.h"
|
||||
@ -52,6 +54,9 @@ static void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w)
|
||||
av_cold void ff_huffyuvdsp_init_ppc(HuffYUVDSPContext *c)
|
||||
{
|
||||
#if HAVE_ALTIVEC
|
||||
if (!PPC_ALTIVEC(av_get_cpu_flags()))
|
||||
return;
|
||||
|
||||
c->add_bytes = add_bytes_altivec;
|
||||
#endif /* HAVE_ALTIVEC */
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
#endif
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libavutil/cpu.h"
|
||||
#include "libavutil/ppc/cpu.h"
|
||||
#include "libavutil/ppc/types_altivec.h"
|
||||
#include "libavutil/ppc/util_altivec.h"
|
||||
#include "libavcodec/svq1enc.h"
|
||||
@ -75,6 +77,9 @@ static int ssd_int8_vs_int16_altivec(const int8_t *pix1, const int16_t *pix2,
|
||||
av_cold void ff_svq1enc_init_ppc(SVQ1EncContext *c)
|
||||
{
|
||||
#if HAVE_ALTIVEC
|
||||
if (!PPC_ALTIVEC(av_get_cpu_flags()))
|
||||
return;
|
||||
|
||||
c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec;
|
||||
#endif /* HAVE_ALTIVEC */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user