[FFmpeg-devel] [PATCH] Add a MAXDIST parameter to tiny_psnr (for 1-off fate tests)

Vitor Sessak vitor1001
Thu Jul 8 20:56:33 CEST 2010


On 07/08/2010 08:51 PM, Ronald S. Bultje wrote:
> Hi,
>
> On Thu, Jul 8, 2010 at 2:47 PM, Vitor Sessak<vitor1001 at gmail.com>  wrote:
>> $subj, it is necessary to get FATE to test float-based codecs (at least
>> locally through "make fate") by checking if MAXDIST == 1. Comments are
>> welcome.
> [..]
>> +            dist = a-b;
>> +            dist = dist<  0 ? -dist : dist;
>
> FFABS().

That would add a new dependency on lavu to it, what is not the case 
until now.

> More importantly, I don't think this is right, we should normalize it
> to the total signal, e.g. FFABS(a-b)/(FFABS(a)+FFABS(b)) or something
> along those lines.

If we are measuring floating-point rounding differences, for most codecs 
it is never greater than one unit. That's why it is not normalized.

-Vitor



More information about the ffmpeg-devel mailing list