mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avfilter/vf_psnr: avoid 64bit arithmetic in the inner loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a11c16a0b0
commit
68f328fcdd
@ -94,8 +94,10 @@ void compute_images_mse(PSNRContext *s,
|
||||
uint64_t m = 0;
|
||||
|
||||
for (i = 0; i < outh; i++) {
|
||||
int m2 = 0;
|
||||
for (j = 0; j < outw; j++)
|
||||
m += pow2(main_line[j] - ref_line[j]);
|
||||
m2 += pow2(main_line[j] - ref_line[j]);
|
||||
m += m2;
|
||||
ref_line += ref_linesize;
|
||||
main_line += main_linesize;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user