[FFmpeg-cvslog] ppc: Recognize the PPC VSX and Power8 CPU flags
Brad Smith
git at videolan.org
Sun Sep 29 05:13:47 EEST 2024
ffmpeg | branch: release/7.1 | Brad Smith <brad at comstyle.com> | Sat Sep 21 05:00:41 2024 -0400| [05ff3eb9f2b9321e4314e7d84fe67557bd809307] | committer: Brad Smith
ppc: Recognize the PPC VSX and Power8 CPU flags
Signed-off-by: Brad Smith <brad at comstyle.com>
(cherry picked from commit 6ec6b0790021c5871016f57ac33d54bb6cab7a7d)
Signed-off-by: Brad Smith <brad at comstyle.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05ff3eb9f2b9321e4314e7d84fe67557bd809307
---
libavutil/cpu.c | 2 ++
libavutil/tests/cpu.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index df00bd541f..44cbb9e9ff 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -120,6 +120,8 @@ int av_parse_cpu_caps(unsigned *flags, const char *s)
{ "flags" , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX, .unit = "flags" },
#if ARCH_PPC
{ "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_ALTIVEC }, .unit = "flags" },
+ { "vsx" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_VSX }, .unit = "flags" },
+ { "power8" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_POWER8 }, .unit = "flags" },
#elif ARCH_X86
{ "mmx" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_MMX }, .unit = "flags" },
{ "mmx2" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_MMX2 }, .unit = "flags" },
diff --git a/libavutil/tests/cpu.c b/libavutil/tests/cpu.c
index 0a459c1d9e..53e9f99950 100644
--- a/libavutil/tests/cpu.c
+++ b/libavutil/tests/cpu.c
@@ -51,6 +51,8 @@ static const struct {
{ AV_CPU_FLAG_SETEND, "setend" },
#elif ARCH_PPC
{ AV_CPU_FLAG_ALTIVEC, "altivec" },
+ { AV_CPU_FLAG_VSX, "vsx" },
+ { AV_CPU_FLAG_POWER8, "power8" },
#elif ARCH_MIPS
{ AV_CPU_FLAG_MMI, "mmi" },
{ AV_CPU_FLAG_MSA, "msa" },
More information about the ffmpeg-cvslog
mailing list