Skip to content
GitLab
Menu
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
fba9772d
Commit
fba9772d
authored
Feb 22, 2013
by
James Zern
Browse files
vp8_first_pass(): avoid floating point div by 0
Change-Id: Id1e6a12db6b0c1d3f64ead8fd8834aadc30fbed2
parent
0ef72720
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp8/encoder/firstpass.c
View file @
fba9772d
...
...
@@ -858,7 +858,9 @@ skip_motion_search:
*/
if
((
cm
->
current_video_frame
>
0
)
&&
(
cpi
->
twopass
.
this_frame_stats
.
pcnt_inter
>
0
.
20
)
&&
((
cpi
->
twopass
.
this_frame_stats
.
intra_error
/
cpi
->
twopass
.
this_frame_stats
.
coded_error
)
>
2
.
0
))
((
cpi
->
twopass
.
this_frame_stats
.
intra_error
/
DOUBLE_DIVIDE_CHECK
(
cpi
->
twopass
.
this_frame_stats
.
coded_error
))
>
2
.
0
))
{
vp8_yv12_copy_frame
(
lst_yv12
,
gld_yv12
);
}
...
...
vp9/encoder/vp9_firstpass.c
View file @
fba9772d
...
...
@@ -749,7 +749,8 @@ void vp9_first_pass(VP9_COMP *cpi) {
((
cm
->
current_video_frame
>
0
)
&&
(
cpi
->
twopass
.
this_frame_stats
->
pcnt_inter
>
0
.
20
)
&&
((
cpi
->
twopass
.
this_frame_stats
->
intra_error
/
cpi
->
twopass
.
this_frame_stats
->
coded_error
)
>
2
.
0
)))
{
DOUBLE_DIVIDE_CHECK
(
cpi
->
twopass
.
this_frame_stats
->
coded_error
))
>
2
.
0
)))
{
vp8_yv12_copy_frame
(
lst_yv12
,
gld_yv12
);
cpi
->
twopass
.
sr_update_lag
=
1
;
}
else
...
...
Write
Preview
Supports
Markdown
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