Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4d851f8d
Commit
4d851f8d
authored
Mar 04, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cpu: add av_set_cpu_flags_mask().
parent
338978a7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
2 deletions
+23
-2
APIchanges
doc/APIchanges
+3
-0
avutil.h
libavutil/avutil.h
+1
-1
cpu.c
libavutil/cpu.c
+11
-1
cpu.h
libavutil/cpu.h
+8
-0
No files found.
doc/APIchanges
View file @
4d851f8d
...
...
@@ -12,6 +12,9 @@ libavutil: 2011-04-18
API changes, most recent first:
2012-03-xx - xxxxxxx - lavu 51.25.0 - cpu.h
Add av_set_cpu_flags_mask().
2012-xx-xx - lavc 54.8.0
xxxxxxx Add av_get_exact_bits_per_sample()
xxxxxxx Add av_get_audio_frame_duration()
...
...
libavutil/avutil.h
View file @
4d851f8d
...
...
@@ -152,7 +152,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 2
4
#define LIBAVUTIL_VERSION_MINOR 2
5
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...
...
libavutil/cpu.c
View file @
4d851f8d
...
...
@@ -19,9 +19,11 @@
#include "cpu.h"
#include "config.h"
static
int
cpuflags_mask
,
checked
;
int
av_get_cpu_flags
(
void
)
{
static
int
flags
,
checked
;
static
int
flags
;
if
(
checked
)
return
flags
;
...
...
@@ -30,10 +32,18 @@ int av_get_cpu_flags(void)
if
(
ARCH_PPC
)
flags
=
ff_get_cpu_flags_ppc
();
if
(
ARCH_X86
)
flags
=
ff_get_cpu_flags_x86
();
flags
&=
cpuflags_mask
;
checked
=
1
;
return
flags
;
}
void
av_set_cpu_flags_mask
(
int
mask
)
{
cpuflags_mask
=
mask
;
checked
=
0
;
}
#ifdef TEST
#undef printf
...
...
libavutil/cpu.h
View file @
4d851f8d
...
...
@@ -48,6 +48,14 @@
*/
int
av_get_cpu_flags
(
void
);
/**
* Set a mask on flags returned by av_get_cpu_flags().
* This function is mainly useful for testing.
*
* @warning this function is not thread safe.
*/
void
av_set_cpu_flags_mask
(
int
mask
);
/* The following CPU-specific functions shall not be called directly. */
int
ff_get_cpu_flags_arm
(
void
);
int
ff_get_cpu_flags_ppc
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment