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
a260369a
Commit
a260369a
authored
Jan 10, 2014
by
Marco Paniconi
Committed by
Gerrit Code Review
Jan 10, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Keep buffer clipped to maximum in change_config."
parents
b6452571
193fa5c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
vp8/encoder/onyx_if.c
vp8/encoder/onyx_if.c
+6
-0
vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_if.c
+6
-0
No files found.
vp8/encoder/onyx_if.c
View file @
a260369a
...
...
@@ -1623,6 +1623,12 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf)
cpi
->
oxcf
.
maximum_buffer_size
=
rescale
((
int
)
cpi
->
oxcf
.
maximum_buffer_size
,
cpi
->
oxcf
.
target_bandwidth
,
1000
);
// Under a configuration change, where maximum_buffer_size may change,
// keep buffer level clipped to the maximum allowed buffer size.
if
(
cpi
->
bits_off_target
>
cpi
->
oxcf
.
maximum_buffer_size
)
{
cpi
->
bits_off_target
=
cpi
->
oxcf
.
maximum_buffer_size
;
cpi
->
buffer_level
=
cpi
->
bits_off_target
;
}
/* Set up frame rate and related parameters rate control values. */
vp8_new_framerate
(
cpi
,
cpi
->
framerate
);
...
...
vp9/encoder/vp9_onyx_if.c
View file @
a260369a
...
...
@@ -1302,6 +1302,12 @@ void vp9_change_config(VP9_PTR ptr, VP9_CONFIG *oxcf) {
else
cpi
->
oxcf
.
maximum_buffer_size
=
rescale
(
cpi
->
oxcf
.
maximum_buffer_size
,
cpi
->
oxcf
.
target_bandwidth
,
1000
);
// Under a configuration change, where maximum_buffer_size may change,
// keep buffer level clipped to the maximum allowed buffer size.
if
(
cpi
->
rc
.
bits_off_target
>
cpi
->
oxcf
.
maximum_buffer_size
)
{
cpi
->
rc
.
bits_off_target
=
cpi
->
oxcf
.
maximum_buffer_size
;
cpi
->
rc
.
buffer_level
=
cpi
->
rc
.
bits_off_target
;
}
// Set up frame rate and related parameters rate control values.
vp9_new_framerate
(
cpi
,
cpi
->
oxcf
.
framerate
);
...
...
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