1 #pragma once 2 3 #include "tests.h" 4 #include "video/mp_image.h" 5 6 struct scale_test_fns { 7 bool (*scale)(void *ctx, struct mp_image *dst, struct mp_image *src); 8 bool (*supports_fmts)(void *ctx, int imgfmt_dst, int imgfmt_src); 9 }; 10 11 struct scale_test { 12 // To be filled in by user. 13 const struct scale_test_fns *fns; 14 void *fns_priv; 15 const char *test_name; 16 struct test_ctx *ctx; 17 18 // Private. 19 struct mp_image *img_repack_rgb8; 20 struct mp_image *img_repack_rgba8; 21 struct mp_image *img_repack_rgb16; 22 struct mp_image *img_repack_rgba16; 23 struct mp_sws_context *sws; 24 int fail; 25 }; 26 27 // Test color repacking between packed formats (typically RGB). 28 void repack_test_run(struct scale_test *stest); 29