Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: source/patched-ffmpeg-mt/libavutil/cpu.c

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/patched-ffmpeg-mt/libavutil/cpu.h ('k') | source/patched-ffmpeg-mt/libavutil/ppc/cpu.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #include "cpu.h"
20 #include "config.h"
21
22 int av_get_cpu_flags(void)
23 {
24 static int flags, checked;
25
26 if (checked)
27 return flags;
28
29 if (ARCH_ARM) flags = ff_get_cpu_flags_arm();
30 if (ARCH_PPC) flags = ff_get_cpu_flags_ppc();
31 if (ARCH_X86) flags = ff_get_cpu_flags_x86();
32
33 checked = 1;
34 return flags;
35 }
36
37 #ifdef TEST
38
39 #undef printf
40
41 int main(void)
42 {
43 int cpu_flags = av_get_cpu_flags();
44
45 printf("cpu_flags = 0x%08X\n", cpu_flags);
46 printf("cpu_flags = %s%s%s%s%s%s%s%s%s%s%s%s\n",
47 #if ARCH_ARM
48 cpu_flags & AV_CPU_FLAG_IWMMXT ? "IWMMXT " : "",
49 #elif ARCH_PPC
50 cpu_flags & AV_CPU_FLAG_ALTIVEC ? "ALTIVEC " : "",
51 #elif ARCH_X86
52 cpu_flags & AV_CPU_FLAG_MMX ? "MMX " : "",
53 cpu_flags & AV_CPU_FLAG_MMX2 ? "MMX2 " : "",
54 cpu_flags & AV_CPU_FLAG_SSE ? "SSE " : "",
55 cpu_flags & AV_CPU_FLAG_SSE2 ? "SSE2 " : "",
56 cpu_flags & AV_CPU_FLAG_SSE2SLOW ? "SSE2(slow) " : "",
57 cpu_flags & AV_CPU_FLAG_SSE3 ? "SSE3 " : "",
58 cpu_flags & AV_CPU_FLAG_SSE3SLOW ? "SSE3(slow) " : "",
59 cpu_flags & AV_CPU_FLAG_SSSE3 ? "SSSE3 " : "",
60 cpu_flags & AV_CPU_FLAG_SSE4 ? "SSE4.1 " : "",
61 cpu_flags & AV_CPU_FLAG_SSE42 ? "SSE4.2 " : "",
62 cpu_flags & AV_CPU_FLAG_3DNOW ? "3DNow " : "",
63 cpu_flags & AV_CPU_FLAG_3DNOWEXT ? "3DNowExt " : "");
64 #endif
65 return 0;
66 }
67
68 #endif
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavutil/cpu.h ('k') | source/patched-ffmpeg-mt/libavutil/ppc/cpu.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698