Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
be34c188
Commit
be34c188
authored
Feb 04, 2014
by
James Zern
Committed by
Gerrit Code Review
Feb 04, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "vp9_systemdependent.h: relocate system includes"
parents
0dc535ec
d89f861f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
vp9/common/vp9_systemdependent.h
vp9/common/vp9_systemdependent.h
+11
-8
No files found.
vp9/common/vp9_systemdependent.h
View file @
be34c188
...
@@ -11,13 +11,17 @@
...
@@ -11,13 +11,17 @@
#ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
#ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
#define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
#define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
#ifdef __cplusplus
#ifdef _MSC_VER
extern
"C"
{
# if _MSC_VER > 1310 && (defined(_M_X64) || defined(_M_IX86))
# include <intrin.h>
# define USE_MSC_INTRIN
# endif
# include <math.h>
# define snprintf _snprintf
#endif
#endif
#ifdef _MSC_VER
#ifdef __cplusplus
#include <math.h>
extern
"C"
{
#define snprintf _snprintf
#endif
#endif
#include "./vpx_config.h"
#include "./vpx_config.h"
...
@@ -44,9 +48,7 @@ static int round(double x) {
...
@@ -44,9 +48,7 @@ static int round(double x) {
static
INLINE
int
get_msb
(
unsigned
int
n
)
{
static
INLINE
int
get_msb
(
unsigned
int
n
)
{
return
31
^
__builtin_clz
(
n
);
return
31
^
__builtin_clz
(
n
);
}
}
#elif defined(_MSC_VER) && _MSC_VER > 1310 && \
#elif defined(USE_MSC_INTRIN)
(defined(_M_X64) || defined(_M_IX86))
#include <intrin.h>
#pragma intrinsic(_BitScanReverse)
#pragma intrinsic(_BitScanReverse)
static
INLINE
int
get_msb
(
unsigned
int
n
)
{
static
INLINE
int
get_msb
(
unsigned
int
n
)
{
...
@@ -54,6 +56,7 @@ static INLINE int get_msb(unsigned int n) {
...
@@ -54,6 +56,7 @@ static INLINE int get_msb(unsigned int n) {
_BitScanReverse
(
&
first_set_bit
,
n
);
_BitScanReverse
(
&
first_set_bit
,
n
);
return
first_set_bit
;
return
first_set_bit
;
}
}
#undef USE_MSC_INTRIN
#else
#else
// Returns (int)floor(log2(n)). n must be > 0.
// Returns (int)floor(log2(n)). n must be > 0.
static
INLINE
int
get_msb
(
unsigned
int
n
)
{
static
INLINE
int
get_msb
(
unsigned
int
n
)
{
...
...
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