diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:36:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:36:56 +0000 |
commit | 51de1d8436100f725f3576aefa24a2bd2057bc28 (patch) | |
tree | c6d1d5264b6d40a8d7ca34129f36b7d61e188af3 /test/scale_test.h | |
parent | Initial commit. (diff) | |
download | mpv-upstream/0.37.0.tar.xz mpv-upstream/0.37.0.zip |
Adding upstream version 0.37.0.upstream/0.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/scale_test.h')
-rw-r--r-- | test/scale_test.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/scale_test.h b/test/scale_test.h new file mode 100644 index 0000000..5c83786 --- /dev/null +++ b/test/scale_test.h @@ -0,0 +1,30 @@ +#pragma once + +#include "img_utils.h" +#include "test_utils.h" +#include "video/mp_image.h" + +struct scale_test_fns { + bool (*scale)(void *ctx, struct mp_image *dst, struct mp_image *src); + bool (*supports_fmts)(void *ctx, int imgfmt_dst, int imgfmt_src); +}; + +struct scale_test { + // To be filled in by user. + const struct scale_test_fns *fns; + void *fns_priv; + const char *test_name; + const char *refdir; + const char *outdir; + + // Private. + struct mp_image *img_repack_rgb8; + struct mp_image *img_repack_rgba8; + struct mp_image *img_repack_rgb16; + struct mp_image *img_repack_rgba16; + struct mp_sws_context *sws; + int fail; +}; + +// Test color repacking between packed formats (typically RGB). +void repack_test_run(struct scale_test *stest); |