mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-16 11:47:04 +00:00
avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
Use the machdep.altivec sysctl on NetBSD for AltiVec detection
as is done with OpenBSD.
(cherry picked from commit 115c96b9bd
)
Signed-off-by: Brad Smith <brad@comstyle.com>
This commit is contained in:
parent
3eb8705ab7
commit
6d9e2e94c3
@ -27,7 +27,7 @@
|
|||||||
#if HAVE_UNISTD_H
|
#if HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <machine/cpu.h>
|
#include <machine/cpu.h>
|
||||||
@ -56,8 +56,8 @@ int ff_get_cpu_flags_ppc(void)
|
|||||||
if (result == VECTORTYPE_ALTIVEC)
|
if (result == VECTORTYPE_ALTIVEC)
|
||||||
return AV_CPU_FLAG_ALTIVEC;
|
return AV_CPU_FLAG_ALTIVEC;
|
||||||
return 0;
|
return 0;
|
||||||
#elif defined(__APPLE__) || defined(__OpenBSD__)
|
#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
#ifdef __OpenBSD__
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
|
int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
|
||||||
#else
|
#else
|
||||||
int sels[2] = {CTL_HW, HW_VECTORUNIT};
|
int sels[2] = {CTL_HW, HW_VECTORUNIT};
|
||||||
|
Loading…
Reference in New Issue
Block a user