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
Xiph.Org
aom-rav1e
Commits
f7388950
Commit
f7388950
authored
May 22, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
May 22, 2014
Browse files
Merge "Cleaning up calc_frame_boost()."
parents
b59b3241
da39b6a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_firstpass.c
View file @
f7388950
...
...
@@ -1142,16 +1142,17 @@ static void accumulate_frame_motion_stats(
}
// Calculate a baseline boost number for the current frame.
static
double
calc_frame_boost
(
VP9_COMP
*
cpi
,
FIRSTPASS_STATS
*
this_frame
,
static
double
calc_frame_boost
(
const
TWO_PASS
*
twopass
,
const
FIRSTPASS_STATS
*
this_frame
,
double
this_frame_mv_in_out
)
{
double
frame_boost
;
// Underlying boost factor is based on inter intra error ratio.
if
(
this_frame
->
intra_error
>
cpi
->
twopass
.
gf_intra_err_min
)
if
(
this_frame
->
intra_error
>
twopass
->
gf_intra_err_min
)
frame_boost
=
(
IIFACTOR
*
this_frame
->
intra_error
/
DOUBLE_DIVIDE_CHECK
(
this_frame
->
coded_error
));
else
frame_boost
=
(
IIFACTOR
*
cpi
->
twopass
.
gf_intra_err_min
/
frame_boost
=
(
IIFACTOR
*
twopass
->
gf_intra_err_min
/
DOUBLE_DIVIDE_CHECK
(
this_frame
->
coded_error
));
// Increase boost for frames where new data coming into frame (e.g. zoom out).
...
...
@@ -1204,8 +1205,8 @@ static int calc_arf_boost(VP9_COMP *cpi, int offset,
?
MIN_DECAY_FACTOR
:
decay_accumulator
;
}
boost_score
+=
(
decay_accumulator
*
calc_frame_boost
(
cpi
,
&
this_frame
,
this_frame_mv_in_out
)
)
;
boost_score
+=
decay_accumulator
*
calc_frame_boost
(
twopass
,
&
this_frame
,
this_frame_mv_in_out
);
}
*
f_boost
=
(
int
)
boost_score
;
...
...
@@ -1241,8 +1242,8 @@ static int calc_arf_boost(VP9_COMP *cpi, int offset,
?
MIN_DECAY_FACTOR
:
decay_accumulator
;
}
boost_score
+=
(
decay_accumulator
*
calc_frame_boost
(
cpi
,
&
this_frame
,
this_frame_mv_in_out
)
)
;
boost_score
+=
decay_accumulator
*
calc_frame_boost
(
twopass
,
&
this_frame
,
this_frame_mv_in_out
);
}
*
b_boost
=
(
int
)
boost_score
;
...
...
@@ -1579,8 +1580,8 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
}
// Calculate a boost number for this frame.
boost_score
+=
(
decay_accumulator
*
calc_frame_boost
(
cpi
,
&
next_frame
,
this_frame_mv_in_out
)
)
;
boost_score
+=
decay_accumulator
*
calc_frame_boost
(
twopass
,
&
next_frame
,
this_frame_mv_in_out
);
// Break out conditions.
if
(
...
...
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