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
Guillaume Martres
aom-rav1e
Commits
034cea5e
Commit
034cea5e
authored
Jun 29, 2011
by
John Koleszar
Committed by
Code Review
Jun 29, 2011
Browse files
Merge "guard against space/time distortion"
parents
eacaabc5
bb0ca87a
Changes
1
Hide whitespace changes
Inline
Side-by-side
vpxenc.c
View file @
034cea5e
...
...
@@ -1347,6 +1347,8 @@ static void update_rate_histogram(struct rate_hist *hist,
if
(
now
<
cfg
->
rc_buf_initial_sz
)
return
;
then
=
now
;
/* Sum the size over the past rc_buf_sz ms */
for
(
i
=
hist
->
frames
;
i
>
0
&&
hist
->
frames
-
i
<
hist
->
samples
;
i
--
)
{
...
...
@@ -1358,6 +1360,9 @@ static void update_rate_histogram(struct rate_hist *hist,
sum_sz
+=
hist
->
sz
[
i_idx
];
}
if
(
now
==
then
)
return
;
avg_bitrate
=
sum_sz
*
8
*
1000
/
(
now
-
then
);
idx
=
avg_bitrate
*
(
RATE_BINS
/
2
)
/
(
cfg
->
rc_target_bitrate
*
1000
);
if
(
idx
<
0
)
...
...
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