[x264-devel] Re: [PATCH] PSNR averages

Måns Rullgård mru at mru.ath.cx
Sun Aug 8 17:01:54 CEST 2004


Laurent Aimar <fenrir at via.ecp.fr> writes:

> On Sun, Aug 08, 2004, Måns Rullgård wrote:
>> Loren Merritt <lorenm at u.washington.edu> writes:
>> 
>> > x264 takes the arithmetic mean of frame-wise PSNRs to produce an
>> > overall PSNR. This is meaningless. (Extreme case: what do you do with a
>> > frame with no error? (infinite PSNR))
>> > This patch corrects it to calculate PSNR from the mean squared error.
>> >
>> > I also replace "PSNR/Size" (which is similarly meaningless) with
>> > "MSE*Size". This quantity is probably closer to what someone wants to
>> > measure when they think of "PSNR/Size". It also tends to be relatively
>> > constant for a given video over a wide range of QPs.)
>> 
>> Speaking of PSNRs, how much is the overhead of calculating these?  If
>> I only want encoding speed, can anything be gained by disabling some
>> calculations?
>  In encoder/encoder.c, I added a #define DEBUG_PRINT_STAT
> comment it out, and it won't print any stats.

I was thinking on a lower level.  To calculate the PSNR, the quantized
samples must be dequantized and inverse transformed, as is done in
various places.  Is the reconstructed image needed for other reasons
than statistics?  Otherwise I suppose some cycles could be gained by
skipping these steps.

-- 
Måns Rullgård
mru at mru.ath.cx

-- 
This is the x264-devel mailing-list
If you are in trouble, please contact <postmaster at videolan.org>



More information about the x264-devel mailing list