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
Xiph.Org
aom-rav1e
Commits
1aedfc99
Commit
1aedfc99
authored
Aug 12, 2013
by
Dmitry Kovalev
Browse files
Using MV* instead of int_mv* as argument of vp9_clamp_mv_min_max.
Change-Id: I3c45916a9059f11b41e9d798e34ffee052969a44
parent
3984b41c
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_mbgraph.c
View file @
1aedfc99
...
...
@@ -40,7 +40,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
(
cpi
->
speed
<
8
?
(
cpi
->
speed
>
5
?
1
:
0
)
:
2
);
step_param
=
MIN
(
step_param
,
(
cpi
->
sf
.
max_step_search_steps
-
2
));
vp9_clamp_mv_min_max
(
x
,
ref_mv
);
vp9_clamp_mv_min_max
(
x
,
&
ref_mv
->
as_mv
);
ref_full
.
as_mv
.
col
=
ref_mv
->
as_mv
.
col
>>
3
;
ref_full
.
as_mv
.
row
=
ref_mv
->
as_mv
.
row
>>
3
;
...
...
vp9/encoder/vp9_mcomp.c
View file @
1aedfc99
...
...
@@ -24,15 +24,14 @@
// #define NEW_DIAMOND_SEARCH
void
vp9_clamp_mv_min_max
(
MACROBLOCK
*
x
,
int_mv
*
ref_mv
)
{
const
int
col_min
=
(
ref_mv
->
as_mv
.
col
>>
3
)
-
MAX_FULL_PEL_VAL
+
((
ref_mv
->
as_mv
.
col
&
7
)
?
1
:
0
);
const
int
row_min
=
(
ref_mv
->
as_mv
.
row
>>
3
)
-
MAX_FULL_PEL_VAL
+
((
ref_mv
->
as_mv
.
row
&
7
)
?
1
:
0
);
const
int
col_max
=
(
ref_mv
->
as_mv
.
col
>>
3
)
+
MAX_FULL_PEL_VAL
;
const
int
row_max
=
(
ref_mv
->
as_mv
.
row
>>
3
)
+
MAX_FULL_PEL_VAL
;
/* Get intersection of UMV window and valid MV window to reduce # of checks in diamond search. */
void
vp9_clamp_mv_min_max
(
MACROBLOCK
*
x
,
MV
*
mv
)
{
const
int
col_min
=
(
mv
->
col
>>
3
)
-
MAX_FULL_PEL_VAL
+
(
mv
->
col
&
7
?
1
:
0
);
const
int
row_min
=
(
mv
->
row
>>
3
)
-
MAX_FULL_PEL_VAL
+
(
mv
->
row
&
7
?
1
:
0
);
const
int
col_max
=
(
mv
->
col
>>
3
)
+
MAX_FULL_PEL_VAL
;
const
int
row_max
=
(
mv
->
row
>>
3
)
+
MAX_FULL_PEL_VAL
;
// Get intersection of UMV window and valid MV window to reduce # of checks
// in diamond search.
if
(
x
->
mv_col_min
<
col_min
)
x
->
mv_col_min
=
col_min
;
if
(
x
->
mv_col_max
>
col_max
)
...
...
vp9/encoder/vp9_mcomp.h
View file @
1aedfc99
...
...
@@ -23,7 +23,7 @@
// Maximum size of the first step in full pel units
#define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1))
void
vp9_clamp_mv_min_max
(
MACROBLOCK
*
x
,
int_mv
*
ref_
mv
);
void
vp9_clamp_mv_min_max
(
MACROBLOCK
*
x
,
MV
*
mv
);
int
vp9_mv_bit_cost
(
int_mv
*
mv
,
int_mv
*
ref
,
int
*
mvjcost
,
int
*
mvcost
[
2
],
int
weight
);
void
vp9_init_dsmotion_compensation
(
MACROBLOCK
*
x
,
int
stride
);
...
...
vp9/encoder/vp9_rdopt.c
View file @
1aedfc99
...
...
@@ -2457,7 +2457,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
setup_pre_planes
(
xd
,
0
,
scaled_ref_frame
,
mi_row
,
mi_col
,
NULL
);
}
vp9_clamp_mv_min_max
(
x
,
&
ref_mv
);
vp9_clamp_mv_min_max
(
x
,
&
ref_mv
.
as_mv
);
// Adjust search parameters based on small partitions' result.
if
(
x
->
fast_ms
)
{
...
...
@@ -2637,7 +2637,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
// Compound motion search on first ref frame.
if
(
id
)
xd
->
plane
[
0
].
pre
[
0
]
=
ref_yv12
[
id
];
vp9_clamp_mv_min_max
(
x
,
&
ref_mv
[
id
]);
vp9_clamp_mv_min_max
(
x
,
&
ref_mv
[
id
]
.
as_mv
);
// Use mv result from single mode as mvp.
tmp_mv
.
as_int
=
frame_mv
[
refs
[
id
]].
as_int
;
...
...
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