[XviD-devel] Re: PSNR question/bug
Rémi Guyomarch
xvid-devel@xvid.org
Sat, 25 Jan 2003 16:05:57 +0100
On Sat, Jan 25, 2003 at 03:11:33PM +0100, Marco elcabesa Belli wrote:
> looking inside image.c i found psnr fouction, after calc of sum of (diff)^2
> you make psnr_y=255*255/result
> andthen SNR = 10 log10(psnr_y)
>
> is this right??
>
> isn't better do
>
> psnr_y =sum (diff)^2
> s= sum (original pixel) ^2
>
> snr= s/psnr;
> SNR =10 log10(snr);
Why an error of X in a realtively bright pixel whould be more
"important" than the same X error on a relatively dark pixel ?
(or the reverse, I don't recall if Y=255 means white or black)
Even if it was the case, think about Cb and Cr ...
--
Rémi