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

Side by Side Diff: patched-ffmpeg-mt/libavcodec/ppc/check_altivec.c

Issue 789004: ffmpeg roll of source to mar 9 version... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 9 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
OLDNEW
1 /* 1 /*
2 * This file is part of FFmpeg. 2 * This file is part of FFmpeg.
3 * 3 *
4 * FFmpeg is free software; you can redistribute it and/or 4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public 5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version. 7 * version 2.1 of the License, or (at your option) any later version.
8 * 8 *
9 * FFmpeg is distributed in the hope that it will be useful, 9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details. 12 * Lesser General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Lesser General Public 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 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 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 17 */
18 18
19 19
20 /** 20 /**
21 * @file libavcodec/ppc/check_altivec.c 21 * @file libavcodec/ppc/check_altivec.c
22 * Checks for AltiVec presence. 22 * Checks for AltiVec presence.
23 */ 23 */
24 24
25 #include "config.h"
26
27 #ifdef __APPLE__ 25 #ifdef __APPLE__
28 #undef _POSIX_C_SOURCE 26 #undef _POSIX_C_SOURCE
29 #include <sys/sysctl.h> 27 #include <sys/sysctl.h>
30 #elif defined(__OpenBSD__) 28 #elif defined(__OpenBSD__)
31 #include <sys/param.h> 29 #include <sys/param.h>
32 #include <sys/sysctl.h> 30 #include <sys/sysctl.h>
33 #include <machine/cpu.h> 31 #include <machine/cpu.h>
34 #elif defined(__AMIGAOS4__) 32 #elif defined(__AMIGAOS4__)
35 #include <exec/exec.h> 33 #include <exec/exec.h>
36 #include <interfaces/exec.h> 34 #include <interfaces/exec.h>
37 #include <proto/exec.h> 35 #include <proto/exec.h>
38 #endif /* __APPLE__ */ 36 #endif /* __APPLE__ */
39 37
38 #include "config.h"
39 #include "dsputil_altivec.h"
40
40 /** 41 /**
41 * This function MAY rely on signal() or fork() in order to make sure AltiVec 42 * This function MAY rely on signal() or fork() in order to make sure AltiVec
42 * is present. 43 * is present.
43 */ 44 */
44 45
45 int has_altivec(void) 46 int has_altivec(void)
46 { 47 {
47 #ifdef __AMIGAOS4__ 48 #ifdef __AMIGAOS4__
48 ULONG result = 0; 49 ULONG result = 0;
49 extern struct ExecIFace *IExec; 50 extern struct ExecIFace *IExec;
(...skipping 27 matching lines...) Expand all
77 proc_ver == 0x0070) 78 proc_ver == 0x0070)
78 return 1; 79 return 1;
79 return 0; 80 return 0;
80 #else 81 #else
81 // Since we were compiled for AltiVec, just assume we have it 82 // Since we were compiled for AltiVec, just assume we have it
82 // until someone comes up with a proper way (not involving signal hacks). 83 // until someone comes up with a proper way (not involving signal hacks).
83 return 1; 84 return 1;
84 #endif /* __AMIGAOS4__ */ 85 #endif /* __AMIGAOS4__ */
85 } 86 }
86 87
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698