myrao / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Wrong PSNR / MSE value with the latest psnr binary. SSIM value is correct though #340

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I compiled the psnr binary with the latest changes (r1021) using blaze and then 
try it out.
The following is the value that I got when I tried to do PSNR comparison

Frame    PSNR-Y      PSNR-U      PSNR-V      PSNR-All    Frame
Global: 128.000000  128.000000  128.000000  128.000000      1
Avg:    128.000000  128.000000  128.000000  128.000000      1
Min:    128.000000  128.000000  128.000000  128.000000      0

I tried to use different images (even completely different images) but I always 
get 128.0 are the result.
The same thing happened when I tried to do the comparison using MSE .
SSIM seems to be working fine.

Original issue reported on code.google.com by clifford...@google.com on 26 Jun 2014 at 1:14

GoogleCodeExporter commented 8 years ago
Can you provide command line and art?
I did find a minor issue.. the ssim is off when comparing the image to itself 
on chroma.  i think its due to odd width.

d:\src\libyuv\trunk>out\Release\psnr.exe -v -ssim c:\work\kirkland3.jpg 
c:\work\kirkland3.jpg
Size: 999x885
Frame     SSIM-Y          SSIM-U          SSIM-V          SSIM-All       Frame
    0     1.000000        0.995747        0.995747        0.998580        min
Avg:      1.000000        0.995747        0.995747        0.998580          1
Min:      1.000000        0.995747        0.995747        0.998580          0

Original comment by fbarch...@chromium.org on 26 Jun 2014 at 5:19

GoogleCodeExporter commented 8 years ago
The command line I used was:
./psnr kirkland3.jpg kirkland3.jpg

I built it from google3 using the following command:
blaze build -c opt --cpu=k8 third_party/libyuv:psnr

Original comment by clifford...@google.com on 26 Jun 2014 at 5:32

GoogleCodeExporter commented 8 years ago
if you compare the image with itself, psnr of 128 is expected.

Original comment by fbarch...@chromium.org on 26 Jun 2014 at 5:33

GoogleCodeExporter commented 8 years ago
Sorry, that was a typo.
I was not comparing the same image itself.
I was using kirkland3a.jpg for comparison.

Original comment by clifford...@google.com on 26 Jun 2014 at 5:36

GoogleCodeExporter commented 8 years ago
psnr kirkland3.jpg kirkland3a.jpg
Frame    PSNR-Y          PSNR-U          PSNR-V          PSNR-All        Frame
Global:  27.467189       27.545679       29.811606       27.794578          1
Avg:     27.467189       27.545679       29.811606       27.794578          1
Min:     27.467189       27.545679       29.811606       27.794578          0

Original comment by fbarch...@chromium.org on 26 Jun 2014 at 5:44

GoogleCodeExporter commented 8 years ago

Original comment by fbarch...@chromium.org on 27 Jun 2014 at 12:57

GoogleCodeExporter commented 8 years ago
I verified it and it works correctly now. Thanks!

Original comment by clifford...@google.com on 27 Jun 2014 at 1:10