[FFmpeg-devel] [PATCH] checkasm: vvc: Use checkasm_check for printing failing output

Martin Storsjö martin at martin.st
Mon Dec 9 16:17:07 EET 2024


On Mon, 9 Dec 2024, Ronald S. Bultje wrote:

> Secondly, can we share checkasm_check_pixel in a more general location so
> other codecs can use it too?

Ideally, yes.

But the problem is in the way multi-bitdepth codecs are handled in 
ffmpeg/checkasm, compared to how it is done in dav1d. In dav1d we have the 
pixel typedefs, and each of the checkasm test files are compiled multiple 
times for each bitdepth that is enabled, so there is one, consistent 
cross-test definition of what a pixel is and what the bitdepth is, etc.

In the ffmpeg checkasm tests (and multi-bitdepth decoders), there's no 
abstraction for this, but we have DSP functions taking uint8_t*, where it 
actually is working on maybe-uint8_t-maybe-uint16_t data - depending on 
the configuration. And this macro that I'm using here (and in HEVC) 
depends on a function local variable named "bit_depth", which is handled 
separately in each test file.

So yes, we could share it, but it relies on assumptions about local 
variables that may or may not be done differently between each test. Then 
again, the issue only arises when you'd try to use the macro in another 
test file, so if someone does that, they'd notice the need for a matching 
"bit_depth" variable.

As a comparison, in dav1d's checkasm, the checkasm_check_pixel macro is 
defined in checkasm.h like this:

     #ifdef BITDEPTH
     #define checkasm_check_pixel(...) checkasm_check(PIXEL_TYPE, __VA_ARGS__)
     ...

// Martin



More information about the ffmpeg-devel mailing list