Commit Graph

8 Commits

Author SHA1 Message Date
Pascal Massimino
31b1e34342 fix SSIM metric ... by ignoring too-dark area
Roughly, if both the source and the reference areas are
darker too dark (R/G/B <= ~6), they are ignored.

One caveat: SSIM calculation won't work for U/V planes,
which are 128-centered and not related to luminance.
But WebPPlaneDistortion() enforces the conversion to RGB,
if needed.

Change-Id: I586c2579c475583b8c90c5baefd766b1d5aea591
2016-10-20 15:17:55 +02:00
Pascal Massimino
ba843a92e7 fix some SSIM calculations
* prevent 64bit overflow by controlling the 32b->64b conversions
  and preventively descaling by 8bit before the final multiply
* adjust the threshold constants C1 and C2 to de-emphasis the dark
  areas
* use a hat-like filter instead of box-filtering to avoid blockiness
  during averaging

SSIM distortion calc is actually *faster* now in SSE2, because of the
unrolling during the function rewrite.
The C-version is quite slower because still un-optimized.

Change-Id: I96e2715827f79d26faae354cc28c7406c6800c90
2016-10-04 01:09:07 -07:00
Pascal Massimino
fb01743a53 get_disto: fix the r/g/b order for luma calculation
Change-Id: I62be556f6254031e8c1f1a572cfdc4ea2641483b
2016-09-30 16:04:17 +02:00
Pascal Massimino
36aa087b6d get_disto: new option to compute SSIM map and convert to gray
using -ssim -o will trigger SSIM map calculation instead of add-diff map.

-gray converts the error map to intensity instead of having each channels' error separated.

Change-Id: I4bdb88880a252e5562aa4e0e3c2353ad93aef20e
2016-09-28 00:23:43 -07:00
Pascal Massimino
0de48e187d get_disto: add a '-o file' option to save a diff map
also: -scale option is useful for using the maximum range.

Change-Id: I8ede7132b08ece7d3b6f699b710ab2ef3fb0b734
2016-08-31 05:31:30 +00:00
James Zern
da573cf490 imageio_util: s/ExUtil/ImgIoUtil/
ExUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane) ->
ImgIoUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane)

Change-Id: I5497f8fe514347efeb83b8b8866ef334390fc18e
2016-07-21 20:40:11 -07:00
James Zern
bdda5bd4bf split example_util.h
move ExUtil*File to imageio_util.h
ExUtil*WebP* to webpdec.h

string parsing routines remain

Change-Id: I0560c4a74e86710d83bc4b5b234f1b5ef9a86f9d
2016-07-21 19:14:58 -07:00
skal
1e7d4401dc 'extras/get_disto' example: compute PSNR between two files
Change-Id: I40e693e52d8eb4e32b86273952dac2e5eefe6e7c
2016-07-20 16:54:28 -07:00