[MPlayer-users] PSNR Questions

D Richard Felker III dalias at aerifal.cx
Sun Feb 16 02:25:09 CET 2003


On Sat, Feb 15, 2003 at 09:42:21PM +0100, Struan Bartlett wrote:
> Objective measurement of encoding quality is really my question.
> 
> A week ago a URL (rguyom.ath.cx) was posted of a doc that compared 
> various encoding options by comparing the PSNRs reported by mencoder.
> 
> I was experimenting myself to compare the quality of a cropped movie 
> encoded at bitrate Xbps: first unscaled, but with (mplayer-only) encoded 
> aspect ratio; second, scaled according to encoding-tips.txt's procedure 
> using calcbpp.pl.
> 
> I wanted to use the reported PSNRs to objectively determine the relative 
> performance of each method, but unfortunately it appears this is not a 
> measure that works well.
> 
> 1. What's your experience of the quality of encoded cropped video at a 
> given bitrate in my two scenarios above?

Personally I would recommend scaling the movie down to 640xHHH after
cropping. If you get the resolution too low, small artifacts will
become very noticable and it will look ugly, but as long as you're
above 512xHHH, lowering the resolution will most likely improve
perceived quality. Personally I like width=640 though because it's
suited for display on TV/projectors/etc. without rescaling.

> 2. Does this invalidate the use of PSNR as an objective measure and 
> therefore the results of the rguyom.ath.cx paper?

No, it shows that you don't understand what PSNR is measuring. It's
perfectly valid for making comparisons when, and only when, the input
to the encoder (aka the signal) is the same. If you're changing the
signal by cropping or scaling, the PSNR values libavcodec gives you
will be relative to the cropped or scaled image.

If you want to compare PSNR with and without cropping, there is a way
that will work: First, encode the non-cropped version and get the
PSNR. Then, encode the cropped version. Now, you'll have to find a way
to measure the PSNR of the cropped version on your own as follows:
expand it back up to the original size, compute the difference from
the source image (signal), and use that to compute the PSNR. You'll
find that it's considerably higher than without cropping, BTW.

Similar methods can probably be used with scaling, filters, etc., but
things will definitely get more complicated.

> 3. If so, how are we to objectively measure the performance of encoding 
> parameters?

For encoding parameters, use PSNR. For comparing different sorts of
preprocessing before encoding you're probably on your own.

Rich



More information about the MPlayer-users mailing list