Skip to content
Snippets Groups Projects
Commit 5ad38d93 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

cpudetect: add av_force_cpu_flags()

parent 9e66b64c
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51 #define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 3 #define LIBAVUTIL_VERSION_MINOR 4
#define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
......
...@@ -19,10 +19,15 @@ ...@@ -19,10 +19,15 @@
#include "cpu.h" #include "cpu.h"
#include "config.h" #include "config.h"
static int flags, checked;
void av_force_cpu_flags(int arg){
flags = arg;
checked = 1;
}
int av_get_cpu_flags(void) int av_get_cpu_flags(void)
{ {
static int flags, checked;
if (checked) if (checked)
return flags; return flags;
......
...@@ -46,6 +46,13 @@ ...@@ -46,6 +46,13 @@
*/ */
int av_get_cpu_flags(void); int av_get_cpu_flags(void);
/**
* Disables cpu detection and forces the specified flags.
*/
void av_force_cpu_flags(int flags);
/* The following CPU-specific functions shall not be called directly. */ /* The following CPU-specific functions shall not be called directly. */
int ff_get_cpu_flags_arm(void); int ff_get_cpu_flags_arm(void);
int ff_get_cpu_flags_ppc(void); int ff_get_cpu_flags_ppc(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment