Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
2c8c1f53
Commit
2c8c1f53
authored
Apr 16, 2014
by
Dmitry Kovalev
Browse files
Replacing cpu_used with speed in VP9_CONFIG.
Change-Id: I86b85b5c11388e84a48f8936330c0d920df5d1f0
parent
833ad89f
Changes
8
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_firstpass.c
View file @
2c8c1f53
...
...
@@ -911,7 +911,7 @@ static int get_twopass_worst_quality(const VP9_COMP *cpi,
const
int
num_mbs
=
cpi
->
common
.
MBs
;
const
double
section_err
=
stats
->
coded_error
/
stats
->
count
;
const
double
err_per_mb
=
section_err
/
num_mbs
;
const
double
speed_term
=
1
.
0
+
0
.
04
*
cpi
->
speed
;
const
double
speed_term
=
1
.
0
+
0
.
04
*
cpi
->
oxcf
.
speed
;
const
int
target_norm_bits_per_mb
=
((
uint64_t
)
section_target_bandwidth
<<
BPER_MB_NORMBITS
)
/
num_mbs
;
int
q
;
...
...
vp9/encoder/vp9_mbgraph.c
View file @
2c8c1f53
...
...
@@ -38,8 +38,8 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
// Further step/diamond searches as necessary
int
step_param
=
cpi
->
sf
.
reduce_first_step_size
+
(
cpi
->
speed
<
8
?
(
cpi
->
speed
>
5
?
1
:
0
)
:
2
)
;
step_param
=
MIN
(
step_param
,
(
cpi
->
sf
.
max_step_search_steps
-
2
)
)
;
(
cpi
->
oxcf
.
speed
>
5
?
1
:
0
);
step_param
=
MIN
(
step_param
,
cpi
->
sf
.
max_step_search_steps
-
2
);
vp9_set_mv_search_range
(
x
,
ref_mv
);
...
...
vp9/encoder/vp9_onyx_if.c
View file @
2c8c1f53
...
...
@@ -705,14 +705,10 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) {
cpi
->
oxcf
=
*
oxcf
;
if
(
cpi
->
oxcf
.
cpu_used
==
-
6
)
cpi
->
oxcf
.
play_alternate
=
0
;
switch
(
cpi
->
oxcf
.
mode
)
{
// Real time and one pass deprecated in test code base
case
ONE_PASS_GOOD
:
cpi
->
pass
=
0
;
cpi
->
oxcf
.
cpu_used
=
clamp
(
cpi
->
oxcf
.
cpu_used
,
-
5
,
5
);
break
;
case
ONE_PASS_BEST
:
...
...
@@ -725,7 +721,6 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) {
case
TWO_PASS_SECOND_GOOD
:
cpi
->
pass
=
2
;
cpi
->
oxcf
.
cpu_used
=
clamp
(
cpi
->
oxcf
.
cpu_used
,
-
5
,
5
);
break
;
case
TWO_PASS_SECOND_BEST
:
...
...
@@ -734,6 +729,7 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) {
case
REALTIME
:
cpi
->
pass
=
0
;
cpi
->
oxcf
.
play_alternate
=
0
;
break
;
}
...
...
@@ -833,8 +829,6 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) {
(
int
)
cpi
->
oxcf
.
target_bandwidth
);
}
cpi
->
speed
=
abs
(
cpi
->
oxcf
.
cpu_used
);
#if CONFIG_MULTIPLE_ARF
vp9_zero
(
cpi
->
alt_ref_source
);
#else
...
...
vp9/encoder/vp9_onyx_int.h
View file @
2c8c1f53
...
...
@@ -196,7 +196,7 @@ typedef struct VP9_CONFIG {
int
noise_sensitivity
;
// pre processing blur: recommendation 0
int
sharpness
;
// sharpening output: recommendation 0:
int
cpu_us
ed
;
int
spe
ed
;
unsigned
int
rc_max_intra_bitrate_pct
;
MODE
mode
;
...
...
@@ -402,10 +402,6 @@ typedef struct VP9_COMP {
int
mbgraph_n_frames
;
// number of frames filled in the above
int
static_mb_pct
;
// % forced skip mbs by segmentation
// for real time encoding
int
speed
;
int
cpu_used
;
int
pass
;
int
ref_frame_flags
;
...
...
vp9/encoder/vp9_rdopt.c
View file @
2c8c1f53
...
...
@@ -451,7 +451,7 @@ static void model_rd_for_sb(VP9_COMP *cpi, BLOCK_SIZE bsize,
x
->
pred_sse
[
ref
]
=
sse
;
// Fast approximate the modelling function.
if
(
cpi
->
speed
>
4
)
{
if
(
cpi
->
oxcf
.
speed
>
4
)
{
int64_t
rate
;
int64_t
dist
;
int64_t
square_error
=
sse
;
...
...
vp9/encoder/vp9_speed_features.c
View file @
2c8c1f53
...
...
@@ -289,7 +289,6 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
SPEED_FEATURES
*
const
sf
=
&
cpi
->
sf
;
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
const
VP9_CONFIG
*
const
oxcf
=
&
cpi
->
oxcf
;
const
int
speed
=
cpi
->
speed
<
0
?
-
cpi
->
speed
:
cpi
->
speed
;
int
i
;
// best quality defaults
...
...
@@ -360,10 +359,10 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
case
TWO_PASS_FIRST
:
case
ONE_PASS_GOOD
:
case
TWO_PASS_SECOND_GOOD
:
set_good_speed_feature
(
cpi
,
cm
,
sf
,
speed
);
set_good_speed_feature
(
cpi
,
cm
,
sf
,
oxcf
->
speed
);
break
;
case
REALTIME
:
set_rt_speed_feature
(
cm
,
sf
,
speed
);
set_rt_speed_feature
(
cm
,
sf
,
oxcf
->
speed
);
break
;
}
...
...
vp9/encoder/vp9_temporal_filter.c
View file @
2c8c1f53
...
...
@@ -151,12 +151,8 @@ static int temporal_filter_find_matching_mb_c(VP9_COMP *cpi,
xd
->
plane
[
0
].
pre
[
0
].
buf
=
frame_ptr_buf
;
xd
->
plane
[
0
].
pre
[
0
].
stride
=
stride
;
// Further step/diamond searches as necessary
if
(
cpi
->
speed
<
8
)
step_param
=
cpi
->
sf
.
reduce_first_step_size
+
((
cpi
->
speed
>
5
)
?
1
:
0
);
else
step_param
=
cpi
->
sf
.
reduce_first_step_size
+
2
;
step_param
=
MIN
(
step_param
,
(
cpi
->
sf
.
max_step_search_steps
-
2
));
step_param
=
cpi
->
sf
.
reduce_first_step_size
+
(
cpi
->
oxcf
.
speed
>
5
?
1
:
0
);
step_param
=
MIN
(
step_param
,
cpi
->
sf
.
max_step_search_steps
-
2
);
/*cpi->sf.search_method == HEX*/
// Ignore mv costing by sending NULL pointer instead of cost arrays
...
...
vp9/vp9_cx_iface.c
View file @
2c8c1f53
...
...
@@ -356,7 +356,7 @@ static vpx_codec_err_t set_encoder_config(
oxcf
->
key_freq
=
cfg
->
kf_max_dist
;
oxcf
->
cpu_used
=
extra_cfg
->
cpu_used
;
oxcf
->
speed
=
clamp
(
abs
(
extra_cfg
->
cpu_used
),
0
,
7
)
;
oxcf
->
encode_breakout
=
extra_cfg
->
static_thresh
;
oxcf
->
play_alternate
=
extra_cfg
->
enable_auto_alt_ref
;
oxcf
->
noise_sensitivity
=
extra_cfg
->
noise_sensitivity
;
...
...
Write
Preview
Supports
Markdown
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