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
Yushin Cho
aom-rav1e
Commits
7bb436fe
Commit
7bb436fe
authored
Jul 01, 2013
by
Paul Wilkins
Committed by
Gerrit Code Review
Jul 01, 2013
Browse files
Merge "New motion threshold factor - speed feature."
parents
632289b3
13772781
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_onyx_if.c
View file @
7bb436fe
...
...
@@ -536,7 +536,9 @@ static void set_default_lf_deltas(VP9_COMP *cpi) {
static
void
set_rd_speed_thresholds
(
VP9_COMP
*
cpi
,
int
mode
,
int
speed
)
{
SPEED_FEATURES
*
sf
=
&
cpi
->
sf
;
int
speed_multiplier
=
speed
+
1
;
int
speed_multiplier
=
(
cpi
->
sf
.
adjust_thresholds_by_speed
)
?
speed
+
1
:
1
;
int
new_motion_multiplier
=
speed_multiplier
*
(
sf
->
new_motion_thresh_factor
+
1
);
int
i
;
// Set baseline threshold values
...
...
@@ -555,26 +557,20 @@ static void set_rd_speed_thresholds(VP9_COMP *cpi, int mode, int speed) {
sf
->
thresh_mult
[
THR_NEARG
]
+=
speed_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_NEARA
]
+=
speed_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_DC
]
=
0
;
sf
->
thresh_mult
[
THR_DC
]
+
=
speed_multiplier
*
100
0
;
sf
->
thresh_mult
[
THR_TM
]
+=
speed_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_V_PRED
]
+=
speed_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_H_PRED
]
+=
speed_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_D45_PRED
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_D135_PRED
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_D117_PRED
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_D153_PRED
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_D27_PRED
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_D63_PRED
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_B_PRED
]
+=
speed_multiplier
*
2500
;
sf
->
thresh_mult
[
THR_NEWMV
]
+=
speed_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_NEWG
]
+=
speed_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_NEWA
]
+=
speed_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_SPLITMV
]
+=
speed_multiplier
*
2500
;
sf
->
thresh_mult
[
THR_SPLITG
]
+=
speed_multiplier
*
2500
;
sf
->
thresh_mult
[
THR_SPLITA
]
+=
speed_multiplier
*
2500
;
sf
->
thresh_mult
[
THR_V_PRED
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_H_PRED
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_D45_PRED
]
+=
speed_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_D135_PRED
]
+=
speed_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_D117_PRED
]
+=
speed_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_D153_PRED
]
+=
speed_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_D27_PRED
]
+=
speed_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_D63_PRED
]
+=
speed_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_NEWMV
]
+=
new_motion_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_NEWG
]
+=
new_motion_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_NEWA
]
+=
new_motion_multiplier
*
1000
;
sf
->
thresh_mult
[
THR_COMP_ZEROLA
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_COMP_ZEROGA
]
+=
speed_multiplier
*
1500
;
...
...
@@ -585,11 +581,16 @@ static void set_rd_speed_thresholds(VP9_COMP *cpi, int mode, int speed) {
sf
->
thresh_mult
[
THR_COMP_NEARLA
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_COMP_NEARGA
]
+=
speed_multiplier
*
1500
;
sf
->
thresh_mult
[
THR_COMP_NEWLA
]
+=
speed_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_COMP_NEWGA
]
+=
speed_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_COMP_NEWLA
]
+=
new_motion_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_COMP_NEWGA
]
+=
new_motion_multiplier
*
2000
;
sf
->
thresh_mult
[
THR_B_PRED
]
+=
speed_multiplier
*
2500
;
sf
->
thresh_mult
[
THR_COMP_SPLITLA
]
+=
speed_multiplier
*
4500
;
sf
->
thresh_mult
[
THR_COMP_SPLITGA
]
+=
speed_multiplier
*
4500
;
sf
->
thresh_mult
[
THR_SPLITMV
]
+=
new_motion_multiplier
*
2500
;
sf
->
thresh_mult
[
THR_SPLITG
]
+=
new_motion_multiplier
*
2500
;
sf
->
thresh_mult
[
THR_SPLITA
]
+=
new_motion_multiplier
*
2500
;
sf
->
thresh_mult
[
THR_COMP_SPLITLA
]
+=
new_motion_multiplier
*
4500
;
sf
->
thresh_mult
[
THR_COMP_SPLITGA
]
+=
new_motion_multiplier
*
4500
;
if
(
cpi
->
sf
.
skip_lots_of_modes
)
{
for
(
i
=
0
;
i
<
MAX_MODES
;
++
i
)
...
...
@@ -690,12 +691,13 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
sf
->
max_step_search_steps
=
MAX_MVSEARCH_STEPS
;
sf
->
comp_inter_joint_search_thresh
=
BLOCK_SIZE_AB4X4
;
sf
->
adpative_rd_thresh
=
0
;
sf
->
adjust_thresholds_by_speed
=
0
;
sf
->
new_motion_thresh_factor
=
0
;
sf
->
use_lastframe_partitioning
=
0
;
sf
->
use_largest_txform
=
0
;
sf
->
use_8tap_always
=
0
;
sf
->
use_avoid_tested_higherror
=
0
;
sf
->
skip_lots_of_modes
=
0
;
sf
->
adjust_thresholds_by_speed
=
0
;
sf
->
partition_by_variance
=
0
;
sf
->
use_one_partition_size_always
=
0
;
sf
->
less_rectangular_check
=
0
;
...
...
@@ -723,13 +725,12 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
#else
sf
->
static_segmentation
=
0
;
#endif
sf
->
comp_inter_joint_search_thresh
=
BLOCK_SIZE_MB16X16
;
sf
->
auto_mv_step_size
=
1
;
sf
->
use_avoid_tested_higherror
=
1
;
sf
->
auto_mv_step_size
=
1
;
sf
->
adpative_rd_thresh
=
1
;
if
(
speed
==
1
)
{
sf
->
comp_inter_joint_search_thresh
=
BLOCK_SIZE_TYPES
;
sf
->
new_motion_thresh_factor
=
1
;
sf
->
less_rectangular_check
=
1
;
sf
->
use_largest_txform
=
!
(
cpi
->
common
.
frame_type
==
KEY_FRAME
||
cpi
->
common
.
intra_only
||
...
...
@@ -775,10 +776,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
};
/* switch */
// Set rd thresholds based on mode and speed setting
if
(
cpi
->
sf
.
adjust_thresholds_by_speed
)
set_rd_speed_thresholds
(
cpi
,
mode
,
speed
);
else
set_rd_speed_thresholds
(
cpi
,
mode
,
0
);
set_rd_speed_thresholds
(
cpi
,
mode
,
speed
);
// Slow quant, dct and trellis not worthwhile for first pass
// so make sure they are always turned off.
...
...
vp9/encoder/vp9_onyx_int.h
View file @
7bb436fe
...
...
@@ -216,14 +216,15 @@ typedef struct {
int
search_best_filter
;
int
static_segmentation
;
int
comp_inter_joint_search_thresh
;
int
adpative_rd_thresh
;
int
skip_encode_sb
;
int
use_lastframe_partitioning
;
int
use_largest_txform
;
int
use_8tap_always
;
int
use_avoid_tested_higherror
;
int
skip_lots_of_modes
;
int
adpative_rd_thresh
;
int
adjust_thresholds_by_speed
;
int
new_motion_thresh_factor
;
int
partition_by_variance
;
int
use_one_partition_size_always
;
int
less_rectangular_check
;
...
...
vp9/encoder/vp9_rdopt.c
View file @
7bb436fe
...
...
@@ -54,20 +54,20 @@ DECLARE_ALIGNED(16, extern const uint8_t,
const
MODE_DEFINITION
vp9_mode_order
[
MAX_MODES
]
=
{
{
ZEROMV
,
LAST_FRAME
,
NONE
},
{
DC_PRED
,
INTRA_FRAME
,
NONE
},
{
NEARESTMV
,
LAST_FRAME
,
NONE
},
{
NEARMV
,
LAST_FRAME
,
NONE
},
{
ZEROMV
,
GOLDEN_FRAME
,
NONE
},
{
NEARESTMV
,
GOLDEN_FRAME
,
NONE
},
{
ZEROMV
,
ALTREF_FRAME
,
NONE
},
{
NEARESTMV
,
ALTREF_FRAME
,
NONE
},
{
ZEROMV
,
GOLDEN_FRAME
,
NONE
},
{
NEARESTMV
,
GOLDEN_FRAME
,
NONE
},
{
NEARMV
,
GOLDEN_FRAME
,
NONE
},
{
NEARMV
,
ALTREF_FRAME
,
NONE
},
{
DC_PRED
,
INTRA_FRAME
,
NONE
},
{
TM_PRED
,
INTRA_FRAME
,
NONE
},
{
V_PRED
,
INTRA_FRAME
,
NONE
},
{
H_PRED
,
INTRA_FRAME
,
NONE
},
{
D45_PRED
,
INTRA_FRAME
,
NONE
},
...
...
@@ -77,18 +77,10 @@ const MODE_DEFINITION vp9_mode_order[MAX_MODES] = {
{
D27_PRED
,
INTRA_FRAME
,
NONE
},
{
D63_PRED
,
INTRA_FRAME
,
NONE
},
{
TM_PRED
,
INTRA_FRAME
,
NONE
},
{
NEWMV
,
LAST_FRAME
,
NONE
},
{
NEWMV
,
GOLDEN_FRAME
,
NONE
},
{
NEWMV
,
ALTREF_FRAME
,
NONE
},
{
SPLITMV
,
LAST_FRAME
,
NONE
},
{
SPLITMV
,
GOLDEN_FRAME
,
NONE
},
{
SPLITMV
,
ALTREF_FRAME
,
NONE
},
{
I4X4_PRED
,
INTRA_FRAME
,
NONE
},
/* compound prediction modes */
{
ZEROMV
,
LAST_FRAME
,
ALTREF_FRAME
},
{
NEARESTMV
,
LAST_FRAME
,
ALTREF_FRAME
},
...
...
@@ -101,8 +93,12 @@ const MODE_DEFINITION vp9_mode_order[MAX_MODES] = {
{
NEWMV
,
LAST_FRAME
,
ALTREF_FRAME
},
{
NEWMV
,
GOLDEN_FRAME
,
ALTREF_FRAME
},
{
SPLITMV
,
LAST_FRAME
,
NONE
},
{
SPLITMV
,
GOLDEN_FRAME
,
NONE
},
{
SPLITMV
,
ALTREF_FRAME
,
NONE
},
{
SPLITMV
,
LAST_FRAME
,
ALTREF_FRAME
},
{
SPLITMV
,
GOLDEN_FRAME
,
ALTREF_FRAME
},
{
I4X4_PRED
,
INTRA_FRAME
,
NONE
},
};
// The baseline rd thresholds for breaking out of the rd loop for
...
...
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