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
21a0c1f3
Commit
21a0c1f3
authored
Jan 10, 2014
by
Marco Paniconi
Committed by
Gerrit Code Review
Jan 10, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Don't use gf_update by default for 1-pass CBR."
parents
b5af9d29
c46538d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
vp9/encoder/vp9_firstpass.c
vp9/encoder/vp9_firstpass.c
+16
-0
vp9/encoder/vp9_firstpass.h
vp9/encoder/vp9_firstpass.h
+1
-0
vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_if.c
+5
-1
No files found.
vp9/encoder/vp9_firstpass.c
View file @
21a0c1f3
...
...
@@ -2029,6 +2029,22 @@ void vp9_get_one_pass_params(VP9_COMP *cpi) {
}
}
void
vp9_get_one_pass_cbr_params
(
VP9_COMP
*
cpi
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
if
((
cm
->
current_video_frame
==
0
||
cm
->
frame_flags
&
FRAMEFLAGS_KEY
||
cpi
->
rc
.
frames_to_key
==
0
||
(
cpi
->
oxcf
.
auto_key
&&
test_for_kf_one_pass
(
cpi
))))
{
cm
->
frame_type
=
KEY_FRAME
;
cpi
->
rc
.
frames_to_key
=
cpi
->
key_frame_frequency
;
}
else
{
cm
->
frame_type
=
INTER_FRAME
;
}
// Don't use gf_update by default in CBR mode.
cpi
->
rc
.
frames_till_gf_update_due
=
INT_MAX
;
cpi
->
rc
.
baseline_gf_interval
=
INT_MAX
;
}
void
vp9_get_first_pass_params
(
VP9_COMP
*
cpi
)
{
VP9_COMMON
*
const
cm
=
&
cpi
->
common
;
if
(
!
cpi
->
refresh_alt_ref_frame
&&
...
...
vp9/encoder/vp9_firstpass.h
View file @
21a0c1f3
...
...
@@ -22,6 +22,7 @@ void vp9_end_second_pass(VP9_COMP *cpi);
void
vp9_get_first_pass_params
(
VP9_COMP
*
cpi
);
void
vp9_get_one_pass_params
(
VP9_COMP
*
cpi
);
void
vp9_get_one_pass_cbr_params
(
VP9_COMP
*
cpi
);
void
vp9_get_svc_params
(
VP9_COMP
*
cpi
);
#endif // VP9_ENCODER_VP9_FIRSTPASS_H_
vp9/encoder/vp9_onyx_if.c
View file @
21a0c1f3
...
...
@@ -3250,7 +3250,11 @@ static void SvcEncode(VP9_COMP *cpi, size_t *size, uint8_t *dest,
static
void
Pass0Encode
(
VP9_COMP
*
cpi
,
size_t
*
size
,
uint8_t
*
dest
,
unsigned
int
*
frame_flags
)
{
vp9_get_one_pass_params
(
cpi
);
if
(
cpi
->
oxcf
.
end_usage
==
USAGE_STREAM_FROM_SERVER
)
{
vp9_get_one_pass_cbr_params
(
cpi
);
}
else
{
vp9_get_one_pass_params
(
cpi
);
}
encode_frame_to_data_rate
(
cpi
,
size
,
dest
,
frame_flags
);
}
...
...
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