[FFmpeg-devel] [PATCH v2] fate: add tests for psnr and ssim filter

Tobias Rapp t.rapp at noa-archive.com
Wed Aug 30 13:47:17 EEST 2017


On 30.08.2017 12:08, Nicolas George wrote:
> Le tridi 13 fructidor, an CCXXV, Tobias Rapp a écrit :
>> Metadata output is passed through an Awk script reducing precision of
>> floats to account for architecture differences (e.g x86-32 vs. x86-64).
> 
> I do not like that approach at all: it will miss small differences
> introduced inadvertently by changes, making the test less useful, but
> would detect falsely rounding differences that fall near the cutoff
> (0.499 -> 0.501).
> 
> I had posted I script to make approximate comparisons of text files; I
> still like this approach better.

It is true that the "precision" parameter of your approach can be half 
the "fuzz" parameter of my approach. Also the "precision" parameter 
would be defined per float value while this patch uses a normalized 
"fuzz" parameter that is scaled depending on the float value's exponent.

There are three considerations that made me choose the current path of 
implementation:

a) With the proposed patch it is possible to generate/update a reference 
file simply by using "make fate GEN=1".

b) Adding a test with slightly more tolerance than needed is better than 
having no test at all.

c) As far as I can see Perl is currently not a dependency for "make 
fate" and I didn't want to add it.

Regards,
Tobias



More information about the ffmpeg-devel mailing list