Trap divide by 0.
Trap divide by 0 that could occur with a 0 rate target in aq mode COMPLEXITY_AQ. Change-Id: I034514f512b2a0db470ae8d37ea395278bf473cf
This commit is contained in:
parent
3b83a395da
commit
c382136122
@ -380,8 +380,10 @@ static void select_in_frame_q_segment(VP9_COMP *cpi,
|
||||
segment = 0;
|
||||
}
|
||||
|
||||
complexity_metric =
|
||||
clamp((int)((projected_rate * 64) / target_rate), 16, 255);
|
||||
if (target_rate > 0) {
|
||||
complexity_metric =
|
||||
clamp((int)((projected_rate * 64) / target_rate), 16, 255);
|
||||
}
|
||||
}
|
||||
|
||||
// Fill in the entires in the segment map corresponding to this SB64
|
||||
|
Loading…
x
Reference in New Issue
Block a user