Skip to content
GitLab
Projects
Groups
Snippets
/
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
aed826b0
Commit
aed826b0
authored
Feb 28, 2014
by
Dmitry Kovalev
Browse files
Using ref_mv[2] instead of two separate variables.
Change-Id: I909a81991aa0cc18afe6526542c7513837445213
parent
3c4a57bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_rdopt.c
View file @
aed826b0
...
...
@@ -1614,7 +1614,7 @@ typedef struct {
}
SEG_RDSTAT
;
typedef
struct
{
int_mv
*
ref_mv
,
*
second_ref_mv
;
int_mv
*
ref_mv
[
2
]
;
int_mv
mvp
;
int64_t
segment_rd
;
...
...
@@ -1822,30 +1822,30 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
// adjust src pointer for this block
mi_buf_shift
(
x
,
i
);
vp9_set_mv_search_range
(
x
,
&
bsi
->
ref_mv
->
as_mv
);
vp9_set_mv_search_range
(
x
,
&
bsi
->
ref_mv
[
0
]
->
as_mv
);
if
(
cpi
->
sf
.
search_method
==
HEX
)
{
bestsme
=
vp9_hex_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
v_fn_ptr
,
1
,
&
bsi
->
ref_mv
->
as_mv
,
&
bsi
->
ref_mv
[
0
]
->
as_mv
,
&
new_mv
->
as_mv
);
}
else
if
(
cpi
->
sf
.
search_method
==
SQUARE
)
{
bestsme
=
vp9_square_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
v_fn_ptr
,
1
,
&
bsi
->
ref_mv
->
as_mv
,
&
bsi
->
ref_mv
[
0
]
->
as_mv
,
&
new_mv
->
as_mv
);
}
else
if
(
cpi
->
sf
.
search_method
==
BIGDIA
)
{
bestsme
=
vp9_bigdia_search
(
x
,
&
mvp_full
,
step_param
,
sadpb
,
1
,
v_fn_ptr
,
1
,
&
bsi
->
ref_mv
->
as_mv
,
&
bsi
->
ref_mv
[
0
]
->
as_mv
,
&
new_mv
->
as_mv
);
}
else
{
bestsme
=
vp9_full_pixel_diamond
(
cpi
,
x
,
&
mvp_full
,
step_param
,
sadpb
,
further_steps
,
0
,
v_fn_ptr
,
&
bsi
->
ref_mv
->
as_mv
,
&
bsi
->
ref_mv
[
0
]
->
as_mv
,
&
new_mv
->
as_mv
);
}
...
...
@@ -1859,7 +1859,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
thissme
=
cpi
->
full_search_sad
(
x
,
&
mvp_full
,
sadpb
,
16
,
v_fn_ptr
,
x
->
nmvjointcost
,
x
->
mvcost
,
&
bsi
->
ref_mv
->
as_mv
,
&
bsi
->
ref_mv
[
0
]
->
as_mv
,
&
best_mv
->
as_mv
);
if
(
thissme
<
bestsme
)
{
bestsme
=
thissme
;
...
...
@@ -1875,7 +1875,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
int
distortion
;
cpi
->
find_fractional_mv_step
(
x
,
&
new_mv
->
as_mv
,
&
bsi
->
ref_mv
->
as_mv
,
&
bsi
->
ref_mv
[
0
]
->
as_mv
,
cm
->
allow_high_precision_mv
,
x
->
errorperbit
,
v_fn_ptr
,
cpi
->
sf
.
subpel_force_stop
,
...
...
@@ -1922,7 +1922,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
bsi
->
rdstat
[
i
][
mode_idx
].
brate
=
labels2mode
(
x
,
i
,
this_mode
,
&
mode_mv
[
this_mode
],
&
second_mode_mv
[
this_mode
],
frame_mv
,
seg_mvs
[
i
],
bsi
->
ref_mv
,
bsi
->
second_
ref_mv
,
x
->
nmvjointcost
,
bsi
->
ref_mv
[
0
]
,
bsi
->
ref_mv
[
1
]
,
x
->
nmvjointcost
,
x
->
mvcost
,
cpi
);
...
...
@@ -2031,7 +2031,7 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x,
labels2mode
(
x
,
i
,
mode_selected
,
&
mode_mv
[
mode_selected
],
&
second_mode_mv
[
mode_selected
],
frame_mv
,
seg_mvs
[
i
],
bsi
->
ref_mv
,
bsi
->
second_
ref_mv
,
x
->
nmvjointcost
,
bsi
->
ref_mv
[
0
]
,
bsi
->
ref_mv
[
1
]
,
x
->
nmvjointcost
,
x
->
mvcost
,
cpi
);
br
+=
bsi
->
rdstat
[
i
][
mode_idx
].
brate
;
...
...
@@ -2086,8 +2086,8 @@ static int64_t rd_pick_best_mbsegmentation(VP9_COMP *cpi, MACROBLOCK *x,
vp9_zero
(
*
bsi
);
bsi
->
segment_rd
=
best_rd
;
bsi
->
ref_mv
=
best_ref_mv
;
bsi
->
second_
ref_mv
=
second_best_ref_mv
;
bsi
->
ref_mv
[
0
]
=
best_ref_mv
;
bsi
->
ref_mv
[
1
]
=
second_best_ref_mv
;
bsi
->
mvp
.
as_int
=
best_ref_mv
->
as_int
;
bsi
->
mvthresh
=
mvthresh
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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