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
353246bd
Commit
353246bd
authored
Feb 11, 2011
by
Yunqing Wang
Committed by
Code Review
Feb 11, 2011
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Add improved_mv_pred flag in real-time mode"
parents
4f8a1660
9d0b2cbb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
21 deletions
+40
-21
vp8/encoder/onyx_if.c
vp8/encoder/onyx_if.c
+2
-0
vp8/encoder/onyx_int.h
vp8/encoder/onyx_int.h
+1
-0
vp8/encoder/pickinter.c
vp8/encoder/pickinter.c
+37
-21
No files found.
vp8/encoder/onyx_if.c
View file @
353246bd
...
...
@@ -601,6 +601,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf
->
first_step
=
0
;
sf
->
max_step_search_steps
=
MAX_MVSEARCH_STEPS
;
sf
->
improved_mv_pred
=
1
;
cpi
->
do_full
[
0
]
=
0
;
cpi
->
do_full
[
1
]
=
0
;
...
...
@@ -1123,6 +1124,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf
->
thresh_mult
[
THR_V_PRED
]
=
INT_MAX
;
sf
->
thresh_mult
[
THR_H_PRED
]
=
INT_MAX
;
sf
->
improved_mv_pred
=
0
;
}
if
(
Speed
>
8
)
...
...
vp8/encoder/onyx_int.h
View file @
353246bd
...
...
@@ -185,6 +185,7 @@ typedef struct
int
use_fastquant_for_pick
;
int
no_skip_block4x4_search
;
int
improved_mv_pred
;
}
SPEED_FEATURES
;
...
...
vp8/encoder/pickinter.c
View file @
353246bd
...
...
@@ -608,7 +608,7 @@ int vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int rec
continue
;
}
if
(
x
->
e_mbd
.
mode_info_context
->
mbmi
.
mode
==
NEWMV
)
if
(
cpi
->
sf
.
improved_mv_pred
&&
x
->
e_mbd
.
mode_info_context
->
mbmi
.
mode
==
NEWMV
)
{
if
(
!
saddone
)
{
...
...
@@ -685,37 +685,50 @@ int vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int rec
int
n
=
0
;
int
sadpb
=
x
->
sadperbit16
;
int
col_min
=
(
best_ref_mv
.
col
-
MAX_FULL_PEL_VAL
)
>>
3
;
int
col_max
=
(
best_ref_mv
.
col
+
MAX_FULL_PEL_VAL
)
>>
3
;
int
row_min
=
(
best_ref_mv
.
row
-
MAX_FULL_PEL_VAL
)
>>
3
;
int
row_max
=
(
best_ref_mv
.
row
+
MAX_FULL_PEL_VAL
)
>>
3
;
int
col_min
;
int
col_max
;
int
row_min
;
int
row_max
;
int
tmp_col_min
=
x
->
mv_col_min
;
int
tmp_col_max
=
x
->
mv_col_max
;
int
tmp_row_min
=
x
->
mv_row_min
;
int
tmp_row_max
=
x
->
mv_row_max
;
// 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
)
x
->
mv_col_max
=
col_max
;
if
(
x
->
mv_row_min
<
row_min
)
x
->
mv_row_min
=
row_min
;
if
(
x
->
mv_row_max
>
row_max
)
x
->
mv_row_max
=
row_max
;
int
speed_adjust
=
(
cpi
->
Speed
>
5
)
?
((
cpi
->
Speed
>=
8
)
?
3
:
2
)
:
1
;
// Further step/diamond searches as necessary
step_param
=
cpi
->
sf
.
first_step
+
speed_adjust
;
if
(
cpi
->
sf
.
improved_mv_pred
)
{
int
speed_adjust
=
(
cpi
->
Speed
>
5
)
?
((
cpi
->
Speed
>=
8
)
?
3
:
2
)
:
1
;
step_param
=
cpi
->
sf
.
first_step
+
speed_adjust
;
sr
+=
speed_adjust
;
//adjust search range according to sr from mv prediction
if
(
sr
>
step_param
)
step_param
=
sr
;
further_steps
=
(
cpi
->
Speed
>=
8
)
?
0
:
(
cpi
->
sf
.
max_step_search_steps
-
1
-
step_param
);
col_min
=
(
best_ref_mv
.
col
-
MAX_FULL_PEL_VAL
)
>>
3
;
col_max
=
(
best_ref_mv
.
col
+
MAX_FULL_PEL_VAL
)
>>
3
;
row_min
=
(
best_ref_mv
.
row
-
MAX_FULL_PEL_VAL
)
>>
3
;
row_max
=
(
best_ref_mv
.
row
+
MAX_FULL_PEL_VAL
)
>>
3
;
// 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
)
x
->
mv_col_max
=
col_max
;
if
(
x
->
mv_row_min
<
row_min
)
x
->
mv_row_min
=
row_min
;
if
(
x
->
mv_row_max
>
row_max
)
x
->
mv_row_max
=
row_max
;
}
else
{
mvp
.
row
=
best_ref_mv
.
row
;
mvp
.
col
=
best_ref_mv
.
col
;
}
further_steps
=
(
cpi
->
Speed
>=
8
)
?
0
:
(
cpi
->
sf
.
max_step_search_steps
-
1
-
step_param
);
if
(
cpi
->
sf
.
search_method
==
HEX
)
{
bestsme
=
vp8_hex_search
(
x
,
b
,
d
,
&
mvp
,
&
d
->
bmi
.
mv
.
as_mv
,
step_param
,
sadpb
/*x->errorperbit*/
,
&
num00
,
&
cpi
->
fn_ptr
[
BLOCK_16X16
],
x
->
mvsadcost
,
x
->
mvcost
,
&
best_ref_mv
);
...
...
@@ -760,10 +773,13 @@ int vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int rec
}
}
x
->
mv_col_min
=
tmp_col_min
;
x
->
mv_col_max
=
tmp_col_max
;
x
->
mv_row_min
=
tmp_row_min
;
x
->
mv_row_max
=
tmp_row_max
;
if
(
cpi
->
sf
.
improved_mv_pred
)
{
x
->
mv_col_min
=
tmp_col_min
;
x
->
mv_col_max
=
tmp_col_max
;
x
->
mv_row_min
=
tmp_row_min
;
x
->
mv_row_max
=
tmp_row_max
;
}
if
(
bestsme
<
INT_MAX
)
cpi
->
find_fractional_mv_step
(
x
,
b
,
d
,
&
d
->
bmi
.
mv
.
as_mv
,
&
best_ref_mv
,
x
->
errorperbit
,
&
cpi
->
fn_ptr
[
BLOCK_16X16
],
cpi
->
mb
.
mvcost
);
...
...
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