Browse Source

avfilter/vf_psnr: avoid 64bit arithmetic in the inner loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 11 years ago
parent
commit
68f328fcdd
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavfilter/vf_psnr.c

+ 3
- 1
libavfilter/vf_psnr.c View File

@@ -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…
Cancel
Save