PSNR 算法说明
http://www.google.com/search?q=APSNR&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:zh-CN:official&client=firefox-a
WIKI
http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
EvalVid 一款开源分析工具
http://www2.tkn.tu-berlin.de/research/evalvid/fw.html
其他的商业工具包括:Elecard StreamEye Tools——VideoQE
PSNR
This metric, which is used often in practice, called peak-to-peak signal-to-noise ratio — PSNR.
where MaxErr - maximum possible absolute value of color components difference,w - video width,h - video height. Generally, this metric is equivalent to Mean Square Error, but it is more convenient to use because of logarithmic scale. It has the same disadvantages as the MSE metric.
In MSU VQMT you can calculate PSNR for all YUV and RGB components and for L component of LUV color space.
In MSU VQMT there are four PSNR implementations. "PSNR" and "APSNR" use the correct way of PSNR calculation and take maximum possible absolute value of color difference asMaxErr. But this way of calculation gives an unpleasant effect after color depth conversion. If color depth is simply increased from 8 to 16 bits, the "PSNR" and "APSNR" will change, becauseMaxErr should change according to maximum possible absolute value of color difference (255 for 8 bit components and 255 + 255/256 for 16 bit components). Thus "PSNR (256)" and "APSNR (256)" are implemented. They would not change because they use upper boundary of color difference asMaxErr. The upper boundary is 256. This approach is less correct but it is used often because it is fast. Here are the rules ofMaxErr definition:
- "PSNR" and "APSNR" - MaxErr varies on color components bits usage:
- 255 for 8 bit components
- 255 + 3/4 for 10 bit components
- 255 + 63/64 for 14 bit components
- 255 + 255/256 for 16 bit components
- 100 for L component of LUV color space
- If bits depth differs for two compared videos, then maximum bits usage is taken to selectMaxErr.
- All color space conversions are assumed to lead to 8 bit images. It means that if, for example, you are measuring R-RGB PSNR for 14 bit YUV file, then 255 will be taken asMaxErr.
- "PSNR (256)" and "APSNR (256)" - MaxErr is selected according to the next rules:
- 256 for YUV and RGB color spaces
- 100 for L component of LUV color space
This way of average PSNR calculation is used in "PSNR" and "PSNR (256)". But sometimes it is needed to take simple average of all the per frame PSNR values. "APSNR" and "APSNR (256)" are implemented for this case and calculate average PSNR by simply averaging per frame PSNR values.
The next table summarizes the differences:
|
|
|
PSNR | correct | correct |
PSNR (256) | 256 (fast, inexact) | correct |
APSNR | correct | averaging |
APSNR (256) | 256 (fast, inexact) | averaging |
Source | Processed | Y-YUV PSNR |