Merge "Fix unsigned overflow in rd_variance_adjustment."
This commit is contained in:
commit
d37c78819a
@ -3017,9 +3017,9 @@ static void rd_variance_adjustment(VP10_COMP *cpi,
|
|||||||
? (source_variance - recon_variance)
|
? (source_variance - recon_variance)
|
||||||
: (recon_variance - source_variance);
|
: (recon_variance - source_variance);
|
||||||
|
|
||||||
var_error = (200 * source_variance * recon_variance) /
|
var_error = ((int64_t)200 * source_variance * recon_variance) /
|
||||||
((source_variance * source_variance) +
|
(((int64_t)source_variance * source_variance) +
|
||||||
(recon_variance * recon_variance));
|
((int64_t)recon_variance * recon_variance));
|
||||||
var_error = 100 - var_error;
|
var_error = 100 - var_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2831,9 +2831,9 @@ static void rd_variance_adjustment(VP9_COMP *cpi,
|
|||||||
? (source_variance - recon_variance)
|
? (source_variance - recon_variance)
|
||||||
: (recon_variance - source_variance);
|
: (recon_variance - source_variance);
|
||||||
|
|
||||||
var_error = (200 * source_variance * recon_variance) /
|
var_error = ((int64_t)200 * source_variance * recon_variance) /
|
||||||
((source_variance * source_variance) +
|
(((int64_t)source_variance * source_variance) +
|
||||||
(recon_variance * recon_variance));
|
((int64_t)recon_variance * recon_variance));
|
||||||
var_error = 100 - var_error;
|
var_error = 100 - var_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user