[FFmpeg-devel] [PATCH 0/2] checkasm: updated tests for sw_scale

Martin Storsjö martin at martin.st
Tue Jun 21 23:12:42 EEST 2022


On Mon, 13 Jun 2022, Swinney, Jonathan wrote:

> Here is an updated patch series for the yuv2plane[X|1] implementations 
> and tests. The checkasm test wasn't working at all for aarch64, and the 
> x86_64 behavior differs from the default implementation so I had to 
> include some code to specialize the test for x86_64. Please let me know 
> if you would like me to do that at different way.

Did you consider what I suggested in the last round - making two rounds of 
the test, one without the bitexact flag, where it's ok to be off by one 
(or some other epsilon) from the C reference, and one with the bitexact 
flag? I would presume that the currently tested x86 routines would fall 
into that category of non-bitexact. That way, you'd get exact tests for 
implementations that claim to be that, and fuzzy tests allowing minor 
differences, for such implementations. That would allow testing all 
variants without all the current horrible ifdefs, right?

> I also left in some code to print out helpful debugging messages when 
> the tests fail. I need them for my own work and thought they might be 
> useful to share, but I'm happy to remove them if you would prefer it 
> that way.

I think it's good to keep such debug printouts in the checkasm tests - the 
checkasm tests are meant for developers working on the assembly 
implementations anyway, so whenever the test fails, the printouts are 
valuable.

// Martin



More information about the ffmpeg-devel mailing list