From 0cff5836c3f410136e3fdb3e2f9e24bb81dd9a87 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 19 Apr 2014 17:09:24 +0200 Subject: Remove CPU detection and inline asm handling Not needed anymore. I'm not opposed to having asm, but inline asm is too much of a pain, and it was planned long ago to eventually get rid fo all inline asm uses. For the note, the inline asm use that was removed with the previous commits was almost worthless. It was confined to video filters, and most video filtering is now done with libavfilter. Some mpv filters (like vf_pullup) actually redirect to libavfilter if possible. If asm is added in the future, it should happen in the form of external files. --- common/cpudetect.c | 43 ------------------------------------------- common/cpudetect.h | 40 ---------------------------------------- 2 files changed, 83 deletions(-) delete mode 100644 common/cpudetect.c delete mode 100644 common/cpudetect.h (limited to 'common') diff --git a/common/cpudetect.c b/common/cpudetect.c deleted file mode 100644 index d68370f231..0000000000 --- a/common/cpudetect.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of MPlayer. - * - * MPlayer is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * MPlayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include -#include -#include - -#include -#include "compat/libav.h" - -#include "config.h" -#include "common/cpudetect.h" - -CpuCaps gCpuCaps; - -void GetCpuCaps(CpuCaps *c) -{ - memset(c, 0, sizeof(*c)); - int flags = av_get_cpu_flags(); -#if ARCH_X86 - c->hasMMX = flags & AV_CPU_FLAG_MMX; - c->hasMMX2 = flags & AV_CPU_FLAG_MMX2; - c->hasSSE = flags & AV_CPU_FLAG_SSE; - c->hasSSE2 = (flags & AV_CPU_FLAG_SSE2) && !(flags & AV_CPU_FLAG_SSE2SLOW); - c->hasSSE3 = (flags & AV_CPU_FLAG_SSE3) && !(flags & AV_CPU_FLAG_SSE3SLOW); - c->hasSSSE3 = flags & AV_CPU_FLAG_SSSE3; -#endif -} diff --git a/common/cpudetect.h b/common/cpudetect.h deleted file mode 100644 index d3d9206c65..0000000000 --- a/common/cpudetect.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of MPlayer. - * - * MPlayer is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * MPlayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with MPlayer; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef MPLAYER_CPUDETECT_H -#define MPLAYER_CPUDETECT_H - -#include -#include "config.h" - -#include "compat/x86_cpu.h" - -typedef struct cpucaps_s { - bool hasMMX; - bool hasMMX2; - bool hasSSE; - bool hasSSE2; - bool hasSSE3; - bool hasSSSE3; -} CpuCaps; - -extern CpuCaps gCpuCaps; - -void GetCpuCaps(CpuCaps *caps); - -#endif /* MPLAYER_CPUDETECT_H */ -- cgit v1.2.3