Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| x264_quality [2014/08/17 21:43] – beandog | x264_quality [2014/08/17 21:47] (current) – beandog | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| Use SSIM or PSNR to gauge differences between encoding settings. | Use SSIM or PSNR to gauge differences between encoding settings. | ||
| + | |||
| + | ==== SSIM ==== | ||
| When comparing two values, here is the formula to discern what percentage amount something has improved. | When comparing two values, here is the formula to discern what percentage amount something has improved. | ||
| Line 50: | Line 52: | ||
| </ | </ | ||
| - | Rounding it out to an integer, would be 55, for a result of 55%. So when encoding | + | Rounding it out to an integer, would be 55, for a result of 55%. So when encoding this particular video at double the bitrate, the SSIM increases by 55%. Not bad! |
| + | |||
| + | Here's a PHP function to do the same thing: | ||
| + | |||
| + | < | ||
| + | function ssim_improvement($old_ssim, | ||
| + | |||
| + | $a = 1 - $old_ssim; | ||
| + | $b = 1 - $new_ssim; | ||
| + | |||
| + | $c = $a / $b; | ||
| + | |||
| + | $d = $c - 1; | ||
| + | |||
| + | $e = $d * 100; | ||
| + | |||
| + | return $e; | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | |||
| + | === PSNR === | ||
| + | |||
| + | Using the doom9 forum post as a reference, the equation is: | ||
| + | |||
| + | < | ||
| + | (new - old) / 0.05 = % improvement | ||
| + | </ | ||