Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
56f27522
Commit
56f27522
authored
Feb 13, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Feb 13, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Using MV instead of int_mv inside vp9_full_pixel_diamond()."
parents
46025ce5
fde1b6d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
31 deletions
+25
-31
vp9/encoder/vp9_mcomp.c
vp9/encoder/vp9_mcomp.c
+21
-26
vp9/encoder/vp9_mcomp.h
vp9/encoder/vp9_mcomp.h
+1
-1
vp9/encoder/vp9_pickmode.c
vp9/encoder/vp9_pickmode.c
+1
-2
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_rdopt.c
+2
-2
No files found.
vp9/encoder/vp9_mcomp.c
View file @
56f27522
...
...
@@ -1289,62 +1289,57 @@ int vp9_diamond_search_sadx4(const MACROBLOCK *x,
int
vp9_full_pixel_diamond
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
MV
*
mvp_full
,
int
step_param
,
int
sadpb
,
int
further_steps
,
int
do_refine
,
int
sadpb
,
int
further_steps
,
int
do_refine
,
const
vp9_variance_fn_ptr_t
*
fn_ptr
,
const
MV
*
ref_mv
,
int_mv
*
dst_mv
)
{
int_mv
temp_mv
;
int
thissme
,
n
,
num00
;
int
bestsme
=
cpi
->
diamond_search_sad
(
x
,
mvp_full
,
&
temp_mv
.
as_mv
,
step_param
,
sadpb
,
&
n
um00
,
const
MV
*
ref_mv
,
MV
*
dst_mv
)
{
MV
temp_mv
;
int
thissme
,
n
,
num00
=
0
;
int
bestsme
=
cpi
->
diamond_search_sad
(
x
,
mvp_full
,
&
temp_mv
,
step_param
,
sadpb
,
&
n
,
fn_ptr
,
x
->
nmvjointcost
,
x
->
mvcost
,
ref_mv
);
dst_mv
->
as_int
=
temp_mv
.
as_int
;
*
dst_mv
=
temp_mv
;
n
=
num00
;
num00
=
0
;
/* If there won't be more n-step search, check to see if refining search is
* needed. */
// If there won't be more n-step search, check to see if refining search is
// needed.
if
(
n
>
further_steps
)
do_refine
=
0
;
while
(
n
<
further_steps
)
{
n
++
;
++
n
;
if
(
num00
)
{
num00
--
;
}
else
{
thissme
=
cpi
->
diamond_search_sad
(
x
,
mvp_full
,
&
temp_mv
.
as_mv
,
thissme
=
cpi
->
diamond_search_sad
(
x
,
mvp_full
,
&
temp_mv
,
step_param
+
n
,
sadpb
,
&
num00
,
fn_ptr
,
x
->
nmvjointcost
,
x
->
mvcost
,
ref_mv
);
/
*
check to see if refining search is needed.
*/
if
(
num00
>
(
further_steps
-
n
)
)
/
/
check to see if refining search is needed.
if
(
num00
>
further_steps
-
n
)
do_refine
=
0
;
if
(
thissme
<
bestsme
)
{
bestsme
=
thissme
;
dst_mv
->
as_int
=
temp_mv
.
as_int
;
*
dst_mv
=
temp_mv
;
}
}
}
/* final 1-away diamond refining search */
if
(
do_refine
==
1
)
{
int
search_range
=
8
;
int_mv
best_mv
;
best_mv
.
as_int
=
dst_mv
->
as_int
;
thissme
=
cpi
->
refining_search_sad
(
x
,
&
best_mv
.
as_mv
,
sadpb
,
search_range
,
// final 1-away diamond refining search
if
(
do_refine
)
{
const
int
search_range
=
8
;
MV
best_mv
=
*
dst_mv
;
thissme
=
cpi
->
refining_search_sad
(
x
,
&
best_mv
,
sadpb
,
search_range
,
fn_ptr
,
x
->
nmvjointcost
,
x
->
mvcost
,
ref_mv
);
if
(
thissme
<
bestsme
)
{
bestsme
=
thissme
;
dst_mv
->
as_int
=
best_mv
.
as_int
;
*
dst_mv
=
best_mv
;
}
}
return
bestsme
;
}
...
...
vp9/encoder/vp9_mcomp.h
View file @
56f27522
...
...
@@ -46,7 +46,7 @@ int vp9_full_pixel_diamond(struct VP9_COMP *cpi, MACROBLOCK *x,
MV
*
mvp_full
,
int
step_param
,
int
sadpb
,
int
further_steps
,
int
do_refine
,
const
vp9_variance_fn_ptr_t
*
fn_ptr
,
const
MV
*
ref_mv
,
int_mv
*
dst_mv
);
const
MV
*
ref_mv
,
MV
*
dst_mv
);
int
vp9_hex_search
(
const
MACROBLOCK
*
x
,
MV
*
ref_mv
,
...
...
vp9/encoder/vp9_pickmode.c
View file @
56f27522
...
...
@@ -99,8 +99,7 @@ static int full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
mvp_full
.
row
>>=
3
;
vp9_full_pixel_diamond
(
cpi
,
x
,
&
mvp_full
,
step_param
,
sadpb
,
further_steps
,
1
,
&
cpi
->
fn_ptr
[
bsize
],
&
ref_mv
.
as_mv
,
tmp_mv
);
&
cpi
->
fn_ptr
[
bsize
],
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
x
->
mv_col_min
=
tmp_col_min
;
x
->
mv_col_max
=
tmp_col_max
;
x
->
mv_row_min
=
tmp_row_min
;
...
...
vp9/encoder/vp9_rdopt.c
View file @
56f27522
...
...
@@ -1819,7 +1819,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
bestsme
=
vp9_full_pixel_diamond
(
cpi
,
x
,
&
mvp_full
,
step_param
,
sadpb
,
further_steps
,
0
,
v_fn_ptr
,
&
bsi
->
ref_mv
->
as_mv
,
new_mv
);
&
new_mv
->
as_mv
);
}
// Should we do a full search (best quality only)
...
...
@@ -2440,7 +2440,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
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
);
&
ref_mv
.
as_mv
,
&
tmp_mv
->
as_mv
);
}
x
->
mv_col_min
=
tmp_col_min
;
...
...
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