Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
49222879
Commit
49222879
authored
Jul 07, 2019
by
simon wu
Committed by
Kai Chen
Jul 07, 2019
Browse files
Fixing build-errors on Windows (#84)
parent
258d4d32
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
mmcv/video/optflow_warp/flow_warp.cpp
mmcv/video/optflow_warp/flow_warp.cpp
+4
-4
mmcv/video/optflow_warp/flow_warp.hpp
mmcv/video/optflow_warp/flow_warp.hpp
+3
-3
No files found.
mmcv/video/optflow_warp/flow_warp.cpp
View file @
49222879
...
@@ -38,8 +38,8 @@ void BilinearInterpolate(const double* img, int width, int height, int channels,
...
@@ -38,8 +38,8 @@ void BilinearInterpolate(const double* img, int width, int height, int channels,
double
dx
,
dy
,
s
;
double
dx
,
dy
,
s
;
dx
=
__max
(
__min
(
x
-
xx
,
double
(
1
)),
double
(
0
));
dx
=
__max
__
(
__min
__
(
x
-
xx
,
double
(
1
)),
double
(
0
));
dy
=
__max
(
__min
(
y
-
yy
,
double
(
1
)),
double
(
0
));
dy
=
__max
__
(
__min
__
(
y
-
yy
,
double
(
1
)),
double
(
0
));
for
(
m
=
0
;
m
<=
1
;
m
++
)
for
(
m
=
0
;
m
<=
1
;
m
++
)
for
(
n
=
0
;
n
<=
1
;
n
++
)
{
for
(
n
=
0
;
n
<=
1
;
n
++
)
{
...
@@ -60,8 +60,8 @@ void NNInterpolate(const double* img, int width, int height, int channels,
...
@@ -60,8 +60,8 @@ void NNInterpolate(const double* img, int width, int height, int channels,
double
dx
,
dy
;
double
dx
,
dy
;
dx
=
__max
(
__min
(
x
-
xx
,
double
(
1
)),
double
(
0
));
dx
=
__max
__
(
__min
__
(
x
-
xx
,
double
(
1
)),
double
(
0
));
dy
=
__max
(
__min
(
y
-
yy
,
double
(
1
)),
double
(
0
));
dy
=
__max
__
(
__min
__
(
y
-
yy
,
double
(
1
)),
double
(
0
));
m
=
(
dx
<
0.5
)
?
0
:
1
;
m
=
(
dx
<
0.5
)
?
0
:
1
;
n
=
(
dy
<
0.5
)
?
0
:
1
;
n
=
(
dy
<
0.5
)
?
0
:
1
;
...
...
mmcv/video/optflow_warp/flow_warp.hpp
View file @
49222879
...
@@ -15,16 +15,16 @@ void NNInterpolate(const double* img, int width, int height, int channels,
...
@@ -15,16 +15,16 @@ void NNInterpolate(const double* img, int width, int height, int channels,
double
x
,
double
y
,
double
*
out
);
double
x
,
double
y
,
double
*
out
);
template
<
typename
T
>
template
<
typename
T
>
inline
T
__min
(
T
a
,
T
b
)
{
inline
T
__min
__
(
T
a
,
T
b
)
{
return
a
>
b
?
b
:
a
;
return
a
>
b
?
b
:
a
;
}
}
template
<
typename
T
>
template
<
typename
T
>
inline
T
__max
(
T
a
,
T
b
)
{
inline
T
__max
__
(
T
a
,
T
b
)
{
return
(
a
<
b
)
?
b
:
a
;
return
(
a
<
b
)
?
b
:
a
;
}
}
template
<
typename
T
>
template
<
typename
T
>
inline
T
EnforceRange
(
const
T
x
,
const
int
MaxValue
)
{
inline
T
EnforceRange
(
const
T
x
,
const
int
MaxValue
)
{
return
__min
(
__max
(
x
,
0
),
MaxValue
);
return
__min
__
(
__max
__
(
x
,
0
),
MaxValue
);
}
}
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