1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

checkasm: add checkasm_check_dctcoef

This is useful for tests that compare dctcoefs which will be either 2 bytes or
4 bytes, depending on bitdepth.

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Tristan Matthews
2025-06-13 10:04:45 -04:00
committed by Michael Niedermayer
parent 8fc91ea936
commit 5ea3adfcf9

View File

@ -443,5 +443,16 @@ DECL_CHECKASM_CHECK_FUNC(int32_t);
#define checkasm_check_pixel_padded_align(...) \
checkasm_check_pixel2(__VA_ARGS__, 8)
/* This assumes that there is a local variable named "bit_depth".
* For tests that don't have that and only operate on a single
* bitdepth, just call checkasm_check(uint8_t, ...) directly. */
#define checkasm_check_dctcoef(buf1, stride1, buf2, stride2, ...) \
((bit_depth > 8) ? \
checkasm_check(int32_t, (const int32_t*)buf1, stride1, \
(const int32_t*)buf2, stride2, \
__VA_ARGS__) : \
checkasm_check(int16_t, (const int16_t*)buf1, stride1, \
(const int16_t*)buf2, stride2, \
__VA_ARGS__))
#endif /* TESTS_CHECKASM_CHECKASM_H */