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
32c51e82
Commit
32c51e82
authored
May 13, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
May 13, 2014
Browse files
Merge "Inlining setup_key_frame() and setup_inter_frame()."
parents
b2904e24
889887aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_encoder.c
View file @
32c51e82
...
...
@@ -115,22 +115,6 @@ static void set_high_precision_mv(VP9_COMP *cpi, int allow_high_precision_mv) {
}
}
static
void
setup_key_frame
(
VP9_COMP
*
cpi
)
{
vp9_setup_past_independence
(
&
cpi
->
common
);
// All buffers are implicitly updated on key frames.
cpi
->
refresh_golden_frame
=
1
;
cpi
->
refresh_alt_ref_frame
=
1
;
}
static
void
setup_inter_frame
(
VP9_COMMON
*
cm
)
{
if
(
cm
->
error_resilient_mode
||
cm
->
intra_only
)
vp9_setup_past_independence
(
cm
);
assert
(
cm
->
frame_context_idx
<
FRAME_CONTEXTS
);
cm
->
fc
=
cm
->
frame_contexts
[
cm
->
frame_context_idx
];
}
static
void
setup_frame
(
VP9_COMP
*
cpi
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
// Set up entropy context depending on frame type. The decoder mandates
...
...
@@ -138,17 +122,21 @@ static void setup_frame(VP9_COMP *cpi) {
// frames where the error_resilient_mode or intra_only flag is set. For
// other inter-frames the encoder currently uses only two contexts;
// context 1 for ALTREF frames and context 0 for the others.
if
(
frame_is_intra_only
(
cm
)
||
cm
->
error_resilient_mode
)
{
vp9_setup_past_independence
(
cm
);
}
else
{
if
(
!
cpi
->
use_svc
)
cm
->
frame_context_idx
=
cpi
->
refresh_alt_ref_frame
;
}
if
(
cm
->
frame_type
==
KEY_FRAME
)
{
setup_key_frame
(
cpi
);
cpi
->
refresh_golden_frame
=
1
;
cpi
->
refresh_alt_ref_frame
=
1
;
}
else
{
if
(
!
cm
->
intra_only
&&
!
cm
->
error_resilient_mode
&&
!
cpi
->
use_svc
)
cm
->
frame_context_idx
=
cpi
->
refresh_alt_ref_frame
;
setup_inter_frame
(
cm
);
cm
->
fc
=
cm
->
frame_contexts
[
cm
->
frame_context_idx
];
}
}
void
vp9_initialize_enc
()
{
static
int
init_done
=
0
;
...
...
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