Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
4d851f8d
Commit
4d851f8d
authored
13 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
cpu: add av_set_cpu_flags_mask().
parent
338978a7
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
doc/APIchanges
+3
-0
3 additions, 0 deletions
doc/APIchanges
libavutil/avutil.h
+1
-1
1 addition, 1 deletion
libavutil/avutil.h
libavutil/cpu.c
+11
-1
11 additions, 1 deletion
libavutil/cpu.c
libavutil/cpu.h
+8
-0
8 additions, 0 deletions
libavutil/cpu.h
with
23 additions
and
2 deletions
doc/APIchanges
+
3
−
0
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()
...
...
This diff is collapsed.
Click to expand it.
libavutil/avutil.h
+
1
−
1
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, \
...
...
This diff is collapsed.
Click to expand it.
libavutil/cpu.c
+
11
−
1
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
...
...
This diff is collapsed.
Click to expand it.
libavutil/cpu.h
+
8
−
0
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment