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
129c994f
Commit
129c994f
authored
Feb 27, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Feb 27, 2014
Browse files
Merge "Replacing int_mv with MV in single_motion_search()."
parents
516f228d
a05faf74
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_rdopt.c
View file @
129c994f
...
...
@@ -2382,7 +2382,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
int
sadpb
=
x
->
sadperbit16
;
MV
mvp_full
;
int
ref
=
mbmi
->
ref_frame
[
0
];
int_mv
ref_mv
=
mbmi
->
ref_mvs
[
ref
][
0
];
MV
ref_mv
=
mbmi
->
ref_mvs
[
ref
][
0
]
.
as_mv
;
int
tmp_col_min
=
x
->
mv_col_min
;
int
tmp_col_max
=
x
->
mv_col_max
;
...
...
@@ -2392,10 +2392,10 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
const
YV12_BUFFER_CONFIG
*
scaled_ref_frame
=
vp9_get_scaled_ref_frame
(
cpi
,
ref
);
int_mv
pred_mv
[
3
];
pred_mv
[
0
]
=
mbmi
->
ref_mvs
[
ref
][
0
];
pred_mv
[
1
]
=
mbmi
->
ref_mvs
[
ref
][
1
];
pred_mv
[
2
]
=
x
->
pred_mv
[
ref
];
MV
pred_mv
[
3
];
pred_mv
[
0
]
=
mbmi
->
ref_mvs
[
ref
][
0
]
.
as_mv
;
pred_mv
[
1
]
=
mbmi
->
ref_mvs
[
ref
][
1
]
.
as_mv
;
pred_mv
[
2
]
=
x
->
pred_mv
[
ref
]
.
as_mv
;
if
(
scaled_ref_frame
)
{
int
i
;
...
...
@@ -2408,7 +2408,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_set_mv_search_range
(
x
,
&
ref_mv
.
as_mv
);
vp9_set_mv_search_range
(
x
,
&
ref_mv
);
// Work out the size of the first step in the mv step search.
// 0 here is maximum length first step. 1 is MAX >> 1 etc.
...
...
@@ -2453,7 +2453,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
}
}
mvp_full
=
pred_mv
[
x
->
mv_best_ref_index
[
ref
]]
.
as_mv
;
mvp_full
=
pred_mv
[
x
->
mv_best_ref_index
[
ref
]];
mvp_full
.
col
>>=
3
;
mvp_full
.
row
>>=
3
;
...
...
@@ -2464,24 +2464,24 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
if
(
cpi
->
sf
.
search_method
==
FAST_HEX
)
{
bestsme
=
vp9_fast_hex_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
&
ref_mv
,
&
tmp_mv
->
as_mv
);
}
else
if
(
cpi
->
sf
.
search_method
==
HEX
)
{
bestsme
=
vp9_hex_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
&
ref_mv
,
&
tmp_mv
->
as_mv
);
}
else
if
(
cpi
->
sf
.
search_method
==
SQUARE
)
{
bestsme
=
vp9_square_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
&
ref_mv
,
&
tmp_mv
->
as_mv
);
}
else
if
(
cpi
->
sf
.
search_method
==
BIGDIA
)
{
bestsme
=
vp9_bigdia_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
1
,
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
&
ref_mv
,
&
tmp_mv
->
as_mv
);
}
else
{
bestsme
=
vp9_full_pixel_diamond
(
cpi
,
x
,
&
mvp_full
,
step_param
,
sadpb
,
further_steps
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
&
ref_mv
,
&
tmp_mv
->
as_mv
);
}
x
->
mv_col_min
=
tmp_col_min
;
...
...
@@ -2491,7 +2491,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
if
(
bestsme
<
INT_MAX
)
{
int
dis
;
/* TODO: use dis in distortion calculation later. */
cpi
->
find_fractional_mv_step
(
x
,
&
tmp_mv
->
as_mv
,
&
ref_mv
.
as_mv
,
cpi
->
find_fractional_mv_step
(
x
,
&
tmp_mv
->
as_mv
,
&
ref_mv
,
cm
->
allow_high_precision_mv
,
x
->
errorperbit
,
&
cpi
->
fn_ptr
[
bsize
],
...
...
@@ -2500,7 +2500,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
x
->
nmvjointcost
,
x
->
mvcost
,
&
dis
,
&
x
->
pred_sse
[
ref
]);
}
*
rate_mv
=
vp9_mv_bit_cost
(
&
tmp_mv
->
as_mv
,
&
ref_mv
.
as_mv
,
*
rate_mv
=
vp9_mv_bit_cost
(
&
tmp_mv
->
as_mv
,
&
ref_mv
,
x
->
nmvjointcost
,
x
->
mvcost
,
MV_COST_WEIGHT
);
if
(
cpi
->
sf
.
adaptive_motion_search
&&
cpi
->
common
.
show_frame
)
...
...
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