mbox series

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

Message ID 7e24309d6e59492ca73651a372ef9b2b@EX13D07UWB004.ant.amazon.com
Headers show
Series checkasm: updated tests for sw_scale | expand

Message

Swinney, Jonathan June 13, 2022, 4:36 p.m. UTC
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.

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.

Thanks!

Jonathan Swinney

Comments

Martin Storsjö June 21, 2022, 8:12 p.m. UTC | #1
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