mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/tests/dct: Use 64bit in intermediate for error computation
Fixes: CID1500284 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
d741638042
commit
161d0aa2a8
@ -226,8 +226,8 @@ static int dct_error(const struct algo *dct, int test, int is_idct, int speed, c
|
||||
v = abs(err);
|
||||
if (v > err_inf)
|
||||
err_inf = v;
|
||||
err2_matrix[i] += v * v;
|
||||
err2 += v * v;
|
||||
err2_matrix[i] += v * (int64_t)v;
|
||||
err2 += v * (int64_t)v;
|
||||
sysErr[i] += block[i] - block1[i];
|
||||
blockSumErr += v;
|
||||
if (abs(block[i]) > maxout)
|
||||
|
Loading…
x
Reference in New Issue
Block a user