Skip to content

Commit cdd9b1e

Browse files
committed
vp9: fix integer overflow in vp9_highbd_post_proc
Make the same fixes to: vp9_highbd_mbpost_proc_across_ip_c() vp9_highbd_mbpost_proc_down_c() Bug: b:468736065 Change-Id: If90015b43163bf3b9f62e3d5b49d3f07e78a0b2e
1 parent ddf807a commit cdd9b1e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

vp9/common/vp9_postproc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ void vp9_highbd_mbpost_proc_across_ip_c(uint16_t *src, int pitch, int rows,
119119
uint16_t d[16];
120120

121121
for (r = 0; r < rows; r++) {
122-
int sumsq = 0;
123-
int sum = 0;
122+
int64_t sumsq = 0;
123+
int64_t sum = 0;
124124

125125
for (i = -8; i <= 6; i++) {
126126
sumsq += s[i] * s[i];
@@ -157,8 +157,8 @@ void vp9_highbd_mbpost_proc_down_c(uint16_t *dst, int pitch, int rows, int cols,
157157

158158
for (c = 0; c < cols; c++) {
159159
uint16_t *s = &dst[c];
160-
int sumsq = 0;
161-
int sum = 0;
160+
int64_t sumsq = 0;
161+
int64_t sum = 0;
162162
uint16_t d[16];
163163
const int16_t *rv2 = rv3 + ((c * 17) & 127);
164164

0 commit comments

Comments
 (0)