Log in

View Full Version : Quality metrics explained... anyone? (SIMM and PSNR)


graysky
13th April 2007, 00:34
I consulted the MSU (http://www.compression.ru/video/quality_measure/info_en.html#start) link and wikipedia to various quality metrics such as SSIM (Structural SIMilarity (http://en.wikipedia.org/wiki/SSIM))and PSNR (peak-to-peak signal-to-noise ratio (http://en.wikipedia.org/wiki/PSNR)) that I can output in x264. Also the FAQ (http://www.compression.ru/video/quality_measure/vqmt_faq_en.html#start). Can someone shed some perspective on these for me? All I was able to get out of that site is that higher values are better.

# SSIM. 1 value for 2 sequences. Higher values are better, 1 for equal frames.
# PSNR. 1 value for 2 sequences. 100 for equal frames, higher values are better.

Here is an example encode with the metrics (I used the "HQ-Slower" preset w/ DVD source):
avis [info]: 704x480 @ 23.98 fps (73284 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE 3DNow!
x264 [warning]: VBV maxrate specified, but no bufsize.
x264 [info]: slice I:613 Avg QP:17.44 size: 42980 PSNR Mean Y:46.23 U:50.54 V:51.64 Avg:47.27 Global:46.72
x264 [info]: slice P:25662 Avg QP:19.54 size: 16012 PSNR Mean Y:44.27 U:49.86 V:50.91 Avg:45.43 Global:44.28
x264 [info]: slice B:47009 Avg QP:20.96 size: 5590 PSNR Mean Y:43.52 U:49.55 V:50.60 Avg:44.74 Global:44.27
x264 [info]: mb I I16..4: 34.1% 0.0% 65.9%
x264 [info]: mb P I16..4: 20.9% 0.0% 0.0% P16..4: 66.7% 0.0% 0.0% 0.0% 0.0% skip:12.4%
x264 [info]: mb B I16..4: 1.2% 0.0% 0.0% B16..8: 23.4% 0.0% 0.0% direct:28.8% skip:46.6%
x264 [info]: final ratefactor: 20.07
x264 [info]: direct mvs spatial:99.9% temporal:0.1%
x264 [info]: SSIM Mean Y:0.9742088
x264 [info]: PSNR Mean Y:43.802 U:49.667 V:50.718 Avg:45.004 Global:44.287 kb/s:1832.27

encoded 73284 frames, 22.78 fps, 1832.33 kb/s

So my SSIM Mean is 0.974... I'm assuming that it's this a "good" value.

PSNR Mean is Y:43.8 U: 49.7 V:50.7 Ave: 45.0 Global: 44.3

Y = luminance similarity
U = contrast similarity
V = structural similarity

Again, are these numbers good? According to that FAQ these are out of 100 possible. Since my global is 44, what is that telling me about my encode? What are "bad" numbers? What are "good" numbers?

Thanks for any info and/or resources.

akupenguin
13th April 2007, 00:57
PSNR=100 is not equal, it's just very close. Infinity is equal. But many programs don't like infinities.
YUV is a colorspace, there is no contrast or structure involved.
PSNR is only mediocre at comparing two encodings of the same image, but it's really bad at measuring absolute quality. Some content looks good at PSNR=40, some content looks bad at PSNR=50.

graysky
13th April 2007, 20:46
Thanks for the info.