Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
39f41a4f
Commit
39f41a4f
authored
Oct 14, 2010
by
Jim Bankoski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
safety check to avoid divide by 0s
parent
0f5c63e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
vp8/encoder/onyx_if.c
vp8/encoder/onyx_if.c
+3
-0
vp8/encoder/ratectrl.c
vp8/encoder/ratectrl.c
+2
-0
No files found.
vp8/encoder/onyx_if.c
View file @
39f41a4f
...
...
@@ -1420,6 +1420,9 @@ int vp8_reverse_trans(int x)
};
void
vp8_new_frame_rate
(
VP8_COMP
*
cpi
,
double
framerate
)
{
if
(
framerate
<
.
1
)
framerate
=
30
;
cpi
->
oxcf
.
frame_rate
=
framerate
;
cpi
->
output_frame_rate
=
cpi
->
oxcf
.
frame_rate
;
cpi
->
per_frame_bandwidth
=
(
int
)(
cpi
->
oxcf
.
target_bandwidth
/
cpi
->
output_frame_rate
);
...
...
vp8/encoder/ratectrl.c
View file @
39f41a4f
...
...
@@ -1481,6 +1481,8 @@ void vp8_adjust_key_frame_context(VP8_COMP *cpi)
// allocated than those following other gfs.
cpi
->
kf_overspend_bits
+=
(
cpi
->
projected_frame_size
-
cpi
->
per_frame_bandwidth
)
*
7
/
8
;
cpi
->
gf_overspend_bits
+=
(
cpi
->
projected_frame_size
-
cpi
->
per_frame_bandwidth
)
*
1
/
8
;
if
(
!
av_key_frame_frequency
)
av_key_frame_frequency
=
60
;
// Work out how much to try and recover per frame.
// For one pass we estimate the number of frames to spread it over based upon past history.
...
...
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